Code Monkey home page Code Monkey logo

ksoap2-android's People

Contributors

karlmdavis avatar markradb avatar mosabua avatar rainerklier avatar

Watchers

 avatar

ksoap2-android's Issues

Source code does not exist in jar form or in svn

What steps will reproduce the problem?
1. Just use the svn commands in the source tab to check out the code as 
read-only

It is very common for open source projects to provide a jar that contains the 
source code (like "xxx-sources.jar" or "xxx.src.jar"). This is especially 
useful when you need to do debugging in Eclipse, as it needs the source code 
attached.

However, you don't release a full src jar for the code in your jar, and also 
the svn repository that is documented in the "Source" tab is empty. Can you 
please provide us the source code? I believe it is in git, but it is definitely 
worth providing the source jar for many developers. I don't really need the 
code for committing changes, I just need to use it for debugging, and it would 
be great if you just provide the jar and release me from the burden of doing 
this every time I update my ksoap2 version.

Original issue reported on code.google.com by [email protected] on 17 Jun 2010 at 12:16

Where are the soruces?

What steps will reproduce the problem?
1. Hello...I found the problem the "old" org.apache.commons.httpclient.xxx
library..I'd like to recompile this project, but where are the sources?
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by lunard on 28 Jul 2009 at 9:54

call web service @ remote server

What steps will reproduce the problem?
1.androidHttpTransport.call(SOAP_ACTION, soapEnvelope);

What is the expected output? What do you see instead?
expect web service return true,but return error 
message:"expected:Start_TAG{http://schemas.xmlsoap.org/soap/envelope/}Envelope
 (position:START_TAG <HTML>@2:7 in java.io.UnputStreamReader@477ad7f8)"

What version of the product are you using? On what operating system?
i use microsoft win7 and visual studio to develop web service, i use Android 
2.2 API with eclipse emulator 

Please provide any additional information below.
when i call web service at localhost it works,but call web service at remote 
server(in same network segment, it will raise exception and e.getMessage() will 
be "expected:Start_TAG{http://schemas.xmlsoap.org/soap/envelope/}Envelope 
(position:START_TAG <HTML>@2:7 in java.io.UnputStreamReader@477ad7f8)"

Original issue reported on code.google.com by [email protected] on 2 Apr 2011 at 2:33

Wrong namespace Error, pointing to w3.org should point to schemas.xmlsoap.org

What steps will reproduce the problem?
1. Launing my app
2. Reaching the line of Http call

What is the expected output? What do you see instead?
No idea what would be the proper response but the an error is thrown which
first lines look like this:
Couldn't create SOAP message. Expecting Envelope in namespace
http://schemas.xmlsoap.org/soap/envelope/, but got
http://www.w3.org/2001/12/soap-envelope

What version of the product are you using? On what operating system?
I switching between version 11 and 12 for testing but usually I go with
version 12. I am programming for the Android OS Version 2.1.


Please provide any additional information below.
I already got a threat going with the sourcecode of my app with I problem I
guess I have solved by now =), here is the link:
http://code.google.com/p/ksoap2-android/issues/detail?id=20

Thanks a lot you folks!

Original issue reported on code.google.com by [email protected] on 24 May 2010 at 9:49

unexpected type (position:END_DOCUMENT null@1:0 in java.io.InputStreamReader@43bed1d8)

What steps will reproduce the problem?
1. Set android emulator connection speed to gsm speed 
2. Run a bunch of soap requests
3. Try to get response

What is the expected output? What do you see instead?

Only first request in sequence is with response, others simply throw
exception: 
unexpected type (position:END_DOCUMENT null@1:0 in 
java.io.InputStreamReader@43bed1d8) 
org.kxml2.io.KXmlParser.exception(KXmlParser.java:245)
org.kxml2.io.KXmlParser.nextTag(KXmlParser.java:1365)
org.ksoap2.SoapEnvelope.parse(SoapEnvelope.java:126)
org.ksoap2.transport.Transport.parseResponse(Transport.java:63)
org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:100)

This only happens when using lower connection speed or connection delay 
parameters.

If I run emulator without connection speed parameters this never happens.



What version of the product are you using? On what operating system?

Android 2.1




Original issue reported on code.google.com by [email protected] on 24 Oct 2010 at 4:24

xmlnullparserexeption

The code is the following

String url = xxxxxxxxxxxxxxxxxxxxxxxxxx;
String namespace = xxxxxxxxxxxxxxxxxxxx;
String metod = "uploadContentById";
String soap_action = url + metodo;

SoapObject solicitud = new SoapObject(namespace, metodo);
int id =9;
solicitud.addProperty("id",id);
solicitud.addProperty("data",printMe);
SoapSerializationEnvelope envoltorio = new 
SoapSerializationEnvelope(SoapEnvelope.VER12);
envoltorio.dotNet = false;
envoltorio.setOutputSoapObject(solicitud);
HttpTransportSE transportHttp = new HttpTransportSE(url);
try{
transportHttp.call(soap_action, envoltorio);
String cadenaDevuelta = envoltorio.getResponse().toString();
}
catch(Exception e){System.out.println("La excepcion producida es 
"+e.toString());
                    }

What is the expected output? What do you see instead?
The output is supposed to be a boolean true or false in which it is said that 
the content of the file has been uploaded or not successfully.

Instead , I have the following exception :

11-09 15:41:07.957: INFO/System.out(748): La excepcion producida es 
org.xmlpull.v1.XmlPullParserException: expected: START_TAG 
{http://www.w3.org/2001/12/soap-envelope}Envelope (position:START_TAG 
<{http://www.w3.org/2003/05/soap-envelope}env:Envelope>@2:67 in 
java.io.InputStreamReader@435a2df8) 



I have looked for this problem in internet but most of people have the same 
problem . Is this a ksoap2 bug ?
I have tried to debug this code and the xml is well made .
What is the really problem ?
Thanks
GOrka

Original issue reported on code.google.com by [email protected] on 9 Nov 2010 at 5:49

How to Remove Header tag from the SOAP request

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

Is it possible to remove "<v:Header / >" tag from the SOAP request. The web 
service provider to which I am posting is not supporting the Header tab. If I 
post the same message without header from SoapUI it is working fine. 

Error : 

</soap:Envelope>
.
.
.
<faultcode>soap:Client</faultcode>
<faultstring>Error Record Rejected</faultstring>
<detail>element 'Envelope' doesn't have child named 'v:Header'_+_+_+_+_+
</detail>
.
.
</soap:Envelope>


What version of the product are you using? On what operating system?

2.5 (ksoap2-android-assembly-2.5-SNAPSHOT-jar-with-dependencies.jar)

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 24 Nov 2010 at 8:35

safeGetProperty returns "anyType{}"

What steps will reproduce the problem?
1. Make sure a tag of type <ns2:Code/> is included in the SoapObject response.
2. Parse the SoapObject with 
String code = soapObject.safeGetProperty("Code", "").toString();

What is the expected output? What do you see instead?
Expected output is "". The real output is "anyType{}"

What version of the product are you using? On what operating system?
Version 2.5.2. Ubuntu operating system.

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 30 Nov 2010 at 5:34

Transfer byte arrays from WCF webservice to soap.

Currently I'm using ksoap2-android to transfer data (Objects, Strings, ...) 
from a wcf webservice to the android device. 

Now I want to transfer images from the server using a byte array. The method 
I'm using is:

problem is that the only way 

public byte[] GetFile(string filePath)
{
 ...
}

which produces a SoapPrimitive on the android client. Other SoapPrimitives 
(Int, String) I read with the toString method

int count = Integer.parseInt(soapPrimitive.toString());

but this (not surprisingly) doesn't work for byte array. I'm not even sure if 
that's the correct way to handle SoapPrimitive results but I haven't found any 
other way.

So my question, is there a way to read a byte array with ksoap2-android (or 
even better a Stream?).

Original issue reported on code.google.com by [email protected] on 5 Dec 2010 at 11:52

org.ksoap2.serialization.SoapObject.getPropertyInfo() is not returning property value

What steps will reproduce the problem?
Call org.ksoap2.serialization.SoapObject.getPropertyInfo() with an
PropertyInfo object.

What is the expected output? What do you see instead?
The PropertyInfo.value field is null whereas other fields are set correctly.

What version of the product are you using? On what operating system?
2.3

Original issue reported on code.google.com by [email protected] on 18 Nov 2009 at 10:45

kSOAP2 and SOAPAction on Android



Hi everyone, I am trying to access a Webservice with kSOAP2 on an Android
Phone. I think the connection is being established, but the server won't
answer my request since I'm not providing a SOAP Action Header which seems
to be required in SOAP Version 1.1(please correct me if I'm wrong here)
which I have to use since the server does not support Version 1.2 . The
concrete Faultcode which is returning in the request looks like this:

faultactor  null    
faultcode   "S:Server" (id=830064966432)    
faultstring "String index out of range: -11" (id=830064966736)



The errorcode which is generated on the server (I'm running it on a
localhost) looks like this:



4.05.2010 20:20:29 com.sun.xml.internal.ws.transport.http.HttpAdapter
fixQuotesAroundSoapAction
WARNUNG: Received WS-I BP non-conformant Unquoted SoapAction HTTP header:
http://server.contextlayer.bscwi.de/createContext
24.05.2010 20:20:29
com.sun.xml.internal.ws.server.sei.EndpointMethodHandler invoke
SCHWERWIEGEND: String index out of range: -11
java.lang.StringIndexOutOfBoundsException: String index out of range: -11
    at java.lang.String.substring(Unknown Source)
    at de.bscwi.contextlayer.xml.XmlValidator.isValid(XmlValidator.java:41)
    at de.bscwi.contextlayer.server.ContextWS.createContext(ContextWS.java:45)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.sun.xml.internal.ws.api.server.InstanceResolver$1.invoke(Unknown
Source)
    at com.sun.xml.internal.ws.server.InvokerTube$2.invoke(Unknown Source)
    at
com.sun.xml.internal.ws.server.sei.EndpointMethodHandler.invoke(Unknown Source)
    at
com.sun.xml.internal.ws.server.sei.SEIInvokerTube.processRequest(Unknown
Source)
    at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unknown Source)
    at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unknown Source)
    at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unknown Source)
    at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unknown Source)
    at com.sun.xml.internal.ws.server.WSEndpointImpl$2.process(Unknown Source)
    at
com.sun.xml.internal.ws.transport.http.HttpAdapter$HttpToolkit.handle(Unknown
Source)
    at com.sun.xml.internal.ws.transport.http.HttpAdapter.handle(Unknown
Source)
    at
com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handleExchange(Unkno
wn
Source)
    at
com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handle(Unknown
Source)
    at com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
    at sun.net.httpserver.AuthFilter.doFilter(Unknown Source)
    at com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
    at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(Unknown
Source)
    at com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
    at sun.net.httpserver.ServerImpl$Exchange.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)



The relevant part of the WSDL (at least that's what I'm thinking) looks
like this:



<operation name="createContext">
<soap:operation soapAction=""/>
−
<input>
<soap:body use="literal" namespace="http://server.contextlayer.bscwi.de/"/>
</input>
−
<output>
<soap:body use="literal" namespace="http://server.contextlayer.bscwi.de/"/>
</output>
</operation>    

In my code I'm adding a Header, but it seems like I'm doing it wrong:

private static final String SOAP_ACTION  = "";
//...
SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope
(SoapEnvelope.VER11);
soapEnvelope.setOutputSoapObject(Request);
AndroidHttpTransport aht = new AndroidHttpTransport (URL);
//...
aht.call(SOAP_ACTION, soapEnvelope);
        SoapPrimitive resultString = (SoapPrimitive)
soapEnvelope.getResponse();



Any advice would be great since I'm running out of ideas.. Thanks folks!
Note: I also posted this at StackOverflow.com
(http://stackoverflow.com/questions/2899392/ksoap2-and-soapaction-on-android)

Original issue reported on code.google.com by [email protected] on 24 May 2010 at 6:59

More access to raw XML needed

I've been thinking a bit lately about what would make this library more
useful for me.  The library has always felt a bit half-finished to me...
there's too many things it should do, but doesn't.

Short of a more end-to-end solution like I've heard Apache Axis is, I think
it would be best to ensure that users of the library can more easily poke
at the raw XML.  Can things be refactored such that developers could choose
whether to use DOM, SAX, or XMLPULL?  In a way that lets them read and
write the SOAP body and headers, while still ensuring all necessary
attributes, etc. are present?

I'm not sure, but I'd like to look into it some.

Original issue reported on code.google.com by [email protected] on 2 Jan 2010 at 8:08

WCF Service hosted in IIS (SVC File) cannot be consumed by ksoap2?

I would like to consume a WCF Service in Eclipse for an Android app.

I have successfully done this with .asmx, based service. However would like to 
use a new .SVC based service instead.(WCF Service hosted through IIS)  

I've tried ksoap2 hitting the url like
http://machine/AppName/ServiceName.svc?wsdl

or http://machine/AppName/ServiceName.svc

It gives me

org.xmlpull.v1.XmlPullParserException: unexpected type (position:END_DOCUMENT 
null@1:0 in java.io.InputStreamReader@44ebb7e0)

I've made sure that the WCF Service is SOAP 1.1 based.
I have Eclipse Galileo and the ADT Plugin v0.97 running on Windows XP

If I use WireShark to sniff the packets I see

HTTP/1.1 415 Cannot process the message because the content type 'text/xml' was 
not the expected type 'application/soap+xml; charset=utf-8'.\r\n

SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);

