ws-soap-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bhaskar Rao" <bhask...@global.com>
Subject Error using Java client to access .NET Web service.
Date Wed, 23 Jan 2002 06:59:54 GMT
We are using the apache SOAP toolkit v2.1 to develop a JAVA client that
accesses a Web service built using .NET [C#].

When the client is executed the following exception is encountered -

(SOAP-ENV:Client): No Deserializer found to deserialize a
'http://schemas.xmlsoap.org/soap/envelope/:Parameter' using encoding
style 'null'.

We are able to debug and ensure that the web service is indeed being
exeuted. The exception is caught as a result [after the execution of the
only statement in the method] of the invocation of the method on the Web
Service.

Could anyone please help us identify what the problem possibly could be.
Would appreciate your help!!

The WEB service returns a double value.

Thanks in Advance!!!!

regards,
Bhaskar
bhaskarr@global.com
www.global.com

The relevant code portions in the client are:


    URL url = new URL
("http://localhost:8080/TempConvert1/Service1.asmx?wsdl");

    SOAPMappingRegistry smr = new SOAPMappingRegistry ();
    DoubleDeserializer dbSerlzer = new DoubleDeserializer ();
    smr.mapTypes (Constants.NS_URI_SOAP_ENC,    new QName ("",
"Result"), null, null, dbSerlzer);

    // 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://localhost/TempConvert1/Service1");
   call.setMethodName("AddNumbers");
   call.setEncodingStyleURI
("http://schemas.xmlsoap.org/soap/encoding/");

  
 
  Vector params = new Vector();
  params.addElement(new Parameter("NumberOne", Double.class, "10",
null));
  params.addElement(new Parameter("NumberTwo", Double.class, "25",
null));
  call.setParams(params); 
  System.out.println("call    --  "+call.buildEnvelope());
   Response resp = null;
   try 
  {
      resp =  call.invoke (url,
"http://BhaskarWalkthrough/XmlWebServices/AddNumbers"); 
  } 
   catch (SOAPException e) 
  {
   System.err.println("Caught SOAPException (" + e.getFaultCode () + "):
" + e.getMessage ()); 
   return;
  }

Mime
View raw message