[
https://issues.apache.org/jira/browse/CXF-3413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13011995#comment-13011995
]
Andreas Gudian commented on CXF-3413:
-------------------------------------
The server side is a webMethods 7.x integration server.
I had to anonymize the WSDL a bit, the real one had some more operations, types
and elements, and different namespaces, service name and port name.
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:tns="http://www.xxx.yy/zzz"
xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsd1="http://www.xxx.yy/zzz/types/" name="zzz.wsdl"
targetNamespace="http://www.xxx.yy/zzz">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.xxx.yy/zzz/types/">
<element name="pdfList">
<complexType>
<sequence>
<element maxOccurs="unbounded" ref="xsd1:pdf"/>
</sequence>
</complexType>
</element>
<element name="pdf">
<complexType>
<sequence>
<element name="pdfName" type="xsd:string"/>
<element xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
name="pdfPayload" type="xsd:base64Binary"
xmime:expectedContentTypes="application/octet-stream"/>
</sequence>
</complexType>
</element>
<element name="xmlFilename" type="xsd:string" />
<element name="transactionID" type="xsd:string"/>
<element name="statusCode" type="xsd:string" />
<element name="statusMessage" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="sendData">
<xsd:complexType>
<xsd:sequence>
<!-- ... -->
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType xmlns:xsd="http://www.w3.org/2001/XMLSchema"
name="authenticationHeaderType">
<xsd:sequence>
<!-- ... -->
</xsd:sequence>
</xsd:complexType>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema"
name="authentication" nillable="true" type="xsd1:authenticationHeaderType"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema"
name="GeneratePreviewResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="xsd1:statusCode"/>
<xsd:element ref="xsd1:statusMessage"/>
<xsd:element ref="xsd1:transactionID"/>
<xsd:element ref="xsd1:pdfList"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</schema>
</types>
<message name="generatePreviewResponse">
<part name="statusCode" element="xsd1:GeneratePreviewResponse"/>
</message>
<message name="xmlRequest">
<part name="xmlData" element="xsd1:sendData"/>
</message>
<message name="request_Headers">
<part name="authentication" element="xsd1:authentication"/>
</message>
<portType name="IPortType">
<operation name="generatePreview">
<documentation>...</documentation>
<input name="xmlRequest" message="tns:xmlRequest"/>
<output name="pdfResponse" message="tns:generatePreviewResponse"/>
</operation>
</portType>
<binding name="ISOAPBinding" type="tns:IPortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsp:PolicyReference
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#wsmtom_policy"
required="true"/>
<operation name="generatePreview">
<soap:operation soapAction="attachment"/>
<input name="xmlRequest">
<soap:header message="tns:request_Headers" part="authentication"
use="literal"/>
<soap:body use="literal"/>
</input>
<output name="pdfResponse">
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="iService">
<port name="ISoapBindingPort" binding="tns:ISOAPBinding">
<soap:address location="http://xxx/yyy"/>
</port>
</service>
<wsp:Policy
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
wsu:Id="wsmtom_policy">
<wsoma:OptimizedMimeSerialization
xmlns:wsoma="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization"/>
</wsp:Policy>
</definitions>
{code}
Please note that the response is not valid as far as the schema is concerned
(two mandatory elements are missing). However, I expected a validation
exception from JAXB for this (validation is turned on in my client).
> IndexOutOfBoundsException in DocLiteralInInterceptor
> ----------------------------------------------------
>
> Key: CXF-3413
> URL: https://issues.apache.org/jira/browse/CXF-3413
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.3.3
> Reporter: Andreas Gudian
>
> I am receiving the following response from a web service that I call using
> CXF 2.3.3:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
> xmlns:xml="http://www.w3.org/XML/1998/namespace"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Header xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
> xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"></SOAP-ENV:Header><SOAP-ENV:Body>
> <xsd1:statusCode
> xmlns:xsd1="http://www.xxx.yy/zzz/types/">-1</xsd1:statusCode>
> <xsd1:statusMessage xmlns:xsd1="http://www.xxx.yy/zzz/types/">Some Status
> Message</xsd1:statusMessage>
> <xsd1:pdfList xmlns:xsd1="http://www.xxx.yy/zzz/types/"></xsd1:pdfList>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> {code}
> This results in the following exception:
> {code}
> java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
> at java.util.ArrayList.RangeCheck(ArrayList.java:547)
> at java.util.ArrayList.get(ArrayList.java:322)
> at
> org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:188)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2335)
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2193)
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2037)
> at
> org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
> at
> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
> at
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:697)
> at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
> at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> at $Proxy43.myWebserviceOperation(Unknown Source)
> {code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira