Closed GoogleCodeExporter closed 9 years ago
This should work with some of the recent changes done to preserve ordering and
might be a valid bug. Could you supply your scenario as a failing test case
(e.g. in SoapSerializationEnvelopeTest) at a minimum and potentially look into
creating a fix.. ?
Original comment by mosa...@gmail.com
on 23 Mar 2012 at 4:41
@Override
protected String doInBackground(String... urls) {
String reSultstr = null;
for (String url : urls) {
SoapObject request = new
SoapObject(WSDL_TARGET_NAMESPACE, url);
request.addProperty("connectionId",
ConnectionID);
SoapObject message = new SoapObject("",
"twoWaySmsMessage");
message.addProperty("message", message);
message.addProperty("mobiles",
mobilenumber);
message.addProperty("messageId", messageID);
request.addSoapObject(message);
SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
HttpTransportSE httpTransport = new
HttpTransportSE(SOAP_ADDRESS);
try {
httpTransport.debug = true;
httpTransport.call(SOAP_ACTION,
envelope);
// Object response =
envelope.getResponse();
// reSultstr = response.toString();
SoapObject response = (SoapObject)
envelope.getResponse();
reSultstr =
response.getProperty(0).toString();
} catch (Exception exception) {
reSultstr = exception.toString();
}
}
return reSultstr;
}
@Override
protected void onPostExecute(String result) {
if (result == null) {
CurrentBalance.setText("Fail");
} else if (result.startsWith("SoapFault")) {
CurrentBalance.setText("Not connected");
disconnectBtn.setText("Connect");
} else if (result.startsWith("true")) {
CurrentBalance.setText("Not connected");
disconnectBtn.setText("Connect");
} else {
CatchError(result);
}
}
}
Original comment by hilljoh...@gmail.com
on 25 Mar 2012 at 11:14
[deleted comment]
[deleted comment]
[deleted comment]
I have the same problem.
The entry for WebServices is
<imp:getCoberturaADSLNuevo>
<imp:telefono>911111111</imp:telefono>
<imp:modalidad>
<xsd:movimientoComercial>A</xsd:movimientoComercial>
<xsd:tipoServicioDSL>I</xsd:tipoServicioDSL>
<xsd:velocidadModalidadDSL>E</xsd:velocidadModalidadDSL>
</imp:modalidad>
</imp:getCoberturaADSLNuevo>
My code is
request.addProperty("telefono", 911111111);
SoapObject message = new SoapObject("", "modalidad");
message.addProperty("movimientoComercial", "A");
message.addProperty("tipoServicioDSL", "I");
message.addProperty("velocidadModalidadDSL", "E");
//request.setProperty(0, "telefono");
request.addSoapObject(message);
But not work.
Original comment by albertod...@gmail.com
on 27 Mar 2012 at 8:32
I resolved my problem.
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("telefono", 911111111);
SoapObject message = new SoapObject(NAMESPACE, "modalidad");
message.addProperty("movimientoComercial", "A");
message.addProperty("tipoServicioDSL", "I");
message.addProperty("velocidadModalidadDSL", "E");
request.addProperty("modalidad", message);
Original comment by albertod...@gmail.com
on 27 Mar 2012 at 9:18
Original comment by mosa...@gmail.com
on 10 Apr 2012 at 4:27
Hello,
I am using same code structure in my application. But one fault message error
is coming every time. Kindly requested to any one, please help me and my error
is as below.
Request Xml string as :
<xs:element name="addSiloEvent">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="asdf" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="asdf" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="asdf" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="asdf" nillable="true" type="xs:string"/>
<xs:element xmlns:q41="url" minOccurs="0" name="sadf" nillable="true"
type="q41:SiloEvent"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="SiloEvent">
<xs:sequence>
<xs:element minOccurs="0" name="adfs" type="xs:dateTime"/>
<xs:element minOccurs="0" name="asdf" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="adf" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="asdf" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="asdf" type="xs:int"/>
<xs:element minOccurs="0" name="asdf" type="xs:int"/>
<xs:element minOccurs="0" name="asdf" nillable="true" type="tns:CropType"/>
<xs:element minOccurs="0" name="asdf" type="xs:double"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CropType">
<xs:sequence>
<xs:element minOccurs="0" name="adsf" type="xs:int"/>
<xs:element minOccurs="0" name="asdf" type="xs:int"/>
<xs:element minOccurs="0" name="asdf" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="adfs" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="CropType" nillable="true" type="tns:CropType"/>
*****************************************************************
Code is as :
StringBuilder sb = null;
SoapObject request = new SoapObject(Controller.NAMESPACE, "addSiloEvent");
request.addProperty("afd", userName);
request.addProperty("asdf", authToken);
request.addProperty("ad", "TestByManoj");
request.addProperty("af", "SiloNameData");
SoapObject siloType_add = new SoapObject("tns:CropType", "CropType");
siloType_add.addAttribute("afds", 14);
siloType_add.addAttribute("asdf", 0);
siloType_add.addAttribute("asdf", "Wheat");
siloType_add.addAttribute("adsf", "Lincon");
SoapObject siloEventObject = new SoapObject("q41:SiloEvent", "siloevent");
siloEventObject.addAttribute("adf", new Date());
siloEventObject.addAttribute("asdf", "AddToSilo");
siloEventObject.addAttribute("asdf", "Grate");
siloEventObject.addAttribute("asf", "Note");
siloEventObject.addAttribute("asdf", 0);
siloEventObject.addAttribute("asfd", 40);
siloEventObject.addAttribute("asdf", siloType_add);
siloEventObject.addAttribute("asf", 800);
request.addProperty("siloevent", siloEventObject);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
envelope.implicitTypes = true;
MarshalDate md = new MarshalDate();
md.register(envelope);
MarshalDouble mDoubl = new MarshalDouble();
mDoubl.register(envelope);
System.out.println("1111");
HttpTransportSE androidHttpTransport = new HttpTransportSE( Controller.URL6767);
androidHttpTransport.call(Controller.SOAP_ACTION + "addSiloEvent", envelope);
System.out.println("1111");
SoapObject sObject = (SoapObject) envelope.getResponse();
*************************************************
Error is coming as below :
06-22 12:47:21.518: W/System.err(526): SoapFault - faultcode:
'a:InternalServiceFault' faultstring: 'Sequence contains no matching element'
faultactor: 'null' detail: org.kxml2.kdom.Node@44f3d948
Kindly requested to any one Guy have idea please let me know.
Thanks
Original comment by manoj.kb...@gmail.com
on 22 Jun 2012 at 7:27
Dont post to old fixed issues. Ask on the mailing list.
Original comment by mosa...@gmail.com
on 23 Jun 2012 at 6:39
Original issue reported on code.google.com by
hilljoh...@gmail.com
on 23 Mar 2012 at 2:39