Details
Description
Hello there,
we are using AXIS2 to generate and use ServiceStubs to handle SOAP webservices.
We upgraded AXIS2 from 1.6.4 to 1.7.6.
After that we generated a new ServiceStub via WSDL2Java based on the following command:
wsdl2java -uri xtc_wsdl.xml -s -d adb -u -S ./
(xtc_wsdl.xml is attached)
If we now get the following response from the webservice, the parsing runs into a IllegalStateException.
getOrdersByStatus_response.xml:
<?xml version="1.0" encoding="utf-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="webservice/xtc/plugins/Speed4Trade/com"> <SOAP-ENV:Body> <ns1:getOrdersByStatusResponse> <orders/> </ns1:getOrdersByStatusResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Error:
java.lang.IllegalStateException: attribute type accessed in illegal event!
at org.apache.axiom.om.impl.common.serializer.pull.Navigator.getAttributeValue(Navigator.java:507)
at org.apache.axiom.om.impl.common.serializer.pull.PullSerializer.getAttributeValue(PullSerializer.java:261)
at javax.xml.stream.util.StreamReaderDelegate.getAttributeValue(StreamReaderDelegate.java:149)
at com.speed4trade.plugins.xtc.webservice.Order$Factory.parse(Order.java:671)
at com.speed4trade.plugins.xtc.webservice.Orders$Factory.parse(Orders.java:428)
at com.speed4trade.plugins.xtc.webservice.GetOrdersByStatusResponse$Factory.parse(GetOrdersByStatusResponse.java:389)
at com.speed4trade.plugins.xtc.webservice.XtcServiceStub.fromOM(XtcServiceStub.java:5906)
... 7 more
I have debugged the Stub and compared it to the old one of version 1.6.4.
I noticed here a code change caused by a change in the XSL template https://github.com/apache/axis2-java/commit/26d78d25e60183c14d901139ad3cdce432e393d0:
ADBBeanTemplate-bean.xsl, line 2190
This generates now this statement in the Orders.java:
if ((reader.isStartElement() && new javax.xml.namespace.QName("", "orders").equals( reader.getName())) || new javax.xml.namespace.QName("", "orders").equals( reader.getName())) {...}
Is it possible that this if-statement is not correct?
Thanks for considering my request.
Attachments
Attachments
Issue Links
- is duplicated by
-
AXIS2-5832 Missing Brackets in ADBBeanTemplate-bean.xsl
- Resolved