eclipse-ee4j / jax-rpc-ri

JAX RPC Implementation (Eclipse Metro Project)
Other
2 stars 4 forks source link

Library fails to parse SOAP fault response detail element #49

Open Tomas-Kraus opened 13 years ago

Tomas-Kraus commented 13 years ago

This response I've received from server:

<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ttns="urn:testtrack-interface">

SOAP-ENV:Server The username or password you entered is not valid for the specified database. 16 Engine throws exception: Unexpected element 16.
Tomas-Kraus commented 6 years ago
Tomas-Kraus commented 13 years ago

@glassfishrobot Commented Reported by evgeny.gornov

Tomas-Kraus commented 13 years ago

@glassfishrobot Commented evgeny.gornov said: I have fixed the issue on my machine. How can I commit the solution to SVN? Trunk seems to be dead...

Tomas-Kraus commented 13 years ago

@glassfishrobot Commented evgeny.gornov said: The solution proposed by me for the file: /java_caps_jax-rpc_patch9/jaxrpc-ri/src/com/sun/xml/rpc/encoding/SOAPFaultInfoSerializer.java

The solution is:

**diff**        @@ -204,9 +208,16 @@
         SOAPDeserializationContext context,
         SOAPFaultInfo instance)
         throws Exception {
-
-        reader.nextElementContent();
-        return deserializeDetail(reader, context);
+        int st = reader.nextContent();
+         if (st == XMLReader.CHARS) {
+SOAPFactory soapFactory = SOAPFactory.newInstance();
+Detail detail = soapFactory.createDetail();
+detail.addTextNode(reader.getValue());
+return detail;
+         }
+         else{
+return deserializeDetail(reader, context);
+         }
     }
Tomas-Kraus commented 13 years ago

@glassfishrobot Commented evgeny.gornov said: The solution proposed be me.

Tomas-Kraus commented 13 years ago

@glassfishrobot Commented File: SOAPFaultInfoSerializer.java Attached By: evgeny.gornov

Tomas-Kraus commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA JAX_RPC-49