CXF Web service proxy configuration issues in Mule - soap

Right now, I have a service called ProcessPayment that calls a billing system. As we can see here, I want to make a call to another billing service from my payment service. The response from PaymentService has 3 data elements. One of them is required in BillingService.
How do I configure the flow for two or more services in Mule? I have tried various permutations but it just does not work!
Mule-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" xmlns:core="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:ognl="http://www.mulesoft.org/schema/mule/ognl" xmlns:servlet="http://www.mulesoft.org/schema/mule/servlet"
xmlns:vm="http://www.mulesoft.org/schema/mule/vm" xmlns:pattern="http://www.mulesoft.org/schema/mule/pattern"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.1/mule.xsd
http://www.mulesoft.org/schema/mule/pattern http://www.mulesoft.org/schema/mule/pattern/3.1/mule-pattern.xsd
http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ognl http://www.mulesoft.org/schema/mule/ognl/current/mule-ognl.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd">
<!-- <flow name="parallelservices"> <all enableCorrelation="ALWAYS"> <cxf:proxy-service
wsdlLocation="classpath:billingservice.wsdl" bindingId="BillingServiceServiceSoapBinding"
port="BillingServicePort" service="BillingServiceService" payload="body"
namespace="http://com.myapp.demo/" /> </all> </flow> -->
<flow name="initpayment">
<inbound-endpoint address="http://localhost:8585/services/processpayment">
<cxf:proxy-service wsdlLocation="classpath:processpaymentservice.wsdl"
bindingId="ProcessPaymentServiceServiceSoapBinding" service="ProcessPaymentServiceService"
payload="body" namespace="http://com.myapp.demo/" />
</inbound-endpoint>
<outbound-endpoint address="http://localhost:8081/BillingEntry/services/BillingServicePort">
<!-- <flow-ref name="parallelservices" /> -->
<cxf:proxy-client/>
</outbound-endpoint>
</flow>
</mule>
Process Payment wsdl
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="ProcessPaymentServiceService" targetNamespace="http://processpayment.icp.sf/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://com.myapp.demo/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://processpayment.icp.sf/" schemaLocation="processpaymentservice_schema1.xsd"/>
</schema>
</wsdl:types>
<wsdl:message name="processPayment">
<wsdl:part name="parameters" element="tns:processPayment">
</wsdl:part>
</wsdl:message>
<wsdl:message name="processPaymentResponse">
<wsdl:part name="parameters" element="tns:processPaymentResponse">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="IProcessPayment">
<wsdl:operation name="processPayment">
<wsdl:input name="processPayment" message="tns:processPayment">
</wsdl:input>
<wsdl:output name="processPaymentResponse" message="tns:processPaymentResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ProcessPaymentServiceServiceSoapBinding" type="tns:IProcessPayment">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="processPayment">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="processPayment">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="processPaymentResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ProcessPaymentServiceService">
<wsdl:port name="ProcessPaymentServicePort" binding="tns:ProcessPaymentServiceServiceSoapBinding">
<soap:address location="http://localhost:8081/ProcessPayment/services/ProcessPaymentServicePort"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Billing Service wsdl
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="BillingServiceService" targetNamespace="http://com.myapp.demo2/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://billing.icp.sf/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://billing.icp.sf/" schemaLocation="billingservice_schema1.xsd"/>
</schema>
</wsdl:types>
<wsdl:message name="billingEntryResponse">
<wsdl:part name="parameters" element="tns:billingEntryResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="billingEntry">
<wsdl:part name="parameters" element="tns:billingEntry">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="IBillingService">
<wsdl:operation name="billingEntry">
<wsdl:input name="billingEntry" message="tns:billingEntry">
</wsdl:input>
<wsdl:output name="billingEntryResponse" message="tns:billingEntryResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="BillingServiceServiceSoapBinding" type="tns:IBillingService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="billingEntry">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="billingEntry">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="billingEntryResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="BillingServiceService">
<wsdl:port name="BillingServicePort" binding="tns:BillingServiceServiceSoapBinding">
<soap:address location="http://localhost:8081/BillingEntry/services/BillingServicePort"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Immediate Problems
I am able to generate the wsdl for ProcessPayment service when I hit the Mule config inbound URL. But it is showing modified values for
<import schemaLocation="".../>
and
<wsdl:port><soap:address>*****</soap:address></wsdl:port>
Using this URL, I am not able to test the service on SOAPui. But when I hit the service original address, and not the Mule inbound address, I get my actual service. It s running in SOAP UI too.
Quick question:
How do I execute a flow? Simply invoking the inbound URL from the browser or SOAPui won't work right?

