5 Replies Latest reply on Apr 29, 2006 1:01 PM by Thomas Diesler

    WSDL first to SLSB

    Per Arneng Newbie

      I develop webservices using the WSDL first technique. I use wscompile to generate the java classes needed. Is it possible to use the generated classes and deploy everything as a SLSB instead of a servlet.

      As i understand servlets are not pooled and it would be nice to get the pooling out of SLSB's instead.

      I use Jboss 4.0.3SP1.

      Best regards
      Per Arneng

        • 2. Re: WSDL first to SLSB
          Per Arneng Newbie

          I am not interested at exposing and ejb as a webservice. I want to create an ejb from a WSDL file. As i understand it the wscompile tool can olny generate servlets and servlets are not pooled in jboss.

          I did not find an answer to that problem on the wiki page.

          • 3. Re: WSDL first to SLSB
            Anders Hedstrom Novice

            Create a SLSB that implements the methods defined in you SI that is generated by wscompile.

            Package your ejb.

            The standard deployment descriptor for EJB components ejb-jar.xml, declares the service endpoint.


            <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
             version="2.1">
             <enterprise-beans>
             <session>
             <ejb-name>OrganizationBean</ejb-name>
             <service-endpoint>com.underworld.crimeportal.OrganizationEndpoint</service-endpoint>
             <ejb-class>com.underworld.crimeportal.ejb.OrganizationSLSB</ejb-class>
             <session-type>Stateless</session-type>
             <transaction-type>Container</transaction-type>
             </session>
             </enterprise-beans>
             </ejb-jar>
            


            Additionally, we need the J2EE Web Service deployment descriptor, webservices.xml


            <webservices xmlns="http://java.sun.com/xml/ns/j2ee"
             xmlns:impl="http://com.underworld.crimeportal/ws4ee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
             version="1.1">
            
             <webservice-description>
             <webservice-description-name>OrganizationServiceEJB</webservice-description-name>
             <wsdl-file>META-INF/wsdl/OrganizationServiceEJB.wsdl</wsdl-file>
             <jaxrpc-mapping-file>META-INF/OrganizationServiceEJB_Mapping.xml</jaxrpc-mapping-file>
             <port-component>
             <port-component-name>Organization</port-component-name>
             <wsdl-port>OrganizationEndpointPort</wsdl-port>
             <service-endpoint-interface>com.underworld.crimeportal.OrganizationEndpoint</service-endpoint-interface>
             <service-impl-bean>
             <ejb-link>OrganizationSLSB</ejb-link>
             </service-impl-bean>
             </port-component>
             </webservice-description>
             </webservices>
            



            You need to add your mapping file and wsdl to the archive as well...then you should be ready to deploy it.

            I hope this helps you...

            • 4. Re: WSDL first to SLSB
              Per Arneng Newbie

              Thank you for the help. Will test this soon

              • 5. Re: WSDL first to SLSB
                Thomas Diesler Master

                jbossws-1.0.0.GA is out. Try wstools to generate JSR-109 client artifacts from wsdl. Then create a SLSB that implements the generated SEI.

                http://labs.jboss.com/portal/jbossws