[XML-SIG] Re: Python Web Services and .NET - will it ever work

Joshua Boverhof JRBoverhof at lbl.gov
Tue Nov 30 20:54:42 CET 2004


The instance produced looks correct..  It's not always python that is 
the problem,
but w/o seeing the WSDL it's impossible to say.  I would guess that you are
using rpc/encoded bindings, and I'd also guess that the operation name
is "GetCity" and that .NET is incorrectly looking for "GetCityRequest" or
whatever the input message name is...


-josh


Richard Kessler wrote:

>I am using just SOAP and have tried both literal and encoded with no
>success. Initially I could not pass  parms. The .NET service complained of
>null values. I discovered using the encoded ([SoapDocumentService
>(Use=SoapBindingUse.Encoded)]   in the service allowed me to pass named
>parameters. My soap message in looks like:
>*** Outgoing SOAP ******************************************************
><?xml version="1.0" encoding="UTF-8"?>
><SOAP-ENV:Envelope
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
>xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
>xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>xmlns:xsd="http://www.w3.org/1999/XMLSchema">
><SOAP-ENV:Body>
><GetCity xmlns="http://tempuri.org" SOAP-ENC:root="1">
><mycode xsi:type="xsd:string">S1234</mycode>
></GetCity>
></SOAP-ENV:Body>
></SOAP-ENV:Envelope>
>************************************************************************
>and .NET returns:
>
>code= 500
>msg= Internal Server Error.
>headers= Server: Microsoft-IIS/5.1
>Date: Tue, 30 Nov 2004 19:34:45 GMT
>X-Powered-By: ASP.NET
>X-AspNet-Version: 1.1.4322
>Cache-Control: private
>Content-Type: text/xml; charset=utf-8
>Content-Length: 1309
>
>content-type= text/xml; charset=utf-8
>data= <?xml version="1.0" encoding="utf-8"?>
><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <soap:Body>
>    <soap:Fault>
>      <faultcode>soap:Client</faultcode>
>      <faultstring>System.Web.Services.Protocols.SoapException: Server was
>unable to read request. ---&gt; System.InvalidOperationException: There is
>an error in XML document (4, 2). ---&gt; System.InvalidOperationException:
>&lt;GetCity xmlns='http://tempuri.org'&gt; was not expected.
>   at
>Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read2_
>GetCity()
>   --- End of inner exception stack trace ---
>   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
>xmlReader, String encodingStyle)
>   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
>xmlReader)
>   at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
>   --- End of inner exception stack trace ---
>   at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
>   at System.Web.Services.Protocols.WebServiceHandler.Invoke()
>   at
>System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()</faults
>tring>
>      <detail />
>    </soap:Fault>
>  </soap:Body>
></soap:Envelope>
>
>I haven't figured out what all this means at this point, but my confidence
>level in the stability of Python talking to .NET is low (this may be my own
>lack of knowledge too, but I am not sure this is a tried and true
>technology).
>
>Thanks for your response.
>
>- Richard
>
>
>"Paul Downey" <paul.downey at whatfettle.com> wrote in message
>news:41ACBC9B.9060301 at whatfettle.com...
>  
>
>>Richard Kessler wrote:
>>    
>>
>>>Apologies if this is the wrong new group, but I have been STRUGGLING to
>>>      
>>>
>get
>  
>
>>>either SOAPpy or ZSI to successfully consume .NET web services and it
>>>      
>>>
>just
>  
>
>>>will not work. I have read a few items on the the net regarding problems
>>>others have had. I very much want to use Plone and a Python web service
>>>client to consume web services from my backend (Microsoft .NET) but if
>>>      
>>>
>the
>  
>
>>>two wont talk, I am out of luck.
>>>      
>>>
>>out of interest, when you say "consume .NET web services" are we talking
>>WSDL, or just SOAP? Is the service style 'rpc/encoded' or
>>'document/literal' ?
>>
>>-- 
>>Paul Downey
>>http://blog.whatfettle.com
>>
>>_______________________________________________
>>XML-SIG maillist  -  XML-SIG at python.org
>>http://mail.python.org/mailman/listinfo/xml-sig
>>
>>    
>>
>
>
>
>_______________________________________________
>XML-SIG maillist  -  XML-SIG at python.org
>http://mail.python.org/mailman/listinfo/xml-sig
>  
>



More information about the XML-SIG mailing list