Well you could do this by doing a contract first web service. It looks like you are using the POJO approach and when u do that you have to live with the schema that Axis2 would give you. Alternatively you could just stick an ESB in front and run the response through an XSLT and format it to the manner you require. This could be done in a single server if you use the WSO2 Web Services Application Server [1] (This is a Web Services runtime environment built on top of Axis2 and its available under the Apache License).
Thanks, Keith. [1] http://wso2.org/projects/wsas/java On Tue, Feb 24, 2009 at 8:25 AM, Shaon, ABS (Arif) <arif.sh...@stfc.ac.uk>wrote: > > > *Hi Everyone,* > > > > I am running a AXIS4 1.4.1 SOAP service that returns an XML document > encoded in the SOAP Body. The response I get is the following: > > > > > > <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> > <soapenv:Body> > <ns:GetCapabilitiesResponse xmlns:ns="http://stfc.ac.uk"> > <ns:return><?xml version="1.0" encoding="UTF-8"?> < > Capabilities > xmlns:xlink="http://www.w3.org/1999/xlink" xmlns=" > http://www.opengis.net/wps/1.0.0" > xmlns:ows="http://www.opengis.net/ows/1.1" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > version="1.0.0" > xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 > > http://schemas.opengis.net/wps/1.0.0/wpsGetCapabilities_response.xsd"> > <ows:ServiceIdentification>.......................... > > > > But the response I would like is the following: > > > > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"xmlns:xsi > ="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=" > http://www.w3.org/2001/XMLSchema"> > <soap:Body> > <wps:Capabilities service="WPS" > version="1.0.0"xml:lang > ="en-CA" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:wps=" > http://www.opengis.net/wps/1.0.0" xmlns:ows=" > http://www.opengis.net/ows/1.1" xmlns:xsi=" > http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" > http://www.opengis.net/wps/1.0.0 > ..\wpsGetCapabilities_response.xsd"updateSequence > ="1"> > > <ows:ServiceIdentification>......................... > > > > > > Any idea how I can get AXIS not to display XML tags as literals? > > > > Many thanks for your help. > > > > Regards > > Arif > > ------------------------------ > > Scanned by iCritical. > -- Keith Chapman Senior Software Engineer WSO2 Inc. Oxygenating the Web Service Platform. http://wso2.org/ blog: http://www.keith-chapman.org