I have an existing Mule 3 api which is consuming a SOAP webservice
We are migrating our API from Mule 3 to Mule 4
Using Anypoint Studio - 7.16
, Mule runtime 4.5
Webservice Consumer version - 1.8.7
As stated above everything is working fine in Mule 3 .
The issue faced in Mule 4 is whenever am trying to invoke a soap operation using Consume
component keep getting this error :
[04-25 21:04:21] ERROR DefaultExceptionListener
[[MuleRuntime].uber.01: [emp-int-v1].my_soap_flowFlow.BLOCKING
@4b5b089]:
******************************************************************************** Message : Error trying to acquire a new connection:null
Element : my_soap_flowFlow/processors/4 @
emp-int-v1:implementation/my_soap_flow.xml:176 (Consume) Element
DSL : <wsc:consume doc:name=”Consume”
config-ref=”Web_Service_Consumer_Config_MyTest” operation=”Create”>
wsc:message wsc:body</wsc:body> wsc:headers</wsc:headers> </wsc:message> </wsc:consume> Error type : WSC:CONNECTIVITY FlowStack : at
my_soap_flowFlow(my_soap_flowFlow/processors/4 @
emp-int-v1:implementation/my_soap_flow.xml:176 (Consume)) Payload
Type :
org.mule.runtime.core.internal.streaming.bytes.ManagedCursorStreamProvider
——————————————————————————– Root Exception stack trace: java.lang.NullPointerException at
org.mule.wsdl.parser.locator.WsdlLocator.getImportInputSource(WsdlLocator.kt:52)
at
com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(WSDLReaderImpl.java:774)
Have made sure wsdl is fine by importing in SOAP UI and testing out the same operation which works fine
Here is the code for web service consumer and global config for the same
<wsc:consume doc:name="Consume" config-ref="Web_Service_Consumer_Config_MyTest" operation="Create">
<wsc:message >
<wsc:body ><![CDATA[#[vars.mySoapBody]]]></wsc:body>
<wsc:headers ><![CDATA[#[vars.mySoapHeaders]]]></wsc:headers>
</wsc:message>
</wsc:consume>
<wsc:config name="Web_Service_Consumer_Config_MyTest" doc:name="Web Service Consumer Config" >
<wsc:connection wsdlLocation="emp.wsdl" service="EmpService" port="EmpPort"
address="https://fictitious.cfg/services/soap" soapVersion="SOAP11">
<wsc:web-service-security >
<wsc:username-token-security-strategy username="empUser" password="empPwd" />
</wsc:web-service-security>
</wsc:connection>
</wsc:config>
I have tried to enable soap debug logs by adding below config in log4j.xml
<AsyncLogger name="org.mule.service.http.impl.service.HttpMessageLogger" level="DEBUG"/>
<AsyncLogger name="org.mule.service.http" level="DEBUG"/>
<AsyncLogger name="org.mule.extension.http" level="DEBUG"/>
<AsyncLogger name="org.apache.cxf" level="DEBUG"/>
<AsyncLogger name="org.mule.service.soap" level="DEBUG"/>
<AsyncLogger name="org.mule.extension.ws" level="DEBUG"/>
But somehow logs do not show any soap request details ….
Based on the error am wondering if the webservice consumer is not able to read/ parse wsdl ?
Note – all of this works fine in Mule 3