Hi,
I followed this blog and it works as expected -
http://www.jroller.com/gmazza/entry/cxf_x509_profile_secpol Adding X.509
security headers to Apache CXF SOAP calls (WS-SecurityPolicy method ).
Then I created my own client but my own handler is not being picked up.
I can see currentRequestContext has the configurations from cxf.xml.
But my own hanlder is not being called.
I suspect that something is not right with jaxws:client name attribute
value.
I set it to "<jaxws:client
name="{http://www.mycompany.com/theservice}DCEndPoint"
createdFromAPI="true">"
The wsdl looks like the one in the below.
Any help is appreciated.
Thanks,
Kyunam
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions name="myService"
targetNamespace="http://www.mycompany.com/theservice/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"
xmlns:wsa10="http://www.w3.org/2005/08/addressing"
xmlns:tns="http://www.mycompany.com/theservice/"
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:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:i0="http://www.mycompany.com/theservice/ItheserviceWebService"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<wsp:Policy wsu:Id="DCEndPoint_policy">
</wsp:Policy>
<wsdl:import
namespace="http://www.mycompany.com/theservice/ItheserviceWebService"
location="http://mydev.mycompany.com/myService.svc?wsdl=wsdl0"/>
<wsdl:types/>
<wsdl:binding name="DCEndPoint" type="i0:ItheserviceWebServiceOf_my">
</wsdl:binding>
<wsdl:service name="myService">
<wsdl:port name="DCEndPoint" binding="tns:DCEndPoint">
<soap12:address
location="http://mydev.mycompany.com/myService.svc"/>
<wsa10:EndpointReference>
<wsa10:Address>http://mydev.mycompany.com/myService.svc</wsa10:Address>
<Identity
xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
<Dns></Dns>
</Identity>
</wsa10:EndpointReference>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
--
View this message in context:
http://cxf.547215.n5.nabble.com/WS-POLICY-jaxws-name-attribute-tp5707797.html
Sent from the cxf-user mailing list archive at Nabble.com.