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

Publishing a WS with Jax-WS Endpoint

I built a minimal web service and published it using javax.xml.ws.Endpoint. If I try to get the WSDL at http://localhost:1234/AddService?wsdl it works fine. Trying to recieve it at http://192.168.0.133:1234/AddService?wsdl, I don't receive…
daniel
  • 3,166
  • 2
  • 17
  • 18
22
votes
2 answers

JAX-WS vs. JAX-RPC

I wrote 2 web services, one with Jax-WS and one with Jax-RPC. They just return a String. I stress-tested both with jMeter and, strangely, thereby Jax-RPC was a bit faster. When do I really profit from Jax-WS in aspects of performance (response time,…
norminka
  • 221
  • 1
  • 2
  • 3
22
votes
1 answer

JAX-WS: Compile Schema separate from WSDL

If have a rather large schema that is used in several webservices, therefore I want to separate XSD compilation from WSDL compilation. In a simplified example, compiling in a single step works: $ wsimport -verbose service.wsdl parsing…
Drunix
  • 3,313
  • 8
  • 28
  • 50
22
votes
4 answers

SOAP web service callback architecture?

I am quite new to web services, JAX-WS etc. so maybe noob question... So, I want to implement a web service to make two systems communicate. The "client" system is interested in events that are generated on the "server" system. But the "client…
Pierre Henry
  • 16,658
  • 22
  • 85
  • 105
22
votes
2 answers

how replace XmlGregorianCalendar by Date?

I have to expose an ejb service layer via jax-ws . I have generated the web service using jax-ws and wsimport but I'm stopped by a strange things ; Date are being mapped to XmlGregorianCalendar . Is it possible to use classic java Date instead ? Can…
hunter99
  • 359
  • 1
  • 4
  • 10
21
votes
1 answer

How tell which jdk contains which versions of JAX-WS

There's a fix in one of the more recent versions of JAXB (2.2.1). I'm trying to determine if that's included in a recent update to Java 6. Is there a way to tell which which versions of a JVM/JRE/JDK contain which versions of JAX-WS/JAXB? Looking at…
Cincinnati Joe
  • 2,077
  • 6
  • 23
  • 32
21
votes
1 answer

Are JAX-WS clients thread safe?

Because the initialization of the WS client side port is so costly we would like to reuse the same instance. We would also like to set different values in the BindingProvider/RequestContext before each call. Initially we would like to do…
PålOliver
  • 2,502
  • 1
  • 23
  • 27
21
votes
2 answers

JAX-WS Password Type PasswordText

I've got a simple command line Java JAX-WS app to test a SOAP request, but the server is expecting the Password Type to be PasswordText and I'm stumped on how to set this... The code looks like so: @WebServiceRef private static final HelloService…
marktucks
  • 1,771
  • 1
  • 16
  • 21
21
votes
3 answers

How to reduce memory size of Apache CXF client stub objects?

My web service client application uses Apache CXF to generate client stubs for talking to several web services. The generated CXF web service stub objects have quite a large memory footprint (10 - 15 web service objects take more than 64 MB of…
Jeremy Raymond
  • 5,817
  • 3
  • 31
  • 33
21
votes
4 answers

How to disable certificate validation in JAX-WS Client?

How do you disable certificate validation in JAX-WS client using javax.xml.ws.Service? I tried creating an all-trusting TrustManager in the SSLSocketFactory and tried to bind it with BindingProvider SSLContext sc = SSLContext.getInstance("SSL");…
Question Asker
  • 231
  • 1
  • 2
  • 6
21
votes
5 answers

Add SOAP header object using pure JAX-WS

I'm trying to implement simple web service client for PayPal Express Checkout API using JAX WS. PayPal Express Checkout API provides WSDL file, from which I was able to generate Java classes using CXF's wsdl2java utility. From authentication…
Yuriy Nakonechnyy
  • 3,742
  • 4
  • 29
  • 41
20
votes
4 answers

How to define a global JAX-WS MessageHandler that intercepts all services in a transparent way?

We have a set of web services implemented in JAX-WS and a SOAPHandler that adds control attributes in the SOAP headers. Today, we need to add the @HandlerChain annotation in every new service we create. The idea is that new services implementors do…
Joaquim Oliveira
  • 1,208
  • 2
  • 16
  • 29
20
votes
8 answers

Unable to create JAXBContext creating my wsdl

I am trying to generate my WSDL for webservices but I get this error: Note: ap round: 2 Exception in thread "main" javax.xml.ws.WebServiceException: Unable to create JAXBContext at…
Edwin Jaws
  • 209
  • 1
  • 2
  • 5
20
votes
4 answers

WebServices : bare vs wrapped?

I generate some WebServices out of some existing wsdl I use Maven to do this but some webservices are generated with @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) and the others with @SOAPBinding(parameterStyle =…
Cris
  • 4,947
  • 6
  • 44
  • 73
20
votes
3 answers

Java JAX-WS web-service client: how log request & response xml?

I created an implementation of LoggingHandler that implements SOAPHandler It should log whenever handleMessage triggers (and it is never called in my case) MyService service = new MyService(); MyServicePort port =…
EugeneP
  • 11,783
  • 32
  • 96
  • 142