TestServiceResponse has nothing to do with the rest of the services. The one common denominator is ReturnWebBase. The wsdl I enclosed has all those - arrays of objects, and single objects. As for pure void, that'd be Robust one-way that returns 200, 404 or 500, etc. IIRC axis2 doesn't have a pure 'fire and forget' - yet.
Anyways, for non-void, the idea is: extension base="tns:ReturnWebBase" on your responses. See 'wiseLoginResponse' and 'testServiceResponse' for two examples. That would require a change to the wsdl. You may have to leave it for next time, but as I said its worked wonders for me. HTH, iksrazal http://www.braziloutsource.com/ Em Quinta 12 Janeiro 2006 18:40, o Jarmo Doc escreveu: > Thanks very much for the good idea. If I understand you, every object that > your operations return would be derived from (or explicilty include) > TestServiceResponse. If so then that would have a big impact on my WSDL > (which right now has operations that return arrays of objects, single > objects, and even void in some cases). > > Having said that, if I don't get exceptions working very soon then I may > think seriously about your idea. Thanks for taking the time to help. > > >From: iksrazal <[EMAIL PROTECTED]> > >Reply-To: [email protected] > >To: [email protected] > >Subject: Re: Exceptions are killing me > >Date: Thu, 12 Jan 2006 17:19:26 -0200 > > > >You know, I often see people banging their head against a wall when it > >comes > >to Exceptions and SOAP. So let me give you a hint that has worked > >splendidly > >for me over several projects: Don't even use them. Return an error code > > and message, generated in your try / catch block. > > > >Allow the code to explain ( axis2, but I've used the idea in both axis 1.x > >and > >Sun's JWSDP): > > > > public TestServiceResponseDocument testService( > > TestServiceDocument testServiceDocument) { > > // prepare output > > TestServiceResponseDocument retDoc = > > TestServiceResponseDocument.Factory.newInstance(); > > > > TestServiceResponse retElement = > > TestServiceResponse.Factory.newInstance(); > > TestService testService = > >testServiceDocument.getTestService(); > > String soapSessionId = testService.getSoapSessionId(); > > String webUserName = testService.getWebUserName(); > > try { > > > > if (!authenticator.validateSoapSessionId(soapSessionId, > > webUserName)) { > > wiseMobilAdapter.handleDefaultTimeout(retElement, > >webUserName); > > } else { > > wiseMobilAdapter.testService(retElement); > > } > > > > } catch (Exception ex) { > > logger.error("SWAWiseEndpointSkeleton.testService:" > > + ex.getMessage(), ex); > > retElement.setErrorMessage(ex.getMessage()); > > retElement.setSuccessErrorCode(MessagesCodes.FAILURE); > > } > > retDoc.setTestServiceResponse(retElement); > > return retDoc; > > } > > > >The idea here is retElement is passed in to the adapter, which sets the > >pass / > >fail status and any other variables needed to return. Or, the try catch in > >the skeleton does the error handling in case of session timeout, login > >problems etc. > > [snip] > > _________________________________________________________________ > Express yourself instantly with MSN Messenger! Download today - it's FREE! > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ --
