You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Simon Nash <na...@hursley.ibm.com> on 2007/09/12 23:56:55 UTC

[Fwd: Re: Java2WSDL output for no parameters or void return type?]

Resending as my first attempt was bounced by the list.

   Simon

-------- Original Message --------
Subject: Re: Java2WSDL output for no parameters or void return type?
Date: Wed, 12 Sep 2007 11:04:44 +0100
From: Simon Nash <na...@hursley.ibm.com>
Organization: IBM
To: tuscany-dev@ws.apache.org
CC: axis-dev@ws.apache.org
References: <c0...@mail.gmail.com>	 <58...@mail.gmail.com> <c0...@mail.gmail.com>

I am not quite clear about the intended changes in the Axis2 generator
in the future.  There were two different cases described, with only
one answer.  Please see my comments inline.

   Simon (Nash)

Simon Laws wrote:

> 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.
> 
This would resolve the first question about a method for an in-out MEP that
has no parameters.

> Regards
> 
> Simon
> 
> On 9/12/07, Deepal Jayasinghe <de...@gmail.com> wrote:
> 
>>
>>
>>On 9/12/07, Simon Laws <si...@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'm not quite sure whether this in answering the question about
   public String foo();

or the other question about
   public void foo(String param);

I think it's answering the former.  If I have understood this correctly,
then I'm not clear about what is the intention of Axis2 for the latter.
This case does seem to generate an in-only MEP at the moment.  Will it be
possible to create an in-out MEP for this case if the user wants this?

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



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [Fwd: Re: Java2WSDL output for no parameters or void return type?]

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Then it is Axis2 issue , so I created a JIRA
https://issues.apache.org/jira/browse/AXIS2-3199

Thanks
Deepal

Anne Thomas Manes wrote:
> Deepal,
>
> Per the wrapped convention, if you have the following interface:
>
>   public String foo();
>
> java2wsdl should generate an input element called "foo":
>
> <w:message name="fooRequest">
>   <w:part name="parameters" element="t:foo"/>
> </w:message>
>
> And "foo" must be defined as:
>
> <s:element name="foo">
>   </s:complexType>
> </s:element>
>
> See the JAX-WS spec for the specific requirements of the wrapped
> convention, or my blog for a quick overview:
>
> http://atmanes.blogspot.com/2005/03/wrapped-documentliteral-convention.html
>
> Anne
>
>
>
> On 9/13/07, Deepal Jayasinghe <de...@opensource.lk> wrote:
>   
>> Simon Laws wrote:
>>     
>>> Hi Deepal
>>>
>>> Some more comments/questions below.
>>>
>>> Thanks
>>>
>>> Simon
>>>
>>> On 9/13/07, *Deepal jayasinghe* <deepalk@gmail.com
>>> <ma...@gmail.com>> wrote:
>>>
>>>
>>>     > I'm not quite sure whether this in answering the question about
>>>     >   public String foo();
>>>     This does not take any method parameters , so user can send SOAP
>>>     message
>>>     with empty body .
>>>
>>>
>>> But in this case Axis at the server has to pull the operation name
>>> from the SOAPAction header.
>>>       
>> yes . And Axis2 generate SOAP action for that , so it can find the
>> operation from the generated SOAP action (if user sends that)
>>     
>>>     So when generating the Schema we do not need to
>>>     generate Schema element for the input.
>>>
>>>
>>> So in this case axis is happy that the operation name arrives at the
>>> server in the SOAPAction header rather than in the first child element
>>> of the <body>?
>>>       
>> It won't try to look for the body first child , so there wont be big
>> difference whether you send that or not. But sometime if you send the
>> body first child without sending SOAP action, that Axis2 will use its
>> local name to dispatch the operation.
>>     
>>> To put it another way. If you have parameters on you operationjava2WSL
>>> generates wrapped style WSDL. However it doesn't generate wrapped
>>> style WSDL if you don't have parameters on your operation (I'm using
>>> the definition of wrapped WSDL from JAX-WS in this case).
>>>       
>> Hmm , well need WSDL advice here , but as I know the WSDL we are
>> generating is correct according to the WSDL validators I have used.
>>     
>>> Sounds strange to me but I'm just trying to get confirmation that this
>>> behaviour is by design. There may be a good reason that I'm just not
>>> thinking of.
>>>
>>>     But we are generating message
>>>     element for both input and output. So we are generating in-out mep for
>>>     the above operation.
>>>     >
>>>     > or the other question about
>>>     >   public void foo(String param);
>>>     In this case we have method which take method parameter , so in this
>>>     case we generate two schema elements one for input and one for output.
>>>     And we generate two message elements as well. So in effect we generate
>>>     in-out mep.
>>>
>>>
>>> When I runjava2WSDL on an interface with the method signature
>>>
>>> public void foo(String param);
>>>
>>> I see
>>>
>>> a single message
>>> a single input part in this message
>>> a single XSD element
>>>       
>> That is correct , since you have in only operation.
>>     
>>> (see the WSDL I posted earlier in this thread)
>>>
>>> So it seems axis is generating an in only mep. How do I tell it to
>>> produce what you are saying here, i.e. an in-out mep
>>>
>>>     >
>>>     > I think it's answering the former.  If I have understood this
>>>     correctly,
>>>     > then I'm not clear about what is the intention of Axis2 for the
>>>     latter.
>>>     > This case does seem to generate an in-only MEP at the moment.
>>>     If the method is in only you need to have method with void as it
>>>     return
>>>     type.
>>>
>>>     public void update(String id){
>>>     }
>>>
>>>
>>> Are you saying here that any message with a void return type is
>>> assumed to be in-only? Or am I reading too much into this. To put it
>>> another way how do I tell java2WSDL to choose between the generation
>>> of in-only or in-out meps in this case.
>>>       
>> There is no way , it pick the MEP looking at the java method , if it is
>> void then it assume that as in-only , if the method is void and has a
>> exception then it will generate robust-in else it will generate in-out.
>>
>> Thanks
>> Deepal
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-dev-help@ws.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
>
>   



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [Fwd: Re: Java2WSDL output for no parameters or void return type?]

