GlassFish v3 comes bundled with Metro – a secure, reliable, transactional, and .NET interoperable Web services stack. Metro is compliant with JAX-WS and provides additional quality of service attributes that can be easily enabled using NetBeans IDE.
This blog contains a screencast that shows how to create a simple Web service using NetBeans 6.8, implement the business logic by accessing a database table using Java Persistence API, and deploy on GlassFish v3.
Please post your questions to users@glassfish.dev.java.net.
Several other screencasts on GlassFish v3and related topics are available here.
Technorati: netbeans jax-ws metro webservice glassfish jpa database
Related posts:- Screencast #WS7: Secure and Reliable Web service using Metro/GlassFish and NetBeans IDE 6
- Screencast #WS3: Reliable and Interoperable Web service using WSIT plug-in, NetBeans and GlassFish
- Screencast #WS2: Invoking a Web service using NetBeans IDE
- Screencast #30: Java EE 6 & GlassFish 3 using NetBeans 6.9 – 5 screencasts
- Creating and Invoking a Web service using GlassFish in NetBeans, IntelliJ, and Eclipse – Part 1
Hi Arun,
I am new to WebServices and GlassFish – I have followed your screen cast 29 – And I am able to complie and deploy – But i think i m missing something – I dont see the Test page as shown in your screen cast- Instead I just see the link to wsdl. Hence I am not able to test my methods. Please advice.
A quick response would be really appreciated.
Thanks,
Harsh
Comment by Harsh — February 22, 2010 @ 9:24 am
Harsh,
The WSDL is accessible at "?wsdl" and tester page is at "?tester". Can you try that ?
Comment by Arun Gupta — February 23, 2010 @ 4:43 pm
Hello Arun,
Thanks for your demo on creation of web service using netbeans. Very useful!!
Comment by Geethapriya — March 4, 2010 @ 5:25 am
Hello Arun,
How to call a web service created using netbeans in one platform say windows from an application[a jsp file] running in another platform say linux[run virtually over windows]
Comment by Geethapriya — March 5, 2010 @ 3:59 am
Geethapriya,
You’ll need to generate the client side artifacts by importing WSDL of the Web service hosted on Linux, bundle the classes with your application on Windows and then use them in your JSP/Servlet.
A slightly old screencast at:
http://blogs.sun.com/arungupta/entry/screencast_ws2_invoking_a_web
shows how to invoke a Web service.
Comment by Arun Gupta — March 5, 2010 @ 10:42 am
hello,
Sorry to post here because i don’t find your email in the blog.
I would like to thank you for this amazing blog.
I started with web services and I work with Netbeans and Glassfish.
I managed to make a web service which is for example the sum of two integers deploy on the same machine.
Now I want to make sure that my web service is deployed on several machines in a LAN
and the client (stub) web service chooses a machine to send the SOAP request and receive response
Eg if the client wants to do two sums at the same time, it sends two SOAP request containing the arguments of the sum for each machine and receives the response from both machines
Excuse me my bad English because I’m French
Thank you in advance
Comment by Marouene — March 17, 2010 @ 3:08 am
Hi Arun,
I have been following you blog for a long time and it has helped me on various occasions.
Web Services is my current focus mostly JAX-WS on glassfish, however i have used AXIS2 as well.
My Question to you is how would you consume a web service if it is behind a SSO, in this case AXIS2 WS is part of a web application and behind a SSO.
For normal web application the SSO layer will use the configured security layer and let the user pass through, how will a java SE client access the same WS?
Any help would be welcome,
Thanks in advance
-Avinash
Comment by Avinash Yadav — June 10, 2010 @ 5:59 am
Avinash,
Please ask your Axis related question on Apache forums
Comment by Arun Gupta — June 10, 2010 @ 8:46 am
Hi Arun. I really learn a lot from your blog. Now have a problem and could not find any info from web search and you may help me.
I have a Java EE application (myApp, myApp-ejb and myApp-war) and it could be built and deployed properly.
I also create the java-ws example CalculatorWSService (Getting Started with JAX-WS Web Services, http://netbeans.org/kb/docs/websvc/jax-ws.html) in a web app. it also work find.
Now I create a web service in myApp (myApp-war) adding the same code as the CalculatorWSService. After build and deploy, when test the ws, it only came null:
———————–
Exceptions details : null
java.lang.NullPointerException at java.io.File.(File.java:222) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.initializePort(WebServiceTesterServlet.java:505) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.doGet(WebServiceTesterServlet.java:165) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.invoke(WebServiceTesterServlet.java:100) at org.glassfish.webservices.JAXWSServlet.doGet(JAXWSServlet.java:193) at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97) at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) at com.sun.grizzly.ContextTask.run(ContextTask.java:69) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309) at java.lang.Thread.run(Thread.java:619)
————————
What is the problem? How to solve this?
Comment by kingsz1 — July 5, 2010 @ 5:08 pm
Hi arun,
I am new to netbeans webservices. I have created a rest ful webservice in netbeans for accessing the data base. but i am not able to create a restful client for that webservice.
pls help me……. i am using netbeans ide 6.9.1
thanks
Comment by prabhu — September 24, 2010 @ 3:52 am