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
public class WCFRetailService : IWCFRetailService | |
{ | |
public string CreateOrder(Order order) { | |
Random random = new Random(); | |
int newOrderId = random.Next(); | |
order.Id = newOrderId.ToString(); | |
// do something with the order... |
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
[ServiceContract] | |
public interface IWCFRetailService | |
{ | |
[OperationContract] | |
string CreateOrder(Order order); | |
} |
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
[DataContract] | |
public class Order | |
{ | |
private String id; | |
private String productId; | |
private String quantity; | |
[DataMember] | |
public String Id | |
{ |
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
<scripting:component doc:name="Prepare rejection response"> | |
<scripting:script engine="php"> | |
<scripting:text> | |
<![CDATA[ | |
<?php | |
$request = json_decode($payload, true); | |
$response["outcome"] = $message->getProperty("outcome"); |
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
<scripting:component doc:name="Analyze credit request"> | |
<scripting:script engine="php"> | |
<scripting:text> | |
<![CDATA[ | |
<?php | |
$log->info("Hello from PHP, mule!"); | |
$request = json_decode($payload, true); |
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
{"customerId": "DEF992", "requestedAmount": "3000", "averageIncome": "1000" } |
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
{"customerId": "ABC123", "requestedAmount": "15000", "averageIncome": "5000" } |
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="flow" doc:name="flow"> | |
<http:inbound-endpoint exchange-pattern="request-response" | |
host="localhost" port="8081" path="runPHP" doc:name="HTTP" /> | |
<object-to-string-transformer doc:name="Object to String" /> | |
<scripting:component doc:name="Analyze credit request"> | |
<scripting:script engine="php"> | |
<scripting:text> | |
<![CDATA[ | |
<?php |
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
<scripting:component doc:name="Script"> | |
<scripting:script engine="php"> | |
<scripting:text> | |
<![CDATA[ | |
<?php | |
$log->info("Hello from PHP, mule!"); | |
$msg = "Hello from PHP! You requested the path: " . $payload; | |
return $msg; |
NewerOlder