[JBossWS] - Deploying on Jboss 4.2.1, jbossws 1.2.1 success, same applicat
by tpawankumar
Hi All,
I have created small sample HelloWorld WebService and tried to deploy on Jboss 4.2.1 GA and Jbossws 1.2.1 GA.It got deployed.
I am using Jax-WS for creating the web service.
Then i upgraded to jbossws to 2.0.1 GA and tried to deploy the same application.
It it throwing the following exception
java.lang.IllegalStateException: Cannot find endpoint meta data for: JWeb
at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.getEndpointM
etaData(UnifiedMetaDataDeploymentAspect.java:117)
at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.create(Unifi
edMetaDataDeploymentAspect.java:86)
at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy
(DeploymentAspectManagerImpl.java:115)
at org.jboss.wsf.container.jboss42.ArchiveDeployerHook.deploy(ArchiveDep
loyerHook.java:97)
at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInt
erceptor.java:90)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.
start(SubDeployerInterceptorSupport.java:188)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterce
ptor.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 $Proxy45.start(Unknown Source)
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 sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
or.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
BeanOperationInterceptor.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(URLDeploymen
tScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
canner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
bstractDeploymentScanner.java:336)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
upport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
eanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.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(ServiceControl
ler.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(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.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(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
or.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
BeanOperationInterceptor.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:595)
What could be the reason?
My Remote Interface
package com.covad.inter;
|
| import java.rmi.Remote;
| import java.rmi.RemoteException;
|
| import javax.jws.WebMethod;
| import javax.jws.WebParam;
| import javax.jws.WebResult;
| import javax.jws.WebService;
| import javax.jws.soap.SOAPBinding;
|
|
| @WebService(name="Hello",targetNamespace = "http://Inter.covad.com/")
| @SOAPBinding(style = SOAPBinding.Style.RPC)
| public interface Hello extends Remote {
|
| String echo(
| String value) throws RemoteException;
|
| }
My Implementation class
package com.covad.impl;
|
| import javax.jws.WebService;
| import javax.jws.soap.SOAPBinding;
|
|
| @WebService(endpointInterface = "com.covad.inter.Hello", name="Hello")
| @SOAPBinding(style = SOAPBinding.Style.RPC)
| public class HelloImpl {
|
| public String echo(String value)
| {
| return "Hello"+value;
| }
|
| }
|
|
My WSDL file
<?xml version="1.0" encoding="UTF-8"?>
| <definitions name='HelloService' targetNamespace='http://Inter.covad.com/' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://Inter.covad.com/' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
| <types/>
| <message name='Hello_echo'>
| <part name='arg0' type='xsd:string'/>
| </message>
| <message name='Hello_echoResponse'>
| <part name='return' type='xsd:string'/>
| </message>
| <portType name='Hello'>
| <operation name='echo' parameterOrder='arg0'>
| <input message='tns:Hello_echo'/>
| <output message='tns:Hello_echoResponse'/>
| </operation>
| </portType>
| <binding name='HelloBinding' type='tns:Hello'>
| <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
| <operation name='echo'>
| <soap:operation soapAction=''/>
| <input>
| <soap:body namespace='http://Inter.covad.com/' use='literal'/>
| </input>
| <output>
| <soap:body namespace='http://Inter.covad.com/' use='literal'/>
| </output>
| </operation>
| </binding>
| <service name='HelloService'>
| <port binding='tns:HelloBinding' name='HelloPort'>
| <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
| </port>
| </service>
| </definitions>
My web.xml file
<?xml version="1.0" encoding="UTF-8"?>
| <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
| http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
| version="2.4">
|
| <servlet>
| <servlet-name>JWeb</servlet-name>
| <servlet-class>com.covad.impl.HelloImpl</servlet-class>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>JWeb</servlet-name>
| <url-pattern>/*</url-pattern>
| </servlet-mapping>
|
| </web-app>
Please let me know if there are any problems in the code or there any changes in the annotation from jbossws 1.2.1GA to jbossws 2.0.1GA.
Thanks in Advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099752#4099752
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099752
17 years, 2 months
[JBossWS] - Exception when deploying a web service on jboss 4.2.1.GA
by SameerGijare
Hi
I have a web service with wsdl ready from weblogic.I am porting it to Jboss 4.2.1.GA.It uses jbossws1.2.1.GA I am also using JAXB 2.1.5 to genarate schema.jar, from XSD using xjc command and then compiling the classes and putting them in schema.jar.But when I deploy the bundled web application on Jboss 4.2.1 i get the following exception
:02,694 ERROR [MainDeployer] Could not start deployment: file:/E:/jboss-4.2.1.GA/server/default/deploy/mcafeeAdapter.war
boss.deployment.DeploymentException: Cannot start service endpoint; - nested throwable: (org.jboss.ws.WSException: {http://smo.xsd.covad.com/vendororder}vendorOrder is not a valid property on class com.covad.xsd.smo.vendororder.ProcessVendorOrder)
at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:101)
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 $Proxy46.start(Unknown Source)
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 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 $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.GeneratedMethodAccessor3.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:508)
at java.lang.Thread.run(Thread.java:595)
d by: org.jboss.ws.WSException: {http://smo.xsd.covad.com/vendororder}vendorOrder is not a valid property on class com.covad.xsd.smo.vendororder.ProcessVendorOrder
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getElementPropertyAccessor(JAXBContextImpl.java:816)
at org.jboss.ws.metadata.acessor.JAXBAccessor$1$1.create(JAXBAccessor.java:84)
at org.jboss.ws.metadata.umdm.ParameterMetaData.eagerInitialize(ParameterMetaData.java:472)
at org.jboss.ws.metadata.umdm.OperationMetaData.eagerInitialize(OperationMetaData.java:466)
at org.jboss.ws.metadata.umdm.EndpointMetaData.eagerInitializeOperations(EndpointMetaData.java:516)
at org.jboss.ws.metadata.umdm.EndpointMetaData.initializeInternal(EndpointMetaData.java:502)
at org.jboss.ws.metadata.umdm.EndpointMetaData.eagerInitialize(EndpointMetaData.java:490)
at org.jboss.ws.metadata.umdm.ServiceMetaData.eagerInitialize(ServiceMetaData.java:429)
at org.jboss.ws.metadata.umdm.UnifiedMetaData.eagerInitialize(UnifiedMetaData.java:192)
at org.jboss.ws.core.server.ServiceEndpoint.start(ServiceEndpoint.java:112)
at org.jboss.ws.core.server.ServiceEndpointManager.startServiceEndpoint(ServiceEndpointManager.java:646)
at org.jboss.ws.core.server.ServiceEndpointDeployer.start(ServiceEndpointDeployer.java:140)
at org.jboss.ws.integration.jboss42.DeployerInterceptor.startServiceEndpoint(DeployerInterceptor.java:144)
at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:96)
... 74 more
Can anyone help me to resolve this exception ?
Thank in advance..
-Sameer Gijare
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099728#4099728
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099728
17 years, 2 months
[JBossWS] - Re: Necessary artifacts/descriptors for JAX-WS web service
by kyriakost
Hi all,
I am coming back to this topic because it seems that I have the same problem and I cannot overpass it.
I have successfully deployed a POJO. Very easy.
I am now trying to deploy a WebServiceProvider but I am getting :
Cannot obtain wsdl location
This is my web.xml :
| <?xml version="1.0" encoding="UTF-8"?>
| <web-app>
|
| <servlet-name>Test</servlet-name>
| <servlet-class>test.ws.Test</servlet-class>
|
| <servlet-mapping>
| <servlet-name>Test</servlet-name>
| <url-pattern>/Test</url-pattern>
| </servlet-mapping>
| </web-app>
|
|
| my jboss-web.xml :
|
| | <?xml version="1.0" encoding="ISO-8859-1"?>
| | <!DOCTYPE jboss-web
| | PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN"
| | "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
| |
| | <jboss-web>
| | <context-root>ws</context-root>
| | </jboss-web>
| |
|
| and this is the code :
|
| | package test.ws;
| |
| |
| | import java.io.ByteArrayInputStream;
| |
| | import javassist.tools.rmi.RemoteException;
| |
| | import javax.jws.WebMethod;
| | import javax.jws.WebParam;
| | import javax.jws.WebResult;
| | import javax.jws.WebService;
| | import javax.jws.soap.SOAPBinding;
| | import javax.xml.transform.Source;
| | import javax.xml.transform.Transformer;
| | import javax.xml.transform.TransformerFactory;
| | import javax.xml.transform.dom.DOMResult;
| | import javax.xml.transform.stream.StreamSource;
| | import javax.xml.ws.Provider;
| | import javax.xml.ws.Service;
| | import javax.xml.ws.ServiceMode;
| | import javax.xml.ws.WebServiceProvider;
| |
| | import org.w3c.dom.Node;
| |
| | @WebServiceProvider
| | @ServiceMode(value = Service.Mode.PAYLOAD)
| | public class Test implements Provider<Source>
| | {
| |
| | public Source invoke(Source source) throws RemoteException {
| | try {
| | DOMResult dom = new DOMResult();
| | Transformer trans = TransformerFactory.newInstance().newTransformer();
| | trans.transform(source, dom);
| | Node node = dom.getNode();
| | Node root = node.getFirstChild();
| | Node first = root.getFirstChild();
| | int number1 = Integer.decode(first.getFirstChild().getNodeValue());
| | Node second = first.getNextSibling();
| | int number2 = Integer.decode(second.getFirstChild().getNodeValue());
| |
| | return sendSource(number1, number2);
| |
| | } catch(Exception e) {
| | e.printStackTrace();
| | throw new RemoteException("Error in provider endpoint");
| | }
| | }
| |
| | private Source sendSource(int number1, int number2) {
| | int sum = number1+number2;
| | String body =
| | "<ns:querySubscriberResponse xmlns:ns=\"http://duke.org\"><return>"
| | +sum
| | +"</return></ns:querySubscriberResponse>";
| | Source source = new StreamSource(
| | new ByteArrayInputStream(body.getBytes()));
| | return source;
| | }
| | }
| |
|
| I even tried putting a wsdl inside at
| WEB-INF/wsdl/TestService.wsdl
|
| Where should I put the wsdl so that the deployer can find it ?
| What other artifacts/deployer-descriptors do I need to make it work ?
|
| Thank you in advance !
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099673#4099673
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099673
17 years, 2 months
[JBossWS] - WebServiceRef & HandlerChain annotations
by egelke
I think I found a bug with the way the HandlerChain annotation is implemented in JBossWS 2.0.1.SP2 on JBoss 4.2.2
It happends when I use @HandlerChain in the following condition:
1) A field in a Stateless Session Bean
2) The type of the field is the port type
3) The field is annotated with @WebServiceRef
An example of the declaration:
| @HandlerChain(file = "MyWsClient_HandlerChains.xml")
| @WebServiceRef(name = "ws/MyWs", wsdlLocation = "META-INF/wsdl/MyWs.wsdl")
| private MyWsPort wsPort;
|
In that case I get the following errror:
| Caused by: org.jboss.ws.WSException: Cannot resolve handler file 'be/egelke/MyWsClient_HandlerChains.xml' on javax.xml.ws.Service
| at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.getHandlerChainsMetaData(JAXWSMetaDataBuilder.java:235)
| at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.<init>(ServiceDelegateImpl.java:150)
| at org.jboss.ws.core.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:61)
| at javax.xml.ws.Service.<init>(Service.java:83)
| at javax.xml.ws.Service.create(Service.java:721)
| at org.jboss.ws.core.jaxws.client.ServiceObjectFactoryJAXWS.getObjectInstance(ServiceObjectFactoryJAXWS.java:135)
| at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
| at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1273)
| at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1290)
| ... 143 more
|
I did check the code and found the following on the line specified in the above exception:
| // Try the filename relative to class
| if (fileURL == null)
| {
| String filepath = filename;
| String packagePath = wsClass.getPackage().getName().replace('.', '/');
| String resourcePath = packagePath + "/" + filepath;
| while (filepath.startsWith("../"))
| {
| packagePath = packagePath.substring(0, packagePath.lastIndexOf("/"));
| filepath = filepath.substring(3);
| resourcePath = packagePath + "/" + filepath;
| }
| fileURL = wsClass.getClassLoader().getResource(resourcePath);
| }
|
| if (fileURL == null)
| throw new WSException("Cannot resolve handler file '" + filename + "' on " + wsClass.getName());
|
As you can see, the above tries the load my handler file with the classloader from the javax.xml.ws.Service class. Obviously, my handler file can't be found.
Is there a way that I can make it work or is this a bug or limitation?
I did find some ways to get arround the problem, but all have there disadvantages:
| 1) Replace the Port class of the field by the Service Client class: requires extra code which complicates unit testing.
| 2) Specify the correct service implementation class: only available in JBoss 5.0
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099646#4099646
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099646
17 years, 2 months