Hello,

I'm using camel-soap for implementing a soap webservice without camel-cxf
(to many problems with project's XSD files). 
Is there a way to 1. read and 2. write a custom soap header.


1. Read custom soap header:

After reading camel docs and googling I found a way to read soap header:


Node[] headerArray =
exchange.getIn().getHeader("org.apache.camel.dataformat.soap.unmarshalled_header_list",
Node[].class);
for(int i = 0; i < headerArray.length; i++) {
        String nodeName = headerArray[i].getNodeName();
        String nodeValue = headerArray[i].getNodeValue();
}

It's not very comfortable so is that the appropriate way to do this ? What
about JAXB-Unmarshalling options ?



2. Write custom soap header:

For that I haven't found anything. I tried to write a custom processor using 

e.g.
exchange.getOut().setHeader("org.apache.camel.dataformat.soap.unmarshalled_header_list",
object); 

and routing it afterwards to a marshalling step with SoapJaxbDataFormat

e.g.
...
.to("direct:setSoapHeaderProcessor")
.marshal(soapJaxbDataFormat)
...

but no soap header is generated. Has anyone a working snippet for that or do
all camel developers use cxf ? 


        Big thanks in advance !
        
                james




--
View this message in context: 
http://camel.465427.n5.nabble.com/reading-and-setting-custom-soap-headers-without-cxf-tp5751608.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to