You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by "Sampige, Srinivas" <Sr...@PSS.Boeing.com> on 2001/03/21 23:50:53 UTC
deserializing exception
Hi
Iam getting a deserializing exception when trying to parse the result that iam getting from calling a Method in a COM web service deployed using MS SOAP on IIS .The error in my apache java client is :
-----------------------------
SOAPException= SOAP-ENV:Client, No Deserializer found to deserialize a ':Result' using encoding style 'http://schemas.xmlsoap.org/soap/encoding/'.
------------------------------
Here is the result packet that is being sent from the
service (i pulled this out from the trace utility available with MS SOAP ) :
----------------------------------------
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Tue, 20 Mar 2001 23:53:53 GMT
Connection: Keep-Alive
Content-Length: 367
Content-Type: text/xml
Cache-control: private
<?xml version="1.0" encoding="UTF-8" standalone="no"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><m:sEchoResponse xmlns:m="http://tempuri.org/message/"><Result>Echoing input value - 10.00</Result></m:sEchoResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
-----------------------------------------
Here is the reply i got from posting in the MS SOAP users mailing list :
-----------------------------------------
You need to use Apache SOAP 2.1 and provide type mapping information to the
client classes. I don't know exactly how to do this, you'll have to get
support from the Apache SOAP mail list.
== Mike ==
-----------------------------------------------
Any clues ??
thanks
Srinivas
RE: deserializing exception
Posted by Silvio Fiorito <si...@ntr.net>.
Someone had the same problem last week. Here's the msg I sent them (note
that you MUST have the tempuri.org junk, it's not an actual URL, just a
place holder I believe [as in temp URI]):
Anyways, let's say you have a COM object "SOAPTest.TestClass" and you'd like
to call method "TestMethod" which takes one string parameter named
"strParam1" and returns a string. Here's what you do (I'm using the
'guidgen' sample as a basis):
Vector params = new Vector();
URL url = new
URL("http://localhost/path_to_wsdl_generated_asp_file.asp");
// define deserializers for the return things (without xsi:type)
SOAPMappingRegistry smr = new SOAPMappingRegistry ();
StringDeserializer sd = new StringDeserializer ();
smr.mapTypes (Constants.NS_URI_SOAP_ENC, new QName("", "Result"), null,
null, sd);
// create the transport and set parameters
SOAPHTTPConnection st = new SOAPHTTPConnection();
// build the call.
Call call = new Call ();
call.setSOAPTransport(st);
call.setSOAPMappingRegistry (smr);
call.setTargetObjectURI ("http://tempuri.org/message/");
call.setMethodName("TestMethod");
call.setEncodingStyleURI ("http://schemas.xmlsoap.org/soap/encoding/");
params.addElement(new Parameter("strParam1", String.class, "A", null));
call.setParams(params);
// invoke it
Response resp;
resp = call.invoke (url,
"http://tempuri.org/action/TestClass.TestMethod");
I think that should do it. I just got it working today. Email me directly if
you're still having problems (unless the other list members don't mind the
traffic).
Silvio
-----Original Message-----
From: Sampige, Srinivas [mailto:Srinivas.Sampige@PSS.Boeing.com]
Sent: Wednesday, March 21, 2001 5:51 PM
To: 'soap-user@xml.apache.org'
Subject: deserializing exception
Hi
Iam getting a deserializing exception when trying to parse the result that
iam getting from calling a Method in a COM web service deployed using MS
SOAP on IIS .The error in my apache java client is :
-----------------------------
SOAPException= SOAP-ENV:Client, No Deserializer found to deserialize a
':Result' using encoding style 'http://schemas.xmlsoap.org/soap/encoding/'.
------------------------------
Here is the result packet that is being sent from the
service (i pulled this out from the trace utility available with MS SOAP ) :
----------------------------------------
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Tue, 20 Mar 2001 23:53:53 GMT
Connection: Keep-Alive
Content-Length: 367
Content-Type: text/xml
Cache-control: private
<?xml version="1.0" encoding="UTF-8" standalone="no"?><SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><m
:sEchoResponse xmlns:m="http://tempuri.org/message/"><Result>Echoing input
value - 10.00</Result></m:sEchoResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
-----------------------------------------
Here is the reply i got from posting in the MS SOAP users mailing list :
-----------------------------------------
You need to use Apache SOAP 2.1 and provide type mapping information to the
client classes. I don't know exactly how to do this, you'll have to get
support from the Apache SOAP mail list.
== Mike ==
-----------------------------------------------
Any clues ??
thanks
Srinivas
RE: deserializing exception
Posted by Silvio Fiorito <si...@ntr.net>.
Someone had the same problem last week. Here's the msg I sent them (note
that you MUST have the tempuri.org junk, it's not an actual URL, just a
place holder I believe [as in temp URI]):
Anyways, let's say you have a COM object "SOAPTest.TestClass" and you'd like
to call method "TestMethod" which takes one string parameter named
"strParam1" and returns a string. Here's what you do (I'm using the
'guidgen' sample as a basis):
Vector params = new Vector();
URL url = new
URL("http://localhost/path_to_wsdl_generated_asp_file.asp");
// define deserializers for the return things (without xsi:type)
SOAPMappingRegistry smr = new SOAPMappingRegistry ();
StringDeserializer sd = new StringDeserializer ();
smr.mapTypes (Constants.NS_URI_SOAP_ENC, new QName("", "Result"), null,
null, sd);
// create the transport and set parameters
SOAPHTTPConnection st = new SOAPHTTPConnection();
// build the call.
Call call = new Call ();
call.setSOAPTransport(st);
call.setSOAPMappingRegistry (smr);
call.setTargetObjectURI ("http://tempuri.org/message/");
call.setMethodName("TestMethod");
call.setEncodingStyleURI ("http://schemas.xmlsoap.org/soap/encoding/");
params.addElement(new Parameter("strParam1", String.class, "A", null));
call.setParams(params);
// invoke it
Response resp;
resp = call.invoke (url,
"http://tempuri.org/action/TestClass.TestMethod");
I think that should do it. I just got it working today. Email me directly if
you're still having problems (unless the other list members don't mind the
traffic).
Silvio
-----Original Message-----
From: Sampige, Srinivas [mailto:Srinivas.Sampige@PSS.Boeing.com]
Sent: Wednesday, March 21, 2001 5:51 PM
To: 'soap-user@xml.apache.org'
Subject: deserializing exception
Hi
Iam getting a deserializing exception when trying to parse the result that
iam getting from calling a Method in a COM web service deployed using MS
SOAP on IIS .The error in my apache java client is :
-----------------------------
SOAPException= SOAP-ENV:Client, No Deserializer found to deserialize a
':Result' using encoding style 'http://schemas.xmlsoap.org/soap/encoding/'.
------------------------------
Here is the result packet that is being sent from the
service (i pulled this out from the trace utility available with MS SOAP ) :
----------------------------------------
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Tue, 20 Mar 2001 23:53:53 GMT
Connection: Keep-Alive
Content-Length: 367
Content-Type: text/xml
Cache-control: private
<?xml version="1.0" encoding="UTF-8" standalone="no"?><SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><m
:sEchoResponse xmlns:m="http://tempuri.org/message/"><Result>Echoing input
value - 10.00</Result></m:sEchoResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
-----------------------------------------
Here is the reply i got from posting in the MS SOAP users mailing list :
-----------------------------------------
You need to use Apache SOAP 2.1 and provide type mapping information to the
client classes. I don't know exactly how to do this, you'll have to get
support from the Apache SOAP mail list.
== Mike ==
-----------------------------------------------
Any clues ??
thanks
Srinivas