Here we go, I have created an example that demonstrates how to perform SOAP envelope level manipulations with CXF proxies. From there I'm sure you can expand and build whatever you need.
Please note that:
No code generation is needed, I actually had to remove the classes you've generated otherwise it is not working. This single XML configuration with the WSDLs+XSDs is enough.
I've qualified Mule core elements in order to avoid elements XSL-T generated in the default namespace to end up in Mule core namespace. This is not required if you externalize the XSL fragments.
The (contrived) example exposes processpaymentservice.wsdl. It takes the value of paymentType_req, pretends it's an IP address and uses it to call http://www.webservicex.net/geoipservice.asmx. The geolocated coutry name is then used as the value for the paymentType_res element of the process payment response (the other 2 values are faked).
Tested with soapUI 4.5 and Mule 3.2.1.
Enjoy!
<mule:flow name="processPaymentServiceOrchestration">
<http:inbound-endpoint address="http://localhost:8080/ppso"
exchange-pattern="request-response">
<cxf:proxy-service wsdlLocation="classpath:processpaymentservice.wsdl"
service="ProcessPaymentServiceService" namespace="http://processpayment.icp.sf/" />
</http:inbound-endpoint>
<!-- Transform input of ProcessPayment to input of GetGeoIP -->
<mulexml:xslt-transformer>
<mulexml:xslt-text>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:web="http://www.webservicex.net/">
<xsl:template match="/">
<web:GetGeoIP>
<web:IPAddress><xsl:value-of select="//paymentType_req" /></web:IPAddress>
</web:GetGeoIP>
</xsl:template>
</xsl:stylesheet>
</mulexml:xslt-text>
</mulexml:xslt-transformer>
<mule:message-properties-transformer>
<mule:add-message-property key="SOAPAction" value="http://www.webservicex.net/GetGeoIP" />
</mule:message-properties-transformer>
<http:outbound-endpoint address="http://www.webservicex.net/geoipservice.asmx"
exchange-pattern="request-response">
<cxf:proxy-client soapVersion="1.2" />
</http:outbound-endpoint>
<!-- Transform response of GetGeoIP in response of ProcessPayment -->
<mulexml:xslt-transformer>
<mulexml:xslt-text>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:pp="http://processpayment.icp.sf/" xmlns:web="http://www.webservicex.net/">
<xsl:template match="/">
<pp:return>
<billingID_res>fake billingID_res</billingID_res>
<paymentID_res>fake paymentID_res</paymentID_res>
<paymentType_res><xsl:value-of select="//web:CountryName"/></paymentType_res>
</pp:return>
</xsl:template>
</xsl:stylesheet>
</mulexml:xslt-text>
</mulexml:xslt-transformer>
</mule:flow>

Related

Problems with SOAP/XML-RPC Request from Jmeter

