4 Replies Latest reply on Dec 20, 2004 1:02 PM by thomas.diesler

    Service Unavailable

    jerryp64

      I have deployed a service using the Getting Started Guide, the Wiki, and some suggestions from these forums. After I deploy the service I am able to use the following URL to see the service:
      http://localhost:8080/ws4ee/services/BookSessionService?wsdl

      I have reviewed the service on the server and I saved the WSDL file to another directory. I am trying to create a standalone client that can access the service. I have used the Axis WSDL2Java program to generate the Java classes needed to access the server.

      When I run the standalone application I get SOAP fault. In the message it returns a


      404-mod07sol/BookSessionService, the requested resource is not available.


      Here is the WSDL file:
      <?xml version="1.0" encoding="UTF-8"?>
      <wsdl:definitions targetNamespace="http://service.hott.com" xmlns:impl="http://service.hott.com" xmlns:intf="http://service.hott.com" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
       <wsdl:message name="findByTitleResponse">
       <wsdl:part name="findByTitleReturn" type="xsd:string"/>
       </wsdl:message>
       <wsdl:message name="findByISBNResponse">
       <wsdl:part name="findByISBNReturn" type="xsd:string"/>
       </wsdl:message>
       <wsdl:message name="findByTitleRequest">
       <wsdl:part name="in0" type="xsd:string"/>
       </wsdl:message>
       <wsdl:message name="findByPriceRangeRequest">
       <wsdl:part name="in0" type="xsd:double"/>
       <wsdl:part name="in1" type="xsd:double"/>
       </wsdl:message>
       <wsdl:message name="findByPriceRangeResponse">
       <wsdl:part name="findByPriceRangeReturn" type="xsd:string"/>
       </wsdl:message>
       <wsdl:message name="findByISBNRequest">
       <wsdl:part name="in0" type="xsd:int"/>
       </wsdl:message>
       <wsdl:portType name="BookSessionEndpoint">
       <wsdl:operation name="findByISBN" parameterOrder="in0">
       <wsdl:input name="findByISBNRequest" message="impl:findByISBNRequest"/>
       <wsdl:output name="findByISBNResponse" message="impl:findByISBNResponse"/>
       </wsdl:operation>
       <wsdl:operation name="findByPriceRange" parameterOrder="in0 in1">
       <wsdl:input name="findByPriceRangeRequest" message="impl:findByPriceRangeRequest"/>
       <wsdl:output name="findByPriceRangeResponse" message="impl:findByPriceRangeResponse"/>
       </wsdl:operation>
       <wsdl:operation name="findByTitle" parameterOrder="in0">
       <wsdl:input name="findByTitleRequest" message="impl:findByTitleRequest"/>
       <wsdl:output name="findByTitleResponse" message="impl:findByTitleResponse"/>
       </wsdl:operation>
       </wsdl:portType>
       <wsdl:binding name="BookSessionEndpointSoapBinding" type="impl:BookSessionEndpoint">
       <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
       <wsdl:operation name="findByISBN">
       <wsdlsoap:operation soapAction=""/>
       <wsdl:input name="findByISBNRequest">
       <wsdlsoap:body use="literal" namespace="http://service.hott.com"/>
       </wsdl:input>
       <wsdl:output name="findByISBNResponse">
       <wsdlsoap:body use="literal" namespace="http://service.hott.com"/>
       </wsdl:output>
       </wsdl:operation>
       <wsdl:operation name="findByPriceRange">
       <wsdlsoap:operation soapAction=""/>
       <wsdl:input name="findByPriceRangeRequest">
       <wsdlsoap:body use="literal" namespace="http://service.hott.com"/>
       </wsdl:input>
       <wsdl:output name="findByPriceRangeResponse">
       <wsdlsoap:body use="literal" namespace="http://service.hott.com"/>
       </wsdl:output>
       </wsdl:operation>
       <wsdl:operation name="findByTitle">
       <wsdlsoap:operation soapAction=""/>
       <wsdl:input name="findByTitleRequest">
       <wsdlsoap:body use="literal" namespace="http://service.hott.com"/>
       </wsdl:input>
       <wsdl:output name="findByTitleResponse">
       <wsdlsoap:body use="literal" namespace="http://service.hott.com"/>
       </wsdl:output>
       </wsdl:operation>
       </wsdl:binding>
       <wsdl:service name="BookSessionService">
       <wsdl:port name="BookSessionEndpoint" binding="impl:BookSessionEndpointSoapBinding">
       <wsdlsoap:address location="http://localhost:8080/mod07sol/BookSessionService"/>
       </wsdl:port>
       </wsdl:service>
      </wsdl:definitions>
      


      Thanks in advance.
      Jerry

        • 1. 3860384
          thomas.diesler

          I have this in /usr/local/jboss/server/cirebon/deploy/scheduler-service.xml

           <mbean code="org.jboss.varia.scheduler.Scheduler"
           name=":service=Scheduler">
           <attribute name="StartAtStartup">true</attribute>
           <attribute name="SchedulableClass">com.xxx.TS</attribute>
           <attribute name="SchedulableArguments"></attribute>
           <attribute name="SchedulableArgumentTypes"></attribute>
           <attribute name="InitialStartDate">0</attribute>
           <attribute name="SchedulePeriod">30000</attribute>
           <attribute name="InitialRepetitions">-1</attribute>
           </mbean>
          

          But when I startup JBoss I encountered this error.
          2004-12-30 17:21:43,110 INFO [org.jboss.varia.scheduler.Scheduler]
          Failed to find: com.xxx.Text2SMS
          java.lang.ClassNotFoundException: No ClassLoaders found for:
          com.xxx.TS
           at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:161)
          

          I extracted the ear and confirmed that my new java class :
          com/xxx/TS.class
          is in my ear along with the many other class files.

          All other files are able to load.


          My colleague informed me that
          I forgot the
          <depends>
          attribute. It complain the class is not there
          because the ear/war/sar is not yet loaded by JBoss.


          I tried adding
          <depends>
          :
           <mbean code="org.jboss.varia.scheduler.Scheduler"
           name=":service=Scheduler">
           <attribute name="StartAtStartup">true</attribute>
           <attribute name="SchedulableClass">com.xxx.TS</attribute>
           <attribute name="SchedulableArguments"/>
           <attribute name="SchedulableArgumentTypes"/>
           <attribute name="InitialStartDate">0</attribute>
           <attribute name="SchedulePeriod">30000</attribute>
           <attribute name="InitialRepetitions">-1</attribute>
           <depends>jboss.j2ee:service=EARDeployer</depends>
           </mbean>
          

          with values such as :
          <depends>module=aaa.jar,service=EjbModule</depends>
          <depends>service=EARDeployer</depends>
          

          But still face the same problem.
          The new class is in
          aaa.jar


          Pls help.

          • 2. Re: Service Unavailable
            jerryp64

            Here is an update. The Locator class I generated was pointing to the URL that was defined in the WSDL file generated by JBoss:

            http://localhost:8080/mod07sol/BookSessionService
            


            I modified the code to use the URL for the service on JBoss:
            http://localhost:8080/ws4ee/services/BookSessionService?wsdl
            


            At that point the client application actually was able to connect to the service. I was told in another message that the URL to "ws4ee/services" had been deprecated in favor the context path. So which is it? If I am supposed to use the path generated in the WSDL file what can I do to get it to work?

            Thanks


            • 3. Re: Service Unavailable
              thomas.diesler

               

              http://localhost:8080/mod07sol/BookSessionService?wsdl
              


              is correct

              • 4. Re: Service Unavailable
                jerryp64

                When I try to use the suggested URL I get the following exception
                for a servlet and for a standalone application:

                 [java] javax.xml.rpc.ServiceException: Error processing WSDL document:
                 [java] java.io.FileNotFoundException: http://localhost:8080/mod07sol/BookSe
                ssionService?wsdl
                 [java] at org.apache.axis.client.Service.initService(Service.java:278)
                 [java] at org.apache.axis.client.Service.<init>(Service.java:193)
                 [java] at org.apache.axis.client.ServiceFactory.createService(ServiceFa
                ctory.java:232)
                 [java] at com.hott.client.WSClient.main(Unknown Source)
                 [java] Exception in thread "main"
                

                I have tried to enter the URL in the browser and it cannot find the file.

                The file is in the server/default/data/wsdl/mod07sol.jar path.

                Jerry