Solution: Custom namespace in soap response
Solution: Custom namespace in soap response
- Subject: Solution: Custom namespace in soap response
- From: Corin Lawson <email@hidden>
- Date: Thu, 15 Jun 2006 11:59:05 +1000
Hi,
I found a solution but it is not wholly satisfying.
I found that overloading the protected _invoke method and only
calling the super method messed with the response soap message. I.e.
adding this to my WOOperation subclass
protected Object _invoke(D2WContext d2wContext) {
return super._invoke(d2wContext);
}
produced this soap msg
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body/>
</soapenv:Envelope>
Strange (but useful), can anyone offer an explanation?
So in this method I painstakingly create the DOM element and add it
as a SOAPBodyElement of the SOAPBody in the response Message of the
MessageContext. I would have liked to reuse the Serializer that I've
already written, but I don't know how, any suggestions? Also does
anyone know of any caveats about overloading this method?
Thanks,
Corin.
Begin forwarded message:
From: Corin Lawson <email@hidden>
Date: 14 June 2006 4:58:41 PM
To: email@hidden
Subject: Custom namespace in soap response
Hi,
How do I customise the namespace of the *Response element in an
soap message?
For example the ns1 shown below.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:checkResponse soapenv:encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://127.0.0.1/cgi-
bin/WebObjects/BDERS-Dev.woa/1/ws/BDERS">
<return href="#id0"/>
</ns1:checkResponse>
...
I am using WO 5.2.4 and have implemented a custom component-based
operation by extending WOOperation. I have set the
WSDLTargetNamespace property in my d2wmodel but to effect the wsdl
but no effect in the actual soap response.
Please Help.
Corin.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden