[
https://issues.apache.org/jira/browse/CXF-2190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704573#action_12704573
]
Alessio Soldano commented on CXF-2190:
--------------------------------------
Trying to workaround this, I think I've found another issue.
To workaround this issue, I added a handler on client side that simply removes
the {http://cxf.apache.org/jaxws/dispatch}Invoke element from the payoad. This
way correct messages go on the wire (both in & out). However, when processing
the response message, I get the following NPE:
java.lang.NullPointerException
at
org.apache.cxf.binding.soap.interceptor.RPCInInterceptor.handleMessage(RPCInInterceptor.java:166)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:641)
at org.apache.cxf.endpoint.ClientImpl$1$1.run(ClientImpl.java:722)
at
org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
at org.apache.cxf.endpoint.ClientImpl$1.onMessage(ClientImpl.java:720)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2134)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:2018)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
Debbuging shows that's because part.getConcreteName() is null.
> Invalid message sent using Dispatch
> -----------------------------------
>
> Key: CXF-2190
> URL: https://issues.apache.org/jira/browse/CXF-2190
> Project: CXF
> Issue Type: Bug
> Components: JAX-WS Runtime
> Affects Versions: 2.2.1
> Reporter: Alessio Soldano
>
> We're running this Dispatch client using CXF 2.2.1:
> URL wsdlURL = new URL("http://" + getServerHost() +
> ":8080/jaxws-jbws1611?wsdl");
> QName serviceName = new QName(targetNS, "PingEndpointService");
> QName portName = new QName(targetNS, "PingEndpointPort");
> Service service = Service.create(wsdlURL, serviceName);
> Dispatch dispatch = service.createDispatch(portName, Source.class,
> Mode.PAYLOAD);
>
> dispatch.getRequestContext().put(BindingProvider.SOAPACTION_USE_PROPERTY,
> true);
>
> dispatch.getRequestContext().put(BindingProvider.SOAPACTION_URI_PROPERTY,
> "uri:placeBuyOrder");
> String payload = "<ns1:ping xmlns:ns1='" + targetNS + "'/>";
> Source retObj = (Source)dispatch.invoke(new StreamSource(new
> StringReader(payload)));
> and we get this exception on server side:
> org.apache.cxf.interceptor.Fault: Message part
> {http://cxf.apache.org/jaxws/dispatch}Invoke was not recognized. (Does it
> exist in service WSDL?)
> at
> org.apache.cxf.interceptor.BareInInterceptor.handleMessage(BareInInterceptor.java:133)
> at
> org.apache.cxf.binding.soap.interceptor.RPCInInterceptor.handleMessage(RPCInInterceptor.java:111)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:89)
> at
> org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:99)
> at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:357)
> at
> org.jboss.wsf.stack.cxf.ServletControllerExt.invoke(ServletControllerExt.java:160)
> at
> org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:61)
> at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:134)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> [...]
> Capturing the message on the wire reveals the following message being sent:
> <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns1:Invoke
> xmlns:ns1="http://cxf.apache.org/jaxws/dispatch"><ns1:ping
> xmlns:ns1="http://jbws1611.jaxws.ws.test.jboss.org/"
> /></ns1:Invoke></soap:Body></soap:Envelope>
> which contains the ns1:Invoke element causing the issue on server side.
> The WSDL of the service is:
> <?xml version='1.0' encoding='UTF-8'?><wsdl:definitions
> name="PingEndpointService"
> targetNamespace="http://jbws1611.jaxws.ws.test.jboss.org/"
> xmlns:ns1="http://schemas.xmlsoap.org/wsdl/soap/http"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="http://jbws1611.jaxws.ws.test.jboss.org/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <wsdl:message name="ping">
> </wsdl:message>
> <wsdl:message name="pingResponse">
> <wsdl:part name="return" type="xsd:string">
> </wsdl:part>
> </wsdl:message>
> <wsdl:portType name="PingEndpoint">
> <wsdl:operation name="ping">
> <wsdl:input message="tns:ping" name="ping">
> </wsdl:input>
> <wsdl:output message="tns:pingResponse" name="pingResponse">
> </wsdl:output>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="PingEndpointServiceSoapBinding" type="tns:PingEndpoint">
> <soap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http" />
> <wsdl:operation name="ping">
> <soap:operation soapAction="" style="rpc" />
> <wsdl:input name="ping">
> <soap:body namespace="http://jbws1611.jaxws.ws.test.jboss.org/"
> use="literal" />
> </wsdl:input>
> <wsdl:output name="pingResponse">
> <soap:body namespace="http://jbws1611.jaxws.ws.test.jboss.org/"
> use="literal" />
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="PingEndpointService">
> <wsdl:port binding="tns:PingEndpointServiceSoapBinding"
> name="PingEndpointPort">
> <soap:address location="http://127.0.0.1:8080/jaxws-jbws1611" />
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
> Please note this is happening starting from CXF 2.2.1 (no issue with 2.2) and
> the wsdl is RPC/Lit while all tests with Dispatch in the systests seem to be
> with DOC/Lit contract services.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.