You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by ant elder <an...@gmail.com> on 2009/04/28 08:59:56 UTC

Fwd: why tuscany generate wsdl so insistently?

Forwarding this from user@ to dev@ as its come up again.

Does anyone remember the details about how wsdl generation is designed
to work? It looks like Tuscany *always* generates its own wsdl
replacing what may have been supplied in a contribution. I vaguely
remember that may be by design but can't find specific emails about it
and it doesn't seem the correct thing to be doing now.

   ...ant

---------- Forwarded message ----------
From: 路经纬 <lj...@gmail.com>
Date: 2009/4/14
Subject: Re: why tuscany generate wsdl so insistently?
To: user@tuscany.apache.org


Hi Raymond,I test according your advice,but same issue exist yet.

2009/4/14 Raymond Feng <en...@gmail.com>
>
> Hi,
>
> If the wsdlElement is pointing to a portType/binding/service, we create a new WSDL to reference the original one. Can you try <binding.ws wsdlElement="http://www.wiscom.com.cn/sample#wsdl.port(sampleService/sampleEndpoint)"/>?
> Thanks,
> Raymond
>
> From: 路经纬
> Sent: Monday, April 13, 2009 12:12 AM
> To: user@tuscany.apache.org
> Subject: why tuscany generate wsdl so insistently?
> Hi all,I want to publish webservice thought tuscany,and I write wsdl file firstly,and I want tuscany use the wsdl file when publish webservice.But I found tuscany so insistently generate wsdl file.
>
> following is my wsdl file sample.wsdl:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions targetNamespace="http://www.wiscom.com.cn/sample"
>                   xmlns:tns="http://www.wiscom.com.cn/sample"
>                   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>                   xmlns:xs="http://www.w3.org/2001/XMLSchema"
>                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
>     <wsdl:types>
>         <xs:schema attributeFormDefault="qualified"
>                    elementFormDefault="unqualified"
>                    targetNamespace="http://www.wiscom.com.cn/sample"
>                    xmlns:tns="http://www.wiscom.com.cn/sample"
>                    xmlns:xs="http://www.w3.org/2001/XMLSchema">
>             <xs:complexType name="student">
>                 <xs:sequence>
>                     <xs:element name="id" type="xs:int"/>
>                     <xs:element minOccurs="0" name="name" type="xs:string"/>
>                     <xs:element minOccurs="0" name="address" type="tns:address"/>
>                     <xs:element minOccurs="0" name="bornDate" type="xs:dateTime"/>
>                     <xs:element maxOccurs="unbounded" minOccurs="0" name="familyMembers" nillable="true"
>                                 type="tns:familyMember"/>
>                     <xs:element name="graduated" type="xs:boolean"/>
>                 </xs:sequence>
>             </xs:complexType>
>             <xs:complexType name="address">
>                 <xs:sequence>
>                     <xs:element minOccurs="0" name="city" type="xs:string"/>
>                     <xs:element minOccurs="0" name="conntry" type="xs:string"/>
>                     <xs:element minOccurs="0" name="street" type="xs:string"/>
>                 </xs:sequence>
>             </xs:complexType>
>             <xs:complexType name="familyMember">
>                 <xs:sequence>
>                     <xs:element name="age" type="xs:int"/>
>                     <xs:element minOccurs="0" name="name" type="xs:string"/>
>                     <xs:element minOccurs="0" name="relation" type="xs:string"/>
>                 </xs:sequence>
>             </xs:complexType>
>             <xs:element name="request">
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element minOccurs="0" name="arg0" nillable="true" type="tns:student"/>
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>             <xs:element name="response">
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element minOccurs="0" name="return" nillable="true" type="tns:student"/>
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>         </xs:schema>
>     </wsdl:types>
>     <wsdl:message name="requestMsg">
>         <wsdl:part name="parameter" element="tns:request"/>
>     </wsdl:message>
>     <wsdl:message name="responseMsg">
>         <wsdl:part name="parameter" element="tns:response"/>
>     </wsdl:message>
>     <wsdl:portType name="sampleInterface">
>         <wsdl:operation name="process">
>             <wsdl:input message="tns:requestMsg"/>
>             <wsdl:output message="tns:responseMsg"/>
>         </wsdl:operation>
>     </wsdl:portType>
>     <wsdl:binding name="sampleBinding" type="tns:sampleInterface">
>         <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>         <wsdl:operation name="process">
>             <soap:operation/>
>             <wsdl:input>
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:service name="sampleService">
>         <wsdl:port name="sampleEndpoint" binding="tns:sampleBinding">
>             <soap:address location="http://127.0.0.1:8080/bs/sampleService"/>
>         </wsdl:port>
>     </wsdl:service>
> </wsdl:definitions>
>
> and following is composite file:
>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>            targetNamespace="http://wiscom"
>            xmlns:wiscom="http://wiscom"
>            xmlns:dbsdo="http://tuscany.apache.org/xmlns/sca/databinding/sdo/1.0"
>            xmlns:wsdli="http://www.w3.org/2004/08/wsdl-instance"
>            name="baseinfo">
>     <dbsdo:import.sdo location="wsdl/sample.wsdl"/>
>     <component name="baseInfoServiceComponent">
>         <implementation.java class="com.wiscom.tuscany.demo.baseinfo.BaseInfoServiceImpl"/>
>         <service name="BaseInfoService">
>             <interface.java interface="com.wiscom.tuscany.demo.baseinfo.BaseInfoService"/>
>             <!--<interface.wsdl interface="http://www.wiscom.com.cn/sample#wsdl.interface(sampleInterface)"/>-->
>             <binding.ws wsdlElement="http://www.wiscom.com.cn/sample#wsdl.service(sampleService)"/>
>         </service>
>     </component>
> </composite>
>
> and when application startup,I access http://127.0.0.1:8080/bs/sampleService?wsdl, I get the following:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions name="baseInfoServiceComponent.BaseInfoService" targetNamespace="http://www.wiscom.com.cn/baseInfoServiceComponent/BaseInfoService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://www.wiscom.com.cn/baseInfoServiceComponent/BaseInfoService" xmlns:ns0="http://www.wiscom.com.cn/sample" xmlns:SOAP11="http://schemas.xmlsoap.org/wsdl/soap/">
>   <wsdl:import namespace="http://www.wiscom.com.cn/sample" location="/bs/sampleService?wsdl=wsdl/sample.wsdl">
>     </wsdl:import>
>   <wsdl:service name="sampleInterfaceService">
>     <wsdl:port name="sampleEndpoint" binding="ns0:sampleBinding">
>       <SOAP11:address location="http://192.168.1.112:8080/bs/sampleService"/>
>     </wsdl:port>
>   </wsdl:service>
> </wsdl:definitions>
>
> Tuscany generate new wsdl file and new namespace,not using the sample.wsdl directly.how to do letting tuscany use sample.wsdl directly?
>
>
>
>

