WS-Addressing documentation is incomplete
-----------------------------------------
Key: CXF-3284
URL: https://issues.apache.org/jira/browse/CXF-3284
Project: CXF
Issue Type: Bug
Components: Documentation
Affects Versions: 2.3.2
Environment: N/A
Reporter: Dan Peterson
Fix For: 2.2.13
In the User's Guide, there is missing documentation for WS-Addressing support
(http://cxf.apache.org/docs/ws-addressing.html). Specifically, there are two
empty sections marked "TODO": 1) Enabling WS-Addressing with WS-Policy, and 2)
Configuring your actions and setting up decoupled endpoints.
I am new to CXF, and I'm using it on a project to communicate with a .NET WCF
web service that users a wsHttpBinding and is secured with SPNEGO and SSL. To
complicate the problem further, there will not be any WSDL available from the
endpoint when my CXF client is deployed. The CXF client will not be able to
rely on the presence of the EndpointReference in the port definition to
determine how to properly configure WS-Addressing. I was wondering if an
example could be given.
I know how to replace the endpoint address using the binding provider:
BindingProvider provider = (BindingProvider)iHelloPort;
provider.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
url);
How do I configure the rest of the information needed by WS-Addressing?
Specifically, the Identity of the endpoint. See below:
The WSDL (just includes the port definition) I am working from is similar to:
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions name="MyService" targetNamespace="http://tempuri.org/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsa10="http://www.w3.org/2005/08/addressing"
xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"
xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:tns="http://tempuri.org/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:i0="http://example.com/my/service"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<wsp:Policy wsu:Id="WSHttpBinding_IHello_policy">
<wsp:ExactlyOne>
<wsp:All>
<http:NegotiateAuthentication
xmlns:http="http://schemas.microsoft.com/ws/06/2004/policy/http"/>
<sp:TransportBinding
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:TransportToken>
<wsp:Policy>
<sp:HttpsToken
RequireClientCertificate="false"/>
</wsp:Policy>
</sp:TransportToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:Basic256/>
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
<sp:Strict/>
</wsp:Policy>
</sp:Layout>
</wsp:Policy>
</sp:TransportBinding>
<wsaw:UsingAddressing/>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
<wsdl:import namespace="http://example.com/my/service"
location="hello-0.wsdl"/>
<wsdl:types/>
<wsdl:binding name="WSHttpBinding_IHello" type="i0:IHello">
<wsp:PolicyReference URI="#WSHttpBinding_IHello_policy"/>
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetMessage">
<soap12:operation
soapAction="http://example.com/my/service/IHello/GetMessage"
style="document"/>
<wsdl:input name="GetMessageRequest">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="GetMessageResponse">
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MyService">
<wsdl:port name="WSHttpBinding_IHello"
binding="tns:WSHttpBinding_IHello">
<soap12:address
location="https://example.com/MyService/service.svc/Hello"/>
<wsa10:EndpointReference>
<wsa10:Address>
https://example.com/MyService/service.svc/Hello
</wsa10:Address>
<Identity
xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
<Spn>host/SERVER.example.com</Spn>
</Identity>
</wsa10:EndpointReference>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.