wood burning stoves 2.0*
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
JavaRanch » Java Forums » Java » Web Services
Bookmark "problem with SOAP" Watch "problem with SOAP" New topic

problem with SOAP


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.setSOAPMappingRegistry (smr);

Response resp;
try {
resp = call.invoke(url,"");
catch (SOAPException e)
System.err.println("Caught SOAPException (" + e.getFaultCode()
+ "): " + e.getMessage());

// 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());
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
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: problem with SOAP
Similar Threads
whats wrong with this ??? ASP.NET service and Java Client
got error when call to >net webservice from java client
SOAP literal xml serialization
Apache SOAP cant understand Reponse From Dot.net server
internal method call.getEnvelopeString() fails. unable to identify cause of failure