Hi,

I noticed that the working sample generates quite some code when strting from 
that Bank service wsdl. 
Especially, the exceptions seem to be "manually" serialized. In the sample, the 
service and clients are generated from the wsdl file.

I'd like to discuss the following points:

a) the WSDL defines the fault message WSDL:FAULT with attributes: 

name: "AccountNotExistException"
message: "tns:AccountNotExistFaultMessage"

The AccountNotExistFaultMessage contains an element of type 
"AccountNotExistFault".


Now, let's examine the service files generated out of this wsdl with respect to 
this particular wsdl:fault element:
Class AccountNotExistFault (representing the element contained in the fault 
message): 
- implements ADBBean.
- implements a serialize method

Class AccountNotExistFaultMessageException (representing the exception to be 
thrown on failure of the withdraw operation):
- extends java.lang.Exception

What I want to discuss here, is the way generation would work the other way 
around: from java classes to WSDL, and then from WSDL to client generation. 

The problem I see here, is: to write a service for the axis2 framework, one 
needs to implement a hell of a lot of methods and get acquainted with many 
concepts. I would have expected the codegeneration tools to do exactly the work 
of generating serialization, correct exception handling, etc. by themselves. So 
that, from an ordinary java class, with operations throwing some (custom) 
exceptions, one could easily generate server- and client-side code. 
Unfortunately, this seems not to be supported. And if I had known that, I 
wouldn't have posted my mails treating exception handling here. I was convinced 
I did something wrong, but I couldn't know that "code generation" here meant 
not that much. 
Also, be aware of some flaws in the code generation tools: when specifying an 
exception extending java.lang.exception, the codegeneration tools effectively 
generates a wsdl in which the extension base "java.lang.)"Exception" is 
specified. This leads to the creation of the class "Exception" lateron, when 
generating the client code from the generated WSDL.

Well folks - isn't there a way to just easen these steps ? I mean, why can't 
the code generation wizards not just take care of serialization and all that 
extra stuff (isReaderMTOMaware and all those methods) by themselves ? If I have 
to browse the documentation to write a service this way, I can well write 
everything myself and it wont be of great help.

Best regards,

Jay

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

Reply via email to