axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Nash <>
Subject Re: [Fwd: Re: Java2WSDL output for no parameters or void return type?]
Date Thu, 13 Sep 2007 09:09:23 GMT
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.
>>On 9/13/07, *Deepal jayasinghe* <
>><>> 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?


> Thanks
> Deepal
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message