This file contains 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
<wsdl:binding name="CustomerServiceServiceSoapBinding" type="tns:CustomerService"> | |
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> | |
<wsdl:operation name="updateCustomer"> | |
<soap:operation soapAction="" style="document"/> | |
<wsdl:input name="updateCustomer"> | |
<soap:body use="literal"/> | |
</wsdl:input> | |
</wsdl:operation> | |
<wsdl:operation name="getCustomersByName"> | |
<soap:operation soapAction="" style="document"/> |
This file contains 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
<!doctype html> | |
<html lang="en-US"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="Content-Type" content="text/html"> | |
<title>Github API Webapp using jQuery - Treehouse Demo</title> | |
<meta name="author" content="Jake Rocheleau"> | |
<link rel="shortcut icon" href="http://d15dxvojnvxp1x.cloudfront.net/assets/favicon.ico"> | |
<link rel="icon" href="http://d15dxvojnvxp1x.cloudfront.net/assets/favicon.ico"> | |
<link rel="stylesheet" type="text/css" media="all" href="css/styles.css"> |
This file contains 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
<cxf:configuration name="CXF_Configuration" enableMuleSoapHeaders="true" initializeStaticBusInstance="true" doc:name="CXF Configuration"/> | |
<flow name="mainFlow1" doc:name="mainFlow1"> | |
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP"/> | |
<cxf:jaxws-service configuration-ref="CXF_Configuration" serviceClass="cc.notsoclever.mule.GitHubService" validationEnabled="true" doc:name="GitHub SOAP Service"/> | |
<choice doc:name="Choice"> | |
<when expression="#[cxf_operation.toString().endsWith('getProjectTags')]"> | |
<set-payload value="repos/#[payload[0]]/#[payload[1]]/tags" doc:name="Tags"/> | |
</when> | |
<when expression="#[cxf_operation.toString().endsWith('getProjectBranches')]"> | |
<set-payload value="repos/#[payload[0]]/#[payload[1]]/branches" doc:name="Branches"/> |
This file contains 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>cc.notsoclever.mule</groupId> | |
<artifactId>test</artifactId> | |
<packaging>mule</packaging> | |
<version>1.0.0-SNAPSHOT</version> |
This file contains 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 void configure() throws Exception { | |
from("cxfrs:http://0.0.0.0:9090?resourceClasses=cc.notsoclever.examples.CompanyService&bindingStyle=SimpleConsumer") | |
.choice() | |
.when(header("operationName").isEqualTo("getCompany")) | |
.to("sql:SELECT * from company where id = :#id") | |
.when(header("operationName").isEqualTo("createCompany")) | |
.to("sql:INSERT INTO company(name, symbol) VALUES (:#name, :#symbol)") | |
.when(header("operationName").isEqualTo("getCompanies")) | |
.to("sql:select * from company") | |
.when(header("operationName").isEqualTo("updateCompany")) |
This file contains 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
try { | |
String str = message.getPayload(String.class); | |
JSONObject json = new JSONObject(str); | |
String xml = "<?xml version=\"1.0\" encoding=\"UTF-16\"?><object>" + XML.toString(json) + "</object>"; | |
return xml; | |
} catch (Exception e) { | |
System.out.println("Error: " + e); | |
e.printStackTrace(); |
This file contains 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
<repositories> | |
<repository> | |
<id>maven.fluxchess.com</id> | |
<url>http://maven.fluxchess.com/release</url> | |
</repository> | |
</repositories> | |
<dependency> | |
<groupId>com.fluxchess</groupId> | |
<artifactId>jcpi</artifactId> |
This file contains 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="LoadAppProperties" doc:name="LoadAppProperties"> | |
<quartz:inbound-endpoint jobName="onetimer" repeatInterval="0" repeatCount="0" startDelay="500" responseTimeout="10000" doc:name="Quartz"> | |
<quartz:event-generator-job/> | |
</quartz:inbound-endpoint> | |
<logger message="---0-0->> Going to go load stuff...." level="INFO" doc:name="Logger"/> | |
<expression-component doc:name="Expression"> | |
settings = new Properties(); | |
settings.load(new FileInputStream("/config/app.properties")); | |
app.registry.put("Settings", settings); | |
</expression-component> |
This file contains 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
mkdir bash-fix | |
cd bash-fix | |
curl https://opensource.apple.com/tarballs/bash/bash-92.tar.gz | tar zxf - | |
cd bash-92/bash-3.2 | |
curl https://ftp.gnu.org/pub/gnu/bash/bash-3.2-patches/bash32-052 | patch -p0 | |
cd .. | |
xcodebuild | |
sudo cp /bin/bash /bin/bash.old | |
sudo cp /bin/sh /bin/sh.old | |
build/Release/bash --version # GNU bash, version 3.2.52(1)-release |
This file contains 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
@Override | |
public Object onCall(MuleEventContext eventContext) throws Exception { | |
MuleMessage message = eventContext.getMessage(); | |
String path = message.getInboundProperty("http.request.uri"); | |
path = path.isEmpty() ? "/" : path; | |
// create a throw away event just for the lookup | |
MuleEvent event = new DefaultMuleEvent(message, |