You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Amila Suriarachchi <am...@gmail.com> on 2007/03/15 13:22:24 UTC

[Axis2] Parameter Oder and jaxws tests problem

Lets take this wsdl fragment.
<wsdl:message name="RequestMessage1">
        <wsdl:part name="Part1" type="xsd:string"/>
        <wsdl:part name="Part2" type="xsd:string"/>
        <wsdl:part name="Part3" type="xsd:string"/>
 </wsdl:message>
  <wsdl:message name="ResponseMessage1">
        <wsdl:part name="Part4" type="xsd:string"/>
  </wsdl:message>
...
<wsdl:portType name="PortType1">
        <wsdl:operation name="Operation1" parameterOrder="Part2 Part1
Part3">
            <wsdl:input message="tns:RequestMessage1"/>
            <wsdl:output message="tns:ResponseMessage1"/>
        </wsdl:operation>
    </wsdl:portType>

Assume this portType binds to an rpc/literal type soap binding.
Then the Request message should have parts Part1,Part2, Part3.
What about the response Message?
The wsdl spec says the only part we can miss should be the return type.
Therefore the response
message should have a part called *result* (instead of Part4 since it is the
return type)
Please correct me if I wrong.

However In the current implementation I have made a mistake, So that the
response does not include any parts.
I belive this is wrong.

The jaxws tests have a test called RPCProxyTests.java and it uses the
RPCLit.wsdl.

this wsdl contains similar cases as in above.
eg.
<wsdl:message name="testListsRequest">
      <wsdl:part name="arg_0_0" type="impl:QNameList"/>
      <wsdl:part name="arg_1_0" type="impl:CalendarList"/>
      <wsdl:part name="arg_2_0" type="impl:StringList"/>
      <wsdl:part name="arg_3_0" type="impl:BigIntegerList"/>
      <wsdl:part name="arg_4_0" type="impl:LongList"/>
      <wsdl:part name="arg_5_0" type="impl:EnumList"/>
      <wsdl:part name="arg_7_0" type="impl:EnumList2"/>
      <wsdl:part name="arg_6_0" type="impl:complexAll"/>
   </wsdl:message>

   <wsdl:message name="testCalendarList1Response">
      <wsdl:part name="testCalendarList1Return" type="impl:CalendarList"/>
   </wsdl:message>

<wsdl:operation name="testLists" parameterOrder="arg_0_0 arg_1_0 arg_2_0
arg_3_0 arg_4_0 arg_5_0 arg_7_0 arg_6_0">
         <wsdl:input message="impl:testListsRequest"
name="testListsRequest"/>
         <wsdl:output message="impl:testListsResponse"
name="testListsResponse"/>
</wsdl:operation>

The problem is,
  When I fixed the earlier problem in WSDL11ToAxisServiceBuilder (i.e. to
insert the return type)
 It seems This test case get fail.

As a result of this I can not fix this bug and can someone please look into
this test case?
Can someone check whether it generates a part for  *testCalendarList1Return*
and similar parts as well.

Thankx.
Amila.


-- 
Amila Suriarachchi,
WSO2 Inc.

Re: [Axis2] Parameter Oder and jaxws tests problem

Posted by Davanum Srinivas <da...@gmail.com>.
Nick, Rich,

Thoughts please.

thanks,
dims

On 3/15/07, Amila Suriarachchi <am...@gmail.com> wrote:
> Lets take this wsdl fragment.
> <wsdl:message name="RequestMessage1">
>         <wsdl:part name="Part1" type="xsd:string"/>
>         <wsdl:part name="Part2" type="xsd:string"/>
>         <wsdl:part name="Part3" type="xsd:string"/>
>  </wsdl:message>
>   <wsdl:message name="ResponseMessage1">
>         <wsdl:part name="Part4" type="xsd:string"/>
>   </wsdl:message>
> ...
> <wsdl:portType name="PortType1">
>         <wsdl:operation name="Operation1" parameterOrder="Part2 Part1
> Part3">
>             <wsdl:input message="tns:RequestMessage1"/>
>             <wsdl:output message="tns:ResponseMessage1"/>
>         </wsdl:operation>
>     </wsdl:portType>
>
> Assume this portType binds to an rpc/literal type soap binding.
> Then the Request message should have parts Part1,Part2, Part3.
> What about the response Message?
> The wsdl spec says the only part we can miss should be the return type.
> Therefore the response
> message should have a part called *result* (instead of Part4 since it is the
> return type)
> Please correct me if I wrong.
>
> However In the current implementation I have made a mistake, So that the
> response does not include any parts.
> I belive this is wrong.
>
> The jaxws tests have a test called RPCProxyTests.java and it uses the
> RPCLit.wsdl.
>
> this wsdl contains similar cases as in above.
> eg.
> <wsdl:message name="testListsRequest">
>       <wsdl:part name="arg_0_0" type="impl:QNameList"/>
>       <wsdl:part name="arg_1_0" type="impl:CalendarList"/>
>       <wsdl:part name="arg_2_0" type="impl:StringList"/>
>       <wsdl:part name="arg_3_0" type="impl:BigIntegerList"/>
>       <wsdl:part name="arg_4_0" type="impl:LongList"/>
>       <wsdl:part name="arg_5_0" type="impl:EnumList"/>
>       <wsdl:part name="arg_7_0" type="impl:EnumList2"/>
>       <wsdl:part name="arg_6_0" type="impl:complexAll"/>
>    </wsdl:message>
>
>    <wsdl:message name="testCalendarList1Response">
>       <wsdl:part name="testCalendarList1Return" type="impl:CalendarList"/>
>    </wsdl:message>
>
> <wsdl:operation name="testLists" parameterOrder="arg_0_0 arg_1_0 arg_2_0
> arg_3_0 arg_4_0 arg_5_0 arg_7_0 arg_6_0">
>          <wsdl:input message="impl:testListsRequest"
> name="testListsRequest"/>
>          <wsdl:output message="impl:testListsResponse"
> name="testListsResponse"/>
> </wsdl:operation>
>
> The problem is,
>   When I fixed the earlier problem in WSDL11ToAxisServiceBuilder ( i.e. to
> insert the return type)
>  It seems This test case get fail.
>
> As a result of this I can not fix this bug and can someone please look into
> this test case?
> Can someone check whether it generates a part for  *testCalendarList1Return*
> and similar parts as well.
>
> Thankx.
> Amila.
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.


-- 
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers

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


[Axis2] Parameter Oder and jaxws tests problem

Posted by Amila Suriarachchi <am...@gmail.com>.
On 3/15/07, Nicholas L Gallardo <nl...@us.ibm.com> wrote:
>
>
> Amila,
>
> > Assume this portType binds to an rpc/literal type soap binding.
> > Then the Request message should have parts Part1,Part2, Part3.
> > What about the response Message?
> > The wsdl spec says the only part we can miss should be the return type.
>
> Yes, the request would have each of those parts and they should follow the
> parameter order defined in the <wsdl:operation>.  This is fine per section
> 2.4.6 of the WSDL spec [1].



> The response would contain the single part defined in the response
> message, which is not included in the parameter order.




This is what I tried to say. The current WSDL11ToAxisService implementation
does not put that missing part in parameter order unless its' name is
*result*. (Actually this is my mistake) So we have to fix this. When I fixed
this bug in WSDL11ToAxisService it seems that the above metioned jaxws test
case fails. Actually this is the main problem I want to point out.

Rename the Response message parts in
modules/jaxws/test/org/apache/axis2/jaxws/proxy/rpclit/META-INF/RPCLit.wsdl
to result. then those tests get fail. can you explain the reason for this?


> Therefore the response
> > message should have a part called *result* (instead of Part4 since it is
> the return type)
> > Please correct me if I wrong.
>
> I wasn't able to find anything in the spec that dictates the name of the
> return part.


See http://www.w3.org/TR/2003/REC-soap12-part2-20030624/#rpcsoapbdy
It says in soap rpc the local part name of the return type is result. And
also the spec says this missing part in the parameter order is the return
value without saying this part should included in the response message.

But anyway there is a question that whether we have to follow this spec or
not. Although I belive it should be *result* I am ok with using the name
result or the original part name. But definitely we have to use this part in
response.

My interpretation has always been that if there is one part, and that part
> doesn't match any of the parts defined in the request, then it is the return
> type.


See http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html#refinement16617928

It says
parameterOrder attribute, if present, omits at most 1 wsdl:part from the
*output message*.
In otherwords all the parts of the request message should include in the
parameter order.

If it DOES match a request part, then it's an INOUT param rather than a
> return.  Is there a section of the spec that I'm missing that dictates that
> part name (not saying there isn't, I could just be missing it)?
>
> [1] - http://www.w3.org/TR/wsdl#_parameter
>
> Regards,
> -Nick


Regards,
Amila

-- 
Amila Suriarachchi,
WSO2 Inc.


-- 
Amila Suriarachchi,
WSO2 Inc.

Re: [Axis2] Parameter Oder and jaxws tests problem

Posted by Amila Suriarachchi <am...@gmail.com>.
On 3/15/07, Nicholas L Gallardo <nl...@us.ibm.com> wrote:
>
>
> Amila,
>
> > Assume this portType binds to an rpc/literal type soap binding.
> > Then the Request message should have parts Part1,Part2, Part3.
> > What about the response Message?
> > The wsdl spec says the only part we can miss should be the return type.
>
> Yes, the request would have each of those parts and they should follow the
> parameter order defined in the <wsdl:operation>.  This is fine per section
> 2.4.6 of the WSDL spec [1].



> The response would contain the single part defined in the response
> message, which is not included in the parameter order.




This is what I tried to say. The current WSDL11ToAxisService implementation
does not put that missing part in parameter order unless its' name is
*result*. (Actually this is my mistake) So we have to fix this. When I fixed
this bug in WSDL11ToAxisService it seems that the above metioned jaxws test
case fails. Actually this is the main problem I want to point out.

Rename the Response message parts in
modules/jaxws/test/org/apache/axis2/jaxws/proxy/rpclit/META-INF/RPCLit.wsdl
to result. then those tests get fail. can you explain the reason for this?


> Therefore the response
> > message should have a part called *result* (instead of Part4 since it is
> the return type)
> > Please correct me if I wrong.
>
> I wasn't able to find anything in the spec that dictates the name of the
> return part.


See http://www.w3.org/TR/2003/REC-soap12-part2-20030624/#rpcsoapbdy
It says in soap rpc the local part name of the return type is result. And
also the spec says this missing part in the parameter order is the return
value without saying this part should included in the response message.

But anyway there is a question that whether we have to follow this spec or
not. Although I belive it should be *result* I am ok with using the name
result or the original part name. But definitely we have to use this part in
response.

My interpretation has always been that if there is one part, and that part
> doesn't match any of the parts defined in the request, then it is the return
> type.


See
http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html#refinement16617928
It says
parameterOrder attribute, if present, omits at most 1 wsdl:part from the
*output message*.
In otherwords all the parts of the request message should include in the
parameter order.

If it DOES match a request part, then it's an INOUT param rather than a
> return.  Is there a section of the spec that I'm missing that dictates that
> part name (not saying there isn't, I could just be missing it)?
>
> [1] - http://www.w3.org/TR/wsdl#_parameter
>
> Regards,
> -Nick


Regards,
Amila

-- 
Amila Suriarachchi,
WSO2 Inc.

Re: [Axis2] Parameter Oder and jaxws tests problem

Posted by Nicholas L Gallardo <nl...@us.ibm.com>.
Amila,

> Assume this portType binds to an rpc/literal type soap binding.
> Then the Request message should have parts Part1,Part2, Part3. 
> What about the response Message?
> The wsdl spec says the only part we can miss should be the return type. 

Yes, the request would have each of those parts and they should follow the 
parameter order defined in the <wsdl:operation>.  This is fine per section 
2.4.6 of the WSDL spec [1].  The response would contain the single part 
defined in the response message, which is not included in the parameter 
order.

> Therefore the response 
> message should have a part called *result* (instead of Part4 since it is 
the return type) 
> Please correct me if I wrong.

I wasn't able to find anything in the spec that dictates the name of the 
return part.  My interpretation has always been that if there is one part, 
and that part doesn't match any of the parts defined in the request, then 
it is the return type.  If it DOES match a request part, then it's an 
INOUT param rather than a return.  Is there a section of the spec that I'm 
missing that dictates that part name (not saying there isn't, I could just 
be missing it)?

[1] - http://www.w3.org/TR/wsdl#_parameter

Regards,
-Nick





"Amila Suriarachchi" <am...@gmail.com> 
03/15/2007 07:22 AM
Please respond to
axis-user@ws.apache.org


To
axis-user@ws.apache.org, axis-dev@ws.apache.org
cc

Subject
[Axis2] Parameter Oder and jaxws tests problem






Lets take this wsdl fragment.
<wsdl:message name="RequestMessage1">
        <wsdl:part name="Part1" type="xsd:string"/>
        <wsdl:part name="Part2" type="xsd:string"/> 
        <wsdl:part name="Part3" type="xsd:string"/>
 </wsdl:message>
  <wsdl:message name="ResponseMessage1">
        <wsdl:part name="Part4" type="xsd:string"/> 
  </wsdl:message>
...
<wsdl:portType name="PortType1">
        <wsdl:operation name="Operation1" parameterOrder="Part2 Part1 
Part3">
            <wsdl:input message="tns:RequestMessage1"/> 
            <wsdl:output message="tns:ResponseMessage1"/>
        </wsdl:operation>
    </wsdl:portType>

Assume this portType binds to an rpc/literal type soap binding.
Then the Request message should have parts Part1,Part2, Part3. 
What about the response Message?
The wsdl spec says the only part we can miss should be the return type. 
Therefore the response 
message should have a part called *result* (instead of Part4 since it is 
the return type) 
Please correct me if I wrong.

However In the current implementation I have made a mistake, So that the 
response does not include any parts.
I belive this is wrong.

The jaxws tests have a test called RPCProxyTests.java and it uses the 
RPCLit.wsdl.

this wsdl contains similar cases as in above.
eg.
<wsdl:message name="testListsRequest">
      <wsdl:part name="arg_0_0" type="impl:QNameList"/> 
      <wsdl:part name="arg_1_0" type="impl:CalendarList"/>
      <wsdl:part name="arg_2_0" type="impl:StringList"/>
      <wsdl:part name="arg_3_0" type="impl:BigIntegerList"/> 
      <wsdl:part name="arg_4_0" type="impl:LongList"/>
      <wsdl:part name="arg_5_0" type="impl:EnumList"/>
      <wsdl:part name="arg_7_0" type="impl:EnumList2"/> 
      <wsdl:part name="arg_6_0" type="impl:complexAll"/>
   </wsdl:message>

   <wsdl:message name="testCalendarList1Response">
      <wsdl:part name="testCalendarList1Return" type="impl:CalendarList"/> 

   </wsdl:message>

<wsdl:operation name="testLists" parameterOrder="arg_0_0 arg_1_0 arg_2_0 
arg_3_0 arg_4_0 arg_5_0 arg_7_0 arg_6_0">
         <wsdl:input message="impl:testListsRequest" 
name="testListsRequest"/> 
         <wsdl:output message="impl:testListsResponse" 
name="testListsResponse"/>
</wsdl:operation>

The problem is,
  When I fixed the earlier problem in WSDL11ToAxisServiceBuilder ( i.e. to 
insert the return type)
 It seems This test case get fail.

As a result of this I can not fix this bug and can someone please look 
into this test case? 
Can someone check whether it generates a part for 
*testCalendarList1Return* and similar parts as well. 

Thankx.
Amila.


-- 
Amila Suriarachchi,
WSO2 Inc. 

Re: [Axis2] Parameter Oder and jaxws tests problem

Posted by Nicholas L Gallardo <nl...@us.ibm.com>.
Amila,

> Assume this portType binds to an rpc/literal type soap binding.
> Then the Request message should have parts Part1,Part2, Part3. 
> What about the response Message?
> The wsdl spec says the only part we can miss should be the return type. 

Yes, the request would have each of those parts and they should follow the 
parameter order defined in the <wsdl:operation>.  This is fine per section 
2.4.6 of the WSDL spec [1].  The response would contain the single part 
defined in the response message, which is not included in the parameter 
order.

> Therefore the response 
> message should have a part called *result* (instead of Part4 since it is 
the return type) 
> Please correct me if I wrong.

I wasn't able to find anything in the spec that dictates the name of the 
return part.  My interpretation has always been that if there is one part, 
and that part doesn't match any of the parts defined in the request, then 
it is the return type.  If it DOES match a request part, then it's an 
INOUT param rather than a return.  Is there a section of the spec that I'm 
missing that dictates that part name (not saying there isn't, I could just 
be missing it)?

[1] - http://www.w3.org/TR/wsdl#_parameter

Regards,
-Nick





"Amila Suriarachchi" <am...@gmail.com> 
03/15/2007 07:22 AM
Please respond to
axis-user@ws.apache.org


To
axis-user@ws.apache.org, axis-dev@ws.apache.org
cc

Subject
[Axis2] Parameter Oder and jaxws tests problem






Lets take this wsdl fragment.
<wsdl:message name="RequestMessage1">
        <wsdl:part name="Part1" type="xsd:string"/>
        <wsdl:part name="Part2" type="xsd:string"/> 
        <wsdl:part name="Part3" type="xsd:string"/>
 </wsdl:message>
  <wsdl:message name="ResponseMessage1">
        <wsdl:part name="Part4" type="xsd:string"/> 
  </wsdl:message>
...
<wsdl:portType name="PortType1">
        <wsdl:operation name="Operation1" parameterOrder="Part2 Part1 
Part3">
            <wsdl:input message="tns:RequestMessage1"/> 
            <wsdl:output message="tns:ResponseMessage1"/>
        </wsdl:operation>
    </wsdl:portType>

Assume this portType binds to an rpc/literal type soap binding.
Then the Request message should have parts Part1,Part2, Part3. 
What about the response Message?
The wsdl spec says the only part we can miss should be the return type. 
Therefore the response 
message should have a part called *result* (instead of Part4 since it is 
the return type) 
Please correct me if I wrong.

However In the current implementation I have made a mistake, So that the 
response does not include any parts.
I belive this is wrong.

The jaxws tests have a test called RPCProxyTests.java and it uses the 
RPCLit.wsdl.

this wsdl contains similar cases as in above.
eg.
<wsdl:message name="testListsRequest">
      <wsdl:part name="arg_0_0" type="impl:QNameList"/> 
      <wsdl:part name="arg_1_0" type="impl:CalendarList"/>
      <wsdl:part name="arg_2_0" type="impl:StringList"/>
      <wsdl:part name="arg_3_0" type="impl:BigIntegerList"/> 
      <wsdl:part name="arg_4_0" type="impl:LongList"/>
      <wsdl:part name="arg_5_0" type="impl:EnumList"/>
      <wsdl:part name="arg_7_0" type="impl:EnumList2"/> 
      <wsdl:part name="arg_6_0" type="impl:complexAll"/>
   </wsdl:message>

   <wsdl:message name="testCalendarList1Response">
      <wsdl:part name="testCalendarList1Return" type="impl:CalendarList"/> 

   </wsdl:message>

<wsdl:operation name="testLists" parameterOrder="arg_0_0 arg_1_0 arg_2_0 
arg_3_0 arg_4_0 arg_5_0 arg_7_0 arg_6_0">
         <wsdl:input message="impl:testListsRequest" 
name="testListsRequest"/> 
         <wsdl:output message="impl:testListsResponse" 
name="testListsResponse"/>
</wsdl:operation>

The problem is,
  When I fixed the earlier problem in WSDL11ToAxisServiceBuilder ( i.e. to 
insert the return type)
 It seems This test case get fail.

As a result of this I can not fix this bug and can someone please look 
into this test case? 
Can someone check whether it generates a part for 
*testCalendarList1Return* and similar parts as well. 

Thankx.
Amila.


-- 
Amila Suriarachchi,
WSO2 Inc.