Hi.
There is a glassfish server running a webservice protected by Username token.
Somehow it should be invoked from a servlet running in jboss 4.2.3 server.
After couple of attempts to invoke the service I've ended up with exception
org.jboss.ws.WSException: Policy not supported!
#ReceptionHelperPortBindingPolicy
You can find policy part of wsdl definition below.
Glassfish community has lots of "simple" examples where one should add file
"webservices-rt.jar" to classpath in order to run example. This file is bundled
with glassfish distribution. This option works well for standalone
applications, but not when runnig application inside jboss or tomcat.
Please share ideas how it can be done or where could I have look for a clue.
Here is code to invoke ws
| ...
| // url points to glassfish server
| URL url = new URL("http://localhost:8080/ws/Helper?wsdl");
| QName qn = new QName("http://ws.reception/", "Helper");
| Service s = Service.create(url, qn); // this is the line where "Policy not
supported" exception is thrown
|
| <ns1:Policy xmlns:ns1="http://schemas.xmlsoap.org/ws/2004/09/policy"
wsu:Id="ReceptionHelperPortBindingPolicy">
| <ns1:ExactlyOne>
| <ns1:All>
| <ns2:SignedSupportingTokens
xmlns:ns2="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
| <ns1:Policy>
| <ns1:ExactlyOne>
| <ns1:All>
| <ns2:UsernameToken
ns2:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
| <ns1:Policy>
| <ns1:ExactlyOne>
| <ns1:All>
|
<ns2:WssUsernameToken10></ns2:WssUsernameToken10>
| </ns1:All>
| </ns1:ExactlyOne>
| </ns1:Policy>
| </ns2:UsernameToken>
|
| </ns1:All>
| </ns1:ExactlyOne>
| </ns1:Policy>
| </ns2:SignedSupportingTokens>
| <ns3:TransportBinding
xmlns:ns3="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
| <ns1:Policy>
| <ns1:ExactlyOne>
| <ns1:All>
| <ns3:AlgorithmSuite>
| <ns1:Policy>
| <ns1:ExactlyOne>
| <ns1:All>
| <ns3:Basic128></ns3:Basic128>
| </ns1:All>
| </ns1:ExactlyOne>
| </ns1:Policy>
| </ns3:AlgorithmSuite>
|
| <ns3:IncludeTimestamp></ns3:IncludeTimestamp>
| <ns3:Layout>
| <ns1:Policy>
| <ns1:ExactlyOne>
| <ns1:All>
| <ns3:Lax></ns3:Lax>
| </ns1:All>
| </ns1:ExactlyOne>
| </ns1:Policy>
| </ns3:Layout>
| <ns3:TransportToken>
| <ns1:Policy>
| <ns1:ExactlyOne>
| <ns1:All>
| <ns3:HttpsToken
RequireClientCertificate="false"></ns3:HttpsToken>
| </ns1:All>
| </ns1:ExactlyOne>
|
| </ns1:Policy>
| </ns3:TransportToken>
| </ns1:All>
| </ns1:ExactlyOne>
| </ns1:Policy>
| </ns3:TransportBinding>
| <ns4:Wss10
xmlns:ns4="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
| <ns1:Policy>
| <ns1:ExactlyOne>
| <ns1:All>
|
<ns4:MustSupportRefKeyIdentifier></ns4:MustSupportRefKeyIdentifier>
| </ns1:All>
| </ns1:ExactlyOne>
| </ns1:Policy>
| </ns4:Wss10>
| <ns5:UsingAddressing
xmlns:ns5="http://www.w3.org/2006/05/addressing/wsdl"></ns5:UsingAddressing>
| </ns1:All>
|
| </ns1:ExactlyOne>
| </ns1:Policy>
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193348#4193348
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4193348
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user