Thank you for all the help you've provided. After my last update, I
continued working on the WS-Policy path, changing the WSDL to use HTTPS,
just to see if I could get a SOAP Envelope created with the desired headers.
Then I verified with the vendor this morning that they do have SSL on the
production host, so I am working toward that endpoint and have only glanced
at the links you posted this morning.
Now that I have an HTTPS connection, the earlier error is gone, but I cannot
get my jaxws:client name attribute set correctly (at least that's what the
error is saying is a *potential *issue).
According to the DoubleIt example, the jaxws:client name should be in the
form {namespace}port_name:
/
<wsdl:definitions name="DoubleIt"
...
targetNamespace="<b>http://www.example.org/contract/DoubleIt*"
...
</wsdl:definitions>
<wsdl:port name="<b>DoubleItTransportEndorsingPort*"
binding="tns:DoubleItTransportEndorsingBinding">
<soap:address
location="https://localhost:9002/DoubleItX509TransportEndorsing" />
</wsdl:port>
/
produces jaxws:client name attribute as such:
/
<jaxws:client
name="<b>{http://www.example.org/contract/DoubleIt}DoubleItTransportEndorsingPort*"
createdFromAPI="true">
...
</jaxws:client>
/
The WSDL I am working with has this (sensitive information obfuscated):
/
<wsdl:definitions
...
targetNamespace="{vendor.namespace}"
...
</wsdl:definitions>
<wsdl:portType name="{foo}Soap">
<wsdl:operation name="{bar}">
<wsdl:input message="tns:{bar}SoapIn" />
<wsdl:output message="tns:{bar}SoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:port name="{foo}Soap" binding="tns:{foo}Soap">
<soap:address location="{_endpoint_url_}/apps/WS_{foo}/{foo}.asmx" />
</wsdl:port>
<wsdl:service name="{foo}">
<wsdl:port name="{foo}Soap" binding="tns:{foo}Soap">
<soap:address location="{_endpoint_url_}/apps/WS_{foo}/{foo}.asmx" />
</wsdl:port>
<wsdl:port name="{foo}Soap12" binding="tns:{foo}Soap12">
<soap12:address location="{_endpoint_url_}/apps/WS_{foo}/{foo}.asmx" />
</wsdl:port>
</wsdl:service>
/
If the jaxws:client name attribute should be {namespace}port_name, then this
should produce the following:
/
<jaxws:client name="{{vendor.namespace}}{foo}Soap" createdFromAPI="true">
<jaxws:properties>
<entry key="ws-security.callback-handler"
value="client.KeystorePasswordCallback"/>
<entry key="ws-security.signature.properties"
value="clientKeystore.properties"/>
<entry key="ws-security.signature.username" value="{key_alias}"/>
</jaxws:properties>
</jaxws:client>
/
But I get this error:
WARNING: Interceptor for {{vendor.namespace}}{foo}#{{vendor.namespace}}{bar}
has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Security configuration could not be
detected. Potential cause: Make sure jaxws:client element with name
attribute value matching endpoint port is defined as well as a
ws-security.signature.properties element within it.
I have tried all of the following combinations, but keep getting the same
error:
<jaxws:client name="{{vendor.namespace}}{foo}Soap" createdFromAPI="true">
<jaxws:client name="{{vendor.namespace}}{foo}" createdFromAPI="true">
<jaxws:client name="{{vendor.namespace}}{bar}" createdFromAPI="true">
<jaxws:client name="{{vendor.namespace}}{foo}#{{vendor.namespace}}{bar}"
createdFromAPI="true">
One thing to note, in this WSDL, both the port and portType elements have
the same value in the name attribute, "{foo}Soap". Could this be causing an
issue?
In case the problem really was the attempt to access my
clientKeystore.properties file, I have it bundled in my JAR as a resource,
and in the local working directory and explicitly named in my classpath in
hopes to take that issue out of the picture.
Thank you again for your help. I really need to get this project behind
me...
--
View this message in context:
http://cxf.547215.n5.nabble.com/CXF-client-to-NET-web-service-attempting-to-create-BinarySecurityToken-BST-tp5726168p5726224.html
Sent from the cxf-user mailing list archive at Nabble.com.