Unit testing a JAX-WS Web Service? - unit-testing

Is there a way to test a JAX-WS web service? Mine is in Netbeans and I'm trying to use a web service client in the test package to do it but I wonder if this is the right way.

You can use soapUI for testing the webservices, both using a GUI or command-line
http://www.soapui.org/Test-Automation/functional-tests.html
&
http://www.soapui.org/Test-Automation/integrating-with-junit.html
You can also by using netbeans test the webservices using generated tests, this is accessible by right clicking the webservice and click "test webservice", that is if you've created the web service using netbeans, if you haven't you can create a webservice from the WSDL of your web service and go from there.
If you want to use the web service client from the test package that is possible, netbeans should generate jaxb classes neccessary for testing, you would be able to drag-n-drop the methods from the client to a test class.

Related

Hibernate RESTful webservices in NetBeans

Is it possible to create RESTful Web Service using Hibernate in Netbeans 7.4?
I could see wizard to create RESTful Web Service using Persistence, but would like to know how it can be integrated with Hibernate?
Appreciate any help or insight.
Edit 1
I would like to know what I did is the correct method of generating RESTful web services using Hibernate.
First I generated Hibernate Entity classes using NetBeans and then I created RESTful services from Entity classes. So does this creates RESTful Web Services with Hibernate? I could see AbstractFacade classes that is almost like DAO classes
Edit 2
Screen shot for selecting RESTful Web Service from Entity classes
If you want to build a truly RESTful service, you need to build up a link relation architecture. You're going to need more than Hibernate or Netbeans to do that.
I recommend using the milestone Spring Data REST in conjunction with Hibernate's JPA implementation and Spring HATEOAS. See Spring Restbucks as an example which brings all these technologies together.

How to convert JBPM project into Web- service?

I have a working JBPM project that i want to expose as a web service so from my server i can call that web-service. So please let me know is there a any way to expose a JBPM project into a web service.
By default, you can use the jbpm-console service to expose the processes you have deployed there as a REST service. You can also expose your project yourself as a web service using for example the camel integration component (and using camel to set up a WS endpoint) or by writing a custom wrapper yourself.

Generate Java classes for web service

I am attempting to write a web client to access a web service; I out of every tool I have tried (CXF, JAX-WS, JAXB, Axis) only Visual Studio 2012 and soapUI are able to access the web service. For the Java generated classes the API is incorrect, there is no way to pass in the Authentication object. soupUI can call the web services and a CSharp program works fine. But my boss expects Java.
Anybody know what library soupUI is using, is it something I haven't tried or is it proprietary? Or anyone know how to hit this web service with Java and have it work?

how can i test sharepoint custom web service

hi all
i coded a custom web service for sharepoint in a remote machine and will deploy it later to the host machine
but how programs do i need to install to my computer to test that web service
Use a tool such as
Storm
SoapUI
Web Service Studio
(All open source)
You'll probably need a test application to sit on the same system as the web service.
It will locally fire the webservice and some of the test fixtures will only monitor what it returns.
The rest of the fixtures should examine what the webservice actually interacts with on the server side.
ie: If you have a webservice that accepts a command then starts a Workflow, you would:
a) Ensure that the correct response is given by the webservice when invalid input is given
b) Ensure on the server side that the correct workflow is instigated and started with the correct initialisation data.
You would probably need many, many test cases depending on what your webservice actually does.

How to get generate WSDL using GroovyWS

I am implementing SOAP web services for a commercial application, and I am using GroovyWS to speed up the development.
But, when I deploy it on Tomcat, I am not using Grails, as the software has it's own J2EE framework, so how I do I get it to react to wsdl requests?
Do I need to write a groovy-based servlet?
Ideally I would like the WSDL generated upon request, so I can easily change the interface and see the change.
It seems I will miss the annotations that JAX-WS provides for, though, to help fine-tune the WSDL.
Using the example web application, the WSDL can be retrieved as follows:
http://localhost:6980/MathService?wsdl