seems as though the Soap implementation is HTTP GET, which is not supported 
with the WCF through IIS.   

Are there plans for ksoap2 to support this ?


Original issue reported on code.google.com by [email protected] on 28 Jul 2010 at 12:13

How to get cookie from SOAP (using Android) and than use it across the methods in my app

Hello ppl.. i think this is my last hope where i can find some solution about 
my issue.

I'm using ksoap2 with Android to connect to my web service (SOAP 1.1). I have 
some methods to LogOn, LogOff, GetUserProfile etc. I'm sniffing the connection 
with Wireshark and everything is fine (it connects successfully).
But the problem is when i call the LogOff method or GetUserProfile, it gives me 
exception from the server and it says "User not logged in", i understand why, 
it's becouse i don't get the cookie and everytime i call them it won't 
recognize me. So i want some help to solve that issue. I want to get the cookie 
after i use LogOn method and than use the same cookie for the User across the 
other methods as LogOff or GetUserProfile.

Here is my class with the Methods..


 public class Methods {

private static final String SOAP_ACTION="http://tempuri.org/E_banka/TSM2/LogOn";
private static final String METHOD_NAME="LogOn";
private static final String NAMESPACE="http://tempuri.org/E_banka/TSM2";
private static final String 
URL="http://wsstore.com/e-banka/WebServisi/WSAuth.asmx";

public static final String LOG_TAG ="error_msg";
//public static final String res = strRes;


public static String res = " ";
public static String resoff = " ";
public static String strproff1 = " ";
public static String strproff2 = " ";
public static String strproff3 = " ";

public static void LogOn(String username, String password) 
{
    SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME);
    Request.addProperty("strUsername", username);
    Request.addProperty("strPassword", password);
    Request.addProperty("strMessage", "");

    SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    soapEnvelope.dotNet = true;
    soapEnvelope.setOutputSoapObject(Request);

    AndroidHttpTransport aht = new AndroidHttpTransport(URL);
  try {
        aht.call(SOAP_ACTION, soapEnvelope);

        SoapObject soapIn = (SoapObject)soapEnvelope.bodyIn;
        String strRes = soapIn.getProperty("LogOnResult").toString();

        res = strRes;
  }
  catch(Exception e)
  {
      e.printStackTrace();
      Log.d(LOG_TAG, "Error: " + e);
  }
}

public static void LogOff()
{   
    try {
        SoapObject Request = new SoapObject(NAMESPACE, "LogOn");
        Request.addProperty("strMessage", "");
        SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
        soapEnvelope.dotNet = true;
        soapEnvelope.setOutputSoapObject(Request);
        AndroidHttpTransport aht = new AndroidHttpTransport(URL);

        aht.call("http://tempuri.org/E_banka/TSM2/LogOff", soapEnvelope);
        SoapObject soapIn = (SoapObject)soapEnvelope.bodyIn;
        String strRes2 = soapIn.getProperty("LogOffResult").toString();

        resoff = strRes2;
  }
  catch(Exception e)
  {
      e.printStackTrace();
      Log.d(LOG_TAG, "Error: " + e);
  }
}

public static void GetProfile()
{
     try {
            SoapObject Request = new SoapObject(NAMESPACE, "GetUserProfile");
            Request.addProperty("uiUser", null);
            Request.addProperty("strMessage", "");
            SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
            soapEnvelope.dotNet = true;
            soapEnvelope.setOutputSoapObject(Request);
            AndroidHttpTransport aht = new AndroidHttpTransport(URL);

            aht.call("http://tempuri.org/E_banka/TSM2/GetUserProfile", soapEnvelope);
            SoapObject soapIn = (SoapObject)soapEnvelope.bodyIn;
            String strProf1 = soapIn.getProperty("FirstLastName").toString();
            String strProf2 = soapIn.getProperty("Jazik").toString();
            String strProf3 = soapIn.getProperty("SertNum").toString();

            strproff1 = strProf1;
            strproff2 = strProf2;
            strproff3 = strProf3;
      }
      catch(Exception e)
      {
          e.printStackTrace();
          Log.d(LOG_TAG, "Error: " + e);
      }
}

public String getRes() { return res; }
public void setRes(String strRes) { res = strRes; }

public String getResOff() { return resoff; }
public void setResOff(String strRes2) { resoff = strRes2; }

public String getProf1() { return strproff1; }
public void setProf1(String strProf1) { strproff1 = strProf1; }

public String getProf2() { return strproff2; }
public void setProf2(String strProf2) { strproff2 = strProf2; }

public String getProf3() { return strproff3; }
public void setProf3(String strProf3) { strproff3 = strProf3; } }


Here is my main Activity..

public class Main extends Activity {
/** Called when the activity is first created. */

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    //TextView tv = (TextView) findViewById(R.id.TextView01);
    final EditText et1 = (EditText) findViewById(R.id.EditText01);
    final EditText et2 = (EditText) findViewById(R.id.EditText02);
    Button btn = (Button) findViewById(R.id.Button01);
    final TextView txt1 = (TextView) findViewById(R.id.TextView02);
    final TextView txt2 = (TextView) findViewById(R.id.TextView03);
    final TextView txt3 = (TextView) findViewById(R.id.TextView04);

    btn.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {
             Methods.LogOn(et1.getText().toString(),et2.getText().toString());
                if(Methods.res.equals("1"))
                {
                    Toast.makeText(Main.this, "Logon Successful", Toast.LENGTH_SHORT).show();

                    Methods.GetProfile();
                    txt1.setText(Methods.strproff1);
                    txt2.setText(Methods.strproff2);
                    txt3.setText(Methods.strproff3);

                    //Methods.LogOff();
                }
                else Toast.makeText(Main.this, "Logon not Successful", Toast.LENGTH_SHORT).show();
        }
    });

}
}


When i use Methods.GetProfile() or Methods.LogOff() i get LogOffResult=-20 and 
that means "USER_NOT_LOGGED", it's the same for GetProfile.

Any solution about the cookie ? i searched almost everything and there isn't 
even close solution about solving this problem :/
I've tried some methods that i've found but still nothing..

Original issue reported on code.google.com by [email protected] on 7 Dec 2010 at 1:48

  • Merged into: #25

Broken .jar files?

If I want to download a package its getting broke because its only 21-6KB in 
size. Why is that?

I tried all versions. Files end up 21.6KB everytime


Original issue reported on code.google.com by [email protected] on 1 Dec 2010 at 4:32

No .jar file in last release

What steps will reproduce the problem?
1. Try to get a .jar file for 2.5.1 release on this page.


What is the expected output? What do you see instead?
To see the link for .jar file in front page!

I really don't like to download all project and then build it my self, just to 
get .jar.


Original issue reported on code.google.com by [email protected] on 16 Oct 2010 at 9:44

