kvin024 / ksoap2-android

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

Remove i:type field from requestheader #126

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
I am using kSoap2 to "talk" to a webservice over SOAP. To generate my SOAP 
request I use the following code:

// Generate SOAP request XML
SoapObject request = new SoapObject(PUB_NAMESPACE,
"testSoapInterface");   

// Add request header
PropertyInfo requestHeader = new PropertyInfo();
requestHeader.setNamespace(PUB_NAMESPACE);
requestHeader.setName("requestheader");

// Generate username property
PropertyInfo usernameProp = new PropertyInfo();
usernameProp.setNamespace(BASE_NAMESPACE);
usernameProp.setName("username");
usernameProp.setValue(username);

// Generate applicationId property
PropertyInfo applicationIdProp = new PropertyInfo();
applicationIdProp.setNamespace(BASE_NAMESPACE);
applicationIdProp.setName("applicationId");
applicationIdProp.setValue("test");

// Add properties to requestHeader (nested)
requestHeader.setValue(new SoapObject(PUB_NAMESPACE, "requestheader")
.addProperty(usernameProp)
.addProperty(applicationIdProp));

request.addProperty(requestHeader);

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

The output gives a requestheader as follows (dots represent XML tags):

<n0:requestheader i:type="n0:requestheader">
       .....
</n0:requestheader>

If I simulate this with soapUI I get an error back from the server.
If I remove the part i:type="n0:requestheader" the server replies correctly.
Because it is a nested SOAP object implicitTypes = true; doesn't work.

What version of the product are you using? On what operating system?
I am using kSoap 2.6.3 on Android.

Please provide any additional information below.
-

Original issue reported on code.google.com by donkers....@gmail.com on 25 Jun 2012 at 6:05

GoogleCodeExporter commented 9 years ago
try with 2.6.5 as well as the latest unreleased code in master. There were a 
few enhancements to that and report back here.

Original comment by mosa...@gmail.com on 25 Jun 2012 at 6:44

GoogleCodeExporter commented 9 years ago
Hello,

I have the same problem and I am using the version 2.6.5.

Original comment by thomas.l...@gmail.com on 13 Sep 2012 at 12:45

GoogleCodeExporter commented 9 years ago
OK, I took the jar of the 3.0.0RC1 and that works.

Original comment by thomas.l...@gmail.com on 13 Sep 2012 at 1:04

GoogleCodeExporter commented 9 years ago
fixed in 3.0.0-RC.1 as reported above

Original comment by mosa...@gmail.com on 13 Sep 2012 at 4:47