c# - WCF SOAP XML as Datasource for SSRS -
i have wcf service returns data ssrs. not able call interface method in ssrs rdl
.
error in deserializing body of request message operation 'catreport'. operationformatter encountered invalid message body. expected find node type 'element' name 'parameterclass' , namespace 'http://tempuri.org/'. found node type 'element' name 'catreport' , namespace 'http://tempuri.org/' (mscorlib)
interface code in wcf
[servicecontract] public interface iservice1 { [operationcontract] responsecontr catreport(parameterclass bbb); }
parameterclass
[messagecontract(iswrapped = true)] public class parameterclass { [messagebodymember] public string informationtype { get; set; } [messagebodymember] public string itemlocation { get; set; } [messagebodymember] }
responsecontr
[messagecontract(iswrapped = true)] public class responsecontr { [messagebodymember] public list<book> books { get; set; } }
book class
[datacontract] public class book { [datamember] public string type { get; set; } [datamember] public int noofcopies { get; set; } }
web.config
<system.servicemodel> <client> <endpoint address="" binding="basichttpbinding" bindingconfiguration="basichttpbinding" contract="reportingservice.iservice1" name="basichttpbinding" /> </client> <diagnostics> <messagelogging logentiremessage="true" logmessagesatservicelevel="false" logmessagesattransportlevel="false" logmalformedmessages="true" maxmessagestolog="5000" maxsizeofmessagetolog="2000"> </messagelogging> </diagnostics> <behaviors> <servicebehaviors> <behavior name="reportingservice.libraryservicebehavior"> <servicemetadata httpgetenabled="true" /> <servicedebug includeexceptiondetailinfaults="true" /> </behavior> </servicebehaviors> </behaviors> <bindings> <basichttpbinding> <binding name="basichttpbinding" allowcookies="true" maxbufferpoolsize="2147483647" maxbuffersize="2147483647" maxreceivedmessagesize="2147483647"> <readerquotas maxdepth="2147483647" maxstringcontentlength="2147483647" maxarraylength="2147483647" /> </binding> </basichttpbinding> </bindings> <services> <service behaviorconfiguration="reportingservice.libraryservicebehavior" name="reportingservice.service1"> <endpoint address="" binding="basichttpbinding" name="basichttpbinding" bindingconfiguration="basichttpbinding" contract="reportingservice.iservice1"> <identity> <dns value="localhost" /> </identity> </endpoint> <endpoint address="mex" binding="mexhttpbinding" contract="imetadataexchange" /> </service> </services> <!--<behaviors> <servicebehaviors> <behavior> --> <!-- avoid disclosing metadata information, set values below false before deployment --> <!-- <servicemetadata httpgetenabled="true" httpsgetenabled="true" /> --> <!-- receive exception details in faults debugging purposes, set value below true. set false before deployment avoid disclosing exception information --> <!-- <servicedebug includeexceptiondetailinfaults="false" /> </behavior> </servicebehaviors> </behaviors>--> <protocolmapping> <add binding="basichttpsbinding" scheme="https" /> </protocolmapping> <servicehostingenvironment aspnetcompatibilityenabled="true" multiplesitebindingsenabled="true" />
implement interface
public class service1 : iservice1 { public responsecontr catreport(parameterclass bbb) { return _clc.cataloguelist(bbb); } }
rdl dataset query
<query> <method namespace="http://tempuri.org/" name="catreport"> </method> <soapaction>http://tempuri.org/iservice1/catreport</soapaction> </query>
any problem highly appreciated.
Comments
Post a Comment