I'm kind of new with this Jmeter thing and I'm trying to do a simple SOAP/XML-RPC request on Jmeter. I'm using an example code I found on internet, that seems to work pretty fine (at least using Wizlet in Chrome didn't seem to have a problem), but when I use the soap request that generates the plug-in on the element in Jmeter... Well thats a different story. If someone could tell me the problem it would be awesome.
This is the code of the WSDL:
<wsdl:definitions xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://jee.javapapers.com" xmlns:intf="http://jee.javapapers.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://jee.javapapers.com">
<!--
WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)
-->
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://jee.javapapers.com">
<element name="animalType">
<complexType>
<sequence>
<element name="animal" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="animalTypeResponse">
<complexType>
<sequence>
<element name="animalTypeReturn" type="xsd:string"/>
</sequence>
</complexType>
</element>
</schema>
</wsdl:types>
<wsdl:message name="animalTypeResponse">
<wsdl:part element="impl:animalTypeResponse" name="parameters"/>
</wsdl:message>
<wsdl:message name="animalTypeRequest">
<wsdl:part element="impl:animalType" name="parameters"/>
</wsdl:message>
<wsdl:portType name="AnimalTypeService">
<wsdl:operation name="animalType">
<wsdl:input message="impl:animalTypeRequest" name="animalTypeRequest"/>
<wsdl:output message="impl:animalTypeResponse" name="animalTypeResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="AnimalTypeServiceSoapBinding" type="impl:AnimalTypeService">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="animalType">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="animalTypeRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="animalTypeResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="AnimalTypeServiceService">
<wsdl:port binding="impl:AnimalTypeServiceSoapBinding" name="AnimalTypeService">
<wsdlsoap:address location="http://localhost:8082/WebServicesAnimals/services/AnimalTypeService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
And this is the request i'm sending and the response error.
URL: http://localhost:8082/WebServicesAnimals/services/AnimalTypeService?WSDL
BODY:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<animalType xmlns="http://jee.javapapers.com">
<animal>Lion</animal>
</animalType>
</soapenv:Body>
</soapenv:Envelope>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1:Client.NoSOAPAction</faultcode>
<faultstring>no SOAPAction header!</faultstring>
<detail>
<ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">WBFINF05</ns2:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
I see at least 2 problems:
Why are you sending your request to the URL ending with ?WSDL, you should use:
http://localhost:8082/WebServicesAnimals/services/AnimalTypeService
Error says you don't have a SOAPAction. If you confirm you didn't set it, add a Header Manager and set soapAction to ""
Finally you should use regular HTTP REquest instead of SOAP/XML-RPC Request as per this tutorial:
https://jmeter.apache.org/usermanual/build-ws-test-plan.html

Mule & Eclipse's WSDL issue

so I have implemented a very simple webservice using eclipse and generated its WSDL using the CXF which is the framework used in Mule as well. However, when I try to publish that same service in Mule using the previously generated WSDL it stops due to something like "BadUsageException: -p invalid character" which is comes from the CXF. I have tried to the java classes from mule using an Axis generated WSDL but no luck with the CXF generated.
Here is my wsdl:
<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://snippet/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="SnippetService" targetNamespace="http://snippet/">
<wsdl:types>
<xs:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://snippet/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" elementFormDefault="unqualified" targetNamespace="http://snippet/" version="1.0">
<xs:element name="multiply" type="tns:multiply"/>
<xs:element name="multiplyResponse" type="tns:multiplyResponse"/>
<xs:element name="sum" type="tns:sum"/>
<xs:element name="sumResponse" type="tns:sumResponse"/>
<xs:complexType name="sum">
<xs:sequence>
<xs:element name="arg0" type="xs:int"/>
<xs:element name="arg1" type="xs:int"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="sumResponse">
<xs:sequence>
<xs:element name="return" type="xs:int"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="multiply">
<xs:sequence>
<xs:element name="arg0" type="xs:int"/>
<xs:element name="arg1" type="xs:int"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="multiplyResponse">
<xs:sequence>
<xs:element name="return" type="xs:int"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="multiplyResponse">
<wsdl:part element="tns:multiplyResponse" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="sumResponse">
<wsdl:part element="tns:sumResponse" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="sum">
<wsdl:part element="tns:sum" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="multiply">
<wsdl:part element="tns:multiply" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:portType name="InterNya">
<wsdl:operation name="sum">
<wsdl:input message="tns:sum" name="sum"></wsdl:input>
<wsdl:output message="tns:sumResponse" name="sumResponse"></wsdl:output>
</wsdl:operation>
<wsdl:operation name="multiply">
<wsdl:input message="tns:multiply" name="multiply"></wsdl:input>
<wsdl:output message="tns:multiplyResponse" name="multiplyResponse"></wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="SnippetServiceSoapBinding" type="tns:InterNya">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="sum">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="sum">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="sumResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="multiply">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="multiply">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="multiplyResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="SnippetService">
<wsdl:port binding="tns:SnippetServiceSoapBinding" name="SnippetPort">
<soap:address location="http://localhost:8080/hassib/services/SnippetPort"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Any help would be appreciated. Thanks.
Tested your WSDL with the Anypoint Studio July 2014 Release.
It correctly creates the Web Service classes you expect.
I used JavaSE-1.7 and a 3.5.1 Mule engine.
How I did it:
1. Drag a HTTP endpoint into a new flow
2. Drag a CXF endpoint behind
3. Open CXF properties and create the java classes using "Generate from WSDL" at the Service class property
Cheers,
Patrick