Posted by Anne Thomas Manes <at...@gmail.com>.
Deepal,

Per the wrapped convention, if you have the following interface:

  public String foo();

java2wsdl should generate an input element called "foo":

<w:message name="fooRequest">
  <w:part name="parameters" element="t:foo"/>
</w:message>

And "foo" must be defined as:

<s:element name="foo">
  </s:complexType>
</s:element>

See the JAX-WS spec for the specific requirements of the wrapped
convention, or my blog for a quick overview:

http://atmanes.blogspot.com/2005/03/wrapped-documentliteral-convention.html

Anne



On 9/13/07, Deepal Jayasinghe <de...@opensource.lk> wrote:
>
>
> Simon Laws wrote:
> > Hi Deepal
> >
> > Some more comments/questions below.
> >
> > Thanks
> >
> > Simon
> >
> > On 9/13/07, *Deepal jayasinghe* <deepalk@gmail.com
> > <ma...@gmail.com>> wrote:
> >
> >
> >     > I'm not quite sure whether this in answering the question about
> >     >   public String foo();
> >     This does not take any method parameters , so user can send SOAP
> >     message
> >     with empty body .
> >
> >
> > But in this case Axis at the server has to pull the operation name
> > from the SOAPAction header.
> yes . And Axis2 generate SOAP action for that , so it can find the
> operation from the generated SOAP action (if user sends that)
> >
> >     So when generating the Schema we do not need to
> >     generate Schema element for the input.
> >
> >
> > So in this case axis is happy that the operation name arrives at the
> > server in the SOAPAction header rather than in the first child element
> > of the <body>?
> It won't try to look for the body first child , so there wont be big
> difference whether you send that or not. But sometime if you send the
> body first child without sending SOAP action, that Axis2 will use its
> local name to dispatch the operation.
> >
> > To put it another way. If you have parameters on you operationjava2WSL
> > generates wrapped style WSDL. However it doesn't generate wrapped
> > style WSDL if you don't have parameters on your operation (I'm using
> > the definition of wrapped WSDL from JAX-WS in this case).
> Hmm , well need WSDL advice here , but as I know the WSDL we are
> generating is correct according to the WSDL validators I have used.
> >
> > Sounds strange to me but I'm just trying to get confirmation that this
> > behaviour is by design. There may be a good reason that I'm just not
> > thinking of.
> >
> >     But we are generating message
> >     element for both input and output. So we are generating in-out mep for
> >     the above operation.
> >     >
> >     > or the other question about
> >     >   public void foo(String param);
> >     In this case we have method which take method parameter , so in this
> >     case we generate two schema elements one for input and one for output.
> >     And we generate two message elements as well. So in effect we generate
> >     in-out mep.
> >
> >
> > When I runjava2WSDL on an interface with the method signature
> >
> > public void foo(String param);
> >
> > I see
> >
> > a single message
> > a single input part in this message
> > a single XSD element
> That is correct , since you have in only operation.
> >
> > (see the WSDL I posted earlier in this thread)
> >
> > So it seems axis is generating an in only mep. How do I tell it to
> > produce what you are saying here, i.e. an in-out mep
> >
> >     >
> >     > I think it's answering the former.  If I have understood this
> >     correctly,
> >     > then I'm not clear about what is the intention of Axis2 for the
> >     latter.
> >     > This case does seem to generate an in-only MEP at the moment.
> >     If the method is in only you need to have method with void as it
> >     return
> >     type.
> >
> >     public void update(String id){
> >     }
> >
> >
> > Are you saying here that any message with a void return type is
> > assumed to be in-only? Or am I reading too much into this. To put it
> > another way how do I tell java2WSDL to choose between the generation
> > of in-only or in-out meps in this case.
> There is no way , it pick the MEP looking at the java method , if it is
> void then it assume that as in-only , if the method is void and has a
> exception then it will generate robust-in else it will generate in-out.
>
> Thanks
> Deepal
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [Fwd: Re: Java2WSDL output for no parameters or void return type?]