Calling getProperty(string) returns anyType{}

What steps will reproduce the problem?
1. Calling a SOAP 1.1 Webservice that contains an element tag but no value (for 
example: <LastPaymentDate /> )
2. Calling getProperty("LastPaymentDate")

What is the expected output? What do you see instead?
I expect to see an empty string returned, as the returning XML has a 
corresponding tag but no value.

What version of the product are you using? On what operating system?
2.5.4, Win XP, Eclipse 3.5.2.

Please provide any additional information below.
Any advice appreciated on best practice to work around, or resolution.

Original issue reported on code.google.com by [email protected] on 7 Apr 2011 at 7:45

Conversion to Dalvik format failed with error 1

What steps will reproduce the problem?
1.Add the 2.5.2 jars with dependencies to eclipse as external jar.
2.Watch the console log: Conversion to Dalvik format failed with error 1

What is the expected output? What do you see instead?
Thats i dont receive this error

What version of the product are you using? On what operating system?
2.5.2 on windows 7 64bit, using eclipse 3.6 EE version

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 8 Jan 2011 at 8:11

httpauth

It would be great, if I can connect to httpauth-secured-servers (like MS SQL 
Reporting Services).

Original issue reported on code.google.com by [email protected] on 21 Aug 2010 at 9:33

Authentication with Ksoap2

What steps will reproduce the problem?
1.
2.
3.

I'd like to get webservice where I should enter my id and auth key. I don't 
know how to do authentication with Ksoap2. 

What is the expected output? What do you see instead?



What version of the product are you using? On what operating system?

I am using ksoap2-2.4 on window xp. 


Please provide any additional information below.




Original issue reported on code.google.com by [email protected] on 14 Sep 2010 at 11:44

Class Cast Exception when returning Object[] from .NET web service method

What steps will reproduce the problem?
1. Create a .net web service method GetAllCategories() which returns Category[] 
. Each Category is a class containing CategoryId (int) , Name (String) and 
Description (String)
2. Use this code
public static final String SOAP_ACTION = 
"http://vladozver.org/GetAllCategories";
    public static final String METHOD_NAME = "GetAllCategories";
    public static final String NAMESPACE = "http://vladozver.org/";
    public static final String URL = "http://192.168.1.3/Services/CategoryServices.asmx";
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        TextView tv = (TextView)findViewById(R.id.TextView01);

        SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME);
        Category C = new Category();
        C.CategoryId = 1;

        PropertyInfo pi = new PropertyInfo();
        pi.setName("Category");
        pi.setValue(C);
        pi.setType(C.getClass());
     //   Request.addProperty(pi);

        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
        envelope.dotNet = true;
        envelope.setOutputSoapObject(Request);

        envelope.addMapping(NAMESPACE, "Category",new Category().getClass());
AndroidHttpTransport androidHttpTransport = new AndroidHttpTransport(URL);
try
        {
            androidHttpTransport.call(SOAP_ACTION, envelope);
SoapObject response = (SoapObject)envelope.getResponse();
Category[] res = new Category[response.getPropertyCount()];
            for (int i = 0; i < res.length; i++) {
     // THROWS EXCEPTION
                Category CTry = (Category)response.getProperty(i);
            }
catch(Exception e)
        {
            e.printStackTrace();
        }
}

public class Category implements KvmSerializable
{
    public int CategoryId;
    public String Name;
    public String Description;
    @Override
    public Object getProperty(int arg0) {

        switch(arg0)
        {
        case 0:
            return CategoryId;
        case 1:
            return Name;
        case 2:
            return Description;
        }

        return null;
    }
    @Override
    public int getPropertyCount() {
        // TODO Auto-generated method stub
        return 3;
    }
    @Override
    public void getPropertyInfo(int index, Hashtable arg1, PropertyInfo info) {
        // TODO Auto-generated method stub
        switch(index)
        {
        case 0:
            info.type = PropertyInfo.INTEGER_CLASS;
            info.name = "CategoryId";
            break;
        case 1:
            info.type = PropertyInfo.STRING_CLASS;
            info.name = "Name";
            break;
        case 2:
            info.type = PropertyInfo.STRING_CLASS;
            info.name = "Description";
            break;
        default:break;
        }
    }
    @Override
    public void setProperty(int index, Object value) {
        // TODO Auto-generated method stub
        switch(index)
        {
        case 0:
            CategoryId = Integer.parseInt(value.toString());
            break;
        case 1:
            Name = value.toString();
            break;
        case 2:
            Description = value.toString();
            break;
        default:
            break;
        }
    }
}

3. Run the code

What is the expected output? What do you see instead?
A category array with the returned categories. Instead a cast exception occurs. 
I don't know how to access the result set of a web service that returns an 
array of objects, in my case Category objects.

What version of the product are you using? On what operating system?
Latest, i downloaded it yesterday. Windows 7, Eclipse.

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 19 Jun 2010 at 5:03

Duplicated AndroidHttpTransport.class and AndroidServiceConnection.java files in the release JAR

What steps will reproduce the problem?
1. Add  ksoap2-android-2.2-jar-with-dependencies.jar to the android project.
2. It gives error that AndroidHttpTransport class is already added.
3. Open jar file with winrar and check the org.ksoap2.transport package,
there are 2 duplicate class files are there.

What is the expected output? What do you see instead?
...possibly there is some error while building the jar.

What version of the product are you using? On what operating system?

...Version 2.2 release of ksoap2-android with all dependencies included 

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 22 Apr 2009 at 1:47

Could not find class 'org.apache.commons.httpclient.SimpleHttpConnectionManager', referenced from method org.ksoap2.transport.AndroidServiceConnection

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?

kSOAP2-android2.2 with dependencies
Windows Vista SP2
Android SDK 1.5 Cupcake


Please provide any additional information below.

It appears that org.ksoap2.transport.AndroidServiceConnection is 
referencing a class that doesn't exist...is there a workaround?


Original issue reported on code.google.com by [email protected] on 11 Jun 2009 at 9:12

XML node names for Vector (array) properties.

I am working with a WebService that receives an array as a parameter. I found 
that this kind of parameters is passed using Vectors.

The problem is that kSoap always renders xml nodes with "item" as the node name 
of each element in the Vector.

Because I am developing my WebService with .NET and I have more than one 
methods that receive array parameters of various types, I can't map the "item" 
node name to multiple types on .NET because this causes errors at runtime.

Given this, we fall on the need to download the kSoap sources and make a slight 
change to have correct communication between kSoap and my WebServices.

As I believe this change could be useful for other people, I am submitting the 
patch file throught this list so that you can evaluate it and, if you thinks is 
appropiate, apply the patch to the official code.

Thank you.

Original issue reported on code.google.com by [email protected] on 6 Sep 2010 at 5:01

Attachments:

ksoap2 does not serialize Object[]

Problem: ksoap2 does not serialize Object[]