designate a default namespace for an element

I'm building a service to accept the following message. Note how InformationExchangePackage has no namespace prefix, but takes the default xmlns="http://www.something.com/dir/1.0.9". I can not figure out how to create this behavior in the WSDL.
The SOAP request I want to service:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<InformationExchangePackage xmlns:j="http://www.something.gov/dir/3.0.3" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="http://www.something.com/dir/1.0.9">
<j:OtherInformation>Sometext</OtherInformation>
</InformationExchangePackage>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Following is she SOAP request that soapUI generates. Note the prefix of "loc" on InformationExchangePackage (not what I want).
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:loc="http://localhost/">
<soapenv:Header/>
<soapenv:Body>
<loc:process>
<loc:InformationExchangePackage>
<OtherInformation>?</OtherInformation>
</loc:InformationExchangePackage>
</loc:process>
</soapenv:Body>
</soapenv:Envelope>
My current WSDL:
<?xml version="1.0" encoding="ISO-8859-1"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://localhost/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:cs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://localhost/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<wsdl:types>
<xs:schema targetNamespace="http://localhost/">
<xs:element name="InformationExchangePackage">
<xs:complexType>
<xs:sequence>
<xs:element name="OtherInformation" type="xs:anyType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="processResponseType">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="aCode"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="processRequest">
<wsdl:part name="InformationExchangePackage" element="tns:InformationExchangePackage"/>
</wsdl:message>
<wsdl:message name="processResponse">
<wsdl:part name="processResponse" element="tns:processResponseType"/>
</wsdl:message>
<wsdl:portType name="CCHEndpoint">
<wsdl:operation name="process">
<wsdl:input message="tns:processRequest"/>
<wsdl:output message="tns:processResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="CCHBinding" type="tns:CCHEndpoint">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="process">
<soap:operation soapAction="urn:process" style="rpc"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="CCHEndpointService">
<wsdl:port name="OrderService" binding="tns:CCHBinding">
<!--<soap:address location="http://localhost:8080/wildcat"/>-->
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
If I submit the request with the loc prefix, it works. If I submit the request without the loc prefix, I get:
org.apache.cxf.interceptor.Fault: Message part {http://www.something.com/dir/1.0.9}InformationExchangePackage was not recognized. (Does it exist in service WSDL?)
I imagine I'm missing a parameter in the WSDL. I've taken the following shots in the dark, to no avail:
<xs:element name="InformationExchangePackage" xsi:schemaLocation="http://www.something.com/dir/1.0.9">
<xs:element name="InformationExchangePackage" xsi:noNamespaceSchemaLocation="http://www.something.com/dir/1.0.9">
You don't have any wsdl:message blocks defined.

soapUI - Use WSDL from Websphere Message Broker

I'm doing a project with WebSphere Message Broker which results in 2 BAR files. One the client and the other the server. Both are deployed in a broker in a remote location (a server upstairs). The WSDL that the server flow uses is inside an Message Set Project. Here is the wsdl structure:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3.1-hudson-749-SNAPSHOT. -->
<definitions targetNamespace="http://ws.interact.bytesw.com/" name="TvPagaInteractWebService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://ws.interact.bytesw.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<types>
<xsd:schema>
<xsd:import namespace="http://ws.interact.bytesw.com/" schemaLocation="TvPagaInteractWebServiceService.xsd"/>
</xsd:schema>
</types>
<message name="ejecutarTransaccion">
<part name="parameters" element="tns:ejecutarTransaccion"/>
</message>
<message name="ejecutarTransaccionResponse">
<part name="parameters" element="tns:ejecutarTransaccionResponse"/>
</message>
<message name="consultarOperacion">
<part name="parameters" element="tns:consultarOperacion"/>
</message>
<message name="consultarOperacionResponse">
<part name="parameters" element="tns:consultarOperacionResponse"/>
</message>
<message name="consultarServicio">
<part name="parameters" element="tns:consultarServicio"/>
</message>
<message name="consultarServicioResponse">
<part name="parameters" element="tns:consultarServicioResponse"/>
</message>
<portType name="TvPagaInteractWebService">
<operation name="ejecutarTransaccion">
<input message="tns:ejecutarTransaccion"/>
<output message="tns:ejecutarTransaccionResponse"/>
</operation>
<operation name="consultarOperacion">
<input message="tns:consultarOperacion"/>
<output message="tns:consultarOperacionResponse"/>
</operation>
<operation name="consultarServicio">
<input message="tns:consultarServicio"/>
<output message="tns:consultarServicioResponse"/>
</operation>
</portType>
<binding name="TvPagaInteractWebServicePortBinding" type="tns:TvPagaInteractWebService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="ejecutarTransaccion">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="consultarOperacion">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="consultarServicio">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="TvPagaInteractWebService">
<port name="TvPagaInteractWebServicePort" binding="tns:TvPagaInteractWebServicePortBinding">
<soap:address location="REPLACE_WITH_ACTUAL_URL"/>
</port>
</service>
</definitions>
Once deployed I want to use it from soapUI. But I don't know which endpoint configure it. I've been trying some combinations including the IP and port of the broker connection. But doesn't work, can someone help me, please?
At the bottom of your WSDL you have this
<service name="TvPagaInteractWebService">
<port name="TvPagaInteractWebServicePort" binding="tns:TvPagaInteractWebServicePortBinding">
<soap:address location="REPLACE_WITH_ACTUAL_URL"/>
</port>
</service>
In REPLACE_WITH_ACTUAL_URL goes the address where WMB should bind this particular service so its accesible from the outside
The port which the broker is listening on is a property of the listener. The SOAP nodes use the EG level embedded listener by default so you can find this by executing the command:
mqsireportproperties -e -o HTTPConnector -r
This port can be found in this information but also the current URL registrations are displayed.
The path that the service is bound to is defined by the URL property on the SOAP node itself which you can find from the toolkit.

Simple WSDL, getting a ConnectException

i really need help with the simpliest things of WSDL.
i got the following WSDL, which is basically just generated code:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="MyFirstWSDL"
targetNamespace="http://www.example.org/MyFirstWSDL/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://www.example.org/MyFirstWSDL/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.example.org/MyFirstWSDL/">
<xsd:element name="getName">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="in" type="xsd:string"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getNameResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="out" type="xsd:string"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="getNameRequest">
<wsdl:part name="parameters" element="tns:getName"></wsdl:part>
</wsdl:message>
<wsdl:message name="getNameResponse">
<wsdl:part name="parameters" element="tns:getNameResponse"></wsdl:part>
</wsdl:message>
<wsdl:portType name="MyFirstInterface">
<wsdl:operation name="getName">
<wsdl:input message="tns:getNameRequest"></wsdl:input>
<wsdl:output message="tns:getNameResponse"></wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="NewBinding" type="tns:MyFirstInterface">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="getName">
<soap:operation
soapAction="http://www.example.org/MyFirstWSDL/getName" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MyFirstService">
<wsdl:port name="MyFirstPort" binding="tns:NewBinding">
<soap:address location="http://localhost:8197/MyFirstService/" />
</wsdl:port>
</wsdl:service>
Now, when generating a provider and testing the service with the "Web Services Explorer" I keep getting the following exception:
IWAB0135E An unexpected error has occurred.
java.net.ConnectException
Connection refused: connect
So, do you have any clue or suggestions to solve this problem?
thx in advance, matt
Probably because http://localhost:8197/MyFirstService/ is not answering from where you call it.
You can try to check this by telnetting there or simply putting the Address in a browser window.
Though as it is localhost, you should know if you started the server, that is accepting the web service client or not.