我有一个问题:我们正在尝试使用Apache CXF实现WS-Addressing.我可以设置一些像To或Action这样的标题,但我找不到设置其他像From,ReplyTo或FaultTo的方法.
有谁知道怎么做?
请查看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);
Run Code Online (Sandbox Code Playgroud)
亲切的问候,土工
| 归档时间: |
|
| 查看次数: |
2412 次 |
| 最近记录: |