What steps will reproduce the problem?
1.create a web service with a methode with a parameter which is an array of
objects
2.create an object (which extends SoapObject) client side, with that array
of objects into its properties.
3. perform a soap call passing that object

What is the expected output? What do you see instead?
I expect  my array of objects to be serialized into the soapEnvelope.
Instead i see that serialization throws an Exception. 

What version of the product are you using? On what operating system?
i am using ksoap2-android-assembly-2.4-jar-with-dependencies.jar under
Linux/Ubuntu, IDE Eclipse

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 17 May 2010 at 5:12

how to remove request id="0" and c:root="1" attributes from SOAP

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
The request should be 
<?xml version="1.0" encoding="UTF-8"?><v:Envelope 
xmlns:i="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:d="http://www.w3.org/2001/XMLSchema" 
xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:v="http://schemas.xmlsoap.org/soap/envelope/">
<v:Header />
<v:Body>
<n0:statusInquiryRequest  
xmlns:n0="http://AVRSLibrary/com/tes/Service"><memberId 
i:type="d:string"></memberId><providerId 
i:type="d:string"></providerId></n0:statusInquiryRequest>
</v:Body>
</v:Envelope>
But creating as follows 
<?xml version="1.0" encoding="UTF-8"?><v:Envelope 
xmlns:i="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:d="http://www.w3.org/2001/XMLSchema" 
xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:v="http://schemas.xmlsoap.org/soap/envelope/">
<v:Header />
<v:Body>
<n0:statusInquiryRequest id="o0" c:root="1"  
xmlns:n0="http://AVRSLibrary/com/tes/Service"><memberId 
i:type="d:string"></memberId><providerId 
i:type="d:string"></providerId></n0:statusInquiryRequest>
</v:Body>
</v:Envelope>

How to remove id="0" and c:root="1" in the SOAP Request. Is there any way we 
can setup dont create these attributes


What version of the product are you using? On what operating system?
ksoap2-android-assembly-2.4-jar-with-dependencies and Window XP, android 
simulation 5554 with Android SDK API 8 with SDK Android plaform 2.2

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 17 Aug 2010 at 9:56

kobjects-j2me wrong for j2me

The dependency kobjects-j2me uses some properties and feature which are 
not available in java.lang.System under j2me. To stay compatible I have 
created a fixed version without these classes (Actually only the ISODate 
and maybe the Base64 is interesting I guess for kSOAP2):

http://globalplatform.sourceforge.net/repo/m2-repository/net/sourceforge/
kobjects/kobjects-j2me/0.0-SNAPSHOT-20040926/

Error preverifying class org.kobjects.xmlrpc.Driver
    VERIFIER ERROR org/kobjects/xmlrpc/Driver.main([Ljava/lang/String;)V:
Cannot find class java/io/FileReader 

I have excluded the dependency and used my fixed version. The classifier 
"fixed" is used.

Can you adjust your version, so that this hack does not have to be done?

Original issue reported on code.google.com by [email protected] on 28 Jan 2010 at 1:54

attribute parsing already supported?

In the API I can see the methods, but on this XML it does not work:

E.g. Prescription="false" and ProfessionallySourced="false" of the return
element are not recognized.

<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>
        <ns2:getMedicationResponse xmlns:ns2="http://foo.bar.com/"
xmlns:ns3="http://www.dossia.org/v2.0/xml/phr"
xmlns:ns4="http://www.dossia.org/v2.0/api"
xmlns:ns5="http://www.w3.org/2005/08/addressing">
            <return Prescription="false" ProfessionallySourced="false">
                <ns3:Origin Classification="PHR">
                    <ns3:Organization>
                        <ns3:OrganizationName>Dossia</ns3:OrganizationName>
                    </ns3:Organization>
                </ns3:Origin>
                <ns3:Date Type="Actual">
                    <ns3:StartDate>2009-10-08</ns3:StartDate>
                    <ns3:EndDate>2009-10-08</ns3:EndDate>
                </ns3:Date>
                <ns3:Comments/>
                <ns3:Drug>
                    <ns3:Code MajorVersion="" MinorVersion="" System="NDC">
                        <ns3:Code>672960489</ns3:Code>
                        <ns3:LongDescription>TYLENOL 3  (300 MG
ACETAMINOPHEN, 30 MG CODEINE PHOSPHATE) (by REDPHARM
DRUG)</ns3:LongDescription>
                    </ns3:Code>
                    <ns3:Route>Oral</ns3:Route>
                </ns3:Drug>
            </return>
        </ns2:getMedicationResponse>
    </S:Body>
</S:Envelope>

Original issue reported on code.google.com by [email protected] on 2 Mar 2010 at 11:09

Adding .jar to project

What steps will reproduce the problem?
1. Add lib folder to project
2. add ksoap2-android-2.2-jar-with-dependencies.jar to folder
3. add library to project

What is the expected output? What do you see instead?
When the library added, eclipse gave errors,like:

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: 
Lorg/ksoap2/transport/AndroidHttpTransport;
[2009-04-11 11:41:44 - WebService1]     at 
com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
[2009-04-11 11:41:44 - WebService1]     at 
com.android.dx.dex.file.DexFile.add(DexFile.java:143)
[2009-04-11 11:41:44 - WebService1]     at 
com.android.dx.command.dexer.Main.processClass(Main.java:299)
[2009-04-11 11:41:44 - WebService1]     at 
com.android.dx.command.dexer.Main.processFileBytes(Main.java:276)
[2009-04-11 11:41:44 - WebService1]     at 
com.android.dx.command.dexer.Main.access$100(Main.java:56)
[2009-04-11 11:41:44 - WebService1]     at 
com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:228)
[2009-04-11 11:41:44 - WebService1]     at 
com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245
)
[2009-04-11 11:41:44 - WebService1]     at 
com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:130)
[2009-04-11 11:41:44 - WebService1]     at 
com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:108)
[2009-04-11 11:41:44 - WebService1]     at 
com.android.dx.command.dexer.Main.processOne(Main.java:245)
[2009-04-11 11:41:44 - WebService1]     at 
com.android.dx.command.dexer.Main.processAllFiles(Main.java:183)
[2009-04-11 11:41:44 - WebService1]     at 
com.android.dx.command.dexer.Main.run(Main.java:139)
[2009-04-11 11:41:44 - WebService1]     at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
[2009-04-11 11:41:44 - WebService1]     at 
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[2009-04-11 11:41:44 - WebService1]     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[2009-04-11 11:41:44 - WebService1]     at java.lang.reflect.Method.invoke(Unknown 
Source)
[2009-04-11 11:41:44 - WebService1]     at 
com.android.ide.eclipse.adt.build.DexWrapper.run(Unknown Source)
[2009-04-11 11:41:44 - WebService1]     at 
com.android.ide.eclipse.adt.build.ApkBuilder.executeDx(Unknown Source)
[2009-04-11 11:41:44 - WebService1]     at 
com.android.ide.eclipse.adt.build.ApkBuilder.build(Unknown Source)
[2009-04-11 11:41:44 - WebService1]     at 
org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:633)
[2009-04-11 11:41:44 - WebService1]     at 
org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
[2009-04-11 11:41:44 - WebService1]     at 
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
[2009-04-11 11:41:44 - WebService1]     at 
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
[2009-04-11 11:41:44 - WebService1]     at 
org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
[2009-04-11 11:41:44 - WebService1]     at 
org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
[2009-04-11 11:41:44 - WebService1]     at 
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
[2009-04-11 11:41:44 - WebService1]     at 
org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:3
09)
[2009-04-11 11:41:44 - WebService1]     at 
org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
[2009-04-11 11:41:44 - WebService1]     at 
org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
[2009-04-11 11:41:44 - WebService1]     at 
org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
[2009-04-11 11:41:44 - WebService1]     at 
org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
[2009-04-11 11:41:44 - WebService1] 1 error; aborting
[2009-04-11 11:41:44 - WebService1] Conversion to Dalvik format failed with 
error 1


