简体   繁体   中英

Java Web Service on Glassfish v3 using EJB

I have a library which I would like to expose as a SOAP web service.

I am using GlassFish Server Open Source Edition 3.1.1 (build 12).

I have read the tutorial here and here however these use an older version of Glassfish. Version 3 does not have a "Web Services" Node as noted here , which makes the tutorials somewhat hard to follow.

I have created an annotated POJO (EJB) using a normal Eclipse project, exported it as a jar file and have deployed it. Glassfish shows this as a "Web Application". I am unsure how to access these as a web service. At what URL can I access the web methods I have created?

Edit: Problems with using the generated WSDL are at: Using GlassFish v3, EJB and SOAPUI

I am unsure how to access these as a web service. At what URL can I access the web methods I have created?

Your web server on deployment will pulish a WSDL and will give you URL to that WSDL file published. Now client can access the Webservices from using that WSDL

Normally you would acces the generated WSDL file in the same address where the service is deployed + ?wsdl suffix. Eg http://localhost:8080/myapp/myservice?wsdl

Then you can use tools like SOAPUI to create XML requests suitable for that WSDL.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM