02-18-2013 07:20 AM
Hi,
When I try to "AUTHENTICATE" Ksoap "HTTPS" webservice
I am using Ksop2 ksoap2-j2me-core-2.1.2.jar for soap parsing.
For http Authentication I am using HttpTransportBasicAuth class but I got following exception :
org.xmlpull.v1.XmlPullParserException: unexpected type (position:END_DOCUMENT null@1:0
When I use on http base url it's work fine but whet use https base url it's not working and throw exeption.
If any one has any idea why I am getting this exception Please help me.
02-18-2013 07:58 AM
02-18-2013 08:16 AM
Thanks for Reply.
Sorry , I can not understand what you are saying .
Can you please explain it ?
Regards,
02-18-2013 08:26 AM
02-18-2013 08:40 AM
OK.
Thank you for your reply.
Can you please help me to resolve this error ?
Regards,
Milan
02-18-2013 08:48 AM
I want to do authentication .
so if you have any idea plz let me know.
Thanks
02-18-2013 09:03 AM
Hi,
I am using "ServiceConnectionMidp" , but not getting the proper response.
I am still getting following error :
org.xmlpull.v1.XmlPullParserException: unexpected type (position:END_DOCUMENT null@1:0
So,can any one please help me to resolve it ?
Regards,
02-18-2013 09:31 AM
We have overwritten ServiceConnectionMidp like this:
/**
* {@inheritDoc}
*
* @see org.ksoap2.transport.ServiceConnection#openInputSt ream()
*/
public InputStream openInputStream() throws IOException {
InputStream is = connection.openInputStream();
if (connection.getResponseCode() != HttpConnection.HTTP_OK) {
How you handle a http error is up to you, we opted to throw a custom exception, to give an example.
The sourcecode of ksoap2 is available on http://ksoap2.sourceforge.net/ if you want to recompile the whole lib instead of overwriting the class only.