Re: Fwd: why tuscany generate wsdl so insistently?

Posted by ant elder <an...@apache.org>.
On Tue, Apr 28, 2009 at 5:47 PM, ant elder <an...@apache.org> wrote:
> 2009/4/28 Raymond Feng <en...@gmail.com>:
>> Here is the discussion thread I found:
>> http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg32475.html
>>
>> It's in the same direction as the latest OASIS binding.ws spec:
>> http://docs.oasis-open.org/opencsa/sca-bindings/sca-wsbinding-1.1-spec.html
>>
>> Thanks,
>> Raymond
>>
>
> Thanks Raymond, that was the email i was looking for. That email says:
>
> "The SCA Web Service binding spec says that a WSDL document should
> be generated for a service that uses <binding.ws>.  This applies
> whether or not the <binding.ws> element specifies an existing
> WSDL document."
>
> Can you or anyone see in the latest WS binding spec where that is
> said? I can see in section 4 it says
>
> "This section describes the defaults to be used if the specific
> transport details are not otherwise specified."
>
> but i can't see where it says if a binding.ws points to an existing
> wsdl doc then that doc shouldn't be used?
>
>   ...ant
>

Reading the latest OASIS WS binding spec i think this should not be
happening now, I've raised TUSCANY-3001 to cover it. The latest spec
doesn't yet include the conformance statements but it seems likely to
me that based on the current wording when the conformance statements
are added there would be one related to this, so we'll likly need to
fix it for 2.0.

   ...ant

Re: Fwd: why tuscany generate wsdl so insistently?

Posted by ant elder <an...@apache.org>.
2009/4/28 Raymond Feng <en...@gmail.com>:
> Here is the discussion thread I found:
> http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg32475.html
>
> It's in the same direction as the latest OASIS binding.ws spec:
> http://docs.oasis-open.org/opencsa/sca-bindings/sca-wsbinding-1.1-spec.html
>
> Thanks,
> Raymond
>

Thanks Raymond, that was the email i was looking for. That email says:

"The SCA Web Service binding spec says that a WSDL document should
be generated for a service that uses <binding.ws>.  This applies
whether or not the <binding.ws> element specifies an existing
WSDL document."

Can you or anyone see in the latest WS binding spec where that is
said? I can see in section 4 it says

"This section describes the defaults to be used if the specific
transport details are not otherwise specified."

but i can't see where it says if a binding.ws points to an existing
wsdl doc then that doc shouldn't be used?

   ...ant

Re: Fwd: why tuscany generate wsdl so insistently?

Posted by Raymond Feng <en...@gmail.com>.
Here is the discussion thread I found:
http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg32475.html

It's in the same direction as the latest OASIS binding.ws spec:
http://docs.oasis-open.org/opencsa/sca-bindings/sca-wsbinding-1.1-spec.html

Thanks,
Raymond

--------------------------------------------------
From: "ant elder" <an...@gmail.com>
Sent: Monday, April 27, 2009 11:59 PM
To: <de...@tuscany.apache.org>
Subject: Fwd: why tuscany generate wsdl so insistently?

> Forwarding this from user@ to dev@ as its come up again.
>
> Does anyone remember the details about how wsdl generation is designed
> to work? It looks like Tuscany *always* generates its own wsdl
> replacing what may have been supplied in a contribution. I vaguely
> remember that may be by design but can't find specific emails about it
> and it doesn't seem the correct thing to be doing now.
>
>   ...ant
>
> ---------- Forwarded message ----------
> From: 路经纬 <lj...@gmail.com>
> Date: 2009/4/14
> Subject: Re: why tuscany generate wsdl so insistently?
> To: user@tuscany.apache.org
>
>
> Hi Raymond,I test according your advice,but same issue exist yet.
>
> 2009/4/14 Raymond Feng <en...@gmail.com>
>>
>> Hi,
>>
>> If the wsdlElement is pointing to a portType/binding/service, we create a 
>> new WSDL to reference the original one. Can you try <binding.ws 
>> wsdlElement="http://www.wiscom.com.cn/sample#wsdl.port(sampleService/sampleEndpoint)"/>?
>> Thanks,
>> Raymond
>>
>> From: 路经纬
>> Sent: Monday, April 13, 2009 12:12 AM
>> To: user@tuscany.apache.org
>> Subject: why tuscany generate wsdl so insistently?
>> Hi all,I want to publish webservice thought tuscany,and I write wsdl file 
>> firstly,and I want tuscany use the wsdl file when publish webservice.But 
>> I found tuscany so insistently generate wsdl file.
>>
>> following is my wsdl file sample.wsdl:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <wsdl:definitions targetNamespace="http://www.wiscom.com.cn/sample"
>>                   xmlns:tns="http://www.wiscom.com.cn/sample"
>>                   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>                   xmlns:xs="http://www.w3.org/2001/XMLSchema"
>>                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
>>     <wsdl:types>
>>         <xs:schema attributeFormDefault="qualified"
>>                    elementFormDefault="unqualified"
>>                    targetNamespace="http://www.wiscom.com.cn/sample"
>>                    xmlns:tns="http://www.wiscom.com.cn/sample"
>>                    xmlns:xs="http://www.w3.org/2001/XMLSchema">
>>             <xs:complexType name="student">
>>                 <xs:sequence>
>>                     <xs:element name="id" type="xs:int"/>
>>                     <xs:element minOccurs="0" name="name" 
>> type="xs:string"/>
>>                     <xs:element minOccurs="0" name="address" 
>> type="tns:address"/>
>>                     <xs:element minOccurs="0" name="bornDate" 
>> type="xs:dateTime"/>
>>                     <xs:element maxOccurs="unbounded" minOccurs="0" 
>> name="familyMembers" nillable="true"
>>                                 type="tns:familyMember"/>
>>                     <xs:element name="graduated" type="xs:boolean"/>
>>                 </xs:sequence>
>>             </xs:complexType>
>>             <xs:complexType name="address">
>>                 <xs:sequence>
>>                     <xs:element minOccurs="0" name="city" 
>> type="xs:string"/>
>>                     <xs:element minOccurs="0" name="conntry" 
>> type="xs:string"/>
>>                     <xs:element minOccurs="0" name="street" 
>> type="xs:string"/>
>>                 </xs:sequence>
>>             </xs:complexType>
>>             <xs:complexType name="familyMember">
>>                 <xs:sequence>
>>                     <xs:element name="age" type="xs:int"/>
>>                     <xs:element minOccurs="0" name="name" 
>> type="xs:string"/>
>>                     <xs:element minOccurs="0" name="relation" 
>> type="xs:string"/>
>>                 </xs:sequence>
>>             </xs:complexType>
>>             <xs:element name="request">
>>                 <xs:complexType>
>>                     <xs:sequence>
>>                         <xs:element minOccurs="0" name="arg0" 
>> nillable="true" type="tns:student"/>
>>                     </xs:sequence>
>>                 </xs:complexType>
>>             </xs:element>
>>             <xs:element name="response">
>>                 <xs:complexType>
>>                     <xs:sequence>
>>                         <xs:element minOccurs="0" name="return" 
>> nillable="true" type="tns:student"/>
>>                     </xs:sequence>
>>                 </xs:complexType>
>>             </xs:element>
>>         </xs:schema>
>>     </wsdl:types>
>>     <wsdl:message name="requestMsg">
>>         <wsdl:part name="parameter" element="tns:request"/>
>>     </wsdl:message>
>>     <wsdl:message name="responseMsg">
>>         <wsdl:part name="parameter" element="tns:response"/>
>>     </wsdl:message>
>>     <wsdl:portType name="sampleInterface">
>>         <wsdl:operation name="process">
>>             <wsdl:input message="tns:requestMsg"/>
>>             <wsdl:output message="tns:responseMsg"/>
>>         </wsdl:operation>
>>     </wsdl:portType>
>>     <wsdl:binding name="sampleBinding" type="tns:sampleInterface">
>>         <soap:binding style="document" 
>> transport="http://schemas.xmlsoap.org/soap/http"/>
>>         <wsdl:operation name="process">
>>             <soap:operation/>
>>             <wsdl:input>
>>                 <soap:body use="literal"/>
>>             </wsdl:input>
>>             <wsdl:output>
>>                 <soap:body use="literal"/>
>>             </wsdl:output>
>>         </wsdl:operation>
>>     </wsdl:binding>
>>     <wsdl:service name="sampleService">
>>         <wsdl:port name="sampleEndpoint" binding="tns:sampleBinding">
>>             <soap:address 
>> location="http://127.0.0.1:8080/bs/sampleService"/>
>>         </wsdl:port>
>>     </wsdl:service>
>> </wsdl:definitions>
>>
>> and following is composite file:
>>
>> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>>            targetNamespace="http://wiscom"
>>            xmlns:wiscom="http://wiscom"
>> 
>> xmlns:dbsdo="http://tuscany.apache.org/xmlns/sca/databinding/sdo/1.0"
>>            xmlns:wsdli="http://www.w3.org/2004/08/wsdl-instance"
>>            name="baseinfo">
>>     <dbsdo:import.sdo location="wsdl/sample.wsdl"/>
>>     <component name="baseInfoServiceComponent">
>>         <implementation.java 
>> class="com.wiscom.tuscany.demo.baseinfo.BaseInfoServiceImpl"/>
>>         <service name="BaseInfoService">
>>             <interface.java 
>> interface="com.wiscom.tuscany.demo.baseinfo.BaseInfoService"/>
>>             <!--<interface.wsdl 
>> interface="http://www.wiscom.com.cn/sample#wsdl.interface(sampleInterface)"/>-->
>>             <binding.ws 
>> wsdlElement="http://www.wiscom.com.cn/sample#wsdl.service(sampleService)"/>
>>         </service>
>>     </component>
>> </composite>
>>
>> and when application startup,I access 
>> http://127.0.0.1:8080/bs/sampleService?wsdl, I get the following:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <wsdl:definitions name="baseInfoServiceComponent.BaseInfoService" 
>> targetNamespace="http://www.wiscom.com.cn/baseInfoServiceComponent/BaseInfoService" 
>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>> xmlns:tns="http://www.wiscom.com.cn/baseInfoServiceComponent/BaseInfoService" 
>> xmlns:ns0="http://www.wiscom.com.cn/sample" 
>> xmlns:SOAP11="http://schemas.xmlsoap.org/wsdl/soap/">
>>   <wsdl:import namespace="http://www.wiscom.com.cn/sample" 
>> location="/bs/sampleService?wsdl=wsdl/sample.wsdl">
>>     </wsdl:import>
>>   <wsdl:service name="sampleInterfaceService">
>>     <wsdl:port name="sampleEndpoint" binding="ns0:sampleBinding">
>>       <SOAP11:address 
>> location="http://192.168.1.112:8080/bs/sampleService"/>
>>     </wsdl:port>
>>   </wsdl:service>
>> </wsdl:definitions>
>>
>> Tuscany generate new wsdl file and new namespace,not using the 
>> sample.wsdl directly.how to do letting tuscany use sample.wsdl directly?
>>
>>
>>
>>
>