What version of the product are you using? On what operating system?


Please provide any additional information below.



Original issue reported on code.google.com by [email protected] on 11 Apr 2009 at 8:45

soap web service from android

public void CelsiusToFahrenheit() {  

    String SOAP_ACTION= "http://tempuri.org/CelsiusToFahrenheit";  
    String METHOD_NAME = "CelsiusToFahrenheit";    
    String NAMESPACE = "http://tempuri.org/";  
    String URL= "http://www.w3schools.com/webservices/tempconvert.asmx";

    SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME);    
    Request.addProperty("Celsius", "32");   
    SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);   
  soapEnvelope.dotNet = true;  
  soapEnvelope.setOutputSoapObject(Request); 
    AndroidHttpTransport httpTransport = new AndroidHttpTransport(URL);  
        try     {   
            httpTransport.call(SOAP_ACTION, soapEnvelope);   
            SoapPrimitive resultString = (SoapPrimitive)soapEnvelope.getResponse();   
            String res = resultString.toString(); 
        }   
        catch (Exception e)
        {        
            e.printStackTrace();
        } 

    } 




here i am getting SOCKET Exception.....Operation timed out...i am using
 "ksoap2-android-assembly-2.4-jar-with-dependencies.jar"



Original issue reported on code.google.com by [email protected] on 7 Apr 2011 at 6:42

import org.ksoap2 cannot be resolved

What steps will reproduce the problem?
I am new to using ksoap, I get error in my project,
"The import org.Ksoap2 cannot be resolved".

I am using eclipse platform.


Original issue reported on code.google.com by [email protected] on 12 Jan 2011 at 10:02

J2ME - Classes are compiled with Java 1.6 target

I get a Verifier error when preverifying the class for J2ME:

Error preverifying class org.ksoap2.serialization.SoapSerializationEnvelope
    VERIFIER ERROR org/ksoap2/serialization/
SoapSerializationEnvelope.readInstance(Lorg/xmlpull/v1/XmlPullParser;Ljava/
lang/String;Ljava/lang/String;Lorg/ksoap2/serialization/
PropertyInfo;)Ljava/lang/Object;:
Illegal type in constant pool

Error preverifying class org.kobjects.xmlrpc.Driver
    VERIFIER ERROR org/kobjects/xmlrpc/Driver.main([Ljava/lang/String;)V:
Cannot find class java/io/FileReader

The classes in the repo should be compiled with the target 1.1/source 1.3 
switch.

                    <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>1.3</source>
                        <target>1.1</target>
                    </configuration>
                </plugin>

I guess for the base, the midp and the extras modules this switch is 
enough.

Original issue reported on code.google.com by [email protected] on 28 Jan 2010 at 1:57

SOAP faults always fail to parse: SoapFault.parse missing parser.require(END_TAG,ENV,"Fault")?

What steps will reproduce the problem?
1. Make any SOAP call that returns a SOAP fault

What is the expected output? What do you see instead?
I expect org.ksoap2.SoapFault to be thrown. Instead, I see:

org.xmlpull.v1.XmlPullParserException: expected: END_TAG 
{http://schemas.xmlsoap.org/soap/envelope/}Body (position:END_TAG 
</{http://schemas.xmlsoap.org/soap/envelope/}soap:Fault>@1:650 in 
java.io.InputStreamReader@438fff30)

What version of the product are you using? On what operating system?
This is "ksoap2-android-assembly-2.3-jar-with-dependencies.jar" which your 
downloads page lists as uploaded Aug 16, on Android 1.6.

Please provide any additional information below.

I'm looking at ksoap2-base/src/main/java/org/ksoap2/SoapFault.java and 
SoapFault.parse() looks suspicious. It calls parser.require for the start 
Fault tag, but not the end Fault tag.

Here is transport.responseDump:

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope 
xmlns:zeusns_1_1="http://soap.zeus.com/zxtm/1.1/" 
xmlns:zeusns_1_2="http://soap.zeus.com/zxtm/1.2/" 
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:zeusns="http://soap.zeus.com/zxtm/1.0/" 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultc
ode>soap:Client</faultcode><faultstring>Unknown function called 
'http://soap.zeus.com/zxtm/test.wrongNS/Diagnose/diagnoseSystem'</faultstri
ng></soap:Fault></soap:Body></soap:Envelope>

Original issue reported on code.google.com by chris.boyle.name on 23 Oct 2009 at 12:43

Integrate attribute patch

It would be nice if the node attribute patch could be integrated into the 
ksoap2 Android builds. 
Perhaps attributes can be solved today by writing your own marhals, but the 
patch seems to 
simplify the procedure a lot.

http://sourceforge.net/tracker/?func=detail&aid=1473145&group_id=158028&atid=806
189

Original issue reported on code.google.com by [email protected] on 5 Jun 2009 at 3:30

org.ksoap2.serialization.SoapSerializationEnvelope.getResponse() throws a ClassCastException

What steps will reproduce the problem?
1. Call a WS that returns a single-element string response
2. Try to get the response with getResponse()

What is the expected output? What do you see instead?
Object expected. 

What version of the product are you using? On what operating system?
I'm using version 2.3 on debian

Please provide any additional information below.
I got the problem on the code, the solution is as easy as to do a
instanceof check and don't try to do the KvmSerializable cast. I've found
this on my first steps with WS creation and connection. Hope it helps ;)

Original issue reported on code.google.com by [email protected] on 16 Nov 2009 at 6:56

There is the class 'java.awt.Frame' not found

Made a example project with Eclipse 3.6 & adt plugin 0.9.9.v201009221407-60953 
for Android 1.5 Platform on a Win XP & SP3

It is right the same as in the example from "Farfale" 
http://vimeo.com/9633556 only just for 1.5

Run it on avd platform 1.5 or on a phone with 1.5

unexpected error: debug says: Could not find class
'java.awt.Frame', referenced from method 

see code and debug below:

*****************
CODE:

package com.linckhvt.soap;

import java.io.IOException;

import android.app.Activity;
import android.os.Bundle;

// import android.app.Activity;
// import android.os.Bundle;
import android.widget.TextView; /** for viewing text */

/** imports for soap */
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapPrimitive;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.AndroidHttpTransport;
import org.ksoap2.transport.HttpTransportSE;
import org.xmlpull.v1.XmlPullParserException;

public class Soap extends Activity {
    /** Called when the activity is first created. */

    private static final String SOAP_ACTION = "http://tempuri.org/CelsiusToFahrenheit";  
    private static final String METHOD_NAME = "CelsiusToFahrenheit";  
    private static final String NAMESPACE = "http://tempuri.org/";  // where xmlns=
    private static final String URL = "http://www.w3schools.com/webservices/tempconvert.asmx"; // where the service is

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        TextView txt = new TextView(this);
        txt.setText("Hello World - LIHE is here"); 
        setContentView(txt);

        try {
        SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);  
        request.addProperty("Celsius", "32");  // ----hier schmiert er ab 

        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
        envelope.dotNet = true;
        envelope.setOutputSoapObject(request);

        AndroidHttpTransport aht = new AndroidHttpTransport(URL);  
        aht.call(SOAP_ACTION, envelope);

//        HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
//        androidHttpTransport.call(SOAP_ACTION, envelope);

        SoapPrimitive resultString = (SoapPrimitive)envelope.getResponse();  
        txt.setText(resultString.toString());

        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (XmlPullParserException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }              
    }
}

