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
29
votes
2 answers

JAX-WS - Map Exceptions to faults

I am using JAX WS to expose a WebService. Some of the operations of this service can generate exceptions. Not internal server exceptions, but rather exceptions that are dependent on the input arguments of the operation invocation. If I specify that…
waxwing
  • 18,547
  • 8
  • 66
  • 82
29
votes
1 answer

sun-jaxws.xml - When is it needed and when not?

I'm giving JAX-WS a high overview and noticed some references to sun-jaxws.xml (along with com.sun.xml.ws.transport.http.servlet.WSServletContextListener and com.sun.xml.ws.transport.http.servlet.WSServlet). In what situations is this needed? (I…
JohnDoDo
  • 4,720
  • 8
  • 31
  • 47
28
votes
2 answers

tns appearing in Web Services schema

I'm using JAX-WS for running some sample Web services. After publishing the web services, when I typed the WSDL URL, I could see the WSDL document. WSDL document refers a Schema document that goes like this:
Vicky
  • 5,380
  • 18
  • 60
  • 83
28
votes
3 answers

Which is the best maven's plugin to generate a Web Service Client?

I have to generate a WS Client and I can't decide which plugin to use. Until now my options are: jaxb2-maven-plugin, axistools-maven-plugin and jaxws-maven-plugin.
Neuquino
  • 11,580
  • 20
  • 62
  • 76
27
votes
4 answers

Sign JAX-WS SOAP request

I would like to write a JAX-WS web service that signs my SOAP messages using the http://www.w3.org/TR/xmldsig-core/ recommendation. With what I found on the internet I wrote a JAX-WS handler (SOAPHandler) that manages to change a…
AndrewBourgeois
  • 2,634
  • 7
  • 41
  • 58
26
votes
5 answers

Controlling JAX-WS wsdlLocation attribute value's (absolute path) with jaxws-maven-plugin

I have a JAX-WS-driven web service whose WSDL we generate a web service client from in another Maven module (which I'll call ws-consumer). For better or worse, we copy the "published WSDLs" (the version of the WSDL & XSDs that the service…
Alex
  • 8,093
  • 6
  • 49
  • 79
25
votes
3 answers

How do I add a SOAP Header using Java JAX-WS

A typical SOAP client request using JAX-WS might be FooService service = new FooService(); FooPort port = service.getFooPort(); FooPayload payload = new FooPayload(); payload.setHatSize(3); payload.setAlias("The…
RedGrittyBrick
25
votes
1 answer

RESTful webservice : how to set headers in java to accept XMLHttpRequest allowed by Access-Control-Allow-Origin

I have a RESTful webservice which will return string and it was written in Java (JAX-WS). My problem is when I send request to that webservice with URL like : http://localhost:8080/project/webservices/getlist/getListCustomers In the console it's…
ChiranjeeviIT
  • 529
  • 1
  • 4
  • 17
25
votes
4 answers

java.lang.NoClassDefFoundError: com/sun/istack/localization/Localizable?

I try to run my project by tomcat7. after the generation of the wsdl file of my webservices by jax ws maven plugin (and it generated by success) but tried to view the wsdl file in the browser but not result. I tried to run my project by tomcat7…
Sayed Jabnoun
  • 251
  • 1
  • 4
  • 7
25
votes
1 answer

JAX-WS vs JAX-RS For RESTful Web Service

Hi I have worked with JAX-WS for SOAP based webservices. Now I want to use REST because REST have advantages over SOAP as i studied about from here. But from different articles I knew that we can create RESTful webservices from JAX-WS also. But most…
Abhendra Singh
  • 1,959
  • 4
  • 26
  • 46
24
votes
7 answers

JAX-WS and BASIC authentication, when user names and passwords are in a database

I'm new to JAX-WS and there's a thing which I don't understand. There's a ton of tutorials available on how to set up JAX-WS security, but in pretty much all cases BindingProvider.USERNAME_PROPERTY and BindingProvider.PASSWORD_PROPERTY are stored in…
ahoge
  • 241
  • 1
  • 2
  • 3
24
votes
5 answers

JAX-WS error on WSDL file: "Error resolving component 's:schema'"

The Error I am using wsimport in a Java project to generate sources for three SOAP web services. The first two work fine: I use the JAX-WS Maven plugin to grab the WSDL file and generate corresponding Java source files. This fails for one web…
Nick
  • 2,827
  • 4
  • 29
  • 39
23
votes
5 answers

java web service client, adding http headers

Having created a java web service client using wsimport on a wsdl, I need to set the Authorization header for each soap message embedded in an http request. Having generated a subclass of javax.xml.ws.Service, how can I append an http header to each…
murungu
  • 2,090
  • 4
  • 21
  • 45
23
votes
2 answers

What's wrong with my Apache CXF client?

This is part of my pom.xml: org.apache.cxf cxf-rt-frontend-jaxws ${cxf.version} runtime
yegor256
  • 102,010
  • 123
  • 446
  • 597
22
votes
3 answers

WebServices security with SAML (SSO) - How to?

The Problem: I want to implement a set of Webservices, protected with SAML. I need to authenticate the users, and also need to authorize based on the user role. I found some questions similar to this one, but none with satisfactory answers. The…
lpinto.eu
  • 2,077
  • 4
  • 21
  • 45