0 Replies Latest reply on May 17, 2010 6:56 AM by slava_schmidt

    Web Service Definition in ejb-jar.xml

    slava_schmidt

      Hello,

       

      i need help with defining a web service with ejb-jar.xml without annotations. I have following class and interface. These are accessible as web service if defined with annotations.


      @WebService

      public interface MessagingConfiguration {
          List<String> getClusterUrls();
      }


      @Stateless
      @WebService(targetNamespace = "http://some.namespace/", name = "MessagingConfiguration", serviceName = "MessagingConfiguration", portName = "MessagingConfiguration")
      public class MessagingConfigurationBean implements MessagingConfiguration

       

          @EJB(mappedName = "BrokerService")
          BrokerService brokerService;

       

          @Override
          public ArrayList<String>
      getClusterUrls() {
              // do some work
       
            return urls;
          }

      }

       

       

      But if i try to remove annotations and add following configuration to my ejb-jar.xml, no web-service is available.

       

      <session>
          <description>Messaging Configuration</description>
          <ejb-name>MessagingConfigurationBean</ejb-name>
          <service-endpoint>MessagingConfiguration</service-endpoint>
          <ejb-class>MessagingConfigurationBean</ejb-class>
          <session-type>Stateless</session-type>
          <transaction-type>Container</transaction-type>
          <ejb-local-ref>
              <ejb-ref-name>BrokerService</ejb-ref-name>
              <local>BrokerService</local>
              <injection-target>
                  <injection-target-class>MessagingConfigurationBean</injection-target-class>
                  <injection-target-name>brokerService</injection-target-name>
              </injection-target>
          </ejb-local-ref>
      </session>

       

      I have both webservices.xml and one wsdl schema as well.

       

      Can anyone please give me a hint what am i doing wrong?

       

      Thanks in advice!