[Remoting] - Re: MasterServerSocket with VirtualServerSocket
by ron.sigal@jboss.com
Hi,
Here is how multiplex works with respect to server sockets. The MasterServerSocket wraps a real server socket, and when a client connects to it (the first time) by calling a VirtualSocket constructor targeted at the MasterServerSocket, the MasterServerSocket creates a real socket and creates a VirtualSocket associated with that socket. This is how a multiplex connection is created from the client to the server.
Let's call the multiplex connection MC. Now, you can attach a VirtualServerSocket to either end of MC, which allows new virtual connections to be added to MC. To attach a VirtualServerSocket to the server side, you need to take an existing VirtualSocket associated with MC and pass it to the constructor
| public VirtualServerSocket(VirtualSocket socket, Map configuration) throws IOException
|
Then the VirtualServerSocket will be bound to the same host and port as the MasterServerSocket, and subsequent connections to that host and port from the other end of MC will be handled by the VirtualServerSocket. That is, new virtual connections will be added to the single physical connection. You can see this idea at work in MultiplexServerInvoker.run().
In your situation it sounds like you are restricted to configuring your third party library with a server socket factory, and the existing VirtualServerSocketFactory probably won't work for you, since it was intended for other purposes. However, you could write your own. Initialize it with a VirtualSocket and then in each createServerSocket() method call the VirtualServerSocket constructor shown above.
anonymous wrote :
| - Do I have to create VirtualServerSocket on the client side although I don't need any "callbacks", i.e. VirtualSockets on the server connecting explicitly to clients?
|
No. You would need a VirtualServerSocket on the client side only if you intended to create virtual connections from the server to the client.
anonymous wrote :
| - How to allow multiple physical clients to connect to one MasterServerSocket?
|
That is enabled automatically, since the MasterServerSocket wraps a real server socket.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4033868#4033868
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4033868
19 years
[JBoss Messaging] - Installation of Jboss messaging as hasingleton
by kunal_u_shah
I am trying to run jboss messaging as a hasingleton. I am still new to Jboss, but I was able to deploy and run jboss-messaging.sar successfully normally under deploy directory. But when I am trying to put this sar under deploy-hasingleton, I am getting error starting "bisocket" connection:
18:30:17,625 INFO [ServerPeer] ServerPeer[0] creating server peer with ID 0
18:30:17,906 WARN [ServiceController] Problem creating service jboss.messaging:service=Connector,transport=bisocket
java.lang.RuntimeException: Couldn't find valid server invoker class for transport 'bisocket'
at org.jboss.remoting.InvokerRegistry.createServerInvoker(InvokerRegistry.java:434)
at org.jboss.remoting.transport.Connector.init(Connector.java:388)
at org.jboss.remoting.transport.Connector.create(Connector.java:745)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
I am using Jboss 4.0.4 and jboss-messaging-1.2.0.sp1.
I am not getting any bisocket issues when running it normally. Also I saw that ant installation script that comes with jboss-messaging is only for default Jboss configuration and doesnt have option to use with "all" configuration. Is it not possible to run jboss-messaging as hasingleton? I am trying to use non-clustered version.
Any information/pointers will be helpful.. Thx
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4033865#4033865
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4033865
19 years
[JBoss Getting Started Documentation] - Re: javax.management.MalformedObjectNameException on startup
by javalover75
These are some additional errors that I have seen with a different intance of jboss. Any help in resolving these issues would be greatly appreciated.
Thanks in advance
| 17:27:39,255 ERROR [JBossErrorHandler] File .../deploy/hsqldb-ds.xml process warning. Location: ; SystemID: ; Line#: 585; Column#: -1. Error message: Cannot write an attribute node when no element start tag is open
| 17:27:39,506 ERROR [MainDeployer] Could not create deployment: file:/opt/jboss-4.0.5.GA.5/server/default/deploy/hsqldb-ds.xml
| org.jboss.deployment.DeploymentException: MBean attribute 'name' must be given.
| at org.jboss.system.ServiceConfigurator.parseObjectName(ServiceConfigurator.java:774)
| at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:447)
| at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
| at org.jboss.system.ServiceController.install(ServiceController.java:226)
| at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.install(Unknown Source)
| at org.jboss.deployment.SARDeployer.create(SARDeployer.java:249)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy38.create(Unknown Source)
| at org.jboss.deployment.XSLSubDeployer.create(XSLSubDeployer.java:192)
| at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy8.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy5.deploy(Unknown Source)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
| at org.jboss.Main.boot(Main.java:200)
| at org.jboss.Main$1.run(Main.java:490)
| at java.lang.Thread.run(Thread.java:595)
| 17:27:39,515 ERROR [JBossErrorHandler] File .../deploy/jms/jms-ds.xml process warning. Location: ; SystemID: ; Line#: 585; Column#: -1. Error message: Cannot write an attribute node when no element start tag is open
| 17:27:39,517 ERROR [JBossErrorHandler] File .../deploy/jms/jms-ds.xml process warning. Location: ; SystemID: ; Line#: 585; Column#: -1. Error message: Cannot write an attribute node when no element start tag is open
| 17:27:39,544 ERROR [MainDeployer] Could not create deployment: file:/opt/jboss-4.0.5.GA.5/server/default/deploy/jms/jms-ds.xml
| org.jboss.deployment.DeploymentException: MBean attribute 'name' must be given.
| at org.jboss.system.ServiceConfigurator.parseObjectName(ServiceConfigurator.java:774)
| at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:447)
| at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
| at org.jboss.system.ServiceController.install(ServiceController.java:226)
| at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.install(Unknown Source)
| at org.jboss.deployment.SARDeployer.create(SARDeployer.java:249)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy38.create(Unknown Source)
| at org.jboss.deployment.XSLSubDeployer.create(XSLSubDeployer.java:192)
| at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy8.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy5.deploy(Unknown Source)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
| at org.jboss.Main.boot(Main.java:200)
| at org.jboss.Main$1.run(Main.java:490)
| at java.lang.Thread.run(Thread.java:595)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4033864#4033864
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4033864
19 years
[JBoss Getting Started Documentation] - javax.management.MalformedObjectNameException on startup
by javalover75
Hello,
I am trying to get jboss-4.0.5.GA to run on fedora core 6 with an ejb3 configuration. It starts, but with a strange warning. I believe this warning is leading to other issues when I try to deploy my app.
Is this something specific to FC 6?
Thanks in advance.
| [root@localhost jboss-4.0.5.GA]# bin/run.sh
| =========================================================================
|
| JBoss Bootstrap Environment
|
| JBOSS_HOME: /usr/local/jboss-4.0.5.GA
|
| JAVA: /usr/java/jdk1.5.0_09/bin/java
|
| JAVA_OPTS: -Dprogram.name=run.sh -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
|
| CLASSPATH: /usr/local/jboss-4.0.5.GA/bin/run.jar:/usr/java/jdk1.5.0_09/lib/tools.jar
|
| =========================================================================
|
| 17:00:31,787 INFO [Server] Starting JBoss (MX MicroKernel)...
| 17:00:31,794 INFO [Server] Release ID: JBoss [Zion] 4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)
| 17:00:31,797 INFO [Server] Home Dir: /usr/local/jboss-4.0.5.GA
| 17:00:31,797 INFO [Server] Home URL: file:/usr/local/jboss-4.0.5.GA/
| 17:00:31,799 INFO [Server] Patch URL: null
| 17:00:31,799 INFO [Server] Server Name: default
| 17:00:31,800 INFO [Server] Server Home Dir: /usr/local/jboss-4.0.5.GA/server/default
| 17:00:31,800 INFO [Server] Server Home URL: file:/usr/local/jboss-4.0.5.GA/server/default/
| 17:00:31,801 INFO [Server] Server Log Dir: /usr/local/jboss-4.0.5.GA/server/default/log
| 17:00:31,801 INFO [Server] Server Temp Dir: /usr/local/jboss-4.0.5.GA/server/default/tmp
| 17:00:31,802 INFO [Server] Root Deployment Filename: jboss-service.xml
| 17:00:32,480 INFO [ServerInfo] Java version: 1.5.0_09,Sun Microsystems Inc.
| 17:00:32,480 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.5.0_09-b03,Sun Microsystems Inc.
| 17:00:32,481 INFO [ServerInfo] OS-System: Linux 2.6.20-1.2933.fc6,i386
| 17:00:33,999 INFO [Server] Core system initialized
| 17:00:41,371 INFO [WebService] Using RMI server codebase: http://localhost.localdomain:8083/
| 17:00:41,454 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
| 17:00:48,130 WARN [Connector] Error registering invoker org.jboss.remoting.transport.socket.SocketServerInvoker@c4bc34 with MBeanServer.
| javax.management.MalformedObjectNameException: Invalid character ':' in value part of property
| at javax.management.ObjectName.construct(ObjectName.java:529)
| at javax.management.ObjectName.<init>(ObjectName.java:1304)
| at org.jboss.remoting.transport.Connector.init(Connector.java:395)
| at org.jboss.remoting.transport.Connector.create(Connector.java:745)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:995)
| at $Proxy0.create(Unknown Source)
| at org.jboss.system.ServiceController.create(ServiceController.java:330)
| at org.jboss.system.ServiceController.create(ServiceController.java:273)
| at org.jboss.system.ServiceController.create(ServiceController.java:349)
| at org.jboss.system.ServiceController.create(ServiceController.java:273)
| at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.create(Unknown Source)
| at org.jboss.deployment.SARDeployer.create(SARDeployer.java:258)
| at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy8.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy5.deploy(Unknown Source)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
| at org.jboss.Main.boot(Main.java:200)
| at org.jboss.Main$1.run(Main.java:490)
| at java.lang.Thread.run(Thread.java:595)
| 17:00:48,219 INFO [SocketServerInvoker] Invoker started for locator: InvokerLocator [socket://0:0:0:0:0:0:0:1:3873/]
| 17:00:57,848 INFO [ServiceEndpointManager] WebServices: jbossws-1.0.3.SP1 (date=200609291417)
| 17:00:58,964 INFO [SnmpAgentService] SNMP agent going active
| 17:00:58,977 ERROR [TrapEmitter] SNMP send error for localhost/127.0.0.1:1162: <java.security.InvalidParameterException: Buffer overflow error converting IP address>
| 17:01:01,400 INFO [CorbaNamingService] Naming: [IOR:000000000000002B49444C3A6F6D672E6F72672F436F734E616D696E672F4E616D696E67436F6E746578744578743A312E3000000000000200000000000000F00001020000000010303A303A303A303A303A303A303A31000DC80000000000114A426F73732F4E616D696E672F726F6F74000000000000050000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001000000210000006400000000000000010000000000000024000000220000007E000000000000000100000010303A303A303A303A303A303A303A31000DC9004000000000000000000000001004010008060667810201010100000000000000000000000000000000000000000000002000000004000000000000001F0000000400000003000000010000002000000000000000020000002000000004000000000000001F0000000400000003]
| 17:01:01,641 INFO [CorbaTransactionService] TransactionFactory: [IOR:000000000000003049444C3A6F72672F6A626F73732F746D2F69696F702F5472616E73616374696F6E466163746F72794578743A312E30000000000200000000000000F00001020000000010303A303A303A303A303A303A303A31000DC80000000000144A426F73732F5472616E73616374696F6E732F46000000050000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001000000210000006400000000000000010000000000000024000000220000007E000000000000000100000010303A303A303A303A303A303A303A31000DC9004000000000000000000000001004010008060667810201010100000000000000000000000000000000000000000000002000000004000000000000001F0000000400000003000000010000002000000000000000020000002000000004000000000000001F0000000400000003]
| 17:01:02,697 INFO [Embedded] Catalina naming disabled
| 17:01:02,775 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
| 17:01:02,778 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
| 17:01:04,299 INFO [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080
| 17:01:04,302 INFO [Catalina] Initialization processed in 1524 ms
| 17:01:04,302 INFO [StandardService] Starting service jboss.web
| 17:01:04,307 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.5.20
| 17:01:04,354 INFO [StandardHost] XML validation disabled
| 17:01:04,393 INFO [Catalina] Server startup in 91 ms
| 17:01:04,614 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
| 17:01:05,417 INFO [WebappLoader] Dual registration of jndi stream handler: factory already defined
| 17:01:09,519 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jbossweb-tomcat55.sar/ROOT.war/
| 17:01:10,798 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../tmp/deploy/tmp62418jbossws-context-exp.war/
| 17:01:12,526 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
| 17:01:15,542 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
| 17:01:18,949 INFO [MailService] Mail Service bound to java:/Mail
| 17:01:19,300 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
| 17:01:19,400 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
| 17:01:19,454 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
| 17:01:19,500 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
| 17:01:19,619 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
| 17:01:19,677 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/mail-ra.rar
| 17:01:19,738 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/quartz-ra.rar
| 17:01:19,751 INFO [QuartzResourceAdapter] start quartz!!!
| 17:01:19,846 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
| 17:01:19,910 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
| 17:01:19,914 INFO [RAMJobStore] RAMJobStore initialized.
| 17:01:19,915 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
| 17:01:19,915 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
| 17:01:19,916 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
| 17:01:21,338 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
| 17:01:21,927 INFO [A] Bound to JNDI name: queue/A
| 17:01:21,930 INFO [B] Bound to JNDI name: queue/B
| 17:01:21,933 INFO [C] Bound to JNDI name: queue/C
| 17:01:21,936 INFO [D] Bound to JNDI name: queue/D
| 17:01:21,939 INFO [ex] Bound to JNDI name: queue/ex
| 17:01:21,973 INFO [testTopic] Bound to JNDI name: topic/testTopic
| 17:01:21,976 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
| 17:01:21,979 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
| 17:01:21,999 INFO [testQueue] Bound to JNDI name: queue/testQueue
| 17:01:22,069 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.0.0:8093
| 17:01:23,041 INFO [DLQ] Bound to JNDI name: queue/DLQ
| 17:01:23,364 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
| 17:01:23,528 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
| 17:01:24,211 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
| 17:01:24,599 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
| 17:01:24,613 INFO [JkMain] Jk running ID=0 time=1/69 config=null
| 17:01:24,748 INFO [Server] JBoss (MX MicroKernel) [4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)] Started in 52s:942ms
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4033863#4033863
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4033863
19 years
[JBossWS] - Unable to create a WSClient that uses jboss-wsse-client.xml
by noclueu2
Hello All,
I am trying to do a simple WS that requires a user/password and has encryption. I have the user/password working and the server (i think) is doing encryption but I cannot get my client to use the jboss-wsse-client.xml file. Here is all my code, step by step.
SERVER:
jboss-wsse-server.xml
| <?xml version="1.0" encoding="UTF-8"?>
|
| <jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
| <key-store-file>META-INF/wsse.keystore</key-store-file>
| <key-store-password>jbossws</key-store-password>
| <trust-store-file>META-INF/wsse.truststore</trust-store-file>
| <trust-store-password>jbossws</trust-store-password>
| <config>
| <sign type="x509v3" alias="wsse"/>
| <requires>
| <signature/>
| </requires>
| </config>
| </jboss-ws-security>
|
ServerHandler.xml
| <?xml version="1.0" encoding="UTF-8"?>
|
| <handler-config>
| <handler-chain>
| <handler-chain-name>SecureHandlerChain</handler-chain-name>
| <handler>
| <handler-name>WSSecurityHandlerInbound</handler-name>
| <handler-class>org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer</handler-class>
| </handler>
| </handler-chain>
| </handler-config>
|
Server Source:
TestMagicRemoteInterface.java
| import javax.ejb.Local;
| import javax.ejb.Remote;
|
| @Local
| @Remote
| public interface TestMagicRemoteInterface {
| String pullFromHat(String input);
| }
|
TestMagicBean.java
| import javax.annotation.PostConstruct;
| import javax.annotation.security.RolesAllowed;
| import javax.ejb.Local;
| import javax.ejb.Remote;
| import javax.ejb.Stateless;
| import javax.jws.WebMethod;
| import javax.jws.WebResult;
| import javax.jws.WebService;
| import javax.jws.HandlerChain;
| import javax.jws.soap.SOAPBinding;
|
| import org.jboss.annotation.ejb.RemoteBinding;
| import org.jboss.annotation.security.SecurityDomain;
| import org.jboss.ws.annotation.WebContext;
|
| @WebService(name = "EndpointInterface",
| targetNamespace = "http://com.test.www/test/jsr181ejb",
| serviceName = "MagicService")
| @SOAPBinding(style = SOAPBinding.Style.RPC)
| @Local(TestMagicRemoteInterface.class)
| @Remote(TestMagicRemoteInterface.class)
| @RolesAllowed("internal")
| @Stateless
| @RemoteBinding(jndiBinding = "/ejb3/TestMagician")
| @WebContext(authMethod="BASIC", transportGuarantee="NONE", secureWSDLAccess=false)
| @SecurityDomain(value="JBossWS")
| @HandlerChain(file="resource://config/ServerHandler.xml", name="SecureHandlerChain")
| public class TestMagicBean implements TestMagicRemoteInterface {
|
| @WebMethod(operationName="PullFromHat")
| @WebResult(name = "hat")
| public String pullFromHat(String input) {
| return "White Rabbit--"+input;
| }
| }
|
build.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <project default="dist" basedir="." name="JBossWS-Tests">
| <property file="${basedir}/build.properties"/>
|
| <property name="dist.dir" value="${basedir}/dist"/>
| <property name="bin.dir" value="${basedir}/bin"/>
| <property name="src.dir" value="${basedir}/src"/>
| <property name="conf.dir" value="${basedir}/conf"/>
| <property name="keystore.dir" value="${basedir}/keystore"/>
|
| <property name="jboss.client" value="${jboss40.home}/client"/>
| <property name="jboss.deploy" value="${jboss40.home}/server/${jboss.server.instance}"/>
|
| <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
|
| <target name="check-jvm">
| <fail message="jdk-1.5 is required" unless="HAVE_JDK_1.5"/>
| </target>
|
| <target name="prepare-classpath" depends="check-jvm">
| <path id="core.classpath">
| <pathelement location="${jboss40.home}/lib/jboss-common.jar"/>
| <pathelement location="${jboss40.home}/lib/jboss-jmx.jar"/>
| <pathelement location="${jboss40.home}/lib/jboss-system.jar"/>
| <pathelement location="${jboss40.home}/lib/jboss-xml-binding.jar"/>
| </path>
| <path id="jbossws.classpath">
| <fileset dir="${jboss.deploy}/deploy/jbossws.sar">
| <include name="*.jar"/>
| </fileset>
| <pathelement location="${jboss.client}/jbossws-client.jar"/>
| <pathelement location="${jboss.client}/jboss-jaxrpc.jar"/>
| <pathelement location="${jboss.client}/jboss-saaj.jar"/>
| </path>
| <path id="ejb3.classpath">
| <fileset dir="${jboss.deploy}/deploy/ejb3.deployer">
| <include name="*.jar"/>
| </fileset>
| <pathelement location="${jboss.client}/jboss-ejb3-client.jar"/>
| <pathelement location="${jboss.deploy}/lib/jboss-j2ee.jar"/>
| </path>
| <path id="wstools.classpath">
| <pathelement location="${jboss.client}/jboss-xml-binding.jar"/>
| <pathelement location="${jboss.client}/activation.jar"/>
| <pathelement location="${jboss.client}/javassist.jar"/>
| <pathelement location="${jboss.client}/jbossall-client.jar"/>
| <pathelement location="${jboss.client}/jbossretro-rt.jar"/>
| <pathelement location="${jboss.client}/jboss-backport-concurrent.jar"/>
| <pathelement location="${jboss.client}/jbossws-client.jar"/>
| <pathelement location="${jboss.client}/log4j.jar"/>
| <pathelement location="${jboss.client}/mail.jar"/>
| </path>
| <path id="build.classpath">
| <path refid="core.classpath"/>
| <path refid="jbossws.classpath"/>
| <path refid="ejb3.classpath"/>
| </path>
| </target>
|
| <target name="wstools" depends="prepare-classpath">
| <taskdef name="wstools" classname="org.jboss.ws.tools.ant.wstools"
| classpathref="wstools.classpath"/>
|
| </target>
|
|
| <target name="compile" depends="prepare-classpath">
| <delete dir="${bin.dir}"/>
| <mkdir dir="${bin.dir}"/>
| <javac destdir="${bin.dir}">
| <src path="${src.dir}"/>
| <classpath refid="build.classpath"/>
| </javac>
| </target>
|
| <target name="package" depends="compile">
| <delete dir="${dist.dir}"/>
| <mkdir dir="${dist.dir}"/>
| <jar destfile="${dist.dir}/${project.name}.jar">
| <zipfileset dir="${bin.dir}">
| <include name="**"/>
| </zipfileset>
| <zipfileset dir="${conf.dir}" prefix="config">
| <include name="ServerHandler.xml"/>
| </zipfileset>
| <zipfileset dir="${conf.dir}" prefix="META-INF">
| <include name="jboss-wsse-server.xml"/>
| </zipfileset>
| <zipfileset dir="${keystore.dir}" prefix="META-INF">
| <include name="wsse.*"/>
| </zipfileset>
| </jar>
| </target>
|
|
| <target name="dist" depends="package">
| <echo message="Preparing Dist"/>
| </target>
| </project>
|
Everything above builds and deploys and expects the client to use wsse:Security
Client Code:
jboss-wsse-client.jar
| <?xml version="1.0" encoding="UTF-8"?>
|
| <jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
| <key-store-file>c:/work/workspace/TestWebServicesClient/keystore/wsse.keystore</key-store-file>
| <key-store-password>jbossws</key-store-password>
| <trust-store-file>c:/work/workspace/TestWebServicesClient/keystore/wsse.truststore</trust-store-file>
| <trust-store-password>jbossws</trust-store-password>
| <config>
| <sign type="x509v3" alias="wsse"/>
| <requires>
| <encryption/>
| </requires>
| </config>
| </jboss-ws-security>
|
wstools-config.xml
| <?xml version="1.0" encoding="UTF-8"?>
|
| <configuration xmlns="http://www.jboss.org/jbossws-tools"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
| <wsdl-java file="http://localhost:8080/MagicService/TestMagicBean?wsdl">
|
| </wsdl-java>
| </configuration>
|
ClientTest.java
| import java.net.URL;
| import java.util.Map;
|
| import javax.xml.namespace.QName;
| import javax.xml.ws.BindingProvider;
|
| import com.client.MagicService;
| import com.client.EndpointInterface;
|
| public class ClientTest {
|
| public static void main(String[] args) {
| System.setProperty("org.jboss.wsse.keyStore", "c:/work/workspace/TestWebServicesClient/keystore/wsse.keystore");
| System.setProperty("org.jboss.wsse.keyStorePassword", "jbossws");
| System.setProperty("org.jboss.wsse.keyStoreType", "x509v3");
| System.setProperty("org.jboss.wsse.trustStore", "c:/work/workspace/TestWebServicesClient/keystore/wsse.truststore");
| System.setProperty("org.jboss.wsse.trustStorePassword", "jbossws");
| System.setProperty("org.jboss.wsse.trustStoreType", "x509v3");
|
|
| try {
| System.out.println("Hello World, I'm about to do magic");
| MagicService service = new MagicService();
| EndpointInterface port = service.getEndpointInterfacePort();
| BindingProvider bindingProvider = (BindingProvider) port;
| Map<String, Object> reqContext = bindingProvider.getRequestContext();
| reqContext.put(BindingProvider.USERNAME_PROPERTY, "myuser");
| reqContext.put(BindingProvider.PASSWORD_PROPERTY, "mypassword");
|
| System.out.println(port.pullFromHat("Java Client Test"));
|
| } catch (Exception e) {
| e.printStackTrace();
| }
|
| }
|
| }
|
build.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <project default="dist" basedir="." name="JBossWS-Tests">
| <property file="${basedir}/build.properties"/>
|
| <property name="dist.dir" value="${basedir}/dist"/>
| <property name="bin.dir" value="${basedir}/bin"/>
| <property name="src.dir" value="${basedir}/src"/>
| <property name="conf.dir" value="${basedir}/conf"/>
| <property name="keystore.dir" value="${basedir}/keystore"/>
| <property name="thirdparty.dir" value="${basedir}/thirdparty"/>
|
| <property name="jboss.client" value="${jboss40.home}/client"/>
| <property name="jboss.deploy" value="${jboss40.home}/server/${jboss.server.instance}"/>
|
| <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
|
| <target name="check-jvm">
| <fail message="jdk-1.5 is required" unless="HAVE_JDK_1.5"/>
| </target>
|
| <target name="prepare-classpath" depends="check-jvm">
| <path id="core.classpath">
| <pathelement location="${jboss40.home}/lib/jboss-common.jar"/>
| <pathelement location="${jboss40.home}/lib/jboss-jmx.jar"/>
| <pathelement location="${jboss40.home}/lib/jboss-system.jar"/>
| <pathelement location="${jboss40.home}/lib/jboss-xml-binding.jar"/>
| </path>
| <path id="jbossws.classpath">
| <fileset dir="${jboss.deploy}/deploy/jbossws.sar">
| <include name="*.jar"/>
| </fileset>
| <pathelement location="${jboss.client}/jbossws-client.jar"/>
| <pathelement location="${jboss.client}/jboss-jaxrpc.jar"/>
| <pathelement location="${jboss.client}/jboss-saaj.jar"/>
| </path>
| <path id="ejb3.classpath">
| <fileset dir="${jboss.deploy}/deploy/ejb3.deployer">
| <include name="*.jar"/>
| </fileset>
| <pathelement location="${jboss.client}/jboss-ejb3-client.jar"/>
| <pathelement location="${jboss.deploy}/lib/jboss-j2ee.jar"/>
| </path>
| <path id="wstools.classpath">
| <pathelement location="${jboss.client}/jboss-xml-binding.jar"/>
| <pathelement location="${jboss.client}/activation.jar"/>
| <pathelement location="${jboss.client}/javassist.jar"/>
| <pathelement location="${jboss.client}/jbossall-client.jar"/>
| <pathelement location="${jboss.client}/jbossretro-rt.jar"/>
| <pathelement location="${jboss.client}/jboss-backport-concurrent.jar"/>
| <pathelement location="${jboss.client}/jbossws-client.jar"/>
| <pathelement location="${jboss.client}/log4j.jar"/>
| <pathelement location="${jboss.client}/mail.jar"/>
| <path refid="core.classpath"/>
| <path refid="jbossws.classpath"/>
| <path refid="ejb3.classpath"/>
| </path>
| <path id="build.classpath">
| <path refid="core.classpath"/>
| <path refid="jbossws.classpath"/>
| <path refid="ejb3.classpath"/>
| </path>
| <path id="client.classpath">
| <fileset dir="${jboss.client}">
| <include name="*.jar"/>
| </fileset>
| <path refid="core.classpath"/>
| <path refid="jbossws.classpath"/>
| <path refid="ejb3.classpath"/>
| <pathelement location="${jboss40.home}/lib/endorsed/xercesImpl.jar"/>
| </path>
| </target>
|
| <target name="wstools" depends="prepare-classpath">
|
| <taskdef name="wstools" classname="org.jboss.ws.tools.ant.wstools"
| classpathref="wstools.classpath"/>
| <!-- <wstools dest="${bin.dir}" config="conf/wstools-config.xml"/> -->
| <taskdef name="wsconsume" classname="org.jboss.ws.tools.jaxws.ant.wsconsume">
| <classpath refid="wstools.classpath"/>
| <classpath location="${thirdparty.dir}/jbossws-wsconsume-impl.jar"/>
| <classpath location="${thirdparty.dir}/jaxb-xjc.jar"/>
| </taskdef>
| <wsconsume wsdl="http://localhost:8080/MagicService/TestMagicBean?wsdl" package="com.client" sourcedestdir="${src.dir}" keep="true"/>
|
|
| </target>
|
|
| <target name="compile" depends="prepare-classpath">
| <delete dir="${bin.dir}"/>
| <mkdir dir="${bin.dir}"/>
| <javac destdir="${bin.dir}">
| <src path="${src.dir}"/>
| <classpath refid="build.classpath"/>
| </javac>
| </target>
|
| <target name="package" depends="compile">
| <delete dir="${dist.dir}"/>
| <mkdir dir="${dist.dir}"/>
| <jar destfile="${dist.dir}/${project.name}-Client.jar">
| <manifest>
| <attribute name="Main-Class" value="ClientTest"/>
| </manifest>
| <zipfileset dir="${bin.dir}">
| <include name="**"/>
| </zipfileset>
| <zipfileset dir="${conf.dir}" prefix="META-INF">
| <include name="jboss-wsse-client.xml"/>
| </zipfileset>
| </jar>
| </target>
|
|
| <target name="dist" depends="package">
| <echo message="Preparing Dist"/>
| </target>
|
| <target name="run" depends="dist">
| <echo message="About To RUN"/>
|
|
| <java classname="ClientTest" fork="true">
| <classpath>
| <pathelement location="${dist.dir}/${project.name}-Client.jar"/>
| <fileset dir="${jboss.client}">
| <include name="*.jar"/>
| </fileset>
| <pathelement location="${jboss40.home}/lib/endorsed/xercesImpl.jar"/>
| </classpath>
| </java>
| </target>
| </project>
|
Jar File structure:
| META-INF
| jboss-wsse-client.xml
| Manifest.mf
| ClientTest.class
| com
| client
| MagicService.class
| EndpointInterface.class
|
My above code works if I do not include the jboss-wsse-server.xml but once I add it, the client fails. I do know that I had to add the HandlerChain to the server class for things to work, is there something similar that I have to do to the client?
Thanks,
Richard K
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4033861#4033861
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4033861
19 years