I have WSDL which defines an asynchronous message. The port type and wsdl
operation do not define any output as in the following extract:
<wsdl:portType name="RequestInbound">
<wsdl:operation name="RequestInbound">
<wsdl:input message="p1
1.PickingRequestIn" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="RequestInboundBinding" type="p1:RequestInbound" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
<wsdl:operation name="RequestInbound">
<soap:operation soapAction="http://sap.com/xi/WebService/soap1.1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
<wsdl:input>
<soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
When I use this WSDL to create a SOAP service using cxf wsdl2java it creates a class with a @OneWay annotatation for the method.
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
@Oneway
@WebMethod(operationName = "RequestInbound", action = "http://sap.com/xi/WebService/soap1.1")
public void requestInbound( @WebParam(partName = "RequestIn", name = "RequestIn", targetNamespace = "urn:pnp:eiss:im")
RequestIn requestIn
);
I have my service defined as follows:
<service name="DeliveryRequestService">
<inbound>
<inbound-endpoint address="cxf:http://localhost:8777/esb/DeliveryRequestService
" synchronous="true"/>
</inbound>
<component>
<singleton-object class="request.RequestInboundImpl" />
</component>
</service>
When I call the webservice, the method runs but while writing the reponse
back to the client I get the following exception:
[10-01 15:36:22] ERROR DefaultExceptionStrategy
[connector.http.0.receiver.2]: Caught exception in Exception Strategy:
null
java.lang.NullPointerException
at
org.mule.transport.cxf.CxfServiceComponent$1.write(CxfServiceComponent.j
ava:272)
at
org.mule.transport.http.HttpServerConnection.writeResponse(HttpServerCon
nection.java:281)
at
org.mule.transport.http.HttpMessageReceiver$HttpWorker.run(HttpMessageRe
ceiver.java:189)
at org.mule.work.WorkerContext.run(WorkerContext.java:310)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWor
ker(ThreadPoolExecutor.java:1061)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker
.run(ThreadPoolExecutor.java:575)
at java.lang.Thread.run(Unknown Source)
Mule sends a result back but the Content Type in the HTTP header is set to
text/plain.