Re: SOAP Response Not De-Serializing to .NET Proxy Class
Paul Johansen <[email protected]> Tue, 16 Mar 2004 15:42:46 -0600
| Newsgroups | gmane.comp.windows.devel.soap.general |
|---|---|
| Message-ID | <FF20B92A240F46429E60FD2AF4ACDE2401EB818A@mwmktomail01.midwestwireless.com> |
Of course as soon as I send out a request, the answer becomes immediately apparent. The namespace that the type being returned in the SOAP envelope was different than how it was being sent in. Sorry for the unnessary post. -----Original Message----- From: Discussion of implementing SOAP applications today [mailto:[email protected]] On Behalf Of Paul Johansen Sent: Tuesday, March 16, 2004 3:21 PM To: [email protected] Subject: [SOAP] SOAP Response Not De-Serializing to .NET Proxy Class I am using .NET to consume a rpc/encoded Web service that is written in Java and exposed via Axis. Everything seems to work fine for any method that doesn't return anything, but one of the methods returns a complex type as shown below from the WSDL: <schema targetNamespace=3D"http://domain.provision.mms.services.ericsson.com" xmlns=3D"http://www.w3.org/2001/XMLSchema"> <import namespace=3D"http://schemas.xmlsoap.org/soap/encoding/"/> <complexType name=3D"Subscriber"> <sequence> <element name=3D"mmlUserPwd" nillable=3D"true" = type=3D"xsd:string"/> <element name=3D"mmlContactEmail" nillable=3D"true" = type=3D"xsd:string"/> <element name=3D"isPorted" type=3D"xsd:boolean"/> <element name=3D"mmlNotifEmail" nillable=3D"true" = type=3D"xsd:string"/> <element name=3D"subNumber" nillable=3D"true" type=3D"xsd:string"/> <element name=3D"terminalModel" nillable=3D"true" = type=3D"xsd:string"/> <element name=3D"deliveryMethod" nillable=3D"true" = type=3D"xsd:string"/> <element name=3D"displayName" nillable=3D"true" = type=3D"xsd:string"/> <element name=3D"allowMT" type=3D"xsd:boolean"/> =20 </sequence> </complexType> </schema> The SOAP request goes through fine and here is the SOAP envelope that is returned: <?xml version=3D"1.0" encoding=3D"UTF-8"?> <soapenv:Envelope xmlns:soapenv=3D"http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema" xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <ns1:searchSubscriberResponse soapenv:encodingStyle=3D"http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1=3D"urn:Web"> <ns1:searchSubscriberReturn href=3D"#id0"/> </ns1:searchSubscriberResponse> <multiRef id=3D"id0" soapenc:root=3D"0" soapenv:encodingStyle=3D"http://schemas.xmlsoap.org/soap/encoding/" xsi:type=3D"ns2:Subscriber" xmlns:soapenc=3D"http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2=3D"urn:AxisActionManager"> <mmlUserPwd xsi:type=3D"xsd:string" xsi:nil=3D"true"/> <mmlContactEmail xsi:type=3D"xsd:string" xsi:nil=3D"true"/> <isPorted xsi:type=3D"xsd:boolean">false</isPorted> <mmlNotifEmail xsi:type=3D"xsd:string" xsi:nil=3D"true"/> <subNumber xsi:type=3D"xsd:string">15555555555</subNumber> <terminalModel xsi:type=3D"xsd:string" xsi:nil=3D"true"/> <deliveryMethod xsi:type=3D"xsd:string">mms</deliveryMethod> <displayName xsi:type=3D"xsd:string" xsi:nil=3D"true"/> <allowMT = xsi:type=3D"xsd:boolean">false</allowMT> </multiRef> </soapenv:Body> </soapenv:Envelope> But an error happens in the proxy class stating that a valid cast cannot be made. Any Suggestions? Thanks! Paul