How can I make CXF ignore HTTP bindings? - soap

I'm currently trying to understand a WSDL file I've been given and why CXF (using CXF-2.7.17) would not generate a JAX-WS compliant class for this services. Here's an excerpt from the WSDL file:
<wsdl:portType name="ServiceSoap">
<wsdl:operation name="GetClient">
<wsdl:input message="tns:GetClientSoapIn" />
<wsdl:output message="tns:GetClientSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:portType name="ServiceHttpPost">
<wsdl:operation name="GetClient">
<wsdl:input message="tns:GetClientHttpPostIn" />
<wsdl:output message="tns:GetClientHttpPostOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ServiceSoap" type="tns:ServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="GetClient">
<soap:operation soapAction="http://ws.comp.com/GetClient" style="document" />
<wsdl:input>
<soap:body use="literal" />
<soap:header message="tns:GetClientCreds" part="Creds" use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:binding name="ServiceHttpPost" type="tns:ServiceHttpPost">
<http:binding verb="POST" />
<wsdl:operation name="GetClient">
<http:operation location="/GetClient" />
<wsdl:input>
<mime:content type="application/x-www-form-urlencoded" />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
The gist is, I have a WSDL file that contains more then my SOAP bindings, which I want CXF to turn into an actual service.
Using WSDL2Java on this WSDL file, I get the following stacktrace:
line 3168 column 66 of file:/home/user/test/Service.wsdl: cvc-complex-type.4: Attribute 'part' must appear on element 'mime:content'.
at org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:203)
at org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:119)
at org.apache.cxf.tools.validator.internal.SchemaValidator.isValid(SchemaValidator.java:103)
at org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WSDL11Validator.java:157)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.validate(JAXWSDefinitionBuilder.java:206)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:204)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:164)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:412)
at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
[...]
It complains about the line
<mime:content type="application/x-www-form-urlencoded" />
Which apparently comes from the cxf's built-in xsd complying to WS-I attachment profile, which requires part to be present (in contrast to the WSDL-1.1 spec).
Thus my question is:
Can I make the validator ignore these bindings?

Related

How to add explicit header to each operation in Axis2?

In Axis2 webservice, genearted wsdl should contain custom soap:header tag bind with each operation. Is there any way to do this?
For eg:
<wsdl:operation name="GetSearchMessage">
<soap:operation soapAction="http://services.ex.com" style="document" />
<wsdl:input name="GetSearchContractRequestType">
<soap:header message="tns:GetRequestHeader_Headers" part="RequestHeader" use="literal" />
<soap:body use="literal" />
</wsdl:input>
<wsdl:output name="GetSearchContractResponseType">
<soap:header message="tns:GetRequestHeader_Headers" part="RequestHeader" use="literal" />
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>

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

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.

CXF Web service proxy configuration issues in Mule

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>

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.