Created
July 1, 2012 02:37
-
-
Save jdeoliveira/3026562 to your computer and use it in GitHub Desktop.
WCFConsumer mule application configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<flow name="wcfconsumerFlow1" doc:name="wcfconsumerFlow1"> | |
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" path="submitOrder" doc:name="HTTP"/> | |
<response> | |
<object-to-string-transformer doc:name="Object to String"/> | |
</response> | |
<http:body-to-parameter-map-transformer doc:name="Body to Parameter Map"/> | |
<choice doc:name="Choice"> | |
<when expression="#[Integer.parseInt(payload['qty']) < 100]"> | |
<processor-chain> | |
<scripting:component doc:name="Groovy"> | |
<scripting:script engine="Groovy"> | |
<scripting:text> | |
<![CDATA[ | |
import com.mulesoft.wcfconsumer.*; | |
ObjectFactory of = new ObjectFactory(); | |
Order o = of.createOrder(); | |
o.setProductId(of.createOrderProductId(payload['productCode'])); | |
o.setQuantity(of.createOrderQuantity(payload['qty'])); | |
return o; | |
]]> | |
</scripting:text> | |
</scripting:script> | |
</scripting:component> | |
<cxf:jaxws-client operation="CreateOrder" serviceClass="com.mulesoft.wcfconsumer.IWCFRetailService" enableMuleSoapHeaders="true" doc:name="SOAP"/> | |
<http:outbound-endpoint exchange-pattern="request-response" host="localhost" port="49676" path="WCFRetailService.svc" doc:name="HTTP"/> | |
</processor-chain> | |
</when> | |
<otherwise> | |
<processor-chain> | |
<mulexml:object-to-xml-transformer doc:name="Object to XML"/> | |
<file:outbound-endpoint path="src/test/resources" responseTimeout="10000" doc:name="File"/> | |
</processor-chain> | |
</otherwise> | |
</choice> | |
</flow> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment