Questions tagged [jax-ws]

JAX-WS is the JSR 224 defining a Java API for XML-Based Web Services

Specifications:

  • JavaTM API for XML-Based Web Services (JAX-WS) 2.0 - JSR 224
  • Web Services Metadata for the Java Platform 2.1 - JSR 181
  • Web Services for Java EE, version 1.3 - JSR 109


Implementations:


Useful links:

JAX-WS Reference Implementation (RI) Project

4067 questions
37
votes
5 answers

JAX-WS = When Apache CXF is installed it "steals" default JDK JAX-WS implementation, how to solve?

I have a strange problem. Using wsimport I generated als JAX-WS Code from a WSDL (in a dedicated eclipse java project). This works fine in JDK6 without any external dependencies (running in Eclipse) I have second project where I once used Apache…
Markus
  • 4,062
  • 4
  • 39
  • 42
37
votes
10 answers

JAX-WS - Adding SOAP Headers

I am trying to create a standalone client to consume some web services. I must add my username and password to the SOAP Header. I tried adding the credentials as follows: OTSWebSvcsService service = new OTSWebSvcsService(); OTSWebSvcs port =…
Jordan Allan
  • 4,408
  • 7
  • 32
  • 35
37
votes
1 answer

Handle JAXB @XMLIDRef in .NET

I'm writing a web service using jax-ws. One of web service's methods returns bean, which contains reference to its parent. To prevent cyclic references I'm using JAXB @XMLID and @XMLIDRef annotations in my bean. Then i'm generating proxy class for…
stborod
  • 533
  • 4
  • 11
35
votes
12 answers

setProperty must be overridden by all subclasses of SOAPMessage

I'm trying to deploy some web services in a WAR application on JBoss 5.1.0. I have created the source files from an existing wsdl using JAX-WS tool wsgen. This created the Service files and @XmlType annotated clases that would act as request and…
Pablo Venturino
  • 5,208
  • 5
  • 33
  • 41
35
votes
2 answers

How to throw a custom fault on a JAX-WS web service?

How do you throw a custom soap fault on a JAX-WS web service? How can I specify the faultCode, faultString and detail of the soap fault? Is it possible to set the value of the detail as bean instead of a String? Please note that I'm developing using…
Arci
  • 6,647
  • 20
  • 70
  • 98
34
votes
4 answers

Is this JAX-WS client call thread safe?

Since initialization of the WS client service and port takes ages I like to initialize them once at startup and reuse the same instance of the port. Initalization would look something like this: private static RequestContext requestContext =…
user871611
  • 3,307
  • 7
  • 51
  • 73
33
votes
8 answers

Tracing XML request/responses with JAX-WS when error occurs

I want to log raw soap post requests if there are any errors , I am using JAX-WS. Any help will be appreciated. Is there an easy way (aka: not using a proxy) to get access to the raw request/response XML for a webservice published with JAX-WS…
user665837
  • 345
  • 1
  • 3
  • 7
32
votes
3 answers

Supplying a different version of JAXB for JAX-WS in Java 1.6

I have a third party jar that ships with a jaxb-impl.jar and includes it in its manifest classpath. The problem is, it seems as though supplying your own version of JAXB (regardless of which version it may be) seems to break the SoapFaultBuilder in…
matt forsythe
  • 3,863
  • 1
  • 19
  • 29
32
votes
2 answers

How does a wsimport generated client work?

Before anything else, I want you to know that I can already connect to the web service server. I'm asking this question because I want to gain a deeper knowledge on how a wsimport generated client works. Based from my research, wsimport uses JAXWS.…
Arci
  • 6,647
  • 20
  • 70
  • 98
31
votes
3 answers

Glassfish JAX-WS side by side SSL / insecure EJB webservice

Is it possible to run a single @WebService bean as both secure and insecure at the same time, preferably using the same URL except for the http/https protocol difference? I am able to run the service either secure or insecure…
Justin
  • 4,097
  • 1
  • 22
  • 31
31
votes
5 answers

How to manually deploy a web service on Tomcat 6?

I'm learning how to develop SOAP web services with Java. So far now I've been following this excellent tutorial http://web.archive.org/web/20120626005333/http://java.sun.com/developer/technicalArticles/J2SE/jax_ws_2/ It all goes well, I have my web…
opensas
  • 60,462
  • 79
  • 252
  • 386
30
votes
1 answer

What is the difference between ?wsdl and ?singleWsdl parameters

My messaging provider gives me two different kinds of WSDLs to use. http://my.amazonaws.com:8000/webservice/?wsdl http://my.amazonaws.com:8000/webservice/?singleWsdl The first one is an embedded WSDL. Can NOT use it to generate WSDL2java packages…
yw173
  • 467
  • 1
  • 7
  • 15
30
votes
3 answers

How can I make a WebMethod parameter required

We use the "start from Java" approach to creating JAX-WS 2.0 web services using the Metro 1.5 stack. When we point a standard tool like SoapUI at one of our web services it indicates that parameters to WebMethods are optional. The generated xsd…
Dean Schulze
  • 9,633
  • 24
  • 100
  • 165
30
votes
2 answers

Metro vs Java's JAX-WS?

What is/are the difference/s of Java's JAX-WS and Metro? Are they the same of are they two different JAX-WS implementations? According to my research, JAX-WS is already a part of JDK 6. However, JAX-WS does not come with the standard bundle of JDK…
Arci
  • 6,647
  • 20
  • 70
  • 98
29
votes
5 answers

Getting java.lang.ClassNotFoundException: com.sun.xml.internal.ws.spi.ProviderImpl despite the dependencies are defined

Despite that I have defined the related dependencies as I have added below, getting the java.lang.ClassNotFoundException: com.sun.xml.internal.ws.spi.ProviderImpl exception when my app makes a call to the web service.
talha06
  • 6,206
  • 21
  • 92
  • 147