[Users] SOAP : WSDL Proxy problem
mfillion
petals-components at ebmwebsourcing.com
Wed Mar 16 10:27:10 CET 2011
I made a webservice with JAX-WS witch work fine on tomcat.
WSDL File :
http://localhost:8080/Echo/echo?wsdl
Code:
<?xml version='1.0' encoding='UTF-8'?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.5-b03-. --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.5-b03-. --><definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ws.tests.mfi/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://ws.tests.mfi/" name="Echo">
<types>
<xsd:schema>
<xsd:import namespace="http://ws.tests.mfi/" schemaLocation="http://localhost:8080/Echo/echo?xsd=1" />
</xsd:schema>
</types>
<message name="getEcho">
<part name="parameters" element="tns:getEcho" />
</message>
<message name="getEchoResponse">
<part name="parameters" element="tns:getEchoResponse" />
</message>
<portType name="Echo">
<operation name="getEcho">
<input message="tns:getEcho" />
<output message="tns:getEchoResponse" />
</operation>
</portType>
<binding name="EchoImplPortBinding" type="tns:Echo">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<operation name="getEcho">
<soap:operation soapAction="" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
<service name="Echo">
<port name="EchoImplPort" binding="tns:EchoImplPortBinding">
<soap:address location="http://localhost:8080/Echo/echo" />
</port>
</service>
</definitions>
XSD File :
http://localhost:8080/Echo/echo?xsd=1
Code:
<?xml version='1.0' encoding='UTF-8'?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.5-b03-. --><xs:schema xmlns:tns="http://ws.tests.mfi/" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://ws.tests.mfi/">
<xs:element name="getEcho" type="tns:getEcho" />
<xs:element name="getEchoResponse" type="tns:getEchoResponse" />
<xs:complexType name="getEcho">
<xs:sequence>
<xs:element name="entree" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="getEchoResponse">
<xs:sequence>
<xs:element name="return" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:schema>
I made 2 SU, i succesfully deployed them on petals.
SU 1 : SOAP2JBI : jbi.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!-- JBI descriptor for the PEtALS component "SOAP", version 3.1 -->
<jbi:jbi version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-4.0"
xmlns:mfi="http://ws.tests.mfi/"
xmlns:soap="http://petals.ow2.org/components/soap/version-3.1">
<!-- Import a Service into PEtALS or Expose a PEtALS Service => use a BC. -->
<jbi:services binding-component="true">
<!-- Import a Service into PEtALS => provides a Service. -->
<jbi:provides
interface-name="mfi:EchoInterface"
service-name="mfi:EchoService"
endpoint-name="SoapEchoEndpoint">
<!-- CDK specific fields -->
<!-- WSDL file -->
<petalsCDK:wsdl>http://localhost:8080/Echo/echo?wsdl</petalsCDK:wsdl>
<!-- SOAP specific fields -->
<soap:address>http://localhost:8080/Echo/echo</soap:address>
<soap:soap-version>1.1</soap:soap-version>
<soap:add-root>false</soap:add-root>
<soap:chunked-mode>false</soap:chunked-mode>
<soap:cleanup-transport>true</soap:cleanup-transport>
<soap:mode>SOAP</soap:mode>
</jbi:provides>
</jbi:services>
</jbi:jbi>
SU 2 : JBI2SOAP : jbi.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!-- JBI descriptor for the PEtALS component "SOAP", version 3.1 -->
<jbi:jbi version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-4.0"
xmlns:mfi="http://ws.tests.mfi/"
xmlns:soap="http://petals.ow2.org/components/soap/version-3.1">
<!-- Import a Service into PEtALS or Expose a PEtALS Service => use a BC. -->
<jbi:services binding-component="true">
<!-- Expose a PEtALS Service => consumes a Service. -->
<jbi:consumes
interface-name="mfi:EchoInterface"
service-name="mfi:EchoService"
endpoint-name="SoapEchoEndpoint">
<!-- CDK specific fields -->
<petalsCDK:mep>InOut</petalsCDK:mep>
<!-- SOAP specific fields -->
<soap:address>PetalsEcho</soap:address>
<soap:remove-root>false</soap:remove-root>
<soap:mode>SOAP</soap:mode>
</jbi:consumes>
</jbi:services>
</jbi:jbi>
The petals web service is deployed and i can access to it at : http://localhost:8084/petals/services/PetalsEcho?wsdl
Code:
<?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.5-b03-. --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.5-b03-. --><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ws.tests.mfi/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Echo" targetNamespace="http://ws.tests.mfi/">
<types>
<xsd:schema>
<xsd:import namespace="http://ws.tests.mfi/" schemaLocation="http://localhost:8080/Echo/echo?xsd=1"/>
</xsd:schema>
</types>
<message name="getEcho">
<part element="tns:getEcho" name="parameters"/>
</message>
<message name="getEchoResponse">
<part element="tns:getEchoResponse" name="parameters"/>
</message>
<portType name="Echo">
<operation name="getEcho">
<input message="tns:getEcho"/>
<output message="tns:getEchoResponse"/>
</operation>
</portType>
<binding name="EchoImplPortBinding" type="tns:Echo">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getEcho">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="Echo">
<port binding="tns:EchoImplPortBinding" name="EchoImplPort">
<soap:address location="http://localhost:8080/Echo/echo"/>
</port>
</service>
</definitions>
In this wsdl the soap:adress location is http://localhost:8080/Echo/echo ant not http://localhost:8084/petals/services/PetalsEcho.
When a client analyse http://localhost:8084/petals/services/PetalsEcho?wsdl, it take http://localhost:8080/Echo/echo endpoint, that's my problem.
Thanks
-------------------- m2f --------------------
Read this forum topic online here:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=440#440
-------------------- m2f --------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://forum-list.petalslink.org/pipermail/users/attachments/20110316/92dff5a1/attachment.htm>
More information about the Users
mailing list