axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Laws" <simonsl...@googlemail.com>
Subject Re: Java2WSDL output for no parameters or void return type?
Date Wed, 12 Sep 2007 05:52:31 GMT
Thanks for the reply Deepal. So we can assume that in some future version of
Axis2 running java2wsdl on the method

 public String foo();

Will give rise to the types

+            <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>

If we know this is the intention we can code accordingly in Tuscany, i.e.
potentially post process the WSDL definition for now to add in the missing
type.

Regards

Simon

On 9/12/07, Deepal Jayasinghe <deepalk@gmail.com> wrote:
>
>
>
> 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