Original issue reported on code.google.com by [email protected] on 28 Sep 2010 at 6:49

Attachments:

how to connect successfully using cmwap

I am a graduate student from China.Recently,i have writen an android 
application which connects webservice using ksoap2-android.

The net is gprs.But in China gprs is divider to cmwap and cmnet.cmnet has no 
proxy,but cmwap has proxy.

My application can using properly through cmnet,but can't connection properly 
through cmwap.It can't connection to webservice from cmwap.

It has puzzled me for a long time,please give me a favor.

Original issue reported on code.google.com by [email protected] on 22 Feb 2011 at 12:17

Figure out how to do a release build

What steps will reproduce the problem?
1. after doing a mvn release:prepare successfully
2. running mvn release:perform stalls with error message

[INFO] [INFO] --- maven-deploy-plugin:2.5:deploy (default-deploy) @ 
ksoap2-parent ---
[INFO] Uploading: 
svn:https://ksoap2-android.googlecode.com/svn/m2-repo/com/google/code/ksoap2-and
roid/ksoap2-parent/2.5.1/ksoap2-parent-2.5.1.pom
[INFO] Error validating server certificate for 
'https://ksoap2-android.googlecode.com:443':
[INFO]  - The certificate is not issued by a trusted authority. Use the
[INFO]    fingerprint to validate the certificate manually!
[INFO]  - The certificate hostname does not match.
[INFO] Certificate information:
[INFO]  - Subject: CN=*.googlecode.com, O=Google Inc, L=Mountain View, 
ST=California, C=US
[INFO]  - Valid: from Thu Sep 02 00:59:14 PDT 2010 until Fri Sep 02 01:09:14 
PDT 2011
[INFO]  - Issuer: CN=Google Internet Authority, O=Google Inc, C=US
[INFO]  - Fingerprint: 
97:78:ab:bf:d9:a2:cc:c0:8c:31:2e:33:17:7f:98:7e:96:e7:da:ab


What is the expected output? What do you see instead?

Not sure.. would just like the jars for the last release (e.g. 2.5.1) get 
uploaded automatically.


Original issue reported on code.google.com by [email protected] on 12 Oct 2010 at 7:52

SoapFault.getMessage() is empty

What steps will reproduce the problem?
1. Apply patch from issue 7 so SOAP faults can be parsed.
2. Make a SOAP call that returns a SOAP fault.

What is the expected output? What do you see instead?
The SOAP "fault string" would be sensible to put here, better than an empty 
message.

What version of the product are you using? On what operating system?
"ksoap2-android-assembly-2.3-jar-with-dependencies.jar" Aug 16 + patch from 
issue 7, Android 1.6.

Please provide any additional information below.
Patch attached to return faultstring.

Original issue reported on code.google.com by chris.boyle.name on 23 Oct 2009 at 2:01

Attachments:

Adding project to maven central

It would be great if the project could publish the artifacts to maven central. 
You could use the approach documented here
https://docs.sonatype.com/display/NX/OSS+Repository+Hosting

then any users of the project would not have to add the custom repository 
and you would not have to maintain it either.. 


Original issue reported on code.google.com by [email protected] on 11 Mar 2010 at 11:57

add ServiceConnectionSE method getServiceConnection so we can use cookie

we should use cookie for save session 
we must access URLConnection so you must 
add ServiceConnectionSE method getServiceConnection so we can use cookie
full code below

package com.glenet.androidWfLib.util;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import org.ksoap2.SoapEnvelope;
import org.ksoap2.transport.AndroidHttpTransport;
import org.ksoap2.transport.ServiceConnectionSE;
import org.xmlpull.v1.XmlPullParserException;

import com.sonalb.net.http.cookie.Client;
import com.sonalb.net.http.cookie.CookieJar;

public class newAndroidHttpTransport extends AndroidHttpTransport {

    private ServiceConnectionSE connection;

    public newAndroidHttpTransport(String url) {
        super(url);
        // TODO Auto-generated constructor stub
    }

    @Override
    protected synchronized ServiceConnectionSE getServiceConnection()
            throws IOException {
        // TODO Auto-generated method stub
        // return super.getServiceConnection();
        if (connection == null) {
            connection = new ServiceConnectionSE(url);
            return connection;
        } else {

            return connection;
        }
    }

