InterOperability issue with MS SOAP 3.0
Steve Daly <[email protected]> Thu, 5 Dec 2002 11:01:14 -0800
| Newsgroups | gmane.comp.java.enhydra.ksoap |
|---|---|
| Message-ID | <[email protected]> |
This link to a successful interop test with MS SOAP 3.0 shows that there is some way to avoid this problem. Are there any notes that go with these tests to stipulate certain programming practices that were used to get it to work? http://ksoap.enhydra.org/software/documentation/round-2-base/err_ms_soap_too lkit_3_0.html#echostring_xsd-2001 -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Thursday, December 05, 2002 12:03 AM To: [email protected] Subject: Ksoap digest, Vol 1 #236 - 4 msgs Send Ksoap mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit http://www.enhydra.org/mailman/listinfo.cgi/ksoap or, via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] When replying, please edit your Subject line so it is more specific than "Re: Contents of Ksoap digest..." Today's Topics: 1. RE: Ksoap digest, Vol 1 #235 - 2 msgs (Steve Daly) 2. RE: Ksoap digest, Vol 1 #235 - 2 msgs (Steve Daly) 3. Re: RE: Ksoap digest, Vol 1 #235 - 2 msgs (Michael Yuan) 4. Re: RE: Ksoap digest, Vol 1 #235 - 2 msgs (Michael Yuan) --__--__-- Message: 1 From: Steve Daly <[email protected]> To: "'[email protected]'" <[email protected]> Date: Wed, 4 Dec 2002 12:22:38 -0800 Subject: Ksoap: RE: Ksoap digest, Vol 1 #235 - 2 msgs Reply-To: [email protected] Here is a soap trace of the response taken while sending from XMLSpy soap debugger, not ksoap. Let me know if this must be requested by ksoap. <?xml version="1.0" encoding="UTF-8" standalone="no"?> <SOAP-ENV:Envelope xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema" xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAPSDK4:setDeviceInfoResponse xmlns:SOAPSDK4="http://tempuri.org/iAM_Registration/message/"> <Result href="#id1"/> <Size>65</Size> <docVersion>1.0</docVersion> <RegInfoDoc>RIM.5810.11223344</RegInfoDoc> </SOAPSDK4:setDeviceInfoResponse> <SOAPSDK5:RegInfoResult xmlns:SOAPSDK5="http://tempuri.org/iAM_Registration/type/" id="id1" SOAPSDK3:root="0"> <resultCode>4</resultCode> <description>Missing required Key value</description> <encryption/> <serverVersion SOAPSDK2:nil="true"/> <regURL SOAPSDK2:nil="true"/> </SOAPSDK5:RegInfoResult> </SOAP-ENV:Body> </SOAP-ENV:Envelope> -- __--__-- Message: 1 From: Steve Daly <[email protected]> To: "'[email protected]'" <[email protected]> Date: Tue, 3 Dec 2002 09:51:42 -0800 Subject: Ksoap: Types map to SoapPrimitive, not Java type Reply-To: [email protected] The complextype below, taken from a .wsdl file produced by MSSOAP toolkit 3.0, is a response structure. In my client ksoap app, I use getProperty on the returned SoapObject and find that the elements are SoapPrimitive and I can't cast to the related java types Short, String... I have tried using Classmap(true) to cover any possible version mismatch though I believe the client and server are at the same version. Also, I'm looking to better understand the use of Classmap - something more than the api javadoc. Also, I'm not sure how to handle the base64Binary element. <complexType name ='RegInfoResult'> <sequence> <element name='resultCode' type='short'/> <element name='description' type='string'/> <element name='encryption' type='base64Binary'/> <element name='serverVersion' type='string'/> <element name='regURL' type='string'/> </sequence> </complexType> Thanks for any help steve -- __--__-- Message: 2 Date: Tue, 3 Dec 2002 11:56:47 -0600 (CST) From: Michael Yuan <[email protected]> To: "'[email protected]'" <[email protected]> Subject: Re: Ksoap: Types map to SoapPrimitive, not Java type Reply-To: [email protected] Can you show us the actual XML stream received by your parser. Microsoft seems to have some non-standard namespace (or omit namespace) problems. In the meanwhile, how use ClassMap in kSOAP v1.2 is discuss in my JavaWorld article: http://www.javaworld.com/javaworld/jw-08-2002/jw-0823-wireless.html cheers Michael ---------------------------------------------------------------------------- Read Michael Yuan's technology articles http://www.enterprisej2me.com/articles.php Dr. Dobbs Journal, JavaWorld, IBM developerWorks and more ... ---------------------------------------------------------------------------- On Tue, 3 Dec 2002, Steve Daly wrote: > The complextype below, taken from a .wsdl file produced by MSSOAP toolkit > 3.0, is a response structure. In my client ksoap app, I use getProperty on > the returned SoapObject and find that the elements are SoapPrimitive and I > can't cast to the related java types Short, String... I have tried using > Classmap(true) to cover any possible version mismatch though I believe the > client and server are at the same version. > > Also, I'm looking to better understand the use of Classmap - something more > than the api javadoc. > > Also, I'm not sure how to handle the base64Binary element. > > > <complexType name ='RegInfoResult'> > <sequence> > <element name='resultCode' type='short'/> > <element name='description' type='string'/> > <element name='encryption' type='base64Binary'/> > <element name='serverVersion' type='string'/> > <element name='regURL' type='string'/> > </sequence> > </complexType> > > Thanks for any help > steve > _______________________________________________ > Ksoap mailing list > [email protected] > http://www.enhydra.org/mailman/listinfo.cgi/ksoap > -- __--__-- _______________________________________________ Ksoap mailing list [email protected] http://www.enhydra.org/mailman/listinfo.cgi/ksoap End of Ksoap Digest --__--__-- Message: 2 From: Steve Daly <[email protected]> To: "'[email protected]'" <[email protected]> Date: Wed, 4 Dec 2002 12:37:56 -0800 Subject: Ksoap: RE: Ksoap digest, Vol 1 #235 - 2 msgs Reply-To: [email protected] I see the lack of type information such as that I took from another service below. Is this a known MSSOAP issue? Is there a work-around? ENC="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <cc2:getSummaryResponse xmlns:cc2="capeconnect:AirportWeather:Station" SOAP-ENC:root="1"> <return xsi:type="cc1:WeatherSummary"> <location xsi:type="xsd:string">San Franc</location> <wind xsi:type="xsd:string">from the E (090 degrees) at 3 MPH (3 KT)</wind> <sky xsi:type="xsd:string">clear</sky> <temp xsi:type="xsd:string">55.9 F (13.3 C)</temp> <humidity xsi:type="xsd:string">77%</humidity> <pressure xsi:type="xsd:string">30.29 in. Hg (1025 hPa)</pressure> <visibility xsi:type="xsd:string">4 mile(s)</visibility> </return> </cc2:getSummaryResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> --__--__-- Message: 3 Date: Wed, 4 Dec 2002 14:58:14 -0600 (CST) From: Michael Yuan <[email protected]> To: Steve Daly <[email protected]> cc: "'[email protected]'" <[email protected]> Subject: Re: Ksoap: RE: Ksoap digest, Vol 1 #235 - 2 msgs Reply-To: [email protected] Yes, the previous message dump you posted omits xsi:type="xsd:string". This is a known issue with Microsoft. You can twick your .NET server to make it sending correct SOAP messages. (I do not know exactly how. But search this mailing list, someone has done it before). Or you can wait for kSOAP v2.0. It will have a "dotNet" swtich which allows the parser to use non-standard .NET conventions. cheers Michael On Wed, 4 Dec 2002, Steve Daly wrote: > I see the lack of type information such as that I took from another service > below. Is this a known MSSOAP issue? Is there a work-around? > > ENC="http://schemas.xmlsoap.org/soap/encoding/"> > <SOAP-ENV:Body > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> > <cc2:getSummaryResponse > xmlns:cc2="capeconnect:AirportWeather:Station" SOAP-ENC:root="1"> > <return xsi:type="cc1:WeatherSummary"> > <location xsi:type="xsd:string">San > Franc</location> > <wind xsi:type="xsd:string">from the E (090 > degrees) at 3 MPH (3 KT)</wind> > <sky xsi:type="xsd:string">clear</sky> > <temp xsi:type="xsd:string">55.9 F (13.3 > C)</temp> > <humidity > xsi:type="xsd:string">77%</humidity> > <pressure xsi:type="xsd:string">30.29 in. Hg > (1025 hPa)</pressure> > <visibility xsi:type="xsd:string">4 > mile(s)</visibility> > </return> > </cc2:getSummaryResponse> > </SOAP-ENV:Body> > </SOAP-ENV:Envelope> > _______________________________________________ > Ksoap mailing list > [email protected] > http://www.enhydra.org/mailman/listinfo.cgi/ksoap > --__--__-- Message: 4 Date: Wed, 4 Dec 2002 15:22:14 -0600 (CST) From: Michael Yuan <[email protected]> To: Steve Daly <[email protected]> cc: "'[email protected]'" <[email protected]> Subject: Re: Ksoap: RE: Ksoap digest, Vol 1 #235 - 2 msgs Reply-To: [email protected] On a second thought, maybe we should use Apache Axis's approach for "untyped" return values. It uses something like: call.setReturnType( org.apache.axis.Constants.XSD_STRING ); to set the default return type. cheers Michael On Wed, 4 Dec 2002, Michael Yuan wrote: > Yes, the previous message dump you posted omits xsi:type="xsd:string". > This is a known issue with Microsoft. You can twick your .NET server to > make it sending correct SOAP messages. (I do not know exactly how. But > search this mailing list, someone has done it before). > > Or you can wait for kSOAP v2.0. It will have a "dotNet" swtich which > allows the parser to use non-standard .NET conventions. > > cheers > Michael > > On Wed, 4 Dec 2002, Steve Daly wrote: > > > I see the lack of type information such as that I took from another service > > below. Is this a known MSSOAP issue? Is there a work-around? > > > > ENC="http://schemas.xmlsoap.org/soap/encoding/"> > > <SOAP-ENV:Body > > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> > > <cc2:getSummaryResponse > > xmlns:cc2="capeconnect:AirportWeather:Station" SOAP-ENC:root="1"> > > <return xsi:type="cc1:WeatherSummary"> > > <location xsi:type="xsd:string">San > > Franc</location> > > <wind xsi:type="xsd:string">from the E (090 > > degrees) at 3 MPH (3 KT)</wind> > > <sky xsi:type="xsd:string">clear</sky> > > <temp xsi:type="xsd:string">55.9 F (13.3 > > C)</temp> > > <humidity > > xsi:type="xsd:string">77%</humidity> > > <pressure xsi:type="xsd:string">30.29 in. Hg > > (1025 hPa)</pressure> > > <visibility xsi:type="xsd:string">4 > > mile(s)</visibility> > > </return> > > </cc2:getSummaryResponse> > > </SOAP-ENV:Body> > > </SOAP-ENV:Envelope> > > _______________________________________________ > > Ksoap mailing list > > [email protected] > > http://www.enhydra.org/mailman/listinfo.cgi/ksoap > > > > --__--__-- _______________________________________________ Ksoap mailing list [email protected] http://www.enhydra.org/mailman/listinfo.cgi/ksoap End of Ksoap Digest