0 Replies Latest reply on Mar 5, 2015 6:36 AM by Mouhammed Soueidane

    Webservices in EJB 2.1 with JBoss AS 7.1.1 Final

    Mouhammed Soueidane Newbie

      I have a legacy web application that we would like to port from JBoss 4.2.0 GA to JBoss AS 7.1.1 Final. The legacy application is packaged in an ear as follows:

      |-- eSchool_R3.25.1.0.ear |-- eschool-ejb.jar |-- META-INF |-- wsdl |-- MANIFEST.MF |-- ESchoolWS-mapping.xml |-- ejb-jar.xml |-- jboss.xml |-- webservices.xml |-- com |-- eschool-war.war 

      ejb-jar.xml looks as follows:

      <?xml version="1.0" encoding="UTF-8"?> <ejb-jar version="2.1" 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"> <display-name>ESchool-ejb</display-name> <enterprise-beans> <session> <display-name>ESchoolWSSB</display-name> <ejb-name>ESchoolWS</ejb-name> <service-endpoint>com.eschool.webservices.ESchoolWSSEI</service-endpoint> <ejb-class>com.eschool.webservices.ESchoolWSBean</ejb-class> <session-type>Stateless</session-type> <transaction-type>Bean</transaction-type> </session> </enterprise-beans> </ejb-jar> 

      The jboss.xml file looks as follows:

      <?xml version="1.0" encoding="UTF-8"?> <jboss> <enterprise-beans> <session> <ejb-name>ESchoolWS</ejb-name> <port-component> <port-component-name>ESchoolWS</port-component-name> <port-component-uri>ESchool/ESchoolWS</port-component-uri> </port-component> </session> </enterprise-beans> </jboss> 

      And finally the webservices.xml file:

      <?xml version='1.0' encoding='UTF-8' ?> <webservices 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://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd' version='1.1'> <webservice-description> <webservice-description-name>ESchoolWS</webservice-description-name> <wsdl-file>META-INF/wsdl/ESchoolWS.wsdl</wsdl-file> <jaxrpc-mapping-file>META-INF/ESchoolWS-mapping.xml</jaxrpc-mapping-file> <port-component xmlns:wsdl-port_ns='urn:ESchoolWS/wsdl'> <port-component-name>ESchoolWS</port-component-name> <wsdl-port>wsdl-port_ns:ESchoolWSSEIPort</wsdl-port> <service-endpoint-interface>com.eschool.webservices.ESchoolWSSEI</service-endpoint-interface> <service-impl-bean> <ejb-link>ESchoolWS</ejb-link> </service-impl-bean> </port-component> </webservice-description> </webservices> 

      The problem is that in JBoss 4.2.0 GA, the webservice endpoint was as follows:

      http//server_ip:8080/ESchool/ESchoolWS 

      Deploying the application in JBoss 7.1.1 AS Final, exposes my webservice on the following endpoint:

      http://server_ip:8080/eschool-ejb/ESchoolWSBean 

      How can I fix my webservice endpoint back to what it was?