[jboss-user] [EJB 3.0] - Web Service Definition in ejb-jar.xml

Slava Schmidt do-not-reply at jboss.com
Mon May 17 06:57:03 EDT 2010


Slava Schmidt [http://community.jboss.org/people/slava_schmidt] created the discussion

"Web Service Definition in ejb-jar.xml"

To view the discussion, visit: http://community.jboss.org/message/543374#543374

--------------------------------------------------------------
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!

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/543374#543374]

Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100517/770762a1/attachment-0001.html 


More information about the jboss-user mailing list