Hi all, here is my code:
public static void main(
String[] args) throws Exception
{
URL url = new URL("http://****/WEBSERVICE");
SOAPMappingRegistry smr = new SOAPMappingRegistry ();
StringDeserializer sd = new StringDeserializer ();
smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName ("", "Result"),
null, null, sd);
smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName ("", "ResultCode"),
null, null, sd);
smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName ("", "ResultMessage"),
null, null, sd);
// define input parameters
Vector params = new Vector ();
String login = "lcbarreram";
String password = "12345678";
params.addElement(new Parameter("login", String.class, login, "http://schemas.xmlsoap.org/soap/encoding/"));
params.addElement(new Parameter("password", String.class, password, "http://schemas.xmlsoap.org/soap/encoding/"));
// 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://****/WEBSERVICE");
call.setMethodName("Autentication");
call.setEncodingStyleURI("http://schemas.xmlsoap.org/soap/encoding/");
call.setParams(params);
Response resp;
try {
resp = call.invoke(url,"");
}
catch (SOAPException e)
{
System.err.println("Caught SOAPException (" + e.getFaultCode()
+ "): " + e.getMessage());
//System.out.println(e.printStack());
return;
}
// check response
if (!resp.generatedFault())
{
Parameter ret = resp.getReturnValue();
Object value = ret.getValue();
System.out.println("ResponseCode: " + value);
Vector v = resp.getParams();
for (int i = 0; i < v.size(); i++)
{
Parameter p = (Parameter)v.elementAt(i);
System.out.println(p.getName() + ":\t" + p.getValue());
}
}
else
{
Fault fault = resp.getFault ();
System.err.println("Generated fault: ");
System.out.println(" Fault Code = " + fault.getFaultCode());
System.out.println(" Fault String = " + fault.getFaultString());
}
}
}
I get the following message
Caught SOAPException (SOAP-ENV:Client): No Deserializer found to deserialize a &
apos;
http://************/ws:sia:AutenticationReturn' using encoding
style 'null'.
what can i do?what serializer do i have to use?
thanks in advance