    public CookieJar call(String soapAction, SoapEnvelope envelope, CookieJar cj) throws IOException,
            XmlPullParserException {


         if (soapAction == null)
                soapAction = "\"\"";
            byte[] requestData = createRequestData(envelope);
            requestDump = debug ? new String(requestData) : null;
            responseDump = null;
            ServiceConnectionSE connection = getServiceConnection();
            connection.setRequestProperty("User-Agent", "kSOAP/2.0");
            connection.setRequestProperty("SOAPAction", soapAction);
            connection.setRequestProperty("Content-Type", "text/xml");
            connection.setRequestProperty("Connection", "close");
            connection.setRequestProperty("Content-Length", "" + requestData.length);
            connection.setRequestMethod("POST");

            Client client = new Client(); 

               if (cj != null)
                {
                    client.setCookies(connection.getConnection(), cj);

                }


            connection.connect();


            OutputStream os = connection.openOutputStream();

            os.write(requestData, 0, requestData.length);
            os.flush();
            os.close();
            requestData = null;
            InputStream is;
            try {
                connection.connect();
                is = connection.openInputStream();


                if(cj == null){
                    cj = client.getCookies(connection.getConnection());
                }
            } catch (IOException e) {
                is = connection.getErrorStream();
                if (is == null) {
                    connection.disconnect();
                    throw (e);
                }
            }
            if (debug) {
                ByteArrayOutputStream bos = new ByteArrayOutputStream();
                byte[] buf = new byte[256];
                while (true) {
                    int rd = is.read(buf, 0, 256);
                    if (rd == -1)
                        break;
                    bos.write(buf, 0, rd);
                }
                bos.flush();
                buf = bos.toByteArray();
                responseDump = new String(buf);
                is.close();
                is = new ByteArrayInputStream(buf);
            }

            parseResponse(envelope, is);
            return cj;


    }



}

Original issue reported on code.google.com by [email protected] on 14 Jul 2010 at 6:00

Check if upstream WSDL/axis patch is applied.

Check the patch linked from 
https://sourceforge.net/projects/ksoap2/forums/forum/532039/topic/3904337/index/
page/1
and see if the codebase from that patch is in this project. 

If it is not there.. merge it in if possible.

Original issue reported on code.google.com by [email protected] on 22 Oct 2010 at 3:13

AndroidServiceConnection is using wrong httpclient library version

What steps will reproduce the problem?
1. AndroidServiceConnection class uses classes from package 
org.apache.commons.httpclient, which is not available in android.jar
2. If you try to use AndroidHttpTransport class to call a web service, 
android application closes unexpectedly.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?

android-sdk-windows-1.1_r1, and  ksoap2-android-2.2-jar-with-
dependencies.jar (  Version 2.2 release of ksoap2-android with all 
dependencies included )
On windows XP.

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 29 Apr 2009 at 12:07

Gingerbread Serialization Issue

What steps will reproduce the problem?
1. Create a SoapEnvelope for a web method.
2. Add the appropriate properties for the web method.
3. Execute the web method.

What is the expected output? What do you see instead?
A successful execution of the web method call.
A NullPointerException occurs.

What version of the product are you using? On what operating system?
2.3.3

Please provide any additional information below.

This has only been noticed on Gingerbread based devices.
The problem occurs on both the emulator and an actual device.

Caused by: java.lang.NullPointerException
    at org.kxml2.io.KXmlSerializer.check(KXmlSerializer.java:75)
    at org.kxml2.io.KXmlSerializer.startTag(KXmlSerializer.java:376)
    at org.kxml2.kdom.Element.write(Element.java:318)
    at org.kxml2.kdom.Node.writeChildren(Node.java:330)
    at org.kxml2.kdom.Element.write(Element.java:331)
    at org.ksoap2.SoapEnvelope.writeHeader(SoapEnvelope.java:203)
    at org.ksoap2.SoapEnvelope.write(SoapEnvelope.java:189)
    at org.ksoap2.transport.Transport.createRequestData(Transport.java:101)
    at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:114)
    at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:90)
    at edu.ua.caps.ksoap.Ksoap2$AdvanceWebService.ResolveMobileMOVEAccount(Ksoap2.java:548)
    at edu.ua.caps.ui.LoginActivity$AsyncLogin.doInBackground(LoginActivity.java:203)
    at edu.ua.caps.ui.LoginActivity$AsyncLogin.doInBackground(LoginActivity.java:1)
    at android.os.AsyncTask$2.call(AsyncTask.java:185)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
    ... 4 more

Original issue reported on code.google.com by [email protected] on 4 Apr 2011 at 6:12

Https problem

What steps will reproduce the problem?
1.try to connect to a https soap sevrer

What is the expected output? What do you see instead?
i was hoping that it would connect but i get "ERROR:java.io.IOException: 
Hostname <#######> was not verified

What version of the product are you using?
2.3


is there a different call for connecting to https soap servers?



Original issue reported on code.google.com by [email protected] on 11 Feb 2010 at 10:00

Start-Tag missing, absolutly new to kSOAP2!

What steps will reproduce the problem?
1. Staring the Application, since it's quite small I think that should do
it here.


What is the expected output? What do you see instead?

Well actually I'm not quite sure what should be the output in the end, but
while debugging the app I noticed that it won't execute the line:

aht.call(SOAP_ACTION, soapEnvelope);
and the errorlog says the following:
expected: START_TAG {http://www.w3.org/2001/12/soap-envelope}Envelope
(position:START_TAG <h1>@1:4 in java.io.InputStreamReader@43d1b8f8) 

Maybe you folks already know what's the problem is, but just to be sure
I'll provide the code of my app here, thanks a lot:


// Most of the code is taken from this really good video
// http://www.vimeo.com/9633556

package com.Connect;

import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapPrimitive;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.AndroidHttpTransport;


import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class connect extends Activity {
    /** Called when the activity is first created. */
    // tempuri.Org wird aus der WSDL File genommen.
//  private static final String SOAP_ACTION =
"http://server.contextlayer.bscwi.de/createContext";
//  private static final String SOAP_ACTION = "ClientWS";
    private static final String SOAP_ACTION  = "";
    private static final String METHOD_NAME = "createContext";
    private static final String NAME_SPACE =
"http://server.contextlayer.bscwi.de/";
    // WICHTIG: nicht wsdl File!!
    private static final String URL = "http://10.0.2.2:10360/ContextWS";
    //private static final String URL = "http://10.0.2.2:10360/ContextWSService";
    TextView tv;
    @Override
    public void onCreate(Bundle savedInstanceState) {



        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        tv = (TextView) findViewById (R.id.TextView01);
        SoapObject Request = new SoapObject (NAME_SPACE, METHOD_NAME);
       Request.addProperty("arg0", "testSituation");

        SoapSerializationEnvelope soapEnvelope = new
SoapSerializationEnvelope (SoapEnvelope.VER12);
       // soapEnvelope.dotNet = true;
        soapEnvelope.setOutputSoapObject(Request);

        AndroidHttpTransport aht = new AndroidHttpTransport (URL);
        try{
        aht.call(SOAP_ACTION, soapEnvelope);
        Object bla = 
            soapEnvelope.getResponse();
        System.out.println(bla.toString());
        SoapPrimitive resultBoolean = (SoapPrimitive)
soapEnvelope.getResponse();

        // Eigentlich nicht sonderlich viel Anhnung was er bei einem
Boolean ausgibt, naja mal sehen.
        tv.setText("Result: "+ (bla));}
        catch(Exception e){
            e.printStackTrace();
            System.out.println(e);
        }
    }
}


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 19 May 2010 at 6:15

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.