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 Ri...@atradius.com on 2006/07/25 12:56:15 UTC

Axis 1.3 WSDL2Java code generation

Dear Axis community,

 

I wanted to know whether it is possible to change the behaviour of WSDL2Java
to generate some be-spoke boilerplate code.

 

For instance, I want the service method in my server side implementation
class to contain a try/catch block - 

 

public ResponseMessage doMessage(RequestMessage msg)

{

try

{

 

 

}

catch(MyBaseApplicationExceptions e)

{

      throw new AxisFault(e.getMessage());

}

}

 

 

Any ideas will be greatly appreciated.

 

Cheers,

Rishi

 

 



------------------------------------------------------------------------------------------------------------
This message is intended for the addressee or its representative only. 
Any form of unauthorized use, publication, reproduction, copying or 
disclosure of the content of this e-mail is not permitted. If you are 
not the intended recipient of this e-mail message and its contents, 
please notify the sender immediately and delete this message and 
all its attachments subsequently.


Re: Axis 1.3 WSDL2Java code generation

Posted by jayachandra <ja...@gmail.com>.
As far as I know, it can't be configured to such a fine level. However I can
suggest something like the following, see if it might help.

Offline, create a class (say desired.implementation.class) as to how you
want your implementation class' code should look like.
Axis WSDL2Java gives an option '-c' to generate the name of the
implementation class as per whatever classname you give. So you give the
value for -c option as desired.implementation.class
Now copy the previously offline created class into the package where
artifacts got created. And you would have the set of artifacts the way you
wanted them to be created.

Hope that helps,
Jayachandra


On 7/25/06, Rishikesh.Mallesh@atradius.com <Ri...@atradius.com>
wrote:
>
>   Dear Axis community,
>
>
>
> I wanted to know whether it is possible to change the behaviour of
> WSDL2Java to generate some be-spoke boilerplate code.
>
>
>
> For instance, I want the service method in my server side implementation
> class to contain a try/catch block -
>
>
>
> public ResponseMessage doMessage(RequestMessage msg)
>
> {
>
> *try*
>
> *{*
>
> * *
>
> * *
>
> *}*
>
> *catch(MyBaseApplicationExceptions e)*
>
> *{*
>
> *      throw new AxisFault(e.getMessage());*
>
> *}*
>
> }
>
>
>
>
>
> Any ideas will be greatly appreciated.
>
>
>
> Cheers,
>
> Rishi
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------------------------------------
> This message is intended for the addressee or its representative only.
> Any form of unauthorized use, publication, reproduction, copying or
> disclosure of the content of this e-mail is not permitted. If you are
> not the intended recipient of this e-mail message and its contents,
> please notify the sender immediately and delete this message and
> all its attachments subsequently.
>



-- 
-- Jaya