4

質問があります。Apache CXF で WS-Addressing を実装しようとしています。To や Action などの一部のヘッダーを設定できますが、From、ReplyTo、FaultTo などの他のヘッダーを設定する方法が見つかりません。

誰もそれを行う方法を知っていますか?

4

1 に答える 1

7

http://cxf.apache.org/docs/ws-addressing.htmlを見てください。それはページの最後にあります:

AddressingProperties maps = new AddressingPropertiesImpl();
EndpointReferenceType ref = new EndpointReferenceType();
AttributedURIType add = new AttributedURIType();
add.setValue("http://localhost:9090/decoupled_endpoint");
ref.setAddress(add);
maps.setReplyTo(ref);
maps.setFaultTo(ref);

((BindingProvider)port).getRequestContext()
    .put("javax.xml.ws.addressing.context", maps);

よろしく、土壌労働者

于 2014-12-11T09:44:50.743 に答える