Posted by Simon Nash <na...@hursley.ibm.com>.
Hi Deepal.  Thanks for your help with this.  See inline for my
comments and questions.

   Simon N.

Deepal Jayasinghe wrote:

> 
> Simon Laws wrote:
> 
>>Hi Deepal
>>
>>Some more comments/questions below.
>>
>>Thanks
>>
>>Simon
>>
>>On 9/13/07, *Deepal jayasinghe* <deepalk@gmail.com
>><ma...@gmail.com>> wrote:
>>
>>
>>    > I'm not quite sure whether this in answering the question about
>>    >   public String foo();
>>    This does not take any method parameters , so user can send SOAP
>>    message
>>    with empty body . 
>>
>>
>>But in this case Axis at the server has to pull the operation name
>>from the SOAPAction header.
> 
> yes . And Axis2 generate SOAP action for that , so it can find the
> operation from the generated SOAP action (if user sends that)
> 
>>    So when generating the Schema we do not need to
>>    generate Schema element for the input. 
>>
>>
>>So in this case axis is happy that the operation name arrives at the
>>server in the SOAPAction header rather than in the first child element
>>of the <body>?
> 
> It won't try to look for the body first child , so there wont be big
> difference whether you send that or not. But sometime if you send the
> body first child without sending SOAP action, that Axis2 will use its
> local name to dispatch the operation.
> 
This sounds like the right approach.  I have been looking into what
the WS-I Basic Profile says about this, and it says that interoperable
Web services should not rely only on the SOAP action for dispatching.
So since the Axis2 runtime is not only relying on this but is also
looking at the element name of the body first child (when available),
this is conformant with the WS-I Basic Profile.

>>To put it another way. If you have parameters on you operationjava2WSL
>>generates wrapped style WSDL. However it doesn't generate wrapped
>>style WSDL if you don't have parameters on your operation (I'm using
>>the definition of wrapped WSDL from JAX-WS in this case).
> 
> Hmm , well need WSDL advice here , but as I know the WSDL we are
> generating is correct according to the WSDL validators I have used.
>
It is valid doc/lit WSDL, but is doesn't conform to the doc/lit/wrapped
pattern.  I think the WSDL validators only check for doc/lit and don't
check for doc/lit/wrapped (the wrapped part of this is really more of
a usage convention).

The concern with sending an empty body is that this would not comply
with the WS-I Basic Profile because then it would be necessary to
make the dispatching decision based only on the SOAP action.  (I have
confirmed this with one of the authors of the WS-I Basic Profile.)
So if Tuscany wants to be WS-I conformant (which is required by the
SCA spec), then we need to generate WSDL with the non-empty body.
 From what you have said, the Axis2 runtime is fine with this and will
work with these SOAP messages in the way that WS-I expects.

>>Sounds strange to me but I'm just trying to get confirmation that this
>>behaviour is by design. There may be a good reason that I'm just not
>>thinking of.
>>
>>    But we are generating message
>>    element for both input and output. So we are generating in-out mep for
>>    the above operation.
>>    >
>>    > or the other question about
>>    >   public void foo(String param);
>>    In this case we have method which take method parameter , so in this
>>    case we generate two schema elements one for input and one for output.
>>    And we generate two message elements as well. So in effect we generate
>>    in-out mep.
>>
>>
>>When I runjava2WSDL on an interface with the method signature
>>
>>public void foo(String param);
>>
>>I see
>>
>>a single message
>>a single input part in this message
>>a single XSD element
> 
> That is correct , since you have in only operation.
> 
>>(see the WSDL I posted earlier in this thread)
>>
>>So it seems axis is generating an in only mep. How do I tell it to
>>produce what you are saying here, i.e. an in-out mep
>>
>>    >
>>    > I think it's answering the former.  If I have understood this
>>    correctly,
>>    > then I'm not clear about what is the intention of Axis2 for the
>>    latter.
>>    > This case does seem to generate an in-only MEP at the moment.
>>    If the method is in only you need to have method with void as it
>>    return
>>    type.
>>
>>    public void update(String id){
>>    }
>>
>>
>>Are you saying here that any message with a void return type is
>>assumed to be in-only? Or am I reading too much into this. To put it
>>another way how do I tell java2WSDL to choose between the generation
>>of in-only or in-out meps in this case.
> 
> There is no way , it pick the MEP looking at the java method , if it is
> void then it assume that as in-only , if the method is void and has a
> exception then it will generate robust-in else it will generate in-out.
> 
I agree that there is no way that Axis2 could know from the Java
code which MEP to generate.  In Tuscany, we have an annotation @OneWay
that can be used to specify which MEP the application wants.  So our
current thought is to take the in-only WSDL generated by Axis2 and
add an out message if there is no @OneWay annotation on the method.
Does this sound OK to you?

   Simon

> Thanks
> Deepal
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [Fwd: Re: Java2WSDL output for no parameters or void return type?]

Posted by Deepal Jayasinghe <de...@opensource.lk>.

