How do I know the WSDL URL of my Web Service ?

In this tutorial we will learn how to retrieve the SOAP Web Service WSDL URL, so that you can quickly test your SOAP Web Service. Ok let’s begin from the following SOAP Web Service application available on JBoss EAP or WildFly. Here is the server log upon deployment: 16:18:12,387 INFO  [org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-6) … Read more

How to change the default Web Service deployment Port ?

Web services running on WildFly or JBoss EAP 7 can customize the deployment port of the Web service by setting the wsdl-port or wsdl-secure-port of the webservices subsystem. Let’s see an example: /subsystem=webservices:write-attribute(name=wsdl-port,value=8090) Now deploy a sample Web service and check the Web Service WSDL URL: /deployment=jaxws-pojo-service.war/subsystem=webservices/endpoint=jaxws-pojo-endpoint%3Aorg.jboss.quickstarts.ws.jaxws.samples.jsr181pojo.JSEBean:read-resource(include-runtime=true) { “outcome” => “success”, “result” => { “average-processing-time” … Read more

JAX-WS Authentication in a nustshell

In the context of an HTTP transaction, BASIC access authentication is a method for a web browser or other client program to provide a user name and password when making a request.
This tutorial shows how to perform BASIC authentication for JAX-WS Web services. Then, as an alternative, we will learn how to use Apache CXF Interceptors as authentication mechanism.

Read more

What is a Web Service One Way invocation?

Most of the message-exchange-patterns are request-response ones; however in some scenarios oneway invocations are preferred, as the client does not expect any actual data in the response from the server. In such cases, the server is instructed that no SOAP response message has to be sent back to the client, whose low-level invocation is immediately … Read more

JBoss web services

JAX-WS simplifies the development model for a web service endpoint a great deal. In short, an endpoint implementation bean is annotated with JAX-WS annotations and deployed to the server. The server automatically generates and publishes the abstract contract (i.e. wsdl+schema) for client consumption. All marshalling/unmarshalling is delegated to JAXB. You can follow two approaches for … Read more

How to test SOAP Web Services

This tutorial will teach how to test SOAP Web Services using open source testing tools or Java testing frameworks. Coding our SOAP Web Service Let’s start from the definition of our JAX-WS Web Service contract: @WebService public interface AccountWSItf { @WebMethod public String newAccount( String name); @WebMethod public String withdraw(String name, long amount) throws RuntimeException; … Read more

How to debug Web Service request and response

In this tutorial we will see how you can trace your JBoss Web Services applications by using some built-in logging features or using an external TCP dumper. Using a System Property to Debug SOAP Messages Debugging SOAP Messages is a critical activity for every application running Web Services. The simplest way to see the full … Read more

Expose EJB 3 as Web Services

Starting with Java EE 7, JAX-WS 2.2 is the standard specification for SOAP web services on the Java EE platform. Developing SOAP-based web services using JAX-WS is straightforward and easy. By using annotations, a web service can be written and deployed within minutes.  Enhancing support for Web services is a driving force introduced since the … Read more

JAX-WS asynchronous Web Services made simple

Developing rigorous and responsive web service client applications has always been a challenge for architects and developers. JAX-WS 2.0 comes with one effective solution to this problem: asynchronous web service invocation. In this article, we will provide an exposition of this technology with examples built upon the reference implementation. The JAX-WS programming model offers two … Read more

Creating SOAP Messages Programmatically

In this tutorial we will learn how to create a javax.xml.soap.SOAPMessage programmatically using SOAPBody and SOAPElement objects and how to create one from a String. First of all the javax.xml.soap.SOAPMessage is the root class for all SOAP messages. As transmitted on the “wire”, a SOAP message is an XML document or a MIME message whose … Read more