pmzlin,
Not sure whether this has been answered.
Is some_namespace visible to your emulator.
Browse it from the web browser.
FWIW: I would be using JSON (easier and less verbose; dead easy from WCF)...
Nic

> Date: Wed, 2 Feb 2011 05:51:19 -0800
> Subject: [android-developers] wcf connection over https using ksoap2
> From: [email protected]
> To: [email protected]
> 
> Helo friends,
> 
> I am developing application for android which communicate with wcf
> over https. I am using ksoap2 (I know the best way is REST) for
> communicate  with wcf service. Service is on server with certificate
> which is not self-signed it is correct signed certificate
> my code:
>         String NAMESPACE = "urn:http://some_namespace/IService1/";;
>         String METHOD_NAME = "TestMethod";
>         String SOAP_ACTION = "urn:http://some_namespace/IService1/
> TestMethod";
>         String URL = "some_hostname/AndroidWCF/
> AndroidWCF.Service1.svc";   //protocol is solved by class
> KeepAliveHttpsTransportSE
>         org.ksoap2.transport.KeepAliveHttpsTransportSE test = new
> org.ksoap2.transport.KeepAliveHttpsTransportSE(URL, 443, "", 1000);
>         SoapObject Request = new SoapObject(NAMESPACE,
> METHOD_NAME);
> 
>         SoapSerializationEnvelope envelope = new
> SoapSerializationEnvelope(SoapEnvelope.VER11);
>         envelope.dotNet = true;
>         envelope.setOutputSoapObject(Request);
> 
>         try
>         {
> 
>               FakeX509TrustManager.allowAllSSL();  //this class may allow
> SSL
>               test.debug = true;
>               test.call(METHOD_NAME, envelope);  //erro comes in call
> method
>               resp = (Object)envelope.getResponse();
>         }
>         catch(Exception e)  // exception is
> org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://
> schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG
> <HTML>@2:7 in java.io.InputStreamReader@44c4e9e0)
> /*in responseDump is html with
>  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/
> TR/html4/strict.dtd">
> <HTML><HEAD><TITLE>Bad Request</TITLE>
> <META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-
> ascii"></HEAD>
> <BODY><h2>Bad Request - Invalid Hostname</h2>
> <hr><p>HTTP Error 400. The request hostname is invalid.</p>
> </BODY></HTML>*/
>         {
> 
>         tvText.setText(e.getMessage()+"\n"+test.responseDump);
>             e.printStackTrace();
>         }
> 
> I am beginner in that and I don't know what is the problem. Somebody
> can help? Thanks.
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
                                          

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to