I'm use ksoap2 to connect webservice - WCF. but java has exception : "java.io.IOException: Server returned HTTP response code: 415 for URL: http:// localhost:2967/SAT_Service.svc"."
My method:
public static String SOAP_ACTION = "http://tempuri.org/SAT_IService/";
public static String NAMESPACE = "http://tempuri.org/";
public static String URL="http://localhost:2967/SAT_Service.svc";
public static String GetString(String name)
{
String rs="";
request=new SoapObject(NAMESPACE,name);
SoapSerializationEnvelope envelope =
new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet=true;
envelope.setOutputSoapObject(request);
HttpTransportSE transp=null;
transp=new HttpTransportSE(URL);
try
{
transp.call(SOAP_ACTION+name, envelope);
Object rsl=envelope.getResponse();
rs=rsl.toString();
}catch(Exception ex)
{
ex.printStackTrace();
}
return rs;
}
What exception mean? How Java (use ksoap2) connect and call method webservice have session in WCF ? Thks