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
20
votes
1 answer

How to convert java.time.ZonedDateTime to XMLGregorianCalendar?

Is there any short way to convert java.time.ZonedDateTime to XMLGregorianCalendar? Maybe I need some intermediate steps like convert ZonedDateTime to java.util.Date, but that will make code too messy. The problem appeared in JAX-WS web services,…
Mikhail Boyarsky
  • 2,908
  • 3
  • 22
  • 37
20
votes
3 answers

Any way to generate WSDL documentation from Javadoc with JAX-WS?

I'm hoping that an extension of some kind is available that does this (although I suppose that my hope is foolishly optimistic). /** *

* Gets the {@link ResultObject} given the identifier. The following * fields are not…

les2
  • 14,093
  • 16
  • 59
  • 76
20
votes
4 answers

Getting the IP Address Of A client For a webservice

I am using JAX-WS and I am having trouble retrieving the client information that is consuming a webservice. I've found out how to do it with JAX-RPC, and Apache Tomcat Axis, but not with JAX-WS. Does anyone have an idea about this?
monksy
  • 14,156
  • 17
  • 75
  • 124
20
votes
4 answers

How to add header to SOAP request?

I try to invoke HTTPS SOAP web service through java code: URL url = new URL("https://somehost:8181/services/"SomeService?wsdl"); QName qname = new QName("http://services.somehost.com/", "SomeService"); Service service =…
kostepanych
  • 2,229
  • 9
  • 32
  • 47
20
votes
3 answers

Customising JAX-WS prefix of a SOAP response

Goal I'm implementing a web service for quite an old (but sadly unchangeable) interface. I have an issue where the client that is calling my service expects a certain namespace in the SOAP response and I'm having difficulty in changing it to…
Catchwa
  • 5,845
  • 4
  • 31
  • 57
20
votes
5 answers

Jersey returns HTTP Status 405 - Method Not Allowed

I have a very simple endpoint using Jersey. My URL is static, it doesn't require any request parameters. It looks like this: @GET @Path("/mydata") @Produces(javax.ws.rs.core.MediaType.APPLICATION_JSON) public String getData() { return…
seedhead
  • 3,655
  • 4
  • 32
  • 38
19
votes
7 answers

The constructor Service(URL, QName, WebServiceFeature[]) is undefined

I got The constructor Service(URL, QName, WebServiceFeature[]) is undefined error after I run wsimport for my client web service. Im using JDK 1.6. Please help.
chinna_82
  • 6,353
  • 17
  • 79
  • 134
19
votes
4 answers

WSP0075: Policy assertion "TransportBinding" was evaluated as "UNKNOWN". Why?

I am a client to a SOAP service I do not control (implemented in .NET). The service provides a WSDL. I use Apache CXF to generate the java client from the WSDL (specifically, I am using the cxf-codegen-plugin for Maven, which uses wsdl2java under…
Francis Avila
  • 31,233
  • 6
  • 58
  • 96
19
votes
5 answers

Apache CXF + Spring Java config (no XML)

Trying to deploy a JAX-WS endpoint using Tomcat 7 Maven plugin and CXF 2.7.8. As a matter of preference, I don't want to have any XML config for Spring or CXF. I see several blogs, articles, posts using cxf-servlet.xml and CXFServlet but none…
Abhijit Sarkar
  • 21,927
  • 20
  • 110
  • 219
18
votes
3 answers

Instantiate JAX-WS service without downloading WSDL?

I have a web service that I have JAX-WS generated client bindings as below: // web service client generated by JAX-WS @WebServiceClient( ... ) public class WebService_Service extends Service { public WebService_Service(URL wsdlLocation, QName…
oconnor0
  • 3,154
  • 6
  • 34
  • 52
18
votes
11 answers

taskdef class com.sun.tools.ws.ant.WsImport cannot be found Following "The java web services tutorial"

I saw the same issue in many different locations and even after a good portion of googling, I could not resolve it. What I am trying to do (the bigger picture) is to go through The java web services tutorial, which seems at points out of…
Dimitrios Mistriotis
  • 2,626
  • 3
  • 28
  • 45
18
votes
3 answers

Trace SOAP request/responses with JAX-WS on the client side

I'm using JAX-WS reference implementation (2.1.7) and I want to trace SOAP request/responses on the client side. Actually, what I need is to examine some Http headers when I receive the response. Following these previous questions ( Tracing XML…
Denian
  • 737
  • 2
  • 8
  • 17
18
votes
2 answers

How to write effective web services in java

Though this might appear as a duplicate of Java Web Services , I would like to know Where to start and to continue.In the past, I have invested so much of time to find where to start but I wasn't able to. There are so many jargons and chaos (at…
gekrish
  • 2,201
  • 11
  • 29
  • 46
18
votes
9 answers

Java Web Service error: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog

I have a problem creating and connecting a Java client to a running Web Service. I use the following code: Service myService = null; URL wsdlLocation = new URL("http://myservice?wsdl"); QName serviceName = new QName(wsdlLocation,…
Kumite
  • 2,129
  • 3
  • 15
  • 15
18
votes
2 answers

When will I ever need to use @WebServiceRef?

From the client side, if I want to access a web service, I would simply generate a proxy for it using wsimport. That is my web service reference. Where then does the annotation @WebServiceRef come into play? Is it meant to be used at the server side…
Jops
  • 22,535
  • 13
  • 46
  • 63