uCosminexus Application Server, Web Service Development Guide
Within the support range of the JAX-WS APIs, you can access the message context from the handler, Web Services client, and Web Service.The details are as follows.
For details on the JAX-WS APIs, see the JAX-WS 2.2 specifications. Also, for details on the support range of the JAX-WS APIs in the Cosminexus JAX-WS functionality, see 19.2.1 List of interfaces and classes (JAX-WS). The Cosminexus JAX-WS functionality supports the standard properties defined in the JAX-WS 2.2 specifications and the vendor-specific properties.
The standard properties mentioned in Chapter 9 of the JAX-WS 2.2 specifications can only be referenced. The operations are not supported if the standard properties are changed.
The following table describes the support range of the message context properties.
Table 19-32 List of message context properties
| No. | Property name | Description location#1 | Mandatory#2 | Support | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Service client | Web Services#5 | Handler | ||||||||
| Web Service client | Web Service | |||||||||
| Out#3 | In#4 | Out#6 | In#7 | In#8 | Out#9 | |||||
| javax.xml.ws.handler.message | ||||||||||
| 1 | .outbound#10 | 9.4.1.1 | Y | N#10 | N#10 | N | R | R | R | R |
| javax.xml.ws.binding.attachments | ||||||||||
| 2 | .inbound#10 | 9.4.1.1 | Y | N#10 | N#10 | R | R | R | R | R |
| 3 | .outbound#10 | 9.4.1.1 | Y | N#10 | N#10 | N | R | R | R | R |
| javax.xml.ws.reference | ||||||||||
| 4 | .parameters#10 | 9.4.1.1 | Y | N#10 | N#10 | R | R | R | R | R |
| javax.xml.ws.wsdl | ||||||||||
| 5 | .description#10, #12 | 9.4.1.1 | -- | N#10 | N#10 | N#11 | N#11 | N#11 | N#11 | N#11 |
| 6 | .service#10, #12 | 9.4.1.1 | -- | N#10 | N#10 | R | R | R | R | R |
| 7 | .port#10, #12 | 9.4.1.1 | -- | N#10 | N#10 | R | R | R | R | R |
| 8 | .interface#10, #12 | 9.4.1.1 | -- | N#10 | N#10 | R | R | R | R | R |
| 9 | .operation#10, #12, #13 | 9.4.1.1 | -- | N#10 | R#13 | R | R | R | R | R |
| javax.xml.ws.http.request | ||||||||||
| 10 | .headers | 9.4.1.1 | Y | R/C#14 | N#10 | R | R/C#14 | R#15 | R | R |
| 11 | .method#10, #11 | 9.4.1.1 | Y | N#10 | N#10 | R | R#15 | R#15 | R | R |
| 12 | .querystring#10, #11 | 9.4.1.1 | Y | N#10 | N#10 | R | R#15 | R#15 | R | R |
| 13 | .headers | 9.4.1.1 | Y | N#10 | N#10 | R#16 | R#15 | R#15 | R#16 | R#16 |
| javax.xml.ws.http.response | ||||||||||
| 14 | .headers#10 | 9.4.1.1 | Y | N#10 | N#10 | N | R#17 | R | R#17 | R#17 |
| 15 | .code#10 | 9.4.1.1 | Y | N#10 | N#10 | N | R#18 | R | R | R |
| javax.xml.ws.servlet | ||||||||||
| 16 | .context#10, #11 | 9.4.1.1 | Y | N#10 | N#10 | R | R#15 | R#15 | R | R |
| 17 | .request#10 | 9.4.1.1 | Y | N#10 | N#10 | R | R#15 | R#15 | R | R |
| 18 | .response#10 | 9.4.1.1 | Y | N#10 | N#10 | R | R#15 | R#15 | R | R |
| javax.xml.ws.service.endpoint | ||||||||||
| 19 | .address#19 | 4.2.1.1 | Y | R/C | R | N | R/C | R | R | R |
| javax.xml.ws.security.auth | ||||||||||
| 20 | .username | 4.2.1.1 | Y | R/C | R | N | R/C | R | R | R |
| 21 | .password | 4.2.1.1 | Y | R/C | R | N | R/C | R | R | R |
| javax.xml.ws.session | ||||||||||
| 22 | .maintain | 4.2.1.1 | Y | R/C | R | N | R/C | R | R | R |
| javax.xml.ws.soap.http.soapaction | ||||||||||
| 23 | .use | 4.2.1.1 | -- | N#20 | N#20 | N#20 | N#20 | N#20 | N#20 | N#20 |
| 24 | .uri | 4.2.1.1 | -- | N#20 | N#20 | N#20 | N#20 | N#20 | N#20 | N#20 |
| com.cosminexus.jaxws | ||||||||||
| 25 | .connect.timeout | R/C | R | N | R/C | R | R | R | ||
| 26 | .request.timeout | R/C | R | N | R/C | R | R | R | ||
| com.cosminexus.xml.ws.client.http | ||||||||||
| 27 | .HostnameVerificationProperty | R/C#21 | N | N | N | N | N | N | ||
This point describes the notes on using a message context.
The property that stores the HTTP method map for the request message (such as the javax.xml.ws.http.request.method property) is obtained using the handler in the Web Service and is a relevant property. Therefore, when this property is referenced with the handler in the Web Service client, null is always returned.
null is always stored for the javax.xml.ws.http.request.pathinfo property.
The outbound handler in the Web Service client is processed before the HTTP communication is performed. Therefore, if the javax.xml.ws.http.response.code property storing the HTTP status code is referenced from the handler, null is always returned.
The standard message context properties include an APPLICATION scope and HANDLER scope, but only the message context properties with the APPLICATION scope can be referenced from the Web Service client. Therefore, with the Cosminexus JAX-WS functionality, the properties assigned #9 in the table in 19.2.5(1) Support range of the message context properties cannot be used with the Web Services client. The operations are not guaranteed if these properties are referenced.
The Cosminexus JAX-WS functionality does not support the SOAPAction header, so the javax.xml.ws.soap.http.soapaction.use and javax.xml.ws.soap.http.soapaction.uri properties cannot be used. The operations are not guaranteed if these properties are referenced.
You cannot set up spaces and null in the javax.xml.ws.service.endpoint.address property that specifies the service endpoint address. The operations are not guaranteed if a space or null is set up. For details on the other values specified in the javax.xml.ws.service.endpoint.address property, see 20.2(3) Values specifiable in the location attribute of the soap: address element or soap12: address element.
The dispatch-based Web Service client and provider-based Web Service do not contain the WSDL file, so null is always returned when the message context properties related to the WSDL are referenced.
The javax.xml.ws.wsdl.operation property in the stub-based Web Service client can only be referenced with the request context that can be obtained with javax.xml.ws.BindingProvider#getResponseContext. If the property is referenced with the request context that can be obtained with javax.xml.ws.BindingProvider#getRequestContext, null is always returned. Also, even if a value is set in the javax.xml.ws.wsdl.operation property, the value does not affect the SOAP message to be sent.
With the Web Service client that uses the WS-RM 1.2 functionality, specify the service endpoint address before you invoke the first Web Service. If the service endpoint is changed subsequent to the first communication, the WS-RM communication fails.
Specify true or false in the message context for the com.cosminexus.xml.ws.client.http.HostnameVerificationProperty property using a java.lang.String type string, as shown in the following figure. The operations are not guaranteed if a string other than a java.lang.String type string is used to set up the value.
context.put("com.cosminexus.xml.ws.client.http.HostnameVerificationProperty", "true");
|
The description of referencing and changing the message context property in Web Services is as follows:
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.