Not sure how one could wire that code into having wsdl2java generate it. Jalopy perhaps but I haven't used it yet.
HTH,
Robert
http://www.braziloutsource.com/
On 4/14/06, Ali Sadik Kumlali <
[EMAIL PROTECTED]> wrote:
Hi all,
I'm using XmlBeans and can validate each operation in my skeleton. I
need validation to be made at a single point before my skeleton is
called. This may be provided with a validation module. But;
1) I don't have fromOM at that point (or I don't know how to get it ;-)
2) Even if I can get fromOM in a module, it will also be called by
*MessageReceiverInOut. Thus, it will cause some performance decrease.
May be WSDL2Java generator has an option to add validation code
like this:
---------------------------------------------------------------
// *MessageReceiverInOut.java
...
if ("MyOp".equals (methodName)) {
reqParam = (MyOpDocument) fromOM
(msgContext.getEnvelope().getBody().getFirstElement(),
com.mycomp.service.MyOpDocument.class);
// validate here
ArrayList validationErrors = new ArrayList ();
XmlOptions validationOptions = new XmlOptions ();
validationOptions.setErrorListener (validationErrors);
boolean isValid = reqParam.validate (validationOptions);
if (!isValid)
throw new AxisFault ("Validation error", e)
com.mycomp.srv.MyOpRespDocument resParam = null;
resParam = skel.MyOp (reqParam);
}
...
---------------------------------------------------------------
Could you please tell me the best way of this?
Thanks a lot.
Ali Sadik Kumlali
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com