aspose file tools*
The moose likes Web Services and the fly likes problem with SOAP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "problem with SOAP" Watch "problem with SOAP" New topic
Author

problem with SOAP

Carlillo
Greenhorn

Joined: Sep 21, 2004
Posts: 1
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
 
Don't get me started about those stupid light bulbs.
 
subject: problem with SOAP