7 Replies Latest reply on Oct 30, 2006 2:28 PM by ray lai

    web services samples

    Ypatios Asmanidis Newbie

      I tried to run the samples so when I run ant in the samples directory somewhere in the end I get this exception

      init:
       [echo] jboss.home = /usr/local/jboss-4.0.4.GA/
       [echo] tomcat.home = ${tomcat.home}
       [echo] java.home = /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/jre
       [echo] node0 = ${env.HOSTNAME}
      
      
      compile15:
      
      copy-resources:
      
      generate-sources:
       [wstools] log4j:WARN No appenders could be found for logger (org.jboss.ws.tools.WSTools).
       [wstools] log4j:WARN Please initialize the log4j system properly.
       [wstools] java.lang.NullPointerException
       [wstools] at java.lang.System.arraycopy(Native Method)
       [wstools] at org.apache.xerces.impl.xs.XSModelImpl.getAnnotations(Unknown Source)
       [wstools] at org.jboss.ws.metadata.wsdl.xmlschema.WSSchemaUtils.copyXSModel(WSSchemaUtils.java:737)
       [wstools] at org.jboss.ws.tools.JavaToXSD.parseSchema(JavaToXSD.java:180)
       [wstools] at org.jboss.ws.metadata.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:227)
       [wstools] at org.jboss.ws.metadata.wsdl.WSDL11Reader.processDefinition(WSDL11Reader.java:118)
       [wstools] at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:145)
       [wstools] at org.jboss.ws.tools.WSDLToJava.convertWSDL2Java(WSDLToJava.java:121)
       [wstools] at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:324)
       [wstools] at org.jboss.ws.tools.WSTools.process(WSTools.java:138)
       [wstools] at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
       [wstools] at org.jboss.ws.tools.ant.wstools.execute(wstools.java:103)
       [wstools] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:276)
       [wstools] at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
       [wstools] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       [wstools] at java.lang.reflect.Method.invoke(Method.java:585)
       [wstools] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
       [wstools] at org.apache.tools.ant.Task.perform(Task.java:342)
       [wstools] at org.apache.tools.ant.Target.execute(Target.java:357)
       [wstools] at org.apache.tools.ant.Target.performTasks(Target.java:385)
       [wstools] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1282)
       [wstools] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
       [wstools] at org.apache.tools.ant.Project.executeTargets(Project.java:1134)
       [wstools] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:390)
       [wstools] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:276)
       [wstools] at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
       [wstools] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       [wstools] at java.lang.reflect.Method.invoke(Method.java:585)
       [wstools] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
       [wstools] at org.apache.tools.ant.Task.perform(Task.java:342)
       [wstools] at org.apache.tools.ant.Target.execute(Target.java:357)
       [wstools] at org.apache.tools.ant.Target.performTasks(Target.java:385)
       [wstools] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1282)
       [wstools] at org.apache.tools.ant.Project.executeTarget(Project.java:1251)
       [wstools] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
       [wstools] at org.apache.tools.ant.Project.executeTargets(Project.java:1134)
       [wstools] at org.apache.tools.ant.Main.runBuild(Main.java:698)
       [wstools] at org.apache.tools.ant.Main.startAnt(Main.java:199)
       [wstools] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:300)
       [wstools] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:106)
      
      BUILD FAILED
      /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/build.xml:23: The following error occurred while executing this line:
      /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/jsr181pojo/build.xml:28: Error running jbossws:
      
      
      


      any idea?

        • 1. Re: web services samples
          Ypatios Asmanidis Newbie

          ok I updated my xerces jars and now I got this error

          init:
           [echo] jboss.home = /usr/local/jboss-4.0.4.GA/
           [echo] tomcat.home = ${tomcat.home}
           [echo] java.home = /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/jre
           [echo] node0 = ${env.HOSTNAME}
          
          
          compile:
           [javac] Compiling 14 source files to /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/output/classes
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/common/java/org/jboss/test/ws/JBossWSTest.java:35: package junit.framework does not exist
           [javac] import junit.framework.TestCase;
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/common/java/org/jboss/test/ws/JBossWSTest.java:51: cannot find symbol
           [javac] symbol: class TestCase
           [javac] public abstract class JBossWSTest extends TestCase
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/common/java/org/jboss/test/ws/JBossWSTestSetup.java:24: package junit.extensions does not exist
           [javac] import junit.extensions.TestSetup;
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/common/java/org/jboss/test/ws/JBossWSTestSetup.java:25: package junit.framework does not exist
           [javac] import junit.framework.TestSuite;
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/common/java/org/jboss/test/ws/JBossWSTestSetup.java:39: cannot find symbol
           [javac] symbol: class TestSetup
           [javac] public class JBossWSTestSetup extends TestSetup
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/docstyle/java/org/jboss/test/ws/samples/docstyle/bare/TrivialServiceDocBareTestCase.java:32: package junit.framework does not exist
           [javac] import junit.framework.Test;
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/docstyle/java/org/jboss/test/ws/samples/docstyle/bare/TrivialServiceDocBareTestCase.java:48: cannot find symbol
           [javac] symbol : class Test
           [javac] location: class org.jboss.test.ws.samples.docstyle.bare.TrivialServiceDocBareTestCase
           [javac] public static Test suite()
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/docstyle/java/org/jboss/test/ws/samples/docstyle/wrapped/TrivialServiceDocWrappedTestCase.java:27: package junit.framework does not exist
           [javac] import junit.framework.Test;
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/docstyle/java/org/jboss/test/ws/samples/docstyle/wrapped/TrivialServiceDocWrappedTestCase.java:48: cannot find symbol
           [javac] symbol : class Test
           [javac] location: class org.jboss.test.ws.samples.docstyle.wrapped.TrivialServiceDocWrappedTestCase
           [javac] public static Test suite()
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/common/java/org/jboss/test/ws/JBossWSTest.java:54: cannot find symbol
           [javac] symbol : method getClass()
           [javac] location: class org.jboss.test.ws.JBossWSTest
           [javac] protected Logger log = Logger.getLogger(getClass().getName());
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/common/java/org/jboss/test/ws/JBossWSTest.java:168: cannot find symbol
           [javac] symbol : variable TestCase
           [javac] location: class org.jboss.test.ws.JBossWSTest
           [javac] else TestCase.assertEquals(exp, was);
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/common/java/org/jboss/test/ws/JBossWSTest.java:180: cannot find symbol
           [javac] symbol : method fail(java.lang.String)
           [javac] location: class org.jboss.test.ws.JBossWSTest
           [javac] fail("Expected <" + exp.length + "> array items, but was <" + was.length + ">");
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/common/java/org/jboss/test/ws/JBossWSTest.java:195: cannot find symbol
           [javac] symbol : method fail(java.lang.String)
           [javac] location: class org.jboss.test.ws.JBossWSTest
           [javac] fail("Expected a null array, but was: " + Arrays.asList(was));
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/common/java/org/jboss/test/ws/JBossWSTest.java:199: cannot find symbol
           [javac] symbol : method fail(java.lang.String)
           [javac] location: class org.jboss.test.ws.JBossWSTest
           [javac] fail("Expected " + Arrays.asList(exp) + ", but was: null");
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/common/java/org/jboss/test/ws/JBossWSTest.java:205: cannot find symbol
           [javac] symbol : method assertTrue(java.lang.String,boolean)
           [javac] location: class org.jboss.test.ws.JBossWSTest
           [javac] assertTrue("Arrays don't match", Arrays.equals(exp, was));
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/common/java/org/jboss/test/ws/JBossWSTest.java:210: cannot find symbol
           [javac] symbol : method assertTrue(java.lang.String,boolean)
           [javac] location: class org.jboss.test.ws.JBossWSTest
           [javac] assertTrue("Arrays don't match", Arrays.equals(exp, was));
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/common/java/org/jboss/test/ws/JBossWSTest.java:215: cannot find symbol
           [javac] symbol : method assertTrue(java.lang.String,boolean)
           [javac] location: class org.jboss.test.ws.JBossWSTest
           [javac] assertTrue("Arrays don't match", Arrays.equals(exp, was));
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/common/java/org/jboss/test/ws/JBossWSTest.java:220: cannot find symbol
           [javac] symbol : method assertTrue(java.lang.String,boolean)
           [javac] location: class org.jboss.test.ws.JBossWSTest
           [javac] assertTrue("Arrays don't match", Arrays.equals(exp, was));
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/common/java/org/jboss/test/ws/JBossWSTest.java:225: cannot find symbol
           [javac] symbol : method assertTrue(java.lang.String,boolean)
           [javac] location: class org.jboss.test.ws.JBossWSTest
           [javac] assertTrue("Arrays don't match", Arrays.equals(exp, was));
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/common/java/org/jboss/test/ws/JBossWSTest.java:230: cannot find symbol
           [javac] symbol : method assertTrue(java.lang.String,boolean)
           [javac] location: class org.jboss.test.ws.JBossWSTest
           [javac] assertTrue("Arrays don't match", Arrays.equals(exp, was));
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/common/java/org/jboss/test/ws/JBossWSTest.java:235: cannot find symbol
           [javac] symbol : method assertTrue(java.lang.String,boolean)
           [javac] location: class org.jboss.test.ws.JBossWSTest
           [javac] assertTrue("Arrays don't match", Arrays.equals(exp, was));
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/common/java/org/jboss/test/ws/JBossWSTestSetup.java:46: cannot find symbol
           [javac] symbol : class TestSuite
           [javac] location: class org.jboss.test.ws.JBossWSTestSetup
           [javac] super(new TestSuite(testClass));
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/docstyle/java/org/jboss/test/ws/samples/docstyle/bare/TrivialServiceDocBareTestCase.java:55: cannot find symbol
           [javac] symbol : method setUp()
           [javac] location: class org.jboss.test.ws.JBossWSTest
           [javac] super.setUp();
           [javac] ^
           [javac] /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/docstyle/java/org/jboss/test/ws/samples/docstyle/wrapped/TrivialServiceDocWrappedTestCase.java:55: cannot find symbol
           [javac] symbol : method setUp()
           [javac] location: class org.jboss.test.ws.JBossWSTest
           [javac] super.setUp();
           [javac] ^
           [javac] Note: Some input files use unchecked or unsafe operations.
           [javac] Note: Recompile with -Xlint:unchecked for details.
           [javac] 24 errors
          
          BUILD FAILED
          /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/build.xml:14: The following error occurred while executing this line:
          /usr/local/progrs/jbossws-1.0.3.GA/jbossws-samples-1.0.3.GA/jbossws-samples-1.0.3.GA/common/imported-build.xml:133: Compile failed; see the compiler error output for details.
          
          
          
          


          • 2. Re: web services samples
            Jason Greene Master

            Looks like you are missing junit in your classpath.

            -Jason

            • 3. Re: web services samples
              ray lai Newbie

              I fixed Xerces in ANT and add JUnit in the classpath (could JBoss add this to the installation/release notes?). However, I have different issues when running the WS examples.

              1. wss (e.g. encrypt, sign) failed with no detailed errors
              2. in the simpleSign test case, there is a cryptic MBean exception due to reflectedDispatcher error.
              3. my colleague told me the wsuid is missing in the SOAP message when he intercepts the SOAP message via TCPSPY.

              could you provide some pointer? thanks.


              HOW I RUN THE SAMPLE
              1. install jboss 4.0.5 and jbossws-samples-1.0.3
              2. fix Xerces in ANT
              3. add ANT and JUnit in classpath
              4. deploy jbossws to jboss server, and jboss-client as per installation/release notes
              5. go to the jbossws-samples-1.0.3 directory and run "ant"
              then run "ant tests" upon previous success

              DETAILS

              tests:

              init:
              [echo] jboss.home = c:/tools/jboss
              [echo] tomcat.home = c:/tools/tomcat55
              [echo] java.home = C:\Program Files\Java\jdk1.5.0_08\jre
              [echo] node0 = MTVL04AL3M0346


              test:
              [junit] Running org.jboss.test.ws.samples.wssecurity.SimpleEncryptTestCase
              [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 7.969 sec
              [junit] Test org.jboss.test.ws.samples.wssecurity.SimpleEncryptTestCase FAIL
              ED
              [junit] Running org.jboss.test.ws.samples.wssecurity.SimpleSignTestCase
              [junit] javax.management.MBeanException
              [junit] at org.jboss.mx.interceptor.ReflectedDispatcher.handleInvocation
              Exceptions(ReflectedDispatcher.java:180)
              [junit] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(Reflected
              Dispatcher.java:163)
              [junit] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              [junit] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractI
              nterceptor.java:133)
              [junit] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              [junit] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invok
              e(ModelMBeanOperationInterceptor.java:142)
              [junit] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              [junit] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBean
              Invoker.java:264)
              [junit] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.ja
              va:659)
              [junit] at sun.reflect.GeneratedMethodAccessor154.invoke(Unknown Source)

              [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
              hodAccessorImpl.java:25)
              [junit] at java.lang.reflect.Method.invoke(Method.java:585)
              [junit] at org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(
              InvokerAdaptorService.java:266)
              [junit] at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)

              [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
              hodAccessorImpl.java:25)
              [junit] at java.lang.reflect.Method.invoke(Method.java:585)
              [junit] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(Reflected
              Dispatcher.java:155)
              [junit] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              [junit] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractI
              nterceptor.java:133)
              [junit] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              [junit] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invok
              e(ModelMBeanOperationInterceptor.java:142)
              [junit] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              [junit] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBean
              Invoker.java:264)
              [junit] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.ja
              va:659)
              [junit] at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMP
              ProxyFactory.java:179)
              [junit] at sun.reflect.GeneratedMethodAccessor111.invoke(Unknown Source)

              [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
              hodAccessorImpl.java:25)
              [junit] at java.lang.reflect.Method.invoke(Method.java:585)
              [junit] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(Reflected
              Dispatcher.java:155)
              [junit] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              [junit] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
              [junit] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBean
              Invoker.java:264)
              [junit] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.ja
              va:659)
              [junit] at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerActio
              n.invoke(JRMPInvoker.java:819)
              [junit] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvok
              er.java:420)
              [junit] at sun.reflect.GeneratedMethodAccessor110.invoke(Unknown Source)

              [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
              hodAccessorImpl.java:25)
              [junit] at java.lang.reflect.Method.invoke(Method.java:585)
              [junit] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.jav
              a:294)
              [junit] at sun.rmi.transport.Transport$1.run(Transport.java:153)
              [junit] at java.security.AccessController.doPrivileged(Native Method)
              [junit] at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
              [junit] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTranspor
              t.java:466)
              [junit] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPT
              ransport.java:707)
              [junit] at java.lang.Thread.run(Thread.java:595)
              [junit] Caused by: org.jboss.deployment.DeploymentException: Could not creat
              e deployment: file:/C:/tools/jboss/jbossws-samples-1.0.3.GA/output/libs/jbossws-
              samples-wssecurity-sign.war; - nested throwable: (org.jboss.ws.WSException: Serv
              ice already registerd: jboss.ws:context=jbossws-samples-wssecurity-sign,endpoint
              =HelloService)
              [junit] at org.jboss.deployment.DeploymentException.rethrowAsDeploymentE
              xception(DeploymentException.java:53)
              [junit] at org.jboss.deployment.MainDeployer.create(MainDeployer.java:99
              1)
              [junit] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:81
              8)
              [junit] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:78
              2)
              [junit] at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
              [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
              hodAccessorImpl.java:25)
              [junit] at java.lang.reflect.Method.invoke(Method.java:585)
              [junit] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(Reflected
              Dispatcher.java:155)
              [junit] ... 43 more
              [junit] Caused by: org.jboss.ws.WSException: Service already registerd: jbos
              s.ws:context=jbossws-samples-wssecurity-sign,endpoint=HelloService
              [junit] at org.jboss.ws.server.ServiceEndpointManager.createServiceEndpo
              int(ServiceEndpointManager.java:501)
              [junit] at org.jboss.ws.deployment.ServiceEndpointDeployer.create(Servic
              eEndpointDeployer.java:120)
              [junit] at org.jboss.ws.integration.jboss.DeployerInterceptor.create(Dep
              loyerInterceptor.java:80)
              [junit] at org.jboss.ws.integration.jboss.DeployerInterceptorJSE.create(
              DeployerInterceptorJSE.java:74)
              [junit] at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInte
              rceptor.create(SubDeployerInterceptorSupport.java:180)
              [junit] at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeploye
              rInterceptor.java:91)
              [junit] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              [junit] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBean
              Invoker.java:264)
              [junit] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.ja
              va:659)
              [junit] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210
              )
              [junit] at $Proxy39.create(Unknown Source)
              [junit] at org.jboss.deployment.MainDeployer.create(MainDeployer.java:96
              9)
              [junit] ... 49 more
              [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 7.891 sec
              [junit] Test org.jboss.test.ws.samples.wssecurity.SimpleSignTestCase FAILED
              [junit] Running org.jboss.test.ws.samples.wssecurity.StorePassEncryptTestCas
              e
              [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 7.984 sec
              [junit] Test org.jboss.test.ws.samples.wssecurity.StorePassEncryptTestCase F
              AILED

              init:
              [echo] jboss.home = c:/tools/jboss
              [echo] tomcat.home = c:/tools/tomcat55
              [echo] java.home = C:\Program Files\Java\jdk1.5.0_08\jre
              [echo] node0 = MTVL04AL3M0346


              tests-report:
              [junitreport] Transform time: 1578ms

              BUILD SUCCESSFUL
              Total time: 3 minutes 50 seconds
              C:\tools\jboss\jbossws-samples-1.0.3.GA>
              C:\tools\jboss\jbossws-samples-1.0.3.GA>
              C:\tools\jboss\jbossws-samples-1.0.3.GA>cd wssec*

              C:\tools\jboss\jbossws-samples-1.0.3.GA\wssecurity>ant tests
              Buildfile: build.xml

              init:
              [echo] jboss.home = c:/tools/jboss
              [echo] tomcat.home = c:/tools/tomcat55
              [echo] java.home = C:\Program Files\Java\jdk1.5.0_08\jre
              [echo] node0 = MTVL04AL3M0346


              compile:

              copy-resources:

              generate-sources:
              [wstools] log4j:WARN No appenders could be found for logger (org.jboss.ws.tool
              s.WSTools).
              [wstools] log4j:WARN Please initialize the log4j system properly.

              compile-generated:

              copy-generated:
              [copy] Copying 3 files to C:\tools\jboss\jbossws-samples-1.0.3.GA\output\re
              sources

              jars:
              [war] Building war: C:\tools\jboss\jbossws-samples-1.0.3.GA\output\libs\jb
              ossws-samples-wssecurity-sign.war
              [jar] Building jar: C:\tools\jboss\jbossws-samples-1.0.3.GA\output\libs\jb
              ossws-samples-wssecurity-sign-client.jar
              [war] Building war: C:\tools\jboss\jbossws-samples-1.0.3.GA\output\libs\jb
              ossws-samples-wssecurity-encrypt.war
              [jar] Building jar: C:\tools\jboss\jbossws-samples-1.0.3.GA\output\libs\jb
              ossws-samples-wssecurity-encrypt-client.jar
              [war] Building war: C:\tools\jboss\jbossws-samples-1.0.3.GA\output\libs\jb
              ossws-samples-store-pass-encrypt.war
              [jar] Building jar: C:\tools\jboss\jbossws-samples-1.0.3.GA\output\libs\jb
              ossws-samples-store-pass-encrypt-client.jar

              tests:

              init:
              [echo] jboss.home = c:/tools/jboss
              [echo] tomcat.home = c:/tools/tomcat55
              [echo] java.home = C:\Program Files\Java\jdk1.5.0_08\jre
              [echo] node0 = MTVL04AL3M0346


              test:
              [junit] Running org.jboss.test.ws.samples.wssecurity.SimpleEncryptTestCase
              [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 7.985 sec
              [junit] Test org.jboss.test.ws.samples.wssecurity.SimpleEncryptTestCase FAIL
              ED
              [junit] Running org.jboss.test.ws.samples.wssecurity.SimpleSignTestCase
              [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 8.016 sec
              [junit] Test org.jboss.test.ws.samples.wssecurity.SimpleSignTestCase FAILED
              [junit] Running org.jboss.test.ws.samples.wssecurity.StorePassEncryptTestCas
              e
              [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 7.985 sec
              [junit] Test org.jboss.test.ws.samples.wssecurity.StorePassEncryptTestCase F
              AILED

              BUILD SUCCESSFUL
              Total time: 27 seconds
              C:\tools\jboss\jbossws-samples-1.0.3.GA\wssecurity>

              • 4. Re: web services samples
                Jason Greene Master

                Good point, we will add that to our release notes

                http://jira.jboss.com/jira/browse/JBWS-1319

                org.jboss.ws.WSException: Serv
                ice already registerd: jboss.ws:context=jbossws-samples-wssecurity-sign,endpoint
                =HelloService)
                


                This means that the jar is already deployed on the server when the test was ran; you need to undeploy it before running the tests.

                -Jason

                • 5. Re: web services samples
                  ray lai Newbie

                  I made some progress to resolve the issues when running jbossws WSS sample.

                  Assumptions
                  - JBoss 4.0.5 on laptop
                  - JBossws 1.0.3 on the same laptop

                  Procedures
                  1. Pre-requisites (discussed in previous threads)
                  - replace xercesImpl.jar version 2.7.x in ANT
                  - add JUnit test in classpath
                  - ensure jboss-xml-binding file is deployed to server, and in the client directory, as per release notes

                  2. From the output/log, it seems that something is wrong with the hostname, and wss samples can't connect to the server, though the WS is deployed
                  - I replaced the hostname in the codes (just to make the WSS sample works)

                  e.g. in SimpleSignTestCase.java
                  ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://localhost:8080/jbossws-samples-wssecurity-sign");

                  3. do a clean up first
                  %ant clean

                  4. re-run the wss examples
                  %ant
                  %ant tests

                  Now I have the jboss ws examples running. Thanks.

                  • 6. Re: web services samples
                    Sidney Zurch Novice

                     

                    "rayymlai" wrote:

                    2. From the output/log, it seems that something is wrong with the hostname...

                    ...I replaced the hostname in the codes (just to make the WSS sample works)


                    I noticed that the ant script run from JBossWS 1.0.3 on Unix did not pick up the value of "node0" from the HOSTNAME environment variable.

                    I'm guessing this has something to do with quirky behavior of ant properties.

                    To try to get the samples to run I modified samples/common/imported-build.xml setting the node0 property value to the host name.

                    I'm still not there yet.

                    It seems to me that the samples exist more for the benefit of the developers, who have carefully configured their environments for junit, than for the users.



                    • 7. Re: web services samples
                      ray lai Newbie

                      wrt your hostname / node0 issues, in order to make the jbossws samples work on my laptop (which runs WinXP), in fact I change

                      1. change the source code to replace the hostname by "localhost"
                      2. change the node0 to localhost in the common/imported-build.xml

                      Previously I changed the node0 alone in the imported-build.xml, I still have the same run-time exception.

                      I make such changes because my laptop may not have wireless network (depending whether I work in the office or when I'm commuting on public transport), and sometimes my laptop resumes from standby mode. Not sure if Jboss/JBoss has any issue with the IP address when running the WSS samples. Setting the hostname to localhost is always safe to my dev environment.

                      Any one shed some light to see if there is a better or cleaner way to address the problem.