我需要一个像这样的 SOAP 头:
<MyHeader xmlns:foo="http://foourl" xmlns:bar="http://barurl" bar:someParam="true", otherParam="hereiam">WORLD</MyHeader>
我尝试像这样创建它:
new SoapHeader(new QName("http://foourl", "MyHeader", "foo"),
"WORLD", new JAXBDataBinding(String.class)));
但我刚刚得到
<MyHeader xmlns:foo="http://foourl">WORLD</MyHeader>
如何设置 header 的其他部分(xmlns:bar
、bar:someParam
、otherParam
)? TIA!
最佳答案
我为自己找到了解决方案:
https://manoj29.wordpress.com/2011/12/29/apache-cxf-adding-custom-soap-headers-to-a-soap-message/
关于java - CXF: SOAP 头中的多个部分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44087293/