sachinrkeche / ksoap2-android

Automatically exported from code.google.com/p/ksoap2-android
0 stars 0 forks source link

java.net.MalformedURLException #186

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Use Ksoap2 to connect/consume .net web services.
------------------------------------------------

1. I generated some classes with Wsdl2Code. I was able to user ksoap2  jar 
file 'ksoap2-android-assembly-2.6.4-jar-with-dependencies.jar'  connect/consume 
to .net web services comfortably for several weeks.

After some time ksoap jar 
ksoap2-android-assembly-2.6.4-jar-with-dependencies.jar started throwing 
exception 'java.net.MalformedURLException : Protocol not found:' both in eclipse
and intelijidea.

I later tried a more recent ksoap jar 
'ksoap2-android-assembly-3.2.0-jar-with-dependencies.jar' and am still
having the same java.net.MalformedURLException : Protocol not found
exception

Original issue reported on code.google.com by okoj...@gmail.com on 17 Mar 2014 at 11:08

Attachments:

GoogleCodeExporter commented 8 years ago
Welll... what is the url that is being complained about? 

Original comment by mosa...@gmail.com on 18 Mar 2014 at 3:42

GoogleCodeExporter commented 8 years ago
I discovered that url is empty in the generated code. I have to manually
assign the web service that am calling..

public class fgplservice {

    public String NAMESPACE ="http://tempuri.org/";
    public String url="";
    public int timeOut = 60000;
    public IWsdl2CodeEvents eventHandler;
    public SoapProtocolVersion soapVersion;

    public fgplservice(){}

...I assigned value to url="
http://www.firstguaranteepension.com/fgplservice.asmx" and it started
working well

Original comment by okoj...@gmail.com on 18 Mar 2014 at 11:56

GoogleCodeExporter commented 8 years ago
can you get any solution? same issue i am facing..

Original comment by corona.p...@gmail.com on 28 Apr 2014 at 9:49

GoogleCodeExporter commented 8 years ago
How I solved the problem is that I replaced all occurance of ur with the
[web service url] in my case is something like
http://www.firstguaranteepension.com/fgplservice.asmx :

Original generated from ksoap
--------------------------------------------------------------------------------
----------------------------
public String NAMESPACE ="http://tempuri.org/";
    public String url="";
    public int timeOut = 60000;
    public IWsdl2CodeEvents eventHandler;
    public SoapProtocolVersion soapVersion;

    public fgplservice(){}
--------------------------------------------------------------------------------
-------------------------------

Modified version

--------------------------------------------------------------------------------
----------------------------
public String NAMESPACE ="http://tempuri.org/";
    public String url="http://www.firstguaranteepension.com/fgplservice.asmx
";
    public int timeOut = 60000;
    public IWsdl2CodeEvents eventHandler;
    public SoapProtocolVersion soapVersion;

    public fgplservice(){}

Original comment by okoj...@gmail.com on 28 Apr 2014 at 12:39

GoogleCodeExporter commented 8 years ago

Original comment by mosa...@gmail.com on 9 May 2014 at 6:32