You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Diego Pietralunga (JIRA)" <ji...@apache.org> on 2016/11/14 11:31:58 UTC

[jira] [Created] (CXF-7131) JAX-WS Client: HolderInInterceptor misbehaving on multipart/repalted SwA message: IndexOutOfBoundException

Diego Pietralunga created CXF-7131:
--------------------------------------

             Summary: JAX-WS Client: HolderInInterceptor misbehaving on multipart/repalted SwA message: IndexOutOfBoundException
                 Key: CXF-7131
                 URL: https://issues.apache.org/jira/browse/CXF-7131
             Project: CXF
          Issue Type: Bug
          Components: JAX-WS Runtime
    Affects Versions: 3.1.8
         Environment: Oracle JDK 1.7.0_79 64-Bit, Linux (OpenSuse 42.1)
            Reporter: Diego Pietralunga


Hi.
I'm getting a IndexOutOfBoundException when receiving a SwA message (multipart/related).
I produce the stubs with Wsdl2Java  with params 
"-verbose   -autoNameResolution   -client" on my wsdl;  operation looks ok with this output:
****************
Loading FrontEnd jaxws ...
Loading DataBinding jaxb ...
wsdl2java -verbose -autoNameResolution -client -d cxfIssuesJira3 ./apache-cxf-3.1.8/ricercaImprese1.2-icar.wsdl
wsdl2java - Apache CXF 3.1.8

Nov 14, 2016 12:16:40 PM org.apache.cxf.wsdl11.WSDLServiceBuilder checkForWrapped
INFO: Operation {http://it.ictechnology.pcad.ws}ricercaImpreseCodiceFiscale cannot be unwrapped, input and output messages (if present) must contain only a single part
Nov 14, 2016 12:16:40 PM org.apache.cxf.wsdl11.WSDLServiceBuilder checkForWrapped
INFO: Operation {http://it.ictechnology.pcad.ws}ricercaImpreseNRea cannot be unwrapped, input and output messages (if present) must contain only a single part
Nov 14, 2016 12:16:40 PM org.apache.cxf.wsdl11.WSDLServiceBuilder checkForWrapped
INFO: Operation {http://it.ictechnology.pcad.ws}ricercaImpreseDenominazione cannot be unwrapped, input and output messages (if present) must contain only a single part
************

This generates the Port/Service/Holders architecture. I populate data for the request and then I launch the generated client program untouched, except for:
- Using BindingProvider.ENDPOINT_ADDRESS_PROPERTY to set the target 
-adding WSS4JOutInterceptor to provide USERNAME_TOKEN & password callback method to the endpoint (getting a proxy)

Upon invocation, I get:

/***********/
WARNING: Interceptor for {http://it.ictechnology.pcad.ws}ricercaImpreseService#{http://it.ictechnology.pcad.ws}ricercaImpreseCodiceFiscale has thrown exception, unwinding now
java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
	at java.util.ArrayList.rangeCheck(ArrayList.java:635)
	at java.util.ArrayList.get(ArrayList.java:411)
	at org.apache.cxf.message.MessageContentsList.get(MessageContentsList.java:80)
	at org.apache.cxf.jaxws.interceptors.HolderInInterceptor.handleMessage(HolderInInterceptor.java:69)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:798)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1670)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1551)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1348)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:651)
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:277)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139)
	at com.sun.proxy.$Proxy33.ricercaImpreseCodiceFiscale(Unknown Source)
	at ws.pcad.ictechnology.it.RicercaImprese_RicercaImprese_Client.main(RicercaImprese_RicercaImprese_Client.java:101)

Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Index: 3, Size: 3
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:161)
	at com.sun.proxy.$Proxy33.ricercaImpreseCodiceFiscale(Unknown Source)
	at ws.pcad.ictechnology.it.RicercaImprese_RicercaImprese_Client.main(RicercaImprese_RicercaImprese_Client.java:101)
Caused by: java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
	at java.util.ArrayList.rangeCheck(ArrayList.java:635)
	at java.util.ArrayList.get(ArrayList.java:411)
	at org.apache.cxf.message.MessageContentsList.get(MessageContentsList.java:80)
	at org.apache.cxf.jaxws.interceptors.HolderInInterceptor.handleMessage(HolderInInterceptor.java:69)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:798)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1670)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1551)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1348)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:651)
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:277)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139)
	... 2 more

/***********/


Looks to me that the incoming Swa/Multipart message is not parsed correctly, or the indeces of the message parts are not set correctly upon extraction.

The incoming multipart/related message looks correct to me and I'm trying to attach a sample to this ticket




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)