4 Replies Latest reply on Jan 7, 2006 1:16 AM by Fairoz Sharif

    "WSDL2Java emitter timed out" error with JBossWS and Amazon

    Matti Rintala Newbie

      Hi!

      I have been stuck with the following problem for a while and I really hope that someone could give me some clue on how to solve it.

      I am trying to consume Amazon web services with servlet deployed to a JBoss 4.0.1sp1. Following instructions in the ?WSClientWEB? tutorial I have managed to consume Google?s web services but, with the some principles and steps, I still fail with the Amazon.

      The problem is following error that I receive when contacting the client servlet (copied from server.log):

      2005-11-23 20:45:45,919 DEBUG [org.jboss.webservice.client.ServiceObjectFactory] Create jaxrpc service for wsdl: file:/C:/jboss-4.0.1sp1/server/default/tmp/deploy/tmp26520aecs-exp.war/WEB-INF/wsdl/AWSECommerceService.wsdl
      2005-11-23 20:45:45,919 DEBUG [org.jboss.webservice.WSDLDefinitionFactory] getBaseInputSource [wsdlUrl=file:/C:/jboss-4.0.1sp1/server/default/tmp/deploy/tmp26520aecs-exp.war/WEB-INF/wsdl/AWSECommerceService.wsdl]
      2005-11-23 20:45:45,929 DEBUG [com.ibm.wsdl.xml.WSDLReaderImpl] Retrieving document at 'file:/C:/jboss-4.0.1sp1/server/default/tmp/deploy/tmp26520aecs-exp.war/WEB-INF/wsdl/AWSECommerceService.wsdl'.
      2005-11-23 20:45:46,139 DEBUG [org.jboss.webservice.EngineConfigurationFinder] Found config at: file:/C:/jboss-4.0.1sp1/server/default/deploy/jboss-ws4ee.sar/META-INF/axis-client-config.xml
      2005-11-23 20:46:34,829 ERROR [org.apache.axis.client.Service] WSDL2Java emitter timed out (this often means the WSDL at the specified URL is inaccessible)!
      java.io.IOException: WSDL2Java emitter timed out (this often means the WSDL at the specified URL is inaccessible)!
       at org.apache.axis.wsdl.gen.Parser.run(Parser.java:248)
       at org.apache.axis.client.Service.initService(Service.java:277)
       at org.apache.axis.client.Service.<init>(Service.java:189)
       at org.jboss.webservice.client.ServiceImpl.<init>(ServiceImpl.java:106)
       at org.jboss.webservice.client.ServiceObjectFactory.getObjectInstance(ServiceObjectFactory.java:155)
       at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:636)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:658)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:520)
       at javax.naming.InitialContext.lookup(InitialContext.java:347)
       at com.aecs.client.AecsServlet.service(AecsServlet.java:34)
      


      Has anybody encountered the same problem? Any help is much appreciated. Thank you in advance.


      My web.xml?s service-ref:
      <service-ref>
       <service-ref-name>service/AWSECommerceService</service-ref-name>
       <service-interface>javax.xml.rpc.Service</service-interface>
       <wsdl-file>WEB-INF/wsdl/AWSECommerceService.wsdl</wsdl-file>
       <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
      </service-ref>
      


      My Servlet (AecsServlet.java):
      InitialContext iniCtx = new InitialContext();
      Service service = (Service) iniCtx.lookup("java:comp/env/service/AWSECommerceService");
      


        • 1. Re:
          Anders Hedstrom Novice

           

          2005-11-23 20:46:34,829 ERROR [org.apache.axis.client.Service] WSDL2Java emitter timed out (this oft
          en means the WSDL at the specified URL is inaccessible)!


          Pretty much says it all, doesn't it? Can you access the wsdl thru your browser?

          • 2. Re:
            Matti Rintala Newbie

             

            Pretty much says it all, doesn't it? Can you access the wsdl thru your browser?


            Thank you for your answer Anders.

            I can access the wsdl through my browser in both locations: http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl and local copy at ...WEB-INF/wsdl/AWSECommerceService.wsdl. I also have tried to override <wsdl-file> defined in web.xml with URL defined in jboss-web.xml <wsdl-override> with no success.

            I understand that the exception and the fact that I am able to consume Google's service with identical configuration suggests that the problem is in accessibility of the wsdl file. However, I have been able to consume the same Amazon wsdl with Axis/Tomcat setup.

            • 3. Re:
              Anders Hedstrom Novice

              I made a quick and dirty test from my machine and I had no problem making a call to Amazon web service.

              I'm using JBoss 4.0.3SP1 with JDK5 on WinXP. I created all artifacts with jwsdp-1.6 wscompile. (I've tested with JBoss 4.0.2 as well, with the same result)

              Are you sitting behind a proxy server? I am. In case of I don't set the system properties for the proxy server I get a connection timeout exception.

              Cheers
              //Anders

              • 4. Re: I got a same problem
                Fairoz Sharif Newbie

                i have hello pojo web service im able to access the wsdl through the browser
                http://localhost:8080/myweb/Hello?WSDL

                the url works fine but when im executing im getting the same exception what counld it mean anyone would like comment some on this , Please

                Good day