[JBossWS] - Glassfish interopepability. Invoking ws-security service dep
by Lauri
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/AlwaysT...">
| <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
16 years, 1 month
[JNDI/Naming/Network] - Re: CommunicationException / ClassNotFoundException on looku
by meiners
The Swing Client runs without errors on any Windows machines (only jre 1.6.0 and network contact installs to the JBoss of the Vista machine).
An exception is thrown with the Swing Client on the Debian machine, here:
initial.lookup("project_projectQ");
The exception reads:
javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: project.query.projectQHome]
The project.query.projectQHome is an interface in a file project.ear, which is on the JBoss (the Vista machine) deployed.
| package project.query;
| public interface projectQHome extends javax.ejb.EJBHome {
| public projectQ create() throws java.rmi.RemoteException, javax.ejb.CreateException;
| }
|
If this interface in the .jar file of the Swing Client is merged, the functions run also on the Debian machine!!
Why doesn't run the interface project.query.projectQHome from project.ear the JBoss on Debian machine? Are there Threads, which miss communication and/or the download of the interface run?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193323#4193323
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4193323
16 years, 1 month