axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kapur....@gmail.com
Subject Re: adding schema reference to Soap Envelope
Date Fri, 17 Apr 2009 18:08:28 GMT
hi,

Its working now - since it was too specific to what I needed - but still  
here is the solution that worked for me -

1) modified RPCMessageReceiver.java (its in axis2-adb-1.4.1.jar) with the  
following code -- It was added after line 132 ie

String nsURI = inMessage.getEnvelope().getNamespace().getNamespaceURI();

New code:

OMAttribute attr1 = null;
OMAttribute attr2 = null;
if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) {
attr1 = fac.createOMAttribute("xmlns:xsi", null,
"http://www.w3.org/2001/XMLSchema-instance");
attr2 = fac
.createOMAttribute(
"xsi:schemaLocation",
null,
"http://www.w3.org/2003/05/soap-envelope  
http://www.w3.org/2003/05/soap-envelope/soap-envelope.xsd");

envelope.addAttribute(attr1);
envelope.addAttribute(attr2);

}

- rebuild - using maven - and deployed the resultant jar in app server.

-rishi

Mime
View raw message