ketan-sharma-developer / ksoap2-android

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

Strange WS response using call() method for saving content in file #154

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

When i use HttpTransport call() method for saving response on file

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

Expected output (my WS response):

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body><ValidateUserResponse xmlns="http://tempuri.org/">
<ValidateUserResult>GUID</ValidateUserResult>
</ValidateUserResponse>
</s:Body>
</s:Envelope>

What i see instead:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body><ValidateUserResponse xmlns="http://tempuri.org/">
<ValidateUserResult>GUID</ValidateUserResult>
</ValidateUserResponse>
</s:Body>
</s:Envelope>�����������������������
���

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

KSoap 3.0.0 

Eclipse SDK
Version: 3.6.2
Build id: M20110210-1200

OS: MAC OSX 10.7.5

Please provide any additional information below.

Seems there is a problem in text format (this problem occurs only if i use 
call() method to save response on file too). For example, if WS response is an 
Xml String, in which open and close tag are rappresented by special characters 
like "&lt;" and "&gt;" or "<" and ">", occurs an XmlPullParser Exception. If WS 
response is simple text like "GUID", there is no error but happen this:

Example with classical call() method -> httpTransport.call(soapAction, 
Envelope). Response dump is:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body><ValidateUserResponse xmlns="http://tempuri.org/">
<ValidateUserResult>GUID</ValidateUserResult>
</ValidateUserResponse>
</s:Body>
</s:Envelope>

Example with new call() method (i set header's List to null) -> 
httpTransport.call(soapAction, Envelope, null, File). Response dump is:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body><ValidateUserResponse xmlns="http://tempuri.org/">
<ValidateUserResult>GUID</ValidateUserResult>
</ValidateUserResponse>
</s:Body>
</s:Envelope>�����������������������
���

As you can see, something is written after Envelope node is closed.
This "something", instead, seems that's not written in file.

Original issue reported on code.google.com by giuseppe...@gmail.com on 6 Mar 2013 at 4:30

GoogleCodeExporter commented 8 years ago
The project is migrating to github. If you believe this issue is still valid 
and should be tracked please file a new issue at 
https://github.com/simpligility/ksoap2-android/issues

Original comment by mosa...@gmail.com on 7 Aug 2015 at 5:35