...
To expose a web service mapping-type needs to be set to any of the following:
Div |
---|
class | confluenceTableSmall |
---|
|
Wiki Markup |
---|
{div:class=confluenceTableSmall}
|| Mapping type || Description ||
| {{rootqname}} | Offers the option to map web service requests based on the qualified name of the root element contained in the message. |
| {{soapaction}} | Used to map web service requests based on the SOAP action specified in the header of the message. |
| {{uri}} | In order to map web service requests that target a specific URI. |
| {{xpathresult}} | Used to map web service requests based on the evaluation of an XPath {{expression}} against the incoming message. The result of the evaluation should match the XPath result specified in the endpoint URI. |
| {{beanname}} | Allows you to reference an {{ Mapping type | Description |
---|
rootqname | Offers the option to map web service requests based on the qualified name of the root element contained in the message. | soapaction | Used to map web service requests based on the SOAP action specified in the header of the message. | uri | In order to map web service requests that target a specific URI. | xpathresult | Used to map web service requests based on the evaluation of an XPath expression against the incoming message. The result of the evaluation should match the XPath result specified in the endpoint URI. | beanname | Allows you to reference an |
org.apache.camel.component.spring.ws.bean.CamelEndpointDispatcher
|
}} [ mappings|http://static.springsource.org/spring-ws/sites/1.5/reference/html/server.html#server-endpoint-mapping] like {{PayloadRootQNameEndpointMapping}}, {{SoapActionEndpointMapping}}, etc |
{div}mappings like PayloadRootQNameEndpointMapping , SoapActionEndpointMapping , etc |
|
As a consumer the address should contain a value relevant to the specified mapping-type (e.g. a SOAP action, XPath expression). As a producer the address should be set to the URI of the web service your calling upon.
You can append query options to the URI in the following format, ?option=value&option=value&...
Options
Div |
---|
class | confluenceTableSmall |
---|
|
Name | Required? | Description |
---|
soapAction | No | SOAP action to include inside a SOAP request when accessing remote web services | wsAddressingAction | No | WS-Addressing 1.0 action header to include when accessing web services. The To header is set to the address of the web service as specified in the endpoint URI (default Spring-WS behavior). | expression | Only when mapping-type is xpathresult | XPath expression to use in the process of mapping web service requests, should match the result specified by xpathresult | timeout | No | Camel 2.10: Sets the socket read timeout (in milliseconds) while invoking a webservice using the producer, see URLConnection.setReadTimeout() and CommonsHttpMessageSender.setReadTimeout(). This option works when using the built-in message sender implementations: CommonsHttpMessageSender and HttpUrlConnectionMessageSender. One of these implementations will be used by default for HTTP based services unless you customize the Spring WS configuration options supplied to the component. If you are using a non-standard sender, it is assumed that you will handle your own timeout configuration. Camel 2.12: The built-in message sender HttpComponentsMessageSender is considered instead of CommonsHttpMessageSender which has been deprecated, see HttpComponentsMessageSender.setReadTimeout(). | sslContextParameters | No | Camel 2.10: Reference to an org.apache.camel.util.jsse.SSLContextParameters in the Registry. See Using the JSSE Configuration Utility. This option works when using the built-in message sender implementations: CommonsHttpMessageSender and HttpUrlConnectionMessageSender. One of these implementations will be used by default for HTTP based services unless you customize the Spring WS configuration options supplied to the component. If you are using a non-standard sender, it is assumed that you will handle your own TLS configuration. Camel 2.12: The built-in message sender HttpComponentsMessageSender is considered instead of CommonsHttpMessageSender which has been deprecated. |
|
Wiki Markup |
---|
{div:class=confluenceTableSmall}
|| Name || Required? || Description ||
| {{soapAction}} | No | SOAP action to include inside a SOAP request when accessing remote web services |
| {{wsAddressingAction}} | No | WS-Addressing 1.0 action header to include when accessing web services. The {{To}} header is set to the _address_ of the web service as specified in the endpoint URI (default Spring-WS behavior). |
| {{expression}} | Only when _mapping-type_ is {{xpathresult}} | XPath expression to use in the process of mapping web service requests, should match the result specified by {{xpathresult}} |
| {{timeout}} | No | *Camel 2.10:* Sets the socket read timeout (in milliseconds) while invoking a webservice using the producer, see [URLConnection.setReadTimeout()|http://docs.oracle.com/javase/6/docs/api/java/net/URLConnection.html#setReadTimeout(int)] and [CommonsHttpMessageSender.setReadTimeout()|http://static.springsource.org/spring-ws/site/apidocs/org/springframework/ws/transport/http/CommonsHttpMessageSender.html#setReadTimeout(int)]. This option works when using the built-in message sender implementations: _CommonsHttpMessageSender_ and _HttpUrlConnectionMessageSender_. One of these implementations will be used by default for HTTP based services unless you customize the Spring WS configuration options supplied to the component. If you are using a non-standard sender, it is assumed that you will handle your own timeout configuration.\\
*Camel 2.12:* The built-in message sender _HttpComponentsMessageSender_ is considered *instead of* _CommonsHttpMessageSender_ which has been deprecated, see [HttpComponentsMessageSender.setReadTimeout()|http://static.springsource.org/spring-ws/site/apidocs/org/springframework/ws/transport/http/HttpComponentsMessageSender.html#setReadTimeout(int)]. |
| {{sslContextParameters}} | No | *Camel 2.10:* Reference to an {{org.apache.camel.util.jsse.SSLContextParameters}} in the [Registry|http://camel.apache.org/registry.html]. See [Using the JSSE Configuration Utility|http://camel.apache.org/http4.html#HTTP4-UsingtheJSSEConfigurationUtility]. This option works when using the built-in message sender implementations: _CommonsHttpMessageSender_ and _HttpUrlConnectionMessageSender_. One of these implementations will be used by default for HTTP based services unless you customize the Spring WS configuration options supplied to the component. If you are using a non-standard sender, it is assumed that you will handle your own TLS configuration.\\
*Camel 2.12:* The built-in message sender _HttpComponentsMessageSender_ is considered *instead of* _CommonsHttpMessageSender_ which has been deprecated. |
{div} |
Registry based options
The following options can be specified in the registry (most likely a Spring ApplicationContext) and referenced from the endpoint URI using the # notation.
Div |
---|
class | confluenceTableSmall |
---|
|
Wiki Markup |
---|
{div:class=confluenceTableSmall}
|| Name || Required? || Description ||
| {{webServiceTemplate}} | No | Option to provide a custom [WebServiceTemplate|http://static.springsource.org/spring-ws/sites/1.5/apidocs/org/springframework/ws/client/core/WebServiceTemplate.html]. This allows for full control over client-side web services handling; like adding a custom interceptor or specifying a fault resolver, message sender or message factory. |
| {{messageSender}} | No | Option to provide a custom [WebServiceMessageSender|http://static.springsource.org/spring-ws/sites/1.5/apidocs/org/springframework/ws/transport/WebServiceMessageSender.html]. For example to perform authentication or use alternative transports |
| {{messageFactory}} | No | Option to provide a custom [WebServiceMessageFactory|http://static.springsource.org/spring-ws/sites/1.5/apidocs/org/springframework/ws/WebServiceMessageFactory.html]. For example when you want Apache Axiom to handle web service messages instead of SAAJ |
| {{transformerFactory}} | No | Option to override default TransformerFactory. The provided transformer factory must be of type {{javax.xml.transform.TransformerFactory}} |
| {{endpointMapping}} | Only when _mapping-type_ is {{rootqname}}, {{soapaction}}, {{uri}} or {{xpathresult}} | Reference to an instance of {{ Name | Required? | Description |
---|
webServiceTemplate | No | Option to provide a custom WebServiceTemplate. This allows for full control over client-side web services handling; like adding a custom interceptor or specifying a fault resolver, message sender or message factory. | messageSender | No | Option to provide a custom WebServiceMessageSender. For example to perform authentication or use alternative transports | messageFactory | No | Option to provide a custom WebServiceMessageFactory. For example when you want Apache Axiom to handle web service messages instead of SAAJ | transformerFactory | No | Option to override default TransformerFactory. The provided transformer factory must be of type javax.xml.transform.TransformerFactory | endpointMapping | Only when mapping-type is rootqname , soapaction , uri or xpathresult | Reference to an instance of |
org.apache.camel.component.spring.ws.bean.CamelEndpointMapping
|
}} Registry/ApplicationContext. |
[MessageDispatcher|http://static.springsource.org/spring-ws/sites/1.5/apidocs/org/springframework/ws/server/.html] |
| {{messageFilter}} | No | *Camel | messageFilter | No | Camel 2.10.3 |
* |
{div} |
Div |
---|
class | confluenceTableSmall |
---|
|
Name | Type | Description |
---|
CamelSpringWebserviceEndpointUri | String | URI of the web service your accessing as a client, overrides address part of the endpoint URI | CamelSpringWebserviceSoapAction | String | Header to specify the SOAP action of the message, overrides soapAction option if present | CamelSpringWebserviceAddressingAction | URI | Use this header to specify the WS-Addressing action of the message, overrides wsAddressingAction option if present | CamelSpringWebserviceSoapHeader | Source | Camel |
|
Wiki Markup |
---|
{div:class=confluenceTableSmall}
|| Name || Type || Description ||
| {{CamelSpringWebserviceEndpointUri}} | String | URI of the web service your accessing as a client, overrides _address_ part of the endpoint URI |
| {{CamelSpringWebserviceSoapAction}} | String | Header to specify the SOAP action of the message, overrides {{soapAction}} option if present |
| {{CamelSpringWebserviceAddressingAction}} | URI | Use this header to specify the WS-Addressing action of the message, overrides {{wsAddressingAction}} option if present |
| {{CamelSpringWebserviceSoapHeader}} | Source | *Camel * |
{div} |
Accessing web services
To call a web service at http://foo.com/bar
simply define a route:
...