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