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 Rishi <ka...@gmail.com> on 2009/04/15 23:03:05 UTC

adding schema reference to Soap Envelope

Hi,

I am new to Axis2 and was wondering how can get a handle to response
SoapEnvelope? I want to update the response SoapEnvelop element (generated
by Axis2 ) as:

original: <soapenv:Envelope xmlns:soapenv="
http://www.w3.org/2003/05/soap-envelope">

update it to: <soapenv:Envelope xmlns:soapenv="
http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://www.w3.org/2003/05/soap-envelope
http://www.w3.org/2003/05/soap-envelope/soap-envelope.xsd">

The reason I want to do is because my response payload within the body has
following 3 things:

1) return code (string)
2) memberId (Long)
3) xml document ( of type String)

Since this is a xml document -- its root element also defines xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"and xsi:schemaLocation... Now if I
don't wrap this element in CDATA section - then XMLSpy says -- The element
declaration was not found for root element <soapenv:Envelope>

But if I don't wrap it with CDATA section and update soapenv:Envelope to
have xmlns:xsi and xsi:schemaLocation (as stated above) --- then everything
is fine.

So I was wondering where and how should I update the outgoing soapEnvelope
to have above mentioned references.

Please let me know - really appreciate your help.
-Rishi