axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepal Jayasinghe" <deep...@gmail.com>
Subject Re: Java2WSDL output for no parameters or void return type?
Date Wed, 12 Sep 2007 05:41:31 GMT
On 9/12/07, Simon Laws <simonslaws@googlemail.com> wrote:
>
> Hi
>
> I asked this question on the user list but would like to move it along and
> ask the developer communities opinion....
>
>
> In the Apache Tuscany Incubator we are using the Axis2 Java2WSDL tooling.
> We generate document/literal/wrapped wsdl (the default I believe for
> java2WSDL) and in Tuscany we are using the JAX-WS V2 specification as a
> guide to what constitutes wrapped WSDL. We are coming up to our 1.0release (in a few
weeks time) and have run into a couple of issues where we
> need to decide quickly whether we are using the Axis2 tools incorrectly or
> whether we need to implement a work around.
>
> Note. We are running with Axis2 1.2 in Tuscany currently but I did the
> generation below with Axis2 1.3 just to see if anything had changed in the
> latest version.
>
> For the interface:
>
> public interface TestServiceParam {
>
>     public String foo();
>
> }
>
> Axis1.3 Java2WSDL produces
>
>     ...
>     <wsdl:types>
>         <xs:schema xmlns:ns=" http://test" attributeFormDefault="qualified"
> elementFormDefault="qualified" targetNamespace=" http://test">
>             <xs:element name="fooResponse">
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element minOccurs="0" name="return"
> nillable="true" type="xs:string"/>
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>         </xs:schema>
>     </wsdl:types>
>     <wsdl:message name="fooRequest"/>
>     <wsdl:message name="fooResponse">
>         <wsdl:part name="parameters" element="ns0:fooResponse"/>
>     </wsdl:message>
>     <wsdl:portType name="TestServiceParamPortType">
>         <wsdl:operation name="foo">
>             <wsdl:input message="ns0:fooRequest" wsaw:Action="urn:foo"/>
>             <wsdl:output message="ns0:fooResponse"
> wsaw:Action="urn:fooResponse"/>
>         </wsdl:operation>
>     </wsdl:portType>
>     ...
>
> I was expecting the following. I've added + to the lines that have been
> added.
>
>     ...
>     <wsdl:types>
>         <xs:schema xmlns:ns=" http://test"
> attributeFormDefault="qualified" elementFormDefault="qualified"
> targetNamespace=" http://test">
> +            <xs:element name="foo">
> +               <xs:complexType/>
> +           </xs:element>
>             <xs:element name="fooResponse">
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element minOccurs="0" name="return"
> nillable="true" type="xs:string"/>
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>         </xs:schema>
>     </wsdl:types>
>     <wsdl:message name="fooRequest">
> +        <wsdl:part name="parameters" element="ns0:foo"/>
>     </wsdl:message>
>     <wsdl:message name="fooResponse">
>         <wsdl:part name="parameters" element="ns0:fooResponse"/>
>     </wsdl:message>
>     <wsdl:portType name="TestServiceParamPortType">
>         <wsdl:operation name="foo">
>             <wsdl:input message="ns0:fooRequest" wsaw:Action="urn:foo"/>
>             <wsdl:output message="ns0:fooResponse"
> wsaw:Action="urn:fooResponse"/>
>         </wsdl:operation>
>     </wsdl:portType>
>     ...
>
> Is the current output produced by design and if so why is it this way?
> Are there options I can use to make java2WSDL generate the form I would
> like?
>
> For the interface
>
> public interface TestServiceReturn {
>
>     public void foo(String param);
>
> }
>
> Axis1.3 Java2WSDL produces
>
>     <wsdl:types>
>         <xs:schema xmlns:ns=" http://test"
> attributeFormDefault="qualified" elementFormDefault="qualified"
> targetNamespace=" http://test">
>             <xs:element name="foo">
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element minOccurs="0" name="param0"
> nillable="true" type="xs:string"/>
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>         </xs:schema>
>     </wsdl:types>
>     <wsdl:message name="fooRequest">
>         <wsdl:part name="parameters" element="ns0:foo"/>
>     </wsdl:message>
>     <wsdl:portType name="TestServiceReturnPortType">
>         <wsdl:operation name="foo">
>             <wsdl:input message="ns0:fooRequest" wsaw:Action="urn:foo"/>
>         </wsdl:operation>
>     </wsdl:portType>
>
> How did Axis2 decide to produce a one way message here?
> Is there a way I can ask java2WSDL to produce a 2 way message in this
> situation?
>

Its not one way , it is in-out MEP, but it does not take any method
parameters. So we do need to generate separate Schema element for  foo.


> I've looked in the mail lists and in JIRA and I don't see mention of this
> but I'm fairly new to the resources that Axis2 has to offer so there's a
> good chance I'm not looking in the right place or with the right search
> term. Apologies if it's staring me in the face.
>
> Thanks
>
> Simon Laws
> Apache Tuscany Incubator
>



-- 





============================
Deepal Jayasinghe
Lanka Software Foundation

Mime
View raw message