Simon Laws wrote:
> Hi Deepal
>
> Some more comments/questions below.
>
> Thanks
>
> Simon
>
> On 9/13/07, *Deepal jayasinghe* <deepalk@gmail.com
> <ma...@gmail.com>> wrote:
>
>
>     > I'm not quite sure whether this in answering the question about
>     >   public String foo();
>     This does not take any method parameters , so user can send SOAP
>     message
>     with empty body . 
>
>
> But in this case Axis at the server has to pull the operation name
> from the SOAPAction header.
yes . And Axis2 generate SOAP action for that , so it can find the
operation from the generated SOAP action (if user sends that)
>
>     So when generating the Schema we do not need to
>     generate Schema element for the input. 
>
>
> So in this case axis is happy that the operation name arrives at the
> server in the SOAPAction header rather than in the first child element
> of the <body>?
It won't try to look for the body first child , so there wont be big
difference whether you send that or not. But sometime if you send the
body first child without sending SOAP action, that Axis2 will use its
local name to dispatch the operation.
>
> To put it another way. If you have parameters on you operationjava2WSL
> generates wrapped style WSDL. However it doesn't generate wrapped
> style WSDL if you don't have parameters on your operation (I'm using
> the definition of wrapped WSDL from JAX-WS in this case).
Hmm , well need WSDL advice here , but as I know the WSDL we are
generating is correct according to the WSDL validators I have used.
>
> Sounds strange to me but I'm just trying to get confirmation that this
> behaviour is by design. There may be a good reason that I'm just not
> thinking of.
>
>     But we are generating message
>     element for both input and output. So we are generating in-out mep for
>     the above operation.
>     >
>     > or the other question about
>     >   public void foo(String param);
>     In this case we have method which take method parameter , so in this
>     case we generate two schema elements one for input and one for output.
>     And we generate two message elements as well. So in effect we generate
>     in-out mep.
>
>
> When I runjava2WSDL on an interface with the method signature
>
> public void foo(String param);
>
> I see
>
> a single message
> a single input part in this message
> a single XSD element
That is correct , since you have in only operation.
>
> (see the WSDL I posted earlier in this thread)
>
> So it seems axis is generating an in only mep. How do I tell it to
> produce what you are saying here, i.e. an in-out mep
>
>     >
>     > I think it's answering the former.  If I have understood this
>     correctly,
>     > then I'm not clear about what is the intention of Axis2 for the
>     latter.
>     > This case does seem to generate an in-only MEP at the moment.
>     If the method is in only you need to have method with void as it
>     return
>     type.
>
>     public void update(String id){
>     }
>
>
> Are you saying here that any message with a void return type is
> assumed to be in-only? Or am I reading too much into this. To put it
> another way how do I tell java2WSDL to choose between the generation
> of in-only or in-out meps in this case.
There is no way , it pick the MEP looking at the java method , if it is
void then it assume that as in-only , if the method is void and has a
exception then it will generate robust-in else it will generate in-out.

Thanks
Deepal


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Fwd: [Fwd: Re: Java2WSDL output for no parameters or void return type?]

Posted by Simon Laws <si...@googlemail.com>.
---------- Forwarded message ----------
From: Simon Laws <si...@googlemail.com>
Date: Sep 13, 2007 7:09 AM
Subject: Re: [Fwd: Re: Java2WSDL output for no parameters or void return
type?]
To: axis-dev@ws.apache.org

Hi Deepal

Some more comments/questions below.

Thanks

Simon

On 9/13/07, Deepal jayasinghe <deepalk@gmail.com > wrote:
>
>
> > I'm not quite sure whether this in answering the question about
> >   public String foo();
> This does not take any method parameters , so user can send SOAP message
> with empty body .


But in this case Axis at the server has to pull the operation name from the
SOAPAction header.

So when generating the Schema we do not need to
> generate Schema element for the input.


So in this case axis is happy that the operation name arrives at the server
in the SOAPAction header rather than in the first child element of the
<body>?

To put it another way. If you have parameters on you operationjava2WSL
generates wrapped style WSDL. However it doesn't generate wrapped style WSDL
if you don't have parameters on your operation (I'm using the definition of
wrapped WSDL from JAX-WS in this case).

Sounds strange to me but I'm just trying to get confirmation that this
behaviour is by design. There may be a good reason that I'm just not
thinking of.

But we are generating message
> element for both input and output. So we are generating in-out mep for
> the above operation.
> >
> > or the other question about
> >   public void foo(String param);
> In this case we have method which take method parameter , so in this
> case we generate two schema elements one for input and one for output.
> And we generate two message elements as well. So in effect we generate
> in-out mep.


When I runjava2WSDL on an interface with the method signature

public void foo(String param);

I see

a single message
a single input part in this message
a single XSD element

(see the WSDL I posted earlier in this thread)

So it seems axis is generating an in only mep. How do I tell it to produce
what you are saying here, i.e. an in-out mep

>
> > I think it's answering the former.  If I have understood this correctly,
>
> > then I'm not clear about what is the intention of Axis2 for the latter.
> > This case does seem to generate an in-only MEP at the moment.
> If the method is in only you need to have method with void as it return
> type.
>
> public void update(String id){
> }


Are you saying here that any message with a void return type is assumed to
be in-only? Or am I reading too much into this. To put it another way how do
I tell java2WSDL to choose between the generation of in-only or in-out meps
in this case.

> Will it be
> > possible to create an in-out MEP for this case if the user wants this?
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>

Re: [Fwd: Re: Java2WSDL output for no parameters or void return type?]

Posted by Simon Laws <si...@googlemail.com>.
Hi Deepal

Some more comments/questions below.

Thanks

Simon

On 9/13/07, Deepal jayasinghe <de...@gmail.com> wrote:
>
>
> > I'm not quite sure whether this in answering the question about
> >   public String foo();
> This does not take any method parameters , so user can send SOAP message
> with empty body .


But in this case Axis at the server has to pull the operation name from the
SOAPAction header.

So when generating the Schema we do not need to
> generate Schema element for the input.


So in this case axis is happy that the operation name arrives at the server
in the SOAPAction header rather than in the first child element of the
<body>?

To put it another way. If you have parameters on you operationjava2WSL
generates wrapped style WSDL. However it doesn't generate wrapped style WSDL
if you don't have parameters on your operation (I'm using the definition of
wrapped WSDL from JAX-WS in this case).

Sounds strange to me but I'm just trying to get confirmation that this
behaviour is by design. There may be a good reason that I'm just not
thinking of.

But we are generating message
> element for both input and output. So we are generating in-out mep for
> the above operation.
> >
> > or the other question about
> >   public void foo(String param);
> In this case we have method which take method parameter , so in this
> case we generate two schema elements one for input and one for output.
> And we generate two message elements as well. So in effect we generate
> in-out mep.


When I runjava2WSDL on an interface with the method signature

public void foo(String param);

I see

a single message
a single input part in this message
a single XSD element

(see the WSDL I posted earlier in this thread)

So it seems axis is generating an in only mep. How do I tell it to produce
what you are saying here, i.e. an in-out mep

>
> > I think it's answering the former.  If I have understood this correctly,
> > then I'm not clear about what is the intention of Axis2 for the latter.
> > This case does seem to generate an in-only MEP at the moment.
> If the method is in only you need to have method with void as it return
> type.
>
> public void update(String id){
> }


Are you saying here that any message with a void return type is assumed to
be in-only? Or am I reading too much into this. To put it another way how do
I tell java2WSDL to choose between the generation of in-only or in-out meps
in this case.

> Will it be
> > possible to create an in-out MEP for this case if the user wants this?
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>

Re: [Fwd: Re: Java2WSDL output for no parameters or void return type?]

Posted by Deepal jayasinghe <de...@gmail.com>.
> I'm not quite sure whether this in answering the question about
>   public String foo();
This does not take any method parameters , so user can send SOAP message
with empty body . So when generating the Schema we do not need to
generate Schema element for the input. But we are generating message
element for both input and output. So we are generating in-out mep for
the above operation.
>
> or the other question about
>   public void foo(String param);
In this case we have method which take method parameter , so in this
case we generate two schema elements one for input and one for output.
And we generate two message elements as well. So in effect we generate
in-out mep.
>
> I think it's answering the former.  If I have understood this correctly,
> then I'm not clear about what is the intention of Axis2 for the latter.
> This case does seem to generate an in-only MEP at the moment.  
If the method is in only you need to have method with void as it return
type.

public void update(String id){
}
> Will it be
> possible to create an in-out MEP for this case if the user wants this?
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org