You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Andreas Veithen (JIRA)" <ji...@apache.org> on 2017/09/18 23:20:00 UTC

[jira] [Resolved] (AXIS2-5887) Parsing of response ends up in a IllegalStateException (attribute type accessed in illegal event!)

     [ https://issues.apache.org/jira/browse/AXIS2-5887?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-5887.
------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.7.7

> Parsing of response ends up in a IllegalStateException (attribute type accessed in illegal event!)
> --------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5887
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5887
>             Project: Axis2
>          Issue Type: Bug
>          Components: codegen, wsdl
>    Affects Versions: 1.7.6
>         Environment: Windows 10, Java 1.8.0_131
>            Reporter: Carl-Ferdinand Böhm
>             Fix For: 1.7.7
>
>         Attachments: getOrdersByStatus_response.xml, Orders.java, xtc_wsdl.xml
>
>
> 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:
> {code:java}
> wsdl2java -uri xtc_wsdl.xml -s -d adb -u -S ./
> {code}
> ([^xtc_wsdl.xml] is attached)
> If we now get the following response from the webservice, the parsing runs into a IllegalStateException.
> [^getOrdersByStatus_response.xml]:
> {code: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>
> {code}
> 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]:
> {code:java}
>                 if ((reader.isStartElement() &&
>                         new javax.xml.namespace.QName("", "orders").equals(
>                             reader.getName())) ||
>                         new javax.xml.namespace.QName("", "orders").equals(
>                             reader.getName())) {...}
> {code}
> Is it possible that this if-statement is not correct?
> Thanks for considering my request.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org