码迷,mamicode.com
首页 > 其他好文 > 详细

Mule自带例子之stockquote

时间:2015-06-24 00:36:46      阅读:173      评论:0      收藏:0      [点我收藏+]

标签:

1 配置效果图

技术分享

 

2 配置文件

  1 <?xml version="1.0" encoding="UTF-8"?>
  2 
  3 <mule version="CE-3.4.0"
  4     xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" 
  5     xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml" 
  6     xmlns:jersey="http://www.mulesoft.org/schema/mule/jersey" 
  7     xmlns:http="http://www.mulesoft.org/schema/mule/http" 
  8     xmlns="http://www.mulesoft.org/schema/mule/core" 
  9     xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
 10     xmlns:spring="http://www.springframework.org/schema/beans" 
 11    xmlns:context="http://www.springframework.org/schema/context"
 12     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 13     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
 14 http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
 15 http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
 16 http://www.mulesoft.org/schema/mule/jersey http://www.mulesoft.org/schema/mule/jersey/current/mule-jersey.xsd
 17 http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/current/mule-xml.xsd
 18 http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd
 19 http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-current.xsd">
 20     
 21     <context:property-placeholder location="stockquote.properties" system-properties-mode="OVERRIDE" />
 22 
 23     
 24     <object-to-string-transformer name="ObjectToString" doc:name="Object to String" />
 25     <custom-transformer name="XmlDecoder" class="org.mule.transformer.codec.XmlEntityDecoder" doc:name="Java"/>
 26     <mulexml:xslt-transformer name="XsltRest" xsl-file="xsl/rest-stock.xsl" maxIdleTransformers="2" maxActiveTransformers="5" doc:name="XSLT"/>
 27     <mulexml:xslt-transformer name="XsltSoap" xsl-file="xsl\soap-stock.xsl" maxIdleTransformers="2" maxActiveTransformers="5" doc:name="XSLT"/>
 28     <mulexml:xml-to-object-transformer name="XmlToObject" doc:name="XML to Object"/>
 29 
 30     
 31     <flow name="HTTP_input">
 32         <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="${port1}" path="stockquote" 
 33             responseTransformer-refs="ObjectToString" doc:name="HTTP"/>
 34         <http:body-to-parameter-map-transformer doc:name="Body to Parameter Map"/>
 35         <choice doc:name="Choice">
 36             <when expression="payload.method == ‘REST‘" evaluator="groovy">
 37                 <logger message="Enter REST when clause." level="INFO" doc:name="logger in REST"/>
 38                 <processor-chain>
 39                     <flow-ref name="REST" doc:name="REST"/>
 40                     <logger message="After HTTP_input REST: #[payload.getClass()] - #[payload]" level="INFO" /> <!-- class [B - [B@1280f39 -->
 41                 </processor-chain>
 42                 <logger message="After HTTP_input REST processor-chain: #[payload.getClass()] - #[payload]" level="INFO" /> <!-- class [B - [B@1280f39 -->
 43             </when>
 44             <when expression="payload.method == ‘SOAP‘" evaluator="groovy">
 45                 <logger message="Enter SOAP when clause." level="INFO" doc:name="logger in SOAP"/>
 46                 <processor-chain>
 47                     <flow-ref name="SOAP" doc:name="SOAP"/>
 48                 </processor-chain>
 49             </when>
 50             <when expression="payload.method == ‘WSDL‘" evaluator="groovy">
 51                 <logger message="Enter WSDL when clause." level="INFO" doc:name="logger in WSDL"/>
 52                 <processor-chain>
 53                     <flow-ref name="WSDL" doc:name="WSDL"/>
 54                 </processor-chain>
 55             </when>
 56         </choice>
 57         
 58         <logger message="Before HTTP_input XmlToObject transformer: #[payload.getClass()] - #[payload]" level="INFO" /> <!-- class [B - [B@1280f39 -->
 59         <transformer ref="XmlToObject" doc:name="Xml To Object"/>
 60         <!-- 
 61         <mulexml:xml-to-object-transformer name="XmlToObject" doc:name="XML to Object"/>功能:
 62                 把‘class [B‘类型转换为StockQuote
 63         class org.mule.example.stockquote.StockQuote - StockQuote[symbol=CSCO, name=Cisco Systems, date=6/23/2015 9:56am, last=28.82, change=-0.12, open=29.00, high=29.04, low=28.79, volume=2410178, previousClose=28.94] 
 64         -->
 65         <logger message="After HTTP_input XmlToObject transformer: #[payload.getClass()] - #[payload]" level="INFO" />  
 66     </flow>
 67     
 68     
 69     <!-- 
 70         功能:调用REST服务,获取symbol=CSCO的信息
 71         输入的类型:class java.util.HashMap - {symbol=CSCO, method=REST}
 72         输出的类型:class [B - [B@1280f39
 73      -->
 74     <sub-flow name="REST">
 75         <logger message="Before REST set-payload: #[payload.getClass()] - #[payload]" level="INFO" /> <!-- class java.util.HashMap - {symbol=CSCO, method=REST} -->
 76         <set-payload value="Symbol=#[payload[‘symbol‘]]" doc:name="Extract Symbol"/>    
 77         <logger message="After REST set-payload: #[payload.getClass()] - #[payload]" level="INFO" />  <!-- class java.lang.String - Symbol=CSCO -->
 78         
 79         <set-property propertyName="Content-Type" value="application/x-www-form-urlencoded" doc:name="Set Content-Type property"/> 
 80        
 81         <!--  http:outbound-endpoint 向地址做一次http连接请求, 请求响应模型,等待响应 -->
 82         <logger message="Before REST http:outbount-endpoint: #[payload.getClass()] - #[payload]" level="INFO" /> <!-- class java.lang.String - Symbol=CSCO -->
 83         <http:outbound-endpoint exchange-pattern="request-response" address="http://www.webservicex.net/stockquote.asmx/GetQuote" doc:name="Invoke REST service"/>
 84         <logger message="After REST http:outbount-endpoint: #[payload.getClass()] - #[payload]" level="INFO" />  <!-- class org.mule.transport.http.ReleasingInputStream - org.mule.transport.http.ReleasingInputStream@1ef9b2e -->
 85         
 86         <!-- 
 87         <custom-transformer name="XmlDecoder" class="org.mule.transformer.codec.XmlEntityDecoder" ... />转换器从ReleasingInputStream中解出XML内容:
 88         <?xml version="1.0" encoding="utf-8"?>
 89         <string xmlns="http://www.webserviceX.NET/">
 90             <StockQuotes>
 91                 <Stock>
 92                     <Symbol>CSCO</Symbol>
 93                     <Last>28.885</Last>
 94                     <Date>6/23/2015</Date>
 95                     <Time>9:49am</Time>
 96                     <Change>-0.055</Change>
 97                     <Open>29.000</Open>
 98                     <High>29.036</High>
 99                     <Low>28.820</Low>
100                     <Volume>1836184</Volume>
101                     <MktCap>146.91B</MktCap>
102                     <PreviousClose>28.940</PreviousClose>
103                     <PercentageChange>-0.190%</PercentageChange>
104                     <AnnRange>22.490 - 30.310</AnnRange>
105                     <Earns>1.721</Earns>
106                     <P-E>16.784</P-E>
107                     <Name>Cisco Systems</Name>
108                 </Stock>
109             </StockQuotes>
110         </string>
111          -->
112         <transformer ref="XmlDecoder" doc:name="Transformer Reference"/>
113         <logger message="After REST XmlDecoder transformer: #[payload.getClass()] - #[payload]" level="INFO" /> 
114         
115         <!-- class [B - [B@c3e965
116             <mulexml:xslt-transformer name="XsltRest" .../>转换器, 把<string>...</string>转换为一个内容大概如下的类型为‘[B‘的对象
117             <org.mule.example.stockquote.StockQuote>
118                 <Stock>
119                     <Symbol>CSCO</Symbol>
120                     <Last>28.885</Last>
121                     <Date>6/23/2015</Date>
122                     <Time>9:49am</Time>
123                     <Change>-0.055</Change>
124                     <Open>29.000</Open>
125                     <High>29.036</High>
126                     <Low>28.820</Low>
127                     <Volume>1836184</Volume>
128                     <MktCap>146.91B</MktCap>
129                     <PreviousClose>28.940</PreviousClose>
130                     <PercentageChange>-0.190%</PercentageChange>
131                     <AnnRange>22.490 - 30.310</AnnRange>
132                     <Earns>1.721</Earns>
133                     <P-E>16.784</P-E>
134                     <Name>Cisco Systems</Name>
135                 </Stock>
136             </org.mule.example.stockquote.StockQuote>
137          -->
138         <transformer ref="XsltRest" doc:name="Transformer Reference"/>
139         <logger message="After REST XsltRest transformer: #[payload.getClass()] - #[payload]" level="INFO" /> 
140     </sub-flow>
141     
142  
143      <sub-flow name="SOAP" doc:name="SOAP">
144      
145          <logger message="Before SOAP set-payload: #[payload.getClass()] - #[payload]" level="INFO" /> <!-- class java.util.HashMap - {symbol=CSCO, method=SOAP} -->
146         <set-payload value="#[payload[‘symbol‘]]" doc:name="Extract Symbol"/>
147         <logger message="After SOAP set-payload: #[payload.getClass()] - #[payload]" level="INFO" /> <!-- class java.lang.String - CSCO -->
148          
149         <processor-chain>        
150             <cxf:jaxws-client operation="GetQuote" clientClass="net.webservicex.StockQuote" port="StockQuoteSoap" wsdlLocation="classpath:stockquote.wsdl" doc:name="SOAP client"/>
151             <http:outbound-endpoint address="http://www.webservicex.net/stockquote.asmx" doc:name="HTTP endpoint"/>
152             <!-- class org.mule.transport.http.ReleasingInputStream - org.mule.transport.http.ReleasingInputStream@1e41c46 -->
153             <logger message="After SOAP http:outbound-endpoint: #[payload.getClass()] - #[payload]" level="INFO" />
154         </processor-chain>
155         <!-- 
156         此处表面 processor-chain 会把请求的响应ReleasingInputStream流类型 处理为对应的String格式
157         class java.lang.String - <StockQuotes><Stock><Symbol>CSCO</Symbol><Last>28.88</Last> ................... 
158         -->
159         <logger message="After SOAP processor-chain: #[payload.getClass()] - #[payload]" level="INFO" /> 
160         
161         
162         
163         <transformer ref="XmlDecoder" doc:name="XmlDecoder transformer"/>
164         <logger message="After SOAP XmlDecoder transformer: #[payload.getClass()] - #[payload]" level="INFO" />  <!-- class java.lang.String - <StockQuotes><Stock><Symbol>CSCO</ -->
165         
166         <transformer ref="XsltSoap" doc:name="XsltSoap transformer"/>
167         <logger message="After SOAP XsltSoap transformer: #[payload.getClass()] - #[payload]" level="INFO" />  <!-- class [B - [B@16dcbb9 -->
168     </sub-flow>
169     
170     
171     <sub-flow name="WSDL">
172         <set-payload value="#[payload[‘symbol‘]]" doc:name="Extract Symbol"/>
173         <outbound-endpoint exchange-pattern="request-response"  address="wsdl-cxf:http://www.webservicex.net/stockquote.asmx?WSDL&amp;method=GetQuote" doc:name="Wsdl"/>
174         <transformer ref="XmlDecoder" doc:name="XmlDecoder transformer"/>
175         <transformer ref="XsltSoap" doc:name="XmlSoap transformer"/>
176     </sub-flow>
177 </mule>

 

 

3 样式单文件

xsl/rest-stock.xsl

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="2.0" 
    xmlns:sq="http://www.webserviceX.NET/" 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:template match="/sq:string/sq:StockQuotes/sq:Stock">
        <org.mule.example.stockquote.StockQuote>
            <name><xsl:value-of select="sq:Name"/></name>
            <symbol><xsl:value-of select="sq:Symbol"/></symbol>
            <date><xsl:value-of select="sq:Date"/><xsl:text> </xsl:text><xsl:value-of select="sq:Time"/></date>
            <change><xsl:value-of select="sq:Change"/></change>
            <last><xsl:value-of select="sq:Last"/></last>
            <open><xsl:value-of select="sq:Open"/></open>
            <high><xsl:value-of select="sq:High"/></high>
            <low><xsl:value-of select="sq:Low"/></low>
            <volume><xsl:value-of select="sq:Volume"/></volume>
            <previousClose><xsl:value-of select="sq:PreviousClose"/></previousClose>
        </org.mule.example.stockquote.StockQuote>
    </xsl:template>
</xsl:stylesheet>

 

 

xsl/soap-stock.xsl

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:template match="/StockQuotes/Stock">
        <org.mule.example.stockquote.StockQuote>
            <name><xsl:value-of select="Name"/></name>
            <symbol><xsl:value-of select="Symbol"/></symbol>
            <date><xsl:value-of select="Date"/><xsl:text> </xsl:text><xsl:value-of select="Time"/></date>
            <change><xsl:value-of select="Change"/></change>
            <last><xsl:value-of select="Last"/></last>
            <open><xsl:value-of select="Open"/></open>
            <high><xsl:value-of select="High"/></high>
            <low><xsl:value-of select="Low"/></low>
            <volume><xsl:value-of select="Volume"/></volume>
            <previousClose><xsl:value-of select="PreviousClose"/></previousClose>
        </org.mule.example.stockquote.StockQuote>
    </xsl:template>
</xsl:stylesheet>

 

 

截取的http://www.webservicex.net/stockquote.asmx服务的响应:

 <?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://www.webserviceX.NET/">
    <StockQuotes>
        <Stock>
            <Symbol>CSCO</Symbol>
            <Last>28.885</Last>
            <Date>6/23/2015</Date>
            <Time>9:49am</Time>
            <Change>-0.055</Change>
            <Open>29.000</Open>
            <High>29.036</High>
            <Low>28.820</Low>
            <Volume>1836184</Volume>
            <MktCap>146.91B</MktCap>
            <PreviousClose>28.940</PreviousClose>
            <PercentageChange>-0.190%</PercentageChange>
            <AnnRange>22.490 - 30.310</AnnRange>
            <Earns>1.721</Earns>
            <P-E>16.784</P-E>
            <Name>Cisco Systems</Name>
        </Stock>
    </StockQuotes>
</string>

 

 

4 测试

1)REST

技术分享

日志输出:

INFO  2015-06-23 22:51:41,322 [[stockquote].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: Enter REST when clause.
INFO 2015-06-23 22:51:41,327 [[stockquote].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: Before REST set-payload: class java.util.HashMap - {symbol=CSCO, method=REST} INFO 2015-06-23 22:51:41,330 [[stockquote].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: After REST set-payload: class java.lang.String - Symbol=CSCO

++++++++++++++++++++ 子流REST中的日志输出(子流REST的输入类型为String) +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ INFO 2015-06-23 22:51:41,332 [[stockquote].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: Before REST http:outbount-endpoint: class java.lang.String - Symbol=CSCO INFO 2015-06-23 22:51:41,335 [[stockquote].connector.http.mule.default.receiver.02] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default outbound transformer: org.mule.transport.http.transformers.ObjectToHttpClientMethodRequest INFO 2015-06-23 22:51:41,335 [[stockquote].connector.http.mule.default.receiver.02] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default response transformer: org.mule.transport.http.transformers.MuleMessageToHttpResponse INFO 2015-06-23 22:51:41,335 [[stockquote].connector.http.mule.default.receiver.02] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default outbound transformer: org.mule.transport.http.transformers.ObjectToHttpClientMethodRequest INFO 2015-06-23 22:51:41,335 [[stockquote].connector.http.mule.default.receiver.02] org.mule.lifecycle.AbstractLifecycleManager: Initialising: ‘connector.http.mule.default.dispatcher.32667419‘. Object is: HttpClientMessageDispatcher INFO 2015-06-23 22:51:41,335 [[stockquote].connector.http.mule.default.receiver.02] org.mule.lifecycle.AbstractLifecycleManager: Starting: ‘connector.http.mule.default.dispatcher.32667419‘. Object is: HttpClientMessageDispatcher INFO 2015-06-23 22:51:43,179 [[stockquote].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: After REST http:outbount-endpoint: class org.mule.transport.http.ReleasingInputStream - org.mule.transport.http.ReleasingInputStream@3d2056

<custom-transformer name="XmlDecoder" class="org.mule.transformer.codec.XmlEntityDecoder" doc:name="Java"/>处理器从ReleasingInputStream中解除XML字符串 INFO 2015-06-23 22:51:43,183 [[stockquote].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: After REST XmlDecoder transformer: class java.lang.String -
<?xml version="1.0" encoding="utf-8"?> <string xmlns="http://www.webserviceX.NET/"><StockQuotes><Stock><Symbol>CSCO</Symbol><Last>28.71</Last><Date>6/23/2015</Date><Time>10:37am</Time><Change>-0.23</Change><Open>29.00</Open><High>29.04</High><Low>28.71</Low><Volume>4101960</Volume><MktCap>146.02B</MktCap><PreviousClose>28.94</PreviousClose><PercentageChange>-0.79%</PercentageChange><AnnRange>22.49 - 30.31</AnnRange><Earns>1.72</Earns><P-E>16.68</P-E><Name>Cisco Systems</Name></Stock></StockQuotes></string>
INFO 2015-06-23 22:51:43,194 [[stockquote].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: After REST XsltRest transformer: class [B - [B@64c4fb
++++++++++++++++++ 子流REST结束(子流REST的输出类型为‘[B‘) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

INFO 2015-06-23 22:51:43,196 [[stockquote].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: After HTTP_input REST: class [B - [B@64c4fb INFO 2015-06-23 22:51:43,198 [[stockquote].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: After HTTP_input REST processor-chain: class [B - [B@64c4fb INFO 2015-06-23 22:51:43,199 [[stockquote].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: Before HTTP_input XmlToObject transformer: class [B - [B@64c4fb INFO 2015-06-23 22:51:43,211 [[stockquote].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: After HTTP_input XmlToObject transformer: class org.mule.example.stockquote.StockQuote - StockQuote[symbol=CSCO, name=Cisco Systems, date=6/23/2015 10:37am, last=28.71, change=-0.23, open=29.00, high=29.04, low=28.71, volume=4101960, previousClose=28.94]

 

2)SOAP

技术分享

日志:

INFO  2015-06-23 23:04:20,910 [[stockquote].connector.http.mule.default.receiver.03] org.mule.api.processor.LoggerMessageProcessor: Enter SOAP when clause.
INFO  2015-06-23 23:04:20,912 [[stockquote].connector.http.mule.default.receiver.03] org.mule.api.processor.LoggerMessageProcessor: Before SOAP set-payload: class java.util.HashMap - {symbol=CSCO, method=SOAP}
INFO  2015-06-23 23:04:20,915 [[stockquote].connector.http.mule.default.receiver.03] org.mule.api.processor.LoggerMessageProcessor: After SOAP set-payload: class java.lang.String - CSCO
INFO  2015-06-23 23:04:20,919 [[stockquote].connector.http.mule.default.receiver.03] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default outbound transformer: org.mule.transport.http.transformers.ObjectToHttpClientMethodRequest
INFO  2015-06-23 23:04:20,919 [[stockquote].connector.http.mule.default.receiver.03] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default response transformer: org.mule.transport.http.transformers.MuleMessageToHttpResponse
INFO  2015-06-23 23:04:20,920 [[stockquote].connector.http.mule.default.receiver.03] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default outbound transformer: org.mule.transport.http.transformers.ObjectToHttpClientMethodRequest
INFO  2015-06-23 23:04:20,920 [[stockquote].connector.http.mule.default.receiver.03] org.mule.lifecycle.AbstractLifecycleManager: Initialising: ‘connector.http.mule.default.dispatcher.18322687‘. Object is: HttpClientMessageDispatcher
INFO  2015-06-23 23:04:20,920 [[stockquote].connector.http.mule.default.receiver.03] org.mule.lifecycle.AbstractLifecycleManager: Starting: ‘connector.http.mule.default.dispatcher.18322687‘. Object is: HttpClientMessageDispatcher
INFO  2015-06-23 23:04:22,391 [[stockquote].connector.http.mule.default.receiver.03] org.mule.api.processor.LoggerMessageProcessor: After SOAP http:outbound-endpoint: class org.mule.transport.http.ReleasingInputStream - org.mule.transport.http.ReleasingInputStream@1b403a3
INFO  2015-06-23 23:04:22,400 [[stockquote].connector.http.mule.default.receiver.03] org.mule.api.processor.LoggerMessageProcessor: After SOAP processor-chain: class java.lang.String - <StockQuotes><Stock><Symbol>CSCO</Symbol><Last>28.7299</Last><Date>6/23/2015</Date><Time>10:50am</Time><Change>-0.2101</Change><Open>29.0000</Open><High>29.0360</High><Low>28.6500</Low><Volume>4746376</Volume><MktCap>146.12B</MktCap><PreviousClose>28.9400</PreviousClose><PercentageChange>-0.7260%</PercentageChange><AnnRange>22.4900 - 30.3100</AnnRange><Earns>1.7210</Earns><P-E>16.6937</P-E><Name>Cisco Systems</Name></Stock></StockQuotes>
INFO  2015-06-23 23:04:22,419 [[stockquote].connector.http.mule.default.receiver.03] org.mule.api.processor.LoggerMessageProcessor: After SOAP XmlDecoder transformer: class java.lang.String - <StockQuotes><Stock><Symbol>CSCO</Symbol><Last>28.7299</Last><Date>6/23/2015</Date><Time>10:50am</Time><Change>-0.2101</Change><Open>29.0000</Open><High>29.0360</High><Low>28.6500</Low><Volume>4746376</Volume><MktCap>146.12B</MktCap><PreviousClose>28.9400</PreviousClose><PercentageChange>-0.7260%</PercentageChange><AnnRange>22.4900 - 30.3100</AnnRange><Earns>1.7210</Earns><P-E>16.6937</P-E><Name>Cisco Systems</Name></Stock></StockQuotes>
INFO  2015-06-23 23:04:22,429 [[stockquote].connector.http.mule.default.receiver.03] org.mule.api.processor.LoggerMessageProcessor: After SOAP XsltSoap transformer: class [B - [B@1abd128
INFO  2015-06-23 23:04:22,432 [[stockquote].connector.http.mule.default.receiver.03] org.mule.api.processor.LoggerMessageProcessor: Before HTTP_input XmlToObject transformer: class [B - [B@1abd128
INFO  2015-06-23 23:04:22,435 [[stockquote].connector.http.mule.default.receiver.03] org.mule.api.processor.LoggerMessageProcessor: After HTTP_input XmlToObject transformer: class org.mule.example.stockquote.StockQuote - StockQuote[symbol=CSCO, name=Cisco Systems, date=6/23/2015 10:50am, last=28.7299, change=-0.2101, open=29.0000, high=29.0360, low=28.6500, volume=4746376, previousClose=28.9400]

 

 

 3)WSDL

技术分享

日志:

INFO  2015-06-23 23:05:36,386 [[stockquote].connector.http.mule.default.receiver.04] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default outbound transformer: org.mule.transport.http.transformers.ObjectToHttpClientMethodRequest
INFO  2015-06-23 23:05:36,386 [[stockquote].connector.http.mule.default.receiver.04] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default response transformer: org.mule.transport.http.transformers.MuleMessageToHttpResponse
INFO  2015-06-23 23:05:36,386 [[stockquote].connector.http.mule.default.receiver.04] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default outbound transformer: org.mule.transport.http.transformers.ObjectToHttpClientMethodRequest
INFO  2015-06-23 23:05:36,386 [[stockquote].connector.http.mule.default.receiver.04] org.mule.lifecycle.AbstractLifecycleManager: Initialising: ‘connector.http.mule.default.dispatcher.5785394‘. Object is: HttpClientMessageDispatcher
INFO  2015-06-23 23:05:36,386 [[stockquote].connector.http.mule.default.receiver.04] org.mule.lifecycle.AbstractLifecycleManager: Starting: ‘connector.http.mule.default.dispatcher.5785394‘. Object is: HttpClientMessageDispatcher
INFO  2015-06-23 23:05:37,407 [[stockquote].connector.http.mule.default.receiver.04] org.mule.api.processor.LoggerMessageProcessor: Before HTTP_input XmlToObject transformer: class [B - [B@19362f0
INFO  2015-06-23 23:05:37,415 [[stockquote].connector.http.mule.default.receiver.04] org.mule.api.processor.LoggerMessageProcessor: After HTTP_input XmlToObject transformer: class org.mule.example.stockquote.StockQuote - StockQuote[symbol=CSCO, name=Cisco Systems, date=6/23/2015 10:51am, last=28.725, change=-0.215, open=29.000, high=29.036, low=28.650, volume=4786820, previousClose=28.940]

 

Mule自带例子之stockquote

标签:

原文地址:http://www.cnblogs.com/asnjudy/p/4596539.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!