I am trying to consume a web service from android and I got that the
application send the XML needed for my WebService.
I ran a sniffer, gather the XML sent by my application, copy-paste the
XML request and test it in SOAPUI client and works fine.

I can see that requestDump and respondDump are filled with the in and
out information inside the HttpTransportSE  object but the application
failed in the line:

                aht.call(SOAP_ACTION_1, soapEnvelop);

It goes to the catch:
        catch (Exception e)

And error is "java.lang.RuntimeException: double ID"

Any suggestion or possible errors.

I appreciate your help.

Below the Main Code:

where
       InClass and OutClass implements KvmSerializable.
       In InClass = Contains 3 Strings objects
       Out OutClass = Contains 6 Strings 1 Integer and 2 User defined
classes that also implements KvmSerializable and inside them there are
Strings and Integer variables.

Code:
===============================================
String NAME_SPACE_1 = "http://name_space";;
String  URL_1 = "http://<server>:<port>/XXX/XXXX/Service?wsdl";
String METHOD_NAME_1 = "searchMethod";
String SOAP_ACTION_1 = "";

SoapObject request = new SoapObject(NAME_SPACE_1, METHOD_NAME_1);

In InClass = new In();
In.mS = "1234";
PropertyInfo PI_In = new PropertyInfo();
PI_In.setName("In");
PI_In.setValue(InClass);
PI_In.setType(InClass.getClass());
request.addProperty(PI_In);

//Set the web service envelope
SoapSerializationEnvelope soapEnvelop = new
SoapSerializationEnvelope(SoapEnvelope.VER10);
soapEnvelop.setOutputSoapObject(request);
soapEnvelop.implicitTypes = true;
soapEnvelop.setAddAdornments(false);

//Setting output parameters
Out     OutClass = new  Out();
soapEnvelop.addMapping(NAME_SPACE_1, "Out",new Out().getClass());

HttpTransportSE aht = new HttpTransportSE(URL_1);
aht.debug=true;

        //Call the web service and retrieve result
        try{
                aht.call(SOAP_ACTION_1, soapEnvelop);
        }
        catch (IOException e) {
                        outputTextKSoap.setText("GetVersion " +
"IOException: "  + e);
        } catch (XmlPullParserException e) {
                        outputTextKSoap.setText("GetVersion " +
"XmlPullParserException: " + e);
        }
        catch (Exception e) {
                if(e != null && e.toString().equals("null"))
                        outputTextKSoap.setText("StackTrace: " +
e.getStackTrace().toString());
                else
                        outputTextKSoap.setText("Exception is NULL");
                }
        }

requestDump
==========
<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:searchMethod xmlns:n0="http://name_space";>
        <In>
                <mS>1234</mS>
        </In>
</n0:searchMethod>
</v:Body>
</v:Envelope>

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

Reply via email to