1 2 Previous Next 27 Replies Latest reply: Apr 13, 2011 12:15 AM by rakesh mehta Go to original post RSS
  • 15. Re: Providing your own wsdl instead of the generated one.
    David Owens Newbie

    Do you have all the proper client jars in your classpath?

  • 16. Re: Providing your own wsdl instead of the generated one.
    Anuradha Rahurkar Newbie

    Yes, I do..I updated the wsrunclient.bat script to include all the relevant jars:
    Here's the list of jars:
    set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jboss-xml-binding.jar
    set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/activation.jar
    set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/javassist.jar
    set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/getopt.jar
    set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jaxb-api.jar
    set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jaxb-impl.jar
    set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jbossall-client.jar
    set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/stax-api.jar
    set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/wstx.jar
    set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jboss-j2ee.jar
    set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jboss-saaj.jar
    set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jboss-jaxws.jar
    set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jboss-jaxrpc.jar
    set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jbossws-client.jar
    set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/log4j.jar
    set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/mail.jar
    set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/wsdl4j.jar

    Here's the EchoClient class:

    package echo;
    
    public class EchoClient {
    
     /**
     * @param args
     */
     public static void main(String[] args) {
     if (args.length != 1) {
     System.err.println("usage: EchoClient <message>");
     System.exit(1);
     }
     EchoService service = new EchoService();
     Echo echo = service.getEchoPort();
     System.out.println("Server said: " + echo.echo(args[0]));
     }
    
    }


  • 17. Re: Providing your own wsdl instead of the generated one.
    Anuradha Rahurkar Newbie

    This thread reports the same WSClientException as I am getting
    http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171340

    However, I wonder why would I need a trustore to get the WSClient to run.

  • 18. Re: Providing your own wsdl instead of the generated one.
    Peter Johnson Master

    Do you have a META-INF/standard-jaxws-client-config.xml packages with your client? If so, please post the contents?

    You did not post the full stack trace - were there are more "caused by" entries in that trace?

    Post the contents of the WSDL.

  • 19. Re: Providing your own wsdl instead of the generated one.
    Anuradha Rahurkar Newbie

    Here are the contents of META-INF
    META-INF/
    META-INF/MANIFEST.MF
    META-INF/wsdl/
    META-INF/wsdl/EchoService.wsdl

    I don't have a standard-jaxws-client-config.xml

    This is the entire stack trace with all the 'caused by' entries

    Exception in thread "main" javax.xml.ws.WebServiceException: java.lang.IllegalSt
    ateException: Could not setup remoting client
     at org.jboss.ws.core.jaxws.client.ClientImpl.handleRemoteException(Clien
    tImpl.java:304)
     at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:242)
    
     at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:16
    4)
     at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:15
    0)
     at $Proxy15.echo(Unknown Source)
     at echo.EchoClient.main(EchoClient.java:15)
    Caused by: java.lang.IllegalStateException: Could not setup remoting client
     at org.jboss.ws.core.client.RemotingConnectionImpl.createRemotingClient(
    RemotingConnectionImpl.java:240)
     at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnec
    tionImpl.java:153)
     at org.jboss.ws.core.client.SOAPRemotingConnection.invoke(SOAPRemotingCo
    nnection.java:77)
     at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:331)
     at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:230)
    
     ... 4 more
    Caused by: java.lang.NullPointerException
     at org.jboss.remoting.InvokerLocator.resolveHost(InvokerLocator.java:333
    )
     at org.jboss.remoting.InvokerLocator.URIParse(InvokerLocator.java:257)
     at org.jboss.remoting.InvokerLocator.parse(InvokerLocator.java:213)
     at org.jboss.remoting.InvokerLocator.<init>(InvokerLocator.java:193)
     at org.jboss.ws.core.client.RemotingConnectionImpl.createRemotingClient(
    RemotingConnectionImpl.java:213)
     ... 8 more


    I am suspicious of one entry in my wsdl though: "Replace with actual url"
    I am thinking if I need to change this to "http://localhost:8080/echo"
    This is the wsdl.

    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name='EchoService'
     targetNamespace='http://echo/'
     xmlns='http://schemas.xmlsoap.org/wsdl/'
     xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
     xmlns:tns='http://echo/' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
     <types>
     <xs:schema targetNamespace='http://echo/' version='1.0' xmlns:tns='http://echo/' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
     <xs:element name='echo' type='tns:echo'/>
     <xs:element name='echoResponse' type='tns:echoResponse'/>
     <xs:complexType name='echo'>
     <xs:sequence>
     <xs:element minOccurs='0' name='arg0' type='xs:string'/>
     </xs:sequence>
     </xs:complexType>
     <xs:complexType name='echoResponse'>
     <xs:sequence>
     <xs:element minOccurs='0' name='return' type='xs:string'/>
     </xs:sequence>
     </xs:complexType>
     </xs:schema>
     </types>
     <message name='Echo_echo'>
     <part element='tns:echo' name='echo'/>
     </message>
     <message name='Echo_echoResponse'>
     <part element='tns:echoResponse' name='echoResponse'/>
     </message>
     <portType name='Echo'>
     <operation name='echo' parameterOrder='echo'>
     <input message='tns:Echo_echo'/>
     <output message='tns:Echo_echoResponse'/>
     </operation>
     </portType>
     <binding name='EchoBinding' type='tns:Echo'>
     <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
     <operation name='echo'>
     <soap:operation soapAction=''/>
     <input>
     <soap:body use='literal'/>
     </input>
     <output>
     <soap:body use='literal'/>
     </output>
     </operation>
     </binding>
     <service name='EchoService'>
     <documentation>Congrats! You have published your own WSDL!</documentation>
     <port binding='tns:EchoBinding' name='EchoPort'>
     <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
     </port>
     </service>
    </definitions>


  • 20. Re: Providing your own wsdl instead of the generated one.
    David Owens Newbie

    I think you're on the right track, notice it's having a problem resolving the host, and you have not put the actual host URL in the WSDL.

    That's probably it.

  • 21. Re: Providing your own wsdl instead of the generated one.
    Anuradha Rahurkar Newbie

    Looks like I am out of luck again :(
    Oh! this is so frustrating..

    So, I made the following update to my wsdl:

    <service name='EchoService'>
     <documentation>Congrats! You have published your own WSDL!</documentation>
     <port binding='tns:EchoBinding' name='EchoPort'>
     <soap:address location='http://localhost:8080/echo'/>
     </port>
     </service>


    packaged the war and deployed it and now I see this error in the JBossConsole:

    12:38:28,359 INFO [WSDLFilePublisher] WSDL published to: file:/C:/sfsl/runtime/
    localhost/workstation/jboss/data/wsdl/echo.war/EchoService.wsdl
    12:38:28,359 ERROR [ServiceEndpointDeployer] Cannot start service endpoint
     org.jboss.ws.WSException: Cannot load service endpoint interface: echo.Echo
     at org.jboss.ws.metadata.umdm.EndpointMetaData.getServiceEndpointInterfa
    ce(EndpointMetaData.java:238)
     at org.jboss.ws.metadata.umdm.EndpointMetaData.eagerInitializeOperations
    (EndpointMetaData.java:510)
     at org.jboss.ws.metadata.umdm.EndpointMetaData.initializeInternal(Endpoi
    ntMetaData.java:504)
     at org.jboss.ws.metadata.umdm.EndpointMetaData.eagerInitialize(EndpointM
    etaData.java:492)
     at org.jboss.ws.metadata.umdm.ServiceMetaData.eagerInitialize(ServiceMet
    aData.java:429)
     at org.jboss.ws.metadata.umdm.UnifiedMetaData.eagerInitialize(UnifiedMet
    aData.java:192)
     at org.jboss.ws.core.server.ServiceEndpoint.start(ServiceEndpoint.java:1
    12)
     at org.jboss.ws.core.server.ServiceEndpointManager.startServiceEndpoint(
    ServiceEndpointManager.java:702)
     at org.jboss.ws.core.server.ServiceEndpointDeployer.start(ServiceEndpoin
    tDeployer.java:140)
     at org.jboss.ws.integration.jboss42.DeployerInterceptor.startServiceEndp
    oint(DeployerInterceptor.java:144)
     at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerIn
    terceptor.java:96)
     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 $Proxy47.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.GeneratedMethodAccessor24.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 $Proxy10.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.GeneratedMethodAccessor5.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.GeneratedMethodAccessor11.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)
    Caused by: java.lang.ClassNotFoundException: echo.Echo
     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
    der.java:1358)
     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
    der.java:1204)
     at org.jboss.ws.metadata.umdm.EndpointMetaData.getServiceEndpointInterfa
    ce(EndpointMetaData.java:229)
     ... 84 more


  • 22. Re: Providing your own wsdl instead of the generated one.
    Peter Johnson Master

    According to this line in your WSDL:

    targetNamespace='http://echo/'


    the web service class is in a package named echo, and according to this line:

    <portType name='Echo'>


    the simple class name is Echo, which makes the full class name echo.Echo. Therefore, you must have an echo.Echo class in the WAR file for your web service. Apparently, you don't:

    Caused by: java.lang.ClassNotFoundException: echo.Echo

    (Hint: always look for the initial exception - with nested exceptions look for 'caused by')


  • 23. Re: Providing your own wsdl instead of the generated one.
    Anuradha Rahurkar Newbie

    Thanks, Peter. This fixed it!

    -Anu

  • 24. Re: Providing your own wsdl instead of the generated one.
    David Owens Newbie

    Thanks PeterJ!

    Sorry Anu, I wasn't reading very carefully, I should have paid more attention before answering.

  • 25. Re: Providing your own wsdl instead of the generated one.
    srini rengasamy Newbie

    I am using JBoss 4.3. I followed the exact steps I just got this
    10:25:45,013 INFO [DefaultEndpointRegistry] register: jboss.ws:context=EchoTest,endpoint=echo
    10:25:45,075 INFO [TomcatDeployer] deploy, ctxPath=/EchoTest, warUrl=.../tmp/deploy/tmp53925EchoTest-exp.war/
    10:25:45,401 INFO [WSDLFilePublisher] WSDL published to: file:/C:/Program Files/JBoss/server/default/data/wsdl/EchoTest.war/EchoService.wsdl

    I did not get the message regarding "ServiceEndpointDeployer". When I test my web service I got exception

    10:27:07,011 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
    java.lang.IllegalStateException: Canot get target bean instance
    at org.jboss.wsf.container.jboss42.DefaultInvocationHandler.getTargetBean(DefaultInvocationHandler.java:80)
    at org.jboss.wsf.container.jboss42.DefaultInvocationHandler.invoke(DefaultInvocationHandler.java:90)
    at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:220)
    ...
    Caused by: java.lang.InstantiationException: echo.Echo
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at org.jboss.wsf.container.jboss42.DefaultInvocationHandler.getTargetBean(DefaultInvocationHandler.java:75)

    I don't understand who creates this echo.Echo servlet which is mentioned in the web.xml. Any help

  • 26. Re: Providing your own wsdl instead of the generated one.
    srini rengasamy Newbie

    I followed the posting below and I could get EchoTest to work by doing the following (adding portName which is in bold)
    @javax.jws.WebService(endpointInterface="echo.Echo", portName="EchoPort")

    public class EchoImpl implements Echo{
    ...
    }

    It looks like the name should match WSL port which is defined as


    I am surprised why some instructions are not available in the product manual or part of WSCONSUME intructions. I don't understand why it should be so difficult to do a simple hello world web service when I start from WSDL first.

  • 27. Re: Providing your own wsdl instead of the generated one.
    rakesh mehta Newbie

    Hi

      Please help to resolve my prolem.

      I want to deploye a web service using my own wsld which is importing xsd schema.

      I have successfully deployed a web service using my own wsdl which does not import any xsd schema.

      Please tell me what are the necessary changes i need to do deploye the web service using my own wsdl.

     

    with regard

    rakesh kumar

1 2 Previous Next