Skip to main content

I am completely new to AnyPoint Platform, and wanted to give it a shoot by running the "howto-wrapping a SOAP web service over a data base"

http://blogs.mulesoft.com/dev/howto/wrap-soap-web-service-around-a-database/

 

I strictly followed the instructions and successfully got the APP deployed in AnyPoint.

However, an error came out

'Error loading [http://localhost:8081/bank/loan?wsdl]: org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: Reference to undefined entity: copy ' when I started a new SOAP project in SOAP UI for test and entered the initial WSDL.

I tried to open the http://localhost:8081/bank/loan?wsdl in the browser and it worked, while not working in SOAP UI.

Could anyone give any hint about how to solve the problem?

This is my XML:

 

<mulexml:namespace prefix="sch" uri="http://www.mulesoft.com/schemas/Mule/Schema.xsd"/>

<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" basePath="bank" doc:name="HTTP Listener Configuration"/>

<db:mysql-config name="MySQL_Configuration" host="localhost" port="3306" user="generatedata" password="generatedata" database="bank" doc:name="MySQL Configuration"/>

<flow name="soap-on-db-Flow">

<http:listener config-ref="HTTP_Listener_Configuration" path="/loan" doc:name="ReceiveHttpRequest"/>

<cxf:proxy-service doc:name="Process SOAP request" namespace="http://www.example.org/loan_system_api_wsdl/" payload="body" service="loan_system_api_wsdl" wsdlLocation="loan_system_api_wsdl.wsdl"/>

<mulexml:dom-to-xml-transformer doc:name="Transform DOM to XML"/>

<db:select config-ref="MySQL_Configuration" doc:name="Perform query in DB ">

<db:parameterized-query><![CDATA[select * from loan where loan_id = # [xpath3("sch:getLoanRequest/sch:loanId")]] ]></db:parameterized-query>

</db:select>

<dw:transform-message doc:name="Transform Message">

<dw:set-payload><![CDATA[%dw 1.0

%output application/xml

%namespace ns0 http://www.mulesoft.com/schemas/Mule/Schema.xsd

---

{

ns0# getLoanResponse: {

ns0# loanList: {

ns0# loan: {

ns0# loanId: payload[0]."loan_id",

ns0# customerId: payload[0]."customer_id",

ns0# loanType: payload[0]."loan_type",

ns0# loanAmount: payload[0]."loan_amount",

ns0# monthlyPayment: payload[0]."monthly_payment",

ns0# interestRate: payload[0]."interest_rate"

}

}

}

}] ]>

</dw:transform-message>

<logger level="INFO" metadata:id="9db6e51d-18b7-47f5-9d37-3086e82ac384" doc:name="Logger"/>

</flow>

3 answers
0/9000