You need to specify the "unwrap" option (-uw) when running wsdl2java.

Anne

On 10/8/07, TimDog <[EMAIL PROTECTED]> wrote:
>
> I'm using Axis2 to generate the  WSDL for my service...and I have a nagging
> question in the back of my mind.
>
> Why are clients generated by the Axis2 wsdl2java (the default adb) of the
> form
>
> stub.function(FunctionObj obj)
>
> And the clients generated from the Axis1.4 wsdl2java of the form
>
> stub.function(param1, param2, param3)
>
> ?
>
> Is there a way to make the Axis2 wsdl2java produce a stub that I can just
> call methods and parameters like the 1.4 clients instead of messing around
> with all of this object indirection?
>
> It seems(to me) that should be added to the client stub automatically,
> because we're doing all of that coding over and over again and it's
> encapsulated fairly easily.
>
>
> E.g.
> ///The Axis 1.4 Client
>
> SoapBindingStub stub;
>                 try {
>                         stub = (SoapBindingStub)
>                         new 
> ISoapBindingStubServiceServiceLocator().getsoapbindingstub(new
> URL(url));
>                          Object resultObj = stub.function(param1, param2, 
> param3);
>                 }
>                 catch (javax.xml.rpc.ServiceException jre) {
>                         jre.printStackTrace();
>                 }
>                 catch (RemoteException e) {
>                         e.printStackTrace();
>                 } catch (MalformedURLException e) {
>                         e.printStackTrace();
>                 }
>
> /////////////////////////////////
> The Axis2 Client
> SoapBindingStub stub;
>                 try {
>                         stub = (SoapBindingStub)
>                         new SoapBindingStub(test.getServiceUrl());
>                         SoapBindingStub.FunctionObj functionObj = new
> SoapBindingStub.FunctionObj();
>                         function.setParam1(param1);
>                         function.setParam2(param2);
>                         SoapBindingStub.FunctionResponseObj responseObj =
> stub.function(functionObj);
>                         Object resultObj = responseObj.getReturn();
>
>                 }
>                 catch(Exception e){
>                         System.err.println("Service Loaded");
>                 }
>
> --
> View this message in context: 
> http://www.nabble.com/Differences-between-Axis-1.4-and-Axis2-client-generation-tf4589968.html#a13102388
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to