<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Terry.Li-彬

    虛其心,可解天下之問;專其心,可治天下之學;靜其心,可悟天下之理;恒其心,可成天下之業。

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      143 隨筆 :: 344 文章 :: 130 評論 :: 0 Trackbacks

    Using the Web Service Wrapper

    The WebServiceWrapperComponent class allows you to send the result of a web service call to another endpoint. The web service call is performed within WebServiceWrapperComponent, providing the following advantages:

    • You can set any type of router on inbound and outbound.
    • Unlike the chaining router, it can send more than one HTTP request at a time
    • The URL for the web service call can be changed at run-time by sending the URL with the message

    Configuring the Web Service Wrapper

    To use the web service wrapper, you specify the <wrapper-component> configuration element. The following table describes the attributes you can set for this element. These attributes are described in more detail in the examples that follow.

    Attribute Description Required?
    address Specifies the URL of the web service to call Yes, unless addressFromMessage is set to true
    addressFromMessage (default is false) Specifies that the URL of the web service will be obtained from the message itself Not required if address is set
    wrapperProperties The SOAP document style, expressed as a map of two properties: style, which can be set to RPC (the default), Document, Message, or Wrapped, and use, which can be Encoded or Literal. No
    <soap-method> A SOAP method to call (see Configuring SOAP Methods below) No

    The web service wrapper is generic and can be used with any type of web service stack supported by Mule, including Axis and CXF. The examples below show synchronous use cases, but the web service wrapper can also support an asynchronous use case like the loan broker example.

    Example Configuration Using the CXF Transport

    Consider the following example. The web service wrapper is configured as a Mule component, accepting messages from a VM endpoint. A call must be made to a web service on the URL cxf:http://localhost:65081/services/TestUMO?method=onReceive and the result must be sent to the outbound endpoint vm://testout.

    The inbound and outbound endpoints are configured in the usual way. The address is set as an attribute on the component, specifying the web service URL that you want to call.

    								<cxf:connector name="cxf" defaultFrontend="simple" />
    								<model name="Sample">
    								<service name="WebServiceSample">
    								<inbound>
    								<vm:inbound-endpoint path="testin" />
    								</inbound>
    								<cxf:wrapper-component address="http://localhost:65081/services/TestUMO?method=onReceive"/>
    								<outbound>
    								<pass-through-router>
    								<outbound-endpoint address="vm://testout"/>
    								</pass-through-router>
    								</outbound>
    								</service>
    						

    Example Configuration Using the addressFromMessage Property

    The "address" property is ideal to use when the web service URL for the web service is known at configuration time. However, if this URL is either not known or else needs to be changed at run-time, the "address" property can be omitted and the "adddressFromMessage" property can be set to true. The following example shows this configuration:

    								<service name = "WebServiceSample2">
    								<inbound>
    								<vm:inbound-endpoint path = "testin2"/>
    								</inbound>
    								<cxf:wrapper-component addressFromMessage = "true"/>
    								</service>
    						

    The URL must be set on the message with the property name "ws.service.url".

    Configuring SOAP Methods

    CXF endpoints are fairly easy to configure, whereas Axis needs some further configuration to set SOAP methods. You can set a SOAP method using the <soap-method> element as shown below:

    								<service name = "WebServiceSample3">
    								<inbound>
    								<vm:inbound-endpoint path = "queue.in" connector-ref = "VMQueue"/>
    								</inbound>
    								<axis:wrapper-component address = "http://localhost:62088/axis/Calculator?method=add" style = "WRAPPED" use = "LITERAL">
    								<axis:soap-method method = "qname{add:http://muleumo.org/Calc}">
    								<axis:soap-parameter parameter = "Number1" type = "int" mode = "IN"/>
    								<axis:soap-parameter parameter = "Number2" type = "int" mode = "IN"/>
    								<axis:soap-return type = "int"/>
    								</axis:soap-method>
    								</axis:wrapper-component>
    								<outbound>
    								<pass-through-router>
    								<vm:outbound-endpoint path = "queue.out" connector-ref = "VMQueue"/>
    								</pass-through-router>
    								</outbound>
    								</service>
    						
    posted on 2009-09-19 21:53 禮物 閱讀(475) 評論(0)  編輯  收藏 所屬分類: AxisESB 、ESB
    主站蜘蛛池模板: 95免费观看体验区视频| 国产免费AV片在线观看| 一级黄色免费毛片| 中文字幕在线视频免费| 一级毛片免费观看| 国产精品久久久久久久久久免费 | 特级无码毛片免费视频| 午夜在线免费视频 | 成人婷婷网色偷偷亚洲男人的天堂| 亚洲AV无码成人网站在线观看| 日本一区二区三区在线视频观看免费 | 亚洲无人区一区二区三区| 亚洲AV无码国产丝袜在线观看 | 久久久久久久久久久免费精品| 久久免费视频99| 在线看片免费不卡人成视频| 四虎影视永久免费观看| 亚洲色自偷自拍另类小说| 亚洲精品国产第1页| 亚洲av无码兔费综合| 人妻18毛片a级毛片免费看| 无码人妻一区二区三区免费n鬼沢| 丁香花免费高清视频完整版| 又粗又大又长又爽免费视频| 国产亚洲一区二区精品| 色噜噜亚洲男人的天堂| 一级毛片免费一级直接观看| 97青青草原国产免费观看| 日韩成全视频观看免费观看高清| 亚洲中文久久精品无码| 亚洲免费人成视频观看| 大片免费观看92在线视频线视频| 91人人区免费区人人| 四虎永久成人免费| 久久精品国产亚洲AV麻豆网站 | 中文字幕亚洲男人的天堂网络 | 精品久久久久久亚洲综合网| 成人片黄网站色大片免费观看APP| 四虎国产精品免费久久| 亚洲中文字幕无码中文字在线| 亚洲日日做天天做日日谢|