4 Replies Latest reply on Apr 30, 2002 4:35 AM by akirchhofer

    Apache SOAP 2.2 and jBoss 2.4.4 with Catalina 4.0.1

    akirchhofer

      Hello all,

      I tried to build a deployment descriptor for Apache SOAP 2.2 which I deployed on jBoss 2.4.4 with Catalina 4.0.1. I built up a small stateless sessionbean with just one bean method: giveBackaHello; just to try out the environment. I deployed it and wrote the Apache SOAP deployment descriptor - but now I don't know how to procceed... maybe there's anybody out there, who could give me a hint...


      My deployment descriptor seems like that:

      <?xml version="1.0"?>

      <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
      id="urn:com.tsystems.webservices.helloservice">
      <isd: provider type="org.apache.soap.providers.StatelessEJBProvider"
      scope="Application"
      methods="giveBackaHello">
      <isd:option key="JNDIName" value="sayhello/SayHello"/>
      <isd:option key="FullHomeInterfaceName" value="com.tsystems.webservices.sayhello.SayHelloHome" />
      <isd:option key="ContextProviderURL" value="localhost:1099" />
      <isd:option key="FullContextFactoryName" value="org.jnp.interfaces.NamingContextFactory" />
      </isd: provider>
      <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
      </isd:service>


      ... now I dont't know if localhost:1099 is that right or if one of the other values is false...

      using rmi://localhost:1099 I'll get:

      [ERROR,Default] =============================================
      [ERROR,Default] In TemplateProvider.locate()
      [ERROR,Default] URI: urn:com.tsystems.webservices.helloservice
      [ERROR,Default] DD.ServiceClass: org.apache.soap.providers.StatelessEJBProvider
      [ERROR,Default] DD.ProviderClass: org.apache.soap.providers.StatelessEJBProvider
      [ERROR,Default] Call.MethodName: giveBackaHello
      [INFO,Default] Exception caught: javax.naming.ServiceUnavailableException: rmi [Root exception is java.net.UnknownHostException: rmi]
      [INFO,Default] Error encountered: Error in connecting to EJB
      [INFO,Default] Successful Web Service call...

      ...on the other hand, if I try it just with localhost:1099 I'll get something like this:

      [ERROR,Default] =============================================
      [ERROR,Default] In TemplateProvider.locate()
      [ERROR,Default] URI: urn:com.tsystems.webservices.helloservice
      [ERROR,Default] DD.ServiceClass: org.apache.soap.providers.StatelessEJBProvider
      [ERROR,Default] DD.ProviderClass: org.apache.soap.providers.StatelessEJBProvider
      [ERROR,Default] Call.MethodName: giveBackaHello
      [INFO,Default] Exception caught: javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: com.tsystems.webservices.sayhello.SayHelloHome (no security manager: RMI class loader disabled)]
      [INFO,Default] Error encountered: Error in connecting to EJB
      [INFO,Default] Successful Web Service call...


      ... or do I have an error in reasoning?

      Could it maybe be, that I first have to create an instance of the stateless session bean and the Apache servlet just uses the home interface to create another replication of this instance (I thougt that it uses the home interface and the context information to create a bean instance - InitialContext() or something like that...)

      Maybe someone has an idea - every comment is very appreciated...

      bye,

      Andy

        • 1. 3713538
          jwkaltz

          Thanks a lot for your answer!

          At the moment I just have the session bean deployed in jBoss together with a Servlet to test it (this servlet uses the home interface, instanciates the bean and everything is all right at this point...).

          Than I wrote another servlet that acts as Apache SOAP client and tries to invoke the web service via Apache SOAP. While invocation the Apache SOAP Servlet catches the exceptions...

          So I really might have an error in reasoning. According to your answer I think the problem might be, that there is no ejb instance available. So it's maybe wrong to just deploy a method of the session bean itself. I must have a servlet or something like that, that instanciates the bean and routes the request over to the bean...

          • 2. Re: Apache SOAP 2.2 and jBoss 2.4.4 with Catalina 4.0.1
            akirchhofer

            Thanks a lot for your answer!

            At the moment I just have the session bean deployed in jBoss together with a Servlet to test it (this servlet uses the home interface, instanciates the bean and everything is all right at this point...).

            Than I wrote another servlet that acts as Apache SOAP client and tries to invoke the web service via Apache SOAP. While invocation the Apache SOAP Servlet catches the exceptions...

            So I really might have an error in reasoning. According to your answer I think the problem might be, that there is no ejb instance available. So it's maybe wrong to just deploy a method of the session bean itself. I must have a servlet or something like that, that instanciates the bean and routes the request over to the bean...

            • 3. Re: Apache SOAP 2.2 and jBoss 2.4.4 with Catalina 4.0.1
              jwkaltz

              The client code that wants to access an ejb needs to get the home interface of the ejb, and then call create().

              (This may or may not actually create an ejb on the server; if it's a stateless session bean it doesn't need to create a new one. But, in your client you need to write that code to get a reference on the ejb)

              What confuses me in your answer is that you speak of a servlet acting as Apache SOAP client. Don't you mean that it's a servlet which is the SOAP server part ? And this servlet would receive SOAP requests, for example asking to access an ejb. Then this servlet acts as an ejb client; meaning it gets the ejb's home interface and calls create().

              • 4. Re: Apache SOAP 2.2 and jBoss 2.4.4 with Catalina 4.0.1
                akirchhofer

                My test environment is the following:

                one box: jBoss 2.4.4 with Catalina 4.0.1 and the Apache SOAP servlet deployed...

                a second box: Apache 1.3.20 + jBoss 2.4.4 with Catalina 4.0.1 with a servlet deployed that acts as a soap client. This means: if you install Apache SOAP 2.2, the samples provided are just clients implemented as java applications you run from command line like: java blablabla...

                So I wrote a servlet-client in order to test out, if there are any specialities with Apache SOAP.

                My idea was: I distribute the methode of the stateless session bean as a web service via the Apache SOAP servlet on box one and call this web service via my servlet on box two, which interacts with Apache SOAP as client... just to try out the environment and how to distribute an ejb method as a web service....