xml - Unwrapping responses on WCF with XmlSerializer and Soap with RPC Literal -


i´m trying consume soap 1.1 web service wcf. after generating proxies svcutil wsdl definition, found responses null.

it seems service uses rpc literal wcf fallbacks using xmlserializer. here wsdl definition:

<wsdl:definitions xmlns:typens="http://www.myservice.es/schemas" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetnamespace="http://www.myservice.es/schemas">  <wsdl:types>     <xsd:schema xmlns="http://www.w3.org/2001/xmlschema" targetnamespace="http://www.myservice.es/schemas">         <xsd:include schemalocation="../xsd/myservicetypes.xsd"/>                </xsd:schema> </wsdl:types> <message name="servicerequest"/> <message name="serviceresponse">     <part name="servicereturn" type="typens:datetimeresponse"/> </message> <porttype name="queryservicedatetimeport">     <operation name="queryservicedatetime">         <input message="typens:servicerequest"/>         <output message="typens:serviceresponse"/>     </operation> </porttype> <binding name="queryservicedatetimebinding" type="typens:queryservicedatetimeport">     <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>     <operation name="queryservicedatetime">         <soap:operation soapaction="urn:queryservicedatetime"/>         <input>             <soap:body use="literal" encodingstyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.myservice.es/schemas"/>         </input>         <output>             <soap:body use="literal" encodingstyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.myservice.es/schemas"/>         </output>     </operation> </binding> <service name="queryservicedatetimeservice">     <port name="queryservicedatetimeport" binding="typens:queryservicedatetimebinding">         <soap:address location="https://www.tests.com"/>     </port> </service> 

however, service returns response:

<soap-env:envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">    <soap-env:header/>    <soap-env:body>       <serviceresponse>          <servicereturn>             <datetime v="2013-04-20t01:13:22.001" xmlns="http://www.myservice.es/schemas"/>          </servicereturn>       </serviceresponse>    </soap-env:body> </soap-env:envelope> 

both wcf , soapui expect , element named queryservicedatetimeresponse instead or before serviceresponse, fail deserialize or validate response.

how can make wcf reconice response , deserialize it? can mark proxies anyway unwrap element?

i should note can't use messagecontract in scenario incompatible rpc - literal.

as found in post ( http://msdn.microsoft.com/en-us/library/ms996466.aspx), can switch document - literal.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -