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 Rick Reumann <ri...@gmail.com> on 2007/05/12 09:10:48 UTC
Is it typical for a client stub to look this complicated for accessing document literal wrapped webservice?
I've deployed a simple webservice to jboss4.0.5 (with jax-ws applied)
that is very simple:
@WebService
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
public interface Calculator extends Remote
{
@WebMethod int add(int x, int y);
@WebMethod int subtract(int x, int y);
}
On a remote server, when I build the stubs using wsdl2JAVA (based off
the wsdl generated when I deploy the webservice/ejb), I seem to have
to get access to the add result by doing something like:
//my TestClient...
CalculatorBeanServiceStub stub = new CalculatorBeanServiceStub();
CalculatorBeanServiceStub.Add0 add0 = new
CalculatorBeanServiceStub.Add0();
CalculatorBeanServiceStub.Add addClass = new
CalculatorBeanServiceStub.Add();
addClass.setArg0(5);
addClass.setArg1(3);
add0.setAdd(addClass);
AddResponse2 addResponse = stub.add(add0);
System.out.println( addResponse.localAddResponse.get_return() );
Is this normal? It seems odd to have to use an Add0 object and another
Add object that seems to wrap the Add0 object. Is there a reason the
stub doesn't provide a more simple implenation like:
CalculatorBeanServiceStub.Add addClass = new CalculatorBeanServiceStub.Add();
addClass.setArg0(5);
addClass.setArg1(3);
AddResponse response = stub.add(addClass);
or even better...
stub.add( 5, 3 )
The client usage seems overly complicated. Is this because I'm
accessing a Document Literal type?
Thanks for any help.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Is it typical for a client stub to look this complicated for accessing document literal wrapped webservice?
Posted by Rick Reumann <ri...@gmail.com>.
Just bumping this to see if anyone has experienced something similar.
Seems odd that I have to have that extra wrapper (Add0 around my Add
class)....
On 5/12/07, Rick Reumann <ri...@gmail.com> wrote:
> I've deployed a simple webservice to jboss4.0.5 (with jax-ws applied)
> that is very simple:
>
> @WebService
> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
> public interface Calculator extends Remote
> {
> @WebMethod int add(int x, int y);
>
> @WebMethod int subtract(int x, int y);
> }
>
>
> On a remote server, when I build the stubs using wsdl2JAVA (based off
> the wsdl generated when I deploy the webservice/ejb), I seem to have
> to get access to the add result by doing something like:
>
> //my TestClient...
>
> CalculatorBeanServiceStub stub = new CalculatorBeanServiceStub();
> CalculatorBeanServiceStub.Add0 add0 = new
> CalculatorBeanServiceStub.Add0();
> CalculatorBeanServiceStub.Add addClass = new
> CalculatorBeanServiceStub.Add();
> addClass.setArg0(5);
> addClass.setArg1(3);
> add0.setAdd(addClass);
> AddResponse2 addResponse = stub.add(add0);
> System.out.println( addResponse.localAddResponse.get_return() );
>
> Is this normal? It seems odd to have to use an Add0 object and another
> Add object that seems to wrap the Add0 object. Is there a reason the
> stub doesn't provide a more simple implenation like:
>
> CalculatorBeanServiceStub.Add addClass = new CalculatorBeanServiceStub.Add();
> addClass.setArg0(5);
> addClass.setArg1(3);
> AddResponse response = stub.add(addClass);
>
> or even better...
>
> stub.add( 5, 3 )
>
> The client usage seems overly complicated. Is this because I'm
> accessing a Document Literal type?
>
> Thanks for any help.
>
--
Rick
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org