Adding a SOAP Component/CXF Element
The configurable elements and attributes of the SOAP component vary according to the type of operation the Web service is performing.Consult the sub-sections below for detailed configuration information.
soap component 可配置的元素和属性根据 webservice要执行的操作决定。
Applying Global CXF Configuration
To set up and reuse customized CXF behavior, you must create a global element and reference it within the SOAP component(s) in your Mule flows.为了建立和复用特定的cxf动作,必须建立一个全局的元素并且将他引入到流中的soap component中。
configuration attributes:
Field
|
Value
|
Description
|
---|---|---|
Name | unique name | Enter a unique name for the global element, if you wish. |
Configuration Location | filepath/filename.xml | If you have created an .xml file that supplies the specifics of how you want your CXF elements to behave, enter the file path of your CXF configuration file.如果已经建立了规定CXF怎么工作的xml文档,可以将文档路径添在此处。 |
Enable Mule Soap Headers | true (default) false | If set to true (i.e. checked) this attribute ensures that Mule can add a header to a SOAP message when required as part of the message's processing. For example, if your SOAP messages will be processed by a third-party schema which prohibits deviations from very specific message properties and will not process messages with Mule headers, set this attribute to false (i.e. uncheck). 选择true运行mule 往soap message中添加header。 |
Initialize Static Bus Instance初始化静态总线实例 | true (default) false | If set to true, (i.e. checked) this attribute ensures that the CXF Web service uses Mule transports instead of CXF transports. 选择true确保cxf web service用mule协议代替cxf协议。 |
Publishing a Web Service
Configure yourcxf:jaxws-service
, cxf:proxy-service
, or cxf:simple-service
attributes according to the table below. Refer to the code sample below.
配置cxf:jaxws-service
, cxf:proxy-service
, or cxf:simple-service
的属性根据下面的表,可以参考下面的代码示例。
Attribute |
Simple service |
JAX-WS service |
Proxy service |
Value |
---|---|---|---|---|
Binding ID |
x
|
x
|
x
| Specify the CXF Protocol Bindings which facilitate the mapping of concrete formats and protocols on transports. 指定CXF的协议绑定,促进具体格式和传输协议的映射。 |
Port |
x
|
x
|
x
| • Code first: specify the the port generated in the WSDL. |
Namespace |
x
|
x
|
x
| • Code first: specify the the SOAP namespace generated in the WSDL. Overrides default CXF namespace. |
Service † |
x
|
x
|
x
| • Code first: where more than one service exists, specify the the service generated in the WSDL. |
Service Class † |
x
|
x
|
x
| • Code first: click the ellipsis (. . .) to specify the Web service interface to which the Java class will bind to the WSDL. |
Validation Enabled |
x
|
x
|
x
| Set to true (i.e. checked) if you want Mule to perform schema validation on all incoming messages. 选中的话会在mule进行schema验证。 |
Payload |
|
|
x
| Use the drop down menu to select how much of the message should pass through the proxy. (By default, Mule selects |
Consuming a Web Service
Attribute |
Simple client |
JAX-WS client |
Proxy client |
Value |
---|---|---|---|---|
Operation |
x
|
x
|
x
| Specify the operation to invoke on the Web service to which your client will make calls. For example, |
Service Class |
x
|
x
|
x
| Specify the Java class CXF should use to construct its service model for the client. |
Decoupled Endpoint |
x
|
x
|
x
| Specify the reply-to endpoint (URL) for clients which have WS-Addressing enabled. |
Client Class |
|
x
|
| Specify the name of the client class that CXF generated using its |
Payload |
|
|
x
| Use the drop down menu to select how much of the message the client passes to the service. (By default, Mule selects |
Port |
|
x
|
x
| Not the TCP port. Specify the WSDL SOAP port name the client must use to communicate with the Web service. Links the binding to the Web service. |