[jboss-user] [JBossWS] - Re: web services samples

rayymlai do-not-reply at jboss.com
Fri Oct 27 11:51:55 EDT 2006


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>

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981348#3981348

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981348



More information about the jboss-user mailing list