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

What's the difference between MTOM and the attachment features provided by SAAJ?

SAAJ: SOAP with Attachments API for Java MTOM: SOAP Message Transmission Optimization Mechanism My simple understanding: they deal with SOAP attachments, with MTOM being the more optimized version of SAAJ. Is this correct? Are they simply 2…
Jops
  • 22,535
  • 13
  • 46
  • 63
18
votes
6 answers

How to Set Timeout for JAX-WS WebService Call

I'm working on a WebService Client and I want to set a Timeout for my WebService Call. I have tried different approaches but still I'm not able to achieve this. I'm using JAX-WS for code generation from WSDL. I'm using JBoss-eap-5.1 as App Server…
Sandeep Poonia
  • 2,158
  • 3
  • 16
  • 29
18
votes
2 answers

Meaning of XMLElement@required=true

Does it mean the XML element is mandatory ? Or the XML element must have some non-null value ? I am really confused by the javadoc explanation.
sateesh
  • 183
  • 1
  • 1
  • 5
18
votes
2 answers

Policy for signing and encrypting

I need to implement a jax-ws client. Here is what the provider docs say about security Currently, we use the SOAP Message Security version 1.0 specification at …
ymajoros
  • 2,454
  • 3
  • 34
  • 60
17
votes
2 answers

Changing the default XML namespace prefix generated with JAXWS

I am using JAXWS to generate a WebService client for a Java Application we're building. When JAXWS build its XMLs to use in SOAP protocol, it generates the following namespace prefix:
Pablo Santa Cruz
  • 176,835
  • 32
  • 241
  • 292
17
votes
4 answers

Applying external JAXB binding file to schema elements imported from WSDL

The XPath expression in my external binding files can't target the elements in my XML schemas which are imported into my WSDL. Everything runs if I do inline binding customization but I really wanted to have external binding files that way I never…
Chase
  • 3,123
  • 1
  • 30
  • 35
17
votes
2 answers

jax-ws/wsimport generates WebMethod with void return - same Request/ResponseWrapper

I'm working with a client's WSDL file that uses the same element definition for the input and output messages, but I'm having trouble getting JAX-WS/JAXB to unmarshal the response.
Nicholas Albion
  • 3,096
  • 7
  • 33
  • 56
16
votes
2 answers

XmlElement annotation dissallowed with WebParam

I have a method inside a webservice, with the following signature: @WebResult(name="purchaseId") public int CreatePurchase( @XmlElement(required=true) @WebParam(name = "item") String item { ... } It seems to me (based on…
MW.
  • 12,550
  • 9
  • 36
  • 65
16
votes
3 answers

Unable to retrieve post data using ,@Context HttpServletRequest when passed to OAuthTokenRequest using Oltu

I'm using Oltu for Oauth2. When using @Context HttpServletRequest request I am unable to retrieve post data When I am using @FormParam I am able to retrieve post data. On passing request to OAuthTokenRequest OAuthTokenRequest oauthRequest = new…
abishkar bhattarai
  • 7,371
  • 8
  • 49
  • 66
16
votes
2 answers

SOAP WS - make @WebParam optional

I have quite a simple method, which I use in WS API by JAX-WS annotations: @WebMethod public MyResponse sendSingle2( @WebParam(name="username") String username, @WebParam(name="password") String password, @WebParam(name="newParam")…
amorfis
  • 15,390
  • 15
  • 77
  • 125
16
votes
2 answers

What is difference Javax.jws and javax.xml.ws

I am new to Java and trying to jump into WebServices. I found two examples somewhere and I am confused with the available options. Firstly, javax.jws.WebService with annotation seem to work fine, but there is loads of material on javax.xml.ws. It…
16
votes
3 answers

JAX-WS Implementation included with Java?

I have a JAX-WS web service application which deploys as a WAR file for Tomcat 7. It uses a recent version of the Metro libraries, which I include inside the WAR file, and it works fine. I'm trying to simplify the deployment package. I understand…
Kenster
  • 23,465
  • 21
  • 80
  • 106
16
votes
5 answers

JAX-WS server-side SOAPHandler that returns fault gets "Internal Error" on WebSphere v8

I have a server-side JAX-WS SOAPHandler (on WebSphere v8) that in certain cases needs to respond to the client with a SOAP response that it has in a String variable (let's call it responseXml). When responseXml contains a successful (i.e.,…
user1717528
  • 161
  • 1
  • 1
  • 4
15
votes
5 answers

@XmlElement(required=true) for @WebParam does not work

I'm building web service using JAX-WS. I have a strange problem that the annotation @XmlElement(required=true) for @WebParam works in some @WebService class, but doesn't work in some others. I have very similar code in the two @WebService classes.…
Shichao
  • 219
  • 1
  • 3
  • 14
15
votes
2 answers

Java SOAP "wsimport" - force wrapped binding from document/literal wrapped WSDL?

The Java 6 JAX-WS "wsimport" utility does a great job of generating a web service skeleton (interface) given a WSDL file but with one personally annoying exception. When given a WSDL that uses the SOAP Document/literal wrapped style (also described…
maerics
  • 151,642
  • 46
  • 269
  • 291