9 Replies Latest reply on Jul 16, 2002 5:02 AM by fernandez

    How to write a soap client for a  cmp ?

    fernandez Newbie

      I'm writing a soap client using axis and jboss-net, but I haven't got any response, any error.

      My soap client create a Service to create Call Object, and assign it a method autorised by service-web.xml.

      In service-web.xml, I declare only one service that reference my sessionBean. Anything on my Entity. My sessionBean must create several entities. I declare responseFlow and requestFlow too.

      What must I do ? Thanks.

        • 1. Re: axis version in upcoming 3.0.1
          Bruce Scharlau Newbie

          Hey - NO problem. I am always very grateful of your hard work on this. I'll be patient.

          • 2. Re: jboss.net sar deployment failure for jboss-3.0.1RC1_tomc
            fernandez Newbie

            i found the offending line in jboss-service.xml and changed Jetty to


            but it still won't deploy

            14:39:46,838 INFO [MainDeployer] Starting deployment of package: file:/var/local/jboss-3.0.1RC1_tomcat-4.0.4/server/default/deploy/jboss-net.sar
            14:39:46,886 INFO [MainDeployer] Package: file:/var/local/jboss-3.0.1RC1_tomcat-4.0.4/server/default/lib/javax.servlet.jar is already deployed
            14:39:46,887 INFO [MainDeployer] Package: file:/var/local/jboss-3.0.1RC1_tomcat-4.0.4/server/default/lib/axis.jar is already deployed
            14:39:46,993 INFO [AxisService] Seting RootContext to axis.
            14:39:46,996 INFO [AxisService] Setting Security Domain to java:/jaas/other.
            14:39:47,035 INFO [AxisService] Creating
            14:39:47,036 INFO [AxisService] Created
            14:39:47,037 INFO [Adaptor] Creating
            14:39:47,037 INFO [Adaptor] Created
            14:39:47,038 INFO [AxisService] Starting
            14:39:47,298 ERROR [MainDeployer] could not start deployment: file:/var/local/jboss-3.0.1RC1_tomcat-4.0.4/server/default/deploy/jboss-net.sar
            java.lang.NoClassDefFoundError: com/techtrader/modules/tools/bytecode/BCEntity
            at org.apache.axis.AxisEngine.init(AxisEngine.java:182)
            at org.apache.axis.AxisEngine.(AxisEngine.java:174)
            at org.apache.axis.server.AxisServer.(AxisServer.java:121)
            at org.jboss.net.axis.server.AxisService.ensureService(AxisService.java:212)
            at org.jboss.net.axis.server.AxisService.startService(AxisService.java:227)
            at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:164)
            at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
            at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:950)
            at $Proxy6.start(Unknown Source)
            at org.jboss.system.ServiceController.start(ServiceController.java:384)
            at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)

            • 3. Re: How to write a soap client for a  cmp ?
              fernandez Newbie

              When I call an other method, I've got this message :

              [java] Internal Server Error

              • 4. Re: How to write a soap client for a  cmp ?
                Bruce Scharlau Newbie

                Is this right? Your soap client accesses the session bean via the web service, and the session bean then connects to the entity beans? That sounds ok, ie a session facade.

                Maybe you want to post your web-service.xml file here and we can see if something is wrong with it. Alternatively use the tcpmon (comes with Axis) to check the soap message being sent from the client to the server. To do this you change the endpoint url of the client to say port 8070, and then have the tcpmon forward the request onto port 8080. It also catches the return trip and shows you the response.



                • 5. Re: How to write a soap client for a  cmp ?
                  fernandez Newbie

                  Bruce, all is working when my client call the sessionBean using RMI.
                  I don't change my session source code, I only create a web-service.xml file and a soap client using the exemple Jboss-Net Hello World-EJB. I 'm using in web-service.xml

                  <ejb-ref-name>VerifiantTracking</ejb-ref-name> //the name of my sessionBean
                  <ejb-link>tracking</ejb-link> // the same link I'm using in ejb-jar.xml

                  "beanJndiName" as <jndi-name>

                  I'm using a method from my session autorised in web-application.xml and calling by the soap client, the return type of this method is a String, with one argument.

                  I don't understand why I must to add the argument with addParameter(..) and invoke(..)

                  • 6. Re: How to write a soap client for a  cmp ?
                    fernandez Newbie

                    and this is the source code :

                    • 7. Re: How to write a soap client for a  cmp ?
                      fernandez Newbie

                      With TCPMonitor I can't see what's the error ?

                      Request :

                      POST /axis/services/tracking HTTP/1.0
                      Content-Lenght: 465
                      Host: localhost
                      Content-Type: text/xml; charset=utf-8


                      Response :

                      .... No data

                      • 8. Re: How to write a soap client for a  cmp ?
                        Bruce Scharlau Newbie

                        You have a typo in your code:

                        You have two 'e' in neet instead of net.

                        Maybe (hopefully) that's all there is to it.



                        • 9. Re: How to write a soap client for a  cmp ?
                          fernandez Newbie

                          Thanks Bruce, but I have changed the source and that don't work ! What must be the contain of <ejb-ref-name> and <ejb-link> ?
                          If I understand, I can write for the client :

                          call.addParameter("id",XMLType.XSD_STRING, ParameterMode.PARAM_MODE_IN);
                          where id is the name of the argument of the method I'm calling ?

                          String ret = (String) call.invoke( new Object[] { new Integer(1) } ); the id's contain ?