Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Consuming .NET Web Service in Java

Status
Not open for further replies.

levyron1

Programmer
Mar 24, 2004
2
IL
Hi,

I am trying to access .net web service from jave
(sun one studio)
and i get an error msg.

this is the code:

import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;
import java.net.URL;
import java.util.*;
import java.net.URL;

public class MyClient
{

public static void main(String args) throws Exception
{

java.net.URL url = new
java.net.URL(" bgu.ac.il/webservices/user_auth henticate/authenticate.asmx);

Call call = new Call ();
call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
//namespace
call.setTargetObjectURI (" bservices");
call.setMethodName ("checkUser");

Vector params = new Vector ();
params.addElement (new Parameter("txtUsername", String.class, "username" , null));
params.addElement (new Parameter("txtPassword", String.class, "password" , null));
call.setParams (params);


Response resp = call.invoke (url, " services/checkUser");

Parameter ret = resp.getReturnValue();
String retResult = (String)ret.getValue();

System.out.println("Success, result: " + retResult);

}
}

and i am getting the error:
SOAPException fault code: SOAP-ENV:Client message: No Deserializer found to deserialize a ' using encoding style 'null'.

can someone help me please?

thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top