Applied the patch. Thanks Paul.
Chamikara
On 11/20/06, Paul Fremantle <[EMAIL PROTECTED]> wrote:
Folks
We have a funny little bug in using Synapse with Sandesha2.
In package org.apache.sandesha2.wsrm.Sequence
public void toSOAPEnvelope(SOAPEnvelope envelope) {
SOAPHeader header = envelope.getHeader();
// in some cases this is null
Here is a simple patch - add these lines directly afterwards.
if (header==null) {
SOAPFactory factory =
(SOAPFactory)envelope.getOMFactory();
header = factory.createSOAPHeader(envelope);
}
Here is the diff:
Index: src/org/apache/sandesha2/wsrm/Sequence.java
===================================================================
--- src/org/apache/sandesha2/wsrm/Sequence.java (revision 477241)
+++ src/org/apache/sandesha2/wsrm/Sequence.java (working copy)
@@ -147,6 +147,11 @@
public void toSOAPEnvelope(SOAPEnvelope envelope) {
SOAPHeader header = envelope.getHeader();
+
+ if (header==null) {
+ SOAPFactory factory =
(SOAPFactory)envelope.getOMFactory();
+ header = factory.createSOAPHeader(envelope);
+ }
//detach if already exist.
OMElement elem = header.getFirstChildWithName(new
QName(namespaceValue,
Sandesha2Constants.WSRM_COMMON.SEQUENCE));
Paul
--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
http://bloglines.com/blog/paulfremantle
[EMAIL PROTECTED]
"Oxygenating the Web Service Platform", www.wso2.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]