Reputation: 1009
I'm trying to use HttpsTransportSE in Ksoap, but I get a URISyntaxException, saying I've got a Malformed IPV6 address- which I guess makes sense as I'm passing a URL... but how do I fix it?
I found a similar query here but this relates to the Http as opposed to Https class and I don't have the overloaded method described.
I'm new to SOAP but my code so far is along the lines of:
String SOAP_ACTION = "http://url.to.thingy";
String METHOD_NAME = "methodNameFromAsmx";
String NAMESPACE = "http://the.namespace";
String URL = ServerName;
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("Address", UserName);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet=true;
envelope.setOutputSoapObject(request);
HttpsTransportSE androidHttpTransport = new HttpsTransportSE(URL, 443, "/relative/pathToAsmx", 5000);
androidHttpTransport.call(SOAP_ACTION, envelope);
I've replaced the various properties with fudge for now as I'm hoping it's not relevant. My error shows the malformed IPV6 as: https:%2F%2Fmy.url.com
Upvotes: 3
Views: 2798
Reputation: 3439
Use this format,
private static final String NAMESPACE = "http://tempuri.org/";
private static final String URL = "192.168.30.8";
private static final String SERVICE = "/Wcf.WCF_.svc?wsdl";
private static String SOAP_ACTION = "http://tempuri.org/iWCF/";
Upvotes: 0