I recently upgraded from jboss-3.2.3
jboss.net to jboss-3.2.8SP1
jboss.net, and now I
discovered an incompatibility between the latter and apache axis (1.4) clients. In apache
axis, user exceptions thrown in the service methods do not have a 'message'
element, while they do have this element in the latest 3.2.8 jboss version.
When the axis client calls that service and the service indeed throws the user exception,
the result is (abbreviated):
AxisFault
| faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
| faultSubcode:
| faultString: org.xml.sax.SAXException: Invalid element in my.package.SomeException -
message
| faultActor:
| faultNode:
| faultDetail:
| {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: Invalid
element in my.package.SomeException - message
| at
org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258)
| at
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
| at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1672)
| at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
| ....
| at
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
| at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
| at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
| at
org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
| at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
| at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
| at org.apache.axis.client.Call.invoke(Call.java:2767)
| at org.apache.axis.client.Call.invoke(Call.java:2443)
| ....
|
The exceptions where declared in the web-service.xml to use the BeanSerializerFactory for
encoding.
I found a workaround by using my own variant of the BeanSerializerFactory for encoding
exceptions. That version filters out the 'message' property, but I am unsure if
this is 'The Right Way' to fix this problem.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4023071#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...