• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

got error when call to >net webservice from java client

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client; msg=No Deserializer found to deserialize a 'http://schemas.xmlsoap.org/soap/envelope/:Parameter' using encoding style 'null'.; targetException=java.lang.IllegalArgumentException: No Deserializer found to deserialize a 'http://schemas.xmlsoap.org/soap/envelope/:Parameter' using encoding style 'null'.]
at org.apache.soap.rpc.Call.invoke(Call.java:244)

MY CODE
-----------------



import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.*;
import org.apache.soap.encoding.SOAPMappingRegistry;
import org.apache.soap.encoding.soapenc.StringDeserializer;
import org.apache.soap.rpc.*;
import org.apache.soap.util.xml.QName;

public class Test_client {

public static void main (String[] args)
throws Exception {

System.out.println("\n\nCalling the SOAP Server to say hello\n\n");
URL url = new URL ("http://localhost/ASVWS/ASVWS.asmx?wsdl");
String name = "satya";
Call call = new Call ( );
String s="//";
String p="/";
//call.setTargetObjectURI("xmlns=http:"+s+"tempuri.org"+p);
SOAPMappingRegistry soapMappingRegistry = new SOAPMappingRegistry();
soapMappingRegistry.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://tempuri.org/", "HelloWorldResult"),null,null, new StringDeserializer());
call.setTargetObjectURI( "http://tempuri.org/");
call.setMethodName("HelloWorld");
call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
call.setSOAPMappingRegistry(soapMappingRegistry);
Vector params = new Vector ( );
params.addElement (new Parameter("name", String.class, name, "http://schemas.xmlsoap.org/soap/encoding/"));
call.setParams (params);

System.out.print("The SOAP Server says: ");

Response resp = call.invoke(url,"http://tempuri.org/HelloWorld" );

if (resp.generatedFault ( )) {
Fault fault = resp.getFault ( );
System.out.println ("\nOuch, the call failed: ");
System.out.println (" Fault Code = " + fault.getFaultCode());
System.out.println (" Fault String = " + fault.getFaultString ( ));
} else {
System.out.println("Here");
Parameter result = resp.getReturnValue ( );
System.out.print(result.getValue ( ));
System.out.println( );
}
}
}



Please any help me out on this issue

Thanks in Advance
 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please post the wsdl, as it describes how you will call the Web Service.
 
laxmidhar prad
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hany Shafik wrote:Please post the wsdl, as it describes how you will call the Web Service.




Sorry for delay

here is the WSDL



 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When posting code please use the code tags and the disable smilies option.

[ code ] [ /code ]

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic