The soap action header is part of HTTP header not a part of soap
envelop.
And there are quit difference between the SOAP 1.1 and SOAP 1.2.
On Wed Apr 25 23:03:29 2012, David Savage wrote:
Hi,
I'm experimenting using camel to call a soap service but failing to
find the magic combination of steps to get the soap action header set.
The current approach I'm taking is to do something like the following:
public void configure() {
SoapJaxbDataFormat soapDF =
new SoapJaxbDataFormat(MyJaxBRequest.class.getPackage().getName());
from("direct:callSoap")
.beanRef("myJaxBRequestBuilder")
.setHeader("SOAPAction", simple("\"http://schemas.example.com""))
.marshal(soapDF)
.to("stream:out");
}
Where myJaxBRequestBuilder is a bean that has a trivial signature:
public class MyJaxBRequestBuilder {
public MyJaxBRequest newRequest() {
MyJaxBRequest req = new MyJaxBRequest();
// hard code various request params for now...
return req;
}
}
This generates a soap request of the form:
<ns2:Envelope xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/">
<ns2:Body>
...
</ns2:Body>
</ns2:Envelope>
But there are no headers set...
Is what I'm trying to do supported? Am I missing some configuration in
the routerbuilder?
Many thanks for any help.
Regards,
/Dave
--
Willem
----------------------------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang