[JBossWS] - JBoss & JAX-WS. Beginners Guide
by JGF1
Hi folks.
I've recently been finished reading a book called Beginning Java EE 5 Platform from Novice to Professional.
It contained an example using JAX-WS.
When I tried to locate one of the jars, I couldn't find it:
ie:jbossws.jar. According to book it's in jbossws.sar folder..
Tried compiling code without this but came across two errors based on jars in my classpath:
warning: [path] bad path element "c:\apps\jboss-4.2.2.ga\client\jsr173_1.0_api.jar": no such file or directory
warning: [path] bad path element "c:\apps\jboss-4.2.2.ga\client\jaxb1-impl.jar": no such file or directory
1) Wondered if someone could shed some light on this for me?
(The authors do state the JAX-WS was incomplete at the time the book was being written. I have downloaded jboss-4.2.2ga,
- Says no full implementations of JSR-181 WS meta-data for J EE 5/JAX-WS 2.0 formerly JAX-RPC. Book was published in 2006...)
These are the jars in my classpath:
c:\apps\jboss-4.2.2.ga\server\all\lib\servlet-api.jar;
c:\apps\jboss-4.2.2.ga\server\all\lib\jsp-api.jar;
c:\apps\jboss-4.2.2.ga\server\all\deploy\jbossws.sar\wsdl4j.jar;
c:\apps\jboss-4.2.2.ga\client\jboss-jaxrpc.jar;
c:\apps\jboss-4.2.2.ga\lib\concurrent.jar;
c:\apps\jboss-4.2.2.ga\lib\jboss-common.jar;
c:\apps\jboss-4.2.2.ga\client\jboss-j2ee.jar;
c:\apps\jboss-4.2.2.ga\lib\commons-httpclient.jar;
c:\apps\jboss-4.2.2.ga\client\jbossall-client.jar;
c:\apps\jboss-4.2.2.ga\server\all\lib\jboss.jar;
c:\apps\jboss-4.2.2.ga\server\all\lib\jboss-remoting.jar;
c:\apps\jboss-4.2.2.ga\server\all\lib\jboss-transaction.jar;
c:\apps\jboss-4.2.2.ga\server\all\lib\jnpserver.jar;
c:\apps\jboss-4.2.2.ga\server\all\deploy\ejb3.deployer\jboss-ejb3.jar;
c:\apps\jboss-4.2.2.ga\server\all\lib\jboss-ejb3x.jar;
c:\apps\jboss-4.2.2.ga\server\all\deploy\jboss-aop-jdk50.deployer\jboss-aop-jdk50.jar;
c:\apps\jboss-4.2.2.ga\server\all\deploy\jboss-aop-jdk50.deployer\jboss-aspect-library-jdk50.jar;
c:\apps\jboss-4.2.2.ga\client\jboss-common-client.jar;c:\apps\jboss-4.2.2.ga\client\jbosssx-client.jar;
c:\apps\jboss-4.2.2.ga\server\all\lib\ejb3-persistence.jar;C:\apps\apache-tomcat-6.0.16\lib\jsf-api.jar;
(The ones in bold I have just added. The ejb3 ones are the others they say are required as well as the missing jbossws.jar)
This was the example
| package webservices;
|
| import java.rmi.Remote;
|
| public interface SimpleService extends Remote
| {
| String echo(String input);
| }
|
| package webservices;
|
| import org.jboss.annotation.ejb.RemoteBinding;
| import org.jboss.ws.annotation.PortComponent;
|
| import javax.jws.WebMethod;
| import javax.jws.WebService;
| import javax.ejb.Remote;
| import javax.ejb.Stateless;
|
| @WebService(name = "EndpointInterface", targetNamespace = "http://localhost",
| serviceName = "SimpleService")
| @PortComponent(contextRoot="/jbosswsest", urlPattern="/*")
| @Remote(SimpleService.class)
| @Stateless
| public class SimpleServiceImpl implements SimpleService
| {
| @WebMethod
| public String echo(String input)
| {
| return input;
| }
| }
|
| package client;
|
| import webservices.SimpleService;
| import javax.xml.rpc.ServiceFactory;
| import javax.xml.rpc.Service;
| import javax.xml.namespace.QName;
| import java.net.URL;
|
| public class SimpleServiceClient {
| private static final String _namespace = "http://localhost";
| private static final String _service = "SimpleService";
| private static final String _wsdl = "http://localhost:8080/jbosswstest?wsdl";
|
| public static void main(String[] args) {
| try {
| URL defUrl = new URL(_wsdl);
| // Create the Service Factory
| ServiceFactory serviceFactory = ServiceFactory.newInstance();
| // Load the service implementation class
| Service remoteService = serviceFactory.createService(defUrl,
| new QName(_namespace, _service));
| // Load a proxy for our class
| SimpleService invoker =
| (SimpleService) remoteService.getPort(SimpleService.class);
| // Invoke our interface for each argument
| for (int i = 0; i < args.length; i++) {
| String returnedString = invoker.echo(args);
| System.out.println("sent string: " + args
| + ", received string: " + returnedString);
| }
| } catch (Exception e) {
| e.printStackTrace();
| }
| }
| }
|
My compile fails with the following:
| warning: [path] bad path element "c:\apps\jboss-4.2.2.ga\client\jsr173_1.0_api.jar": no such file or directory
| warning: [path] bad path element "c:\apps\jboss-4.2.2.ga\client\jaxb1-impl.jar": no such file or directory
| webservices\SimpleServiceImpl.java:3: package org.jboss.annotation.ejb does not exist
| import org.jboss.annotation.ejb.RemoteBinding;
| ^
| webservices\SimpleServiceImpl.java:4: package org.jboss.ws.annotation does not exist
| import org.jboss.ws.annotation.PortComponent;
| ^
| webservices\SimpleServiceImpl.java:13: cannot find symbol
| symbol: class PortComponent
| @PortComponent(contextRoot="/jbosswsest", urlPattern="/*")
| ^
| 3 errors
| 2 warnings
|
The book says you need the following to run client app:
c:\apps\jboss-4.2.2.ga\client\jboss-jaxrpc.jar;
c:\apps\jboss-4.2.2.ga\client\log4j.jar;
c:\apps\jboss-4.2.2.ga\client\logkit.jar;
c:\apps\jboss-4.2.2.ga\client\jbossws-client.jar;
c:\apps\jboss-4.2.2.ga\client\activation.jar;
c:\apps\jboss-4.2.2.ga\client\jboss-saaj.jar;
c:\apps\jboss-4.2.2.ga\client\mail.jar;
c:\apps\jboss-4.2.2.ga\client\wsdl4j.jar;
c:\apps\jboss-4.2.2.ga\lib\endorsed\xercesImpl.jar;
c:\apps\jboss-4.2.2.ga\client\jbossall-client.jar;
c:\apps\jboss-4.2.2.ga\server\all\lib\jboss-remoting.jar;
c:\apps\jboss-4.2.2.ga\server\all\lib\javax.servlet.jar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4135754#4135754
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4135754
16 years, 10 months
[JBossWS] - Re: NullPointerException with jbossws 2.0.1
by MakkaPakka
Have some more info about my experiments version 202.
If I add this in to my launch args there is no exception at startup.....
| -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl
| -Djboss.platform.mbeanserver
| -Dcom.sun.management.jmxremote=true
| -Dcom.sun.management.jmxremote.port=13095 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
However, upon connecting with jboss - all of the jconsole tabs are disabled. ie Overview, Memory, Threads, Classes, VMSummary are all disabled. Only the MBeans tab is enabled.
If I launch JBoss with these args...
| -Dcom.sun.management.jmxremote=true
| -Dcom.sun.management.jmxremote.port=13095 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
...ie I remove the jboss mbean entries, then I get the exception I posted above.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4135700#4135700
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4135700
16 years, 10 months
[JBossWS] - Re: NullPointerException with jbossws 2.0.1
by MakkaPakka
I've checked out the jira bug 1800 and it appears that this problem is fixed in jbossws 202 onwards.
I've tried both 202 and 203 and they fail to deploy if I include the -Dcom.sun.management.jmxremote.
Admittedly I am using Java 6 Update4 which I understand is unsupported?
Does anyone have any suggestions?
11-03-08 15:19:19,908 ERROR main [org.jboss.deployment.MainDeployer] Could not start deployment: file:/C:/jboss-4.2.2.GA/server/default/deploy/test.ear/test.jar/
java.lang.NullPointerException
at org.jboss.wsf.framework.deployment.WebAppGeneratorDeploymentAspect.generatWebDeployment(WebAppGeneratorDeploymentAspect.java:105)
at org.jboss.wsf.framework.deployment.WebAppGeneratorDeploymentAspect.create(WebAppGeneratorDeploymentAspect.java:84)
at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy(DeploymentAspectManagerImpl.java:115)
at org.jboss.wsf.container.jboss42.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:97)
at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:90)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
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 $Proxy32.start(Unknown Source)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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 $Proxy9.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.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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:597)
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:508)
at java.lang.Thread.run(Thread.java:619)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4135694#4135694
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4135694
16 years, 10 months
[JBossWS] - Jboss Juddi configuration
by anil_dongre
Hi
I do not know whether this is the right place for my question.
I am new to jboss and Juddi. I tried configuring juddi on JBoss 4.2 GA. My database is MySQL.
I have similarly configured Juddi on tomcat.
I tried a small application to create an organisation using JAXR. This sample works fine with my tomcat installation but when i try it with JBoss it throws a table not found exception for the table Publisher. I guess something is wrong with my configuration of Juddi on JBoss.
Can any help me with this. Can someone tell me exactly how do i configure my datasource. Can someone also tell me how do i test my Juddi configuration like i can in tomcat with happyjuddi.
Thanks in advance
Regards
Anil
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4135585#4135585
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4135585
16 years, 10 months
[JBossWS] - Yet another WS-Security question ...
by viniciuscarvalho
Hello there! I'm using JBoss 4.2.1.GA with JBoss WS
Before one can point, I've already read:
http://jbws.dyndns.org/mediawiki/index.php?title=User_Guide#WS-Security
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=105580&postdays=...
http://jbws.dyndns.org/mediawiki/index.php?title=WS-Security_options
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=94406&postdays=0...
Although those really helped me getting things started, I could not get security running.
I have 2 services that need to have an encryption/sign options. I decided to do this using certificates.
One of the services, is a pure JSR-189 WS:
| @Stateless(name="CSMQueryService")
| @WebService(serviceName="CSMQueryService",targetNamespace="http://www.synos.com.br/CSM/definitions")
| @SOAPBinding(use = SOAPBinding.Use.LITERAL, style = SOAPBinding.Style.DOCUMENT)
| @WebContext(contextRoot="/csm/services",urlPattern="/CSMQueryService")
| @EndpointConfig(configName = "Standard WSSecurity Endpoint")
| @HandlerChain(file="resource://META-INF/ServerHandler.xml")
| public class CSMQueryServiceImpl implements CSMQueryService
|
|
The other, is a bit trick since I've implemented the WSDL from a top-down approach, and it was hand created. But, I can't get even this one working :(
I have a jar, with jboss-wsse-server.xml, ServerHandler, csm.keystore, csm.truststore inside its META-INF dir.
During deployment, there's no error, neither warning on the console. But, when I access the service's WSDL I was hoping to find some ws-security related stuff in there, but there was none, this was my first concern.
So I tried to access it using SOAPUI (I'll not try to run tests using jboss ws clients, since this service will be accessed using other languages like .net). Well, I did not set the certificate on SOAPUI on purpose, but I was expecting an error like "Not allowed", instead, a nullpointer was thrown:
| 2008-03-10 17:34:05,463 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerResolverImpl] getHandlerChain: [type=POST,info=[service={http://www.synos.com.br/CSM/definitions}CSMQuery...]
| 2008-03-10 17:34:05,464 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Create a handler executor: [WSSecurity Handler]
| 2008-03-10 17:34:05,464 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Enter: handleIn BoundMessage
| 2008-03-10 17:34:05,470 ERROR [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Exception during handler processing
| java.lang.NullPointerException
| at org.jboss.ws.extensions.security.Util.matchNode(Util.java:188)
| at org.jboss.ws.extensions.security.Util.matchNode(Util.java:183)
| at org.jboss.ws.extensions.security.Util.findElement(Util.java:89)
| at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleInbound(WSSecurityDispatcher.java:114)
| at org.jboss.ws.extensions.security.jaxws.WSSecurityHandler.handleInboundSecurity(WSSecurityHandler.java:78)
| at org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer.handleInbound(WSSecurityHandlerServer.java:41)
| at org.jboss.wsf.spi.jaxws.handler.GenericHandler.handleMessage(GenericHandler.java:55)
| at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:295)
| at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:140)
| at org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS.callRequestHandlerChain(HandlerDelegateJAXWS.java:87)
| at org.jboss.ws.core.server.ServiceEndpointInvoker.callRequestHandlerChain(ServiceEndpointInvoker.java:115)
| at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:159)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:396)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:260)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:177)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:110)
| at org.jboss.wsf.spi.invocation.EndpointServlet.service(EndpointServlet.java:72)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:595)
| 2008-03-10 17:34:05,481 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Exit: handleIn BoundMessage with status: false
| 2008-03-10 17:34:05,481 DEBUG [org.jboss.ws.core.jaxws.handler.MessageContextJAXWS] Begin response processing
| 2008-03-10 17:34:05,481 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] popMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@1e7879f (Thread http-127.0.0.1-8080-1)
| 2008-03-10 17:34:05,481 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] pushMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@4fe915 (Thread http-127.0.0.1-8080-1)
| 2008-03-10 17:34:05,484 ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] SOAP request exception
| javax.xml.ws.WebServiceException: java.lang.NullPointerException
| at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.processHandlerFailure(HandlerChainExecutor.java:276)
| at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:155)
| at org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS.callRequestHandlerChain(HandlerDelegateJAXWS.java:87)
| at org.jboss.ws.core.server.ServiceEndpointInvoker.callRequestHandlerChain(ServiceEndpointInvoker.java:115)
| at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:159)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:396)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:260)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:177)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:110)
| at org.jboss.wsf.spi.invocation.EndpointServlet.service(EndpointServlet.java:72)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.NullPointerException
| at org.jboss.ws.extensions.security.Util.matchNode(Util.java:188)
| at org.jboss.ws.extensions.security.Util.matchNode(Util.java:183)
| at org.jboss.ws.extensions.security.Util.findElement(Util.java:89)
| at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleInbound(WSSecurityDispatcher.java:114)
| at org.jboss.ws.extensions.security.jaxws.WSSecurityHandler.handleInboundSecurity(WSSecurityHandler.java:78)
| at org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer.handleInbound(WSSecurityHandlerServer.java:41)
| at org.jboss.wsf.spi.jaxws.handler.GenericHandler.handleMessage(GenericHandler.java:55)
| at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:295)
| at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:140)
| ... 27 more
| 2008-03-10 17:34:05,503 DEBUG [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] Cannot obtain fault meta data for: class javax.xml.ws.WebServiceException
| 2008-03-10 17:34:05,503 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] callFaultHandlerChain: PRE
| 2008-03-10 17:34:05,503 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] callFaultHandlerChain: ENDPOINT
| 2008-03-10 17:34:05,503 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] callFaultHandlerChain: POST
| 2008-03-10 17:34:05,503 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Enter: handleOutBoundFault
| 2008-03-10 17:34:05,503 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Exit: handleOutBoundFault with status: true
|
It is my first time using WS-Sec on jbossws. I have used it before on glassfish. And the provider added few stuff on the WSDL to let the client know about the extensions to the WSDL.
I believe that my questions are:
1st: Does jbossws add this meta-data inside the secured service?
2nd: How do I get it running?
Regards[/url]
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4135463#4135463
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4135463
16 years, 10 months
[JBossWS] - Compile errors with wsconsume generated source
by earniedyke
Greetings all,
I am trying to use wsconsume to generate the artifacts for a very simple web service (see wsdl below). Here are the results of executing the command:
C:\JBoss\jboss-4.2.2.GA\bin>wsconsume -k -p org.ebsinc.adalert.ws -o c:\ebs\work
| spaces\ws-adalert\adalert-service\src -s c:\ebworkspaces\ws-adalert\adalert-serv
| uces\src http://localhost:81/services/echoService?wsdl
| parsing WSDL...
|
|
| generating code...
| org\ebsinc\adalert\ws\\Proxy0.java
| org\ebsinc\adalert\ws\Echo.java
| org\ebsinc\adalert\ws\EchoResponse.java
| org\ebsinc\adalert\ws\EchoService.java
| org\ebsinc\adalert\ws\Log.java
| org\ebsinc\adalert\ws\LogResponse.java
| org\ebsinc\adalert\ws\ObjectFactory.java
| org\ebsinc\adalert\ws\package-info.java
| c:\ebworkspaces\ws-adalert\adalert-servuces\src\org\ebsinc\adalert\ws\Proxy0.java:2:<identifier>expected package org.ebsinc.adalert.ws.;
| ^
| c:\ebworkspaces\ws-adalert\adalert-servuces\src\org\ebsinc\adalert\ws\EchoServic
| e.java:10: malformed floating point literal
| import org.ebsinc.adalert.ws..Proxy0;
| ^
| 2 errors
| compilation failed, errors should have been reported
| Failed to invoke WsImport
| java.lang.IllegalStateException: WsImport invocation failed. Try the verbose swi
| tch for more information
| at org.jboss.ws.tools.jaxws.impl.SunRIConsumerImpl.consume(SunRIConsumer
| Impl.java:190)
| at org.jboss.wsf.spi.tools.cmd.WSConsume.importServices(WSConsume.java:2
| 16)
| at org.jboss.wsf.spi.tools.cmd.WSConsume.main(WSConsume.java:79)
|
Any ideas why this is happening? I am using JBoss 4.2.2.GA's wsconsume.
Thanks in advance for any and all help.
Earnie!
wsdl:
<?xml version="1.0" encoding="UTF-8"?>
| <wsdl:definitions targetNamespace="http://simple.components.mule.org" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://simple.components.mule.org" xmlns:intf="http://simple.components.mule.org" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><!--WSDL created by Apache Axis version: 1.4
| Built on Apr 22, 2006 (06:55:48 PDT)--><wsdl:types><schema elementFormDefault="qualified" targetNamespace="http://simple.components.mule.org" xmlns="http://www.w3.org/2001/XMLSchema"><element name="echo"><complexType><sequence><element name="in0" type="xsd:string"/></sequence></complexType></element><element name="echoResponse"><complexType><sequence><element name="echoReturn" type="xsd:string"/></sequence></complexType></element><element name="log"><complexType><sequence><element name="in0" type="xsd:string"/></sequence></complexType></element><element name="logResponse"><complexType/></element></schema></wsdl:types>
| <wsdl:message name="logRequest">
| <wsdl:part element="impl:log" name="parameters"/>
| </wsdl:message>
| <wsdl:message name="echoRequest">
| <wsdl:part element="impl:echo" name="parameters"/>
| </wsdl:message>
| <wsdl:message name="echoResponse">
| <wsdl:part element="impl:echoResponse" name="parameters"/>
|
| </wsdl:message>
| <wsdl:message name="logResponse">
| <wsdl:part element="impl:logResponse" name="parameters"/>
| </wsdl:message>
| <wsdl:portType name="$Proxy0">
| <wsdl:operation name="echo">
| <wsdl:input message="impl:echoRequest" name="echoRequest"/>
| <wsdl:output message="impl:echoResponse" name="echoResponse"/>
| </wsdl:operation>
|
| <wsdl:operation name="log">
| <wsdl:input message="impl:logRequest" name="logRequest"/>
| <wsdl:output message="impl:logResponse" name="logResponse"/>
| </wsdl:operation>
| </wsdl:portType>
| <wsdl:binding name="echoServiceSoapBinding" type="impl:$Proxy0">
| <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
| <wsdl:operation name="echo">
| <wsdlsoap:operation soapAction=""/>
|
| <wsdl:input name="echoRequest">
| <wsdlsoap:body use="literal"/>
| </wsdl:input>
| <wsdl:output name="echoResponse">
| <wsdlsoap:body use="literal"/>
| </wsdl:output>
| </wsdl:operation>
| <wsdl:operation name="log">
| <wsdlsoap:operation soapAction=""/>
|
| <wsdl:input name="logRequest">
| <wsdlsoap:body use="literal"/>
| </wsdl:input>
| <wsdl:output name="logResponse">
| <wsdlsoap:body use="literal"/>
| </wsdl:output>
| </wsdl:operation>
| </wsdl:binding>
| <wsdl:service name="echoService">
|
| <wsdl:port binding="impl:echoServiceSoapBinding" name="echoService">
| <wsdlsoap:address location="http://localhost:81/services/echoService"/>
| </wsdl:port>
| </wsdl:service>
| </wsdl:definitions>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4135406#4135406
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4135406
16 years, 10 months