MavyaSoni / ksoap2-android

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

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

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
This patch results in a proper throw.

Original comment by chris.boyle.name on 23 Oct 2009 at 1:27

Attachments:

GoogleCodeExporter commented 8 years ago
I am also getting this error.How to resolve this?

Original comment by sudeep.n...@gmail.com on 21 Jan 2010 at 11:30

GoogleCodeExporter commented 8 years ago
@sudeep.netizen The above patch, ksoap2fault.diff, fixes this issue: just get 
the 
ksoap2-android source, apply the patch, build - but last time I checked, I 
couldn't see 
a way to build "ksoap2-android-assembly-2.3-jar-with-dependencies.jar". What I 
did was 
to cheat: open that jar and replace org/ksoap2/SoapFault.class.

Original comment by chris.boyle.name on 21 Jan 2010 at 11:38

GoogleCodeExporter commented 8 years ago
i am still facing the problem, even after the patch :(

Original comment by lgma...@gmail.com on 29 Jan 2010 at 6:04

GoogleCodeExporter commented 8 years ago
i am still facing the problem, even after the patch :(

Original comment by ei05...@hotmail.com on 15 Feb 2010 at 6:45

GoogleCodeExporter commented 8 years ago
Extremely frustrated with this same problem  ... applied the fix.
Maybe ksoap2 needs a new release? Is this project closed?
What are the other options? I'm a java developer and I shouldn't be stuck on 
this 
prob after a few days now?!  

Original comment by mark.dat...@gmail.com on 22 Feb 2010 at 5:57

GoogleCodeExporter commented 8 years ago
Thanks very much for the patch.  Sorry it took me so long to get to it.

Resolved in
http://github.com/karlmdavis/ksoap2-android/commit/0f9d2414146c25fdec5b36d64bb78
f5ba3a5b081.

Original comment by karl.mic...@gmail.com on 8 Mar 2010 at 1:27

GoogleCodeExporter commented 8 years ago
Can you build a new JAR for the project?  I'm not too sure on how to exactly 
check
out the code and package it back up.

Original comment by mbr...@gmail.com on 27 Apr 2010 at 5:32

GoogleCodeExporter commented 8 years ago
Hey Im having the same problems as mbrand. Seems you fixed it on march 7th but 
the newest download is from march 6th and giving me the same problem as the 
original poster.

Original comment by Rvt...@gmail.com on 24 Jun 2010 at 9:21

GoogleCodeExporter commented 8 years ago
Hello, I applied patch on both 2.3 and 2.4, after maven rebuild original issue 
vanished but new one appeared: java.lang.ClassCastException for 
org.ksoap2.SoapFault.
Looks like issue comes from parseBody in SoapEnvelope.java and 
SoapSerializationEnvelope.java, when assigning fault to bodyIn..

An official JAR for version 2.3 or 2.4 would be much appreciated!

Thanks a lot

Original comment by climb...@gmail.com on 14 Jul 2010 at 5:25

GoogleCodeExporter commented 8 years ago
i am getting the same problem.. Please let me know if anybody have solutions 
for this issue

Original comment by rsgirida...@gmail.com on 22 Oct 2010 at 7:18

GoogleCodeExporter commented 8 years ago
The new version 2.5.1 fixes this problem!!

Original comment by mosa...@gmail.com on 22 Oct 2010 at 3:16

GoogleCodeExporter commented 8 years ago
I am also getting the same problem like below :

05-05 20:04:53.449: WARN/System.err(6387): 
org.xmlpull.v1.XmlPullParserException: expected: END_TAG 
{http://schemas.xmlsoap.org/soap/envelope/}Body (position:END_TAG 
</{http://schemas.xmlsoap.org/soap/envelope/}s:Fault>@1:289 in 
java.io.InputStreamReader@43c1b868) 

How to solve this?

Original comment by subratmo...@gmail.com on 5 May 2011 at 2:35

GoogleCodeExporter commented 8 years ago
Are you using the latest version? 2.5.2 .. if not upgrade first.

Original comment by mosa...@gmail.com on 5 May 2011 at 4:02

GoogleCodeExporter commented 8 years ago
I am using the 2.5.2 and getting the same error

Original comment by renatopp...@gmail.com on 25 Jul 2011 at 1:13

GoogleCodeExporter commented 8 years ago
soap fault parsing was broken in 2.5.2 and other old releases. Upgrade to 2.5.7

Original comment by mosa...@gmail.com on 25 Jul 2011 at 8:14

GoogleCodeExporter commented 8 years ago
Hi... I am also facing the same problem.. Can anyone tell me how to fix this.. 
I am using the latest version of ksoap2. Please Help Me!!

Original comment by priyanka...@gmail.com on 21 Dec 2013 at 7:58