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
import java.io.ByteArrayOutputStream; | |
import java.io.InputStream; | |
import java.util.HashMap; | |
import java.util.Map; | |
import org.apache.commons.fileupload.MultipartStream; | |
import org.apache.log4j.Logger; | |
import org.mule.api.MuleMessage; | |
import org.mule.api.transport.PropertyScope; | |
import org.mule.transformer.AbstractMessageTransformer; |
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
protected Map<String, String> parseHeaders(String headerPart) | |
{ | |
Map<String, String> headers = new HashMap<String, String>(); | |
char buffer[] = new char[1024]; | |
boolean done = false; | |
int j = 0; | |
int i; | |
String header, headerName, headerValue; | |
try | |
{ |
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="NotificationOfError"> | |
<vm:inbound-endpoint path="notifyError" /> | |
<object-to-string-transformer /> | |
<smtp:outbound-endpoint host="smtp.gmail.com" | |
port="587" user="${email.user}" password="${email.pass}" from="${email.user}" | |
to="${email.support}" subject="Houston: We have a problem!" | |
connector-ref="emailConnector" /> | |
</flow> |
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
muleContext.getClient().send("vm://notifyError", exception) |
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
// reference the files with the customized flows and resources | |
ConfigResource[2] resources = new ConfigResource[2]; | |
resources[0] = new ConfigResource(new URL(pathToCustomFile1)); | |
resources[1] = new ConfigResource(new URL(pathToCustomFile2)); | |
// create a spring configuration builder | |
SpringXmlConfigurationBuilder springXmlConfigurationBuilder = new SpringXmlConfigurationBuilder(resources); | |
//reference the parent | |
springXmlConfigurationBuilder.setParentContext(parentMuleContext); |
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
MuleContext child = contextsMap.get(contextName); | |
child.getClient().send("vm://notifyError", exception) |
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
xjc example.xsd |
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
<!-- give jaxb a package to scan for annotations --> | |
<mulexml:jaxb-context name="myJaxB" packageNames="com.mulesoft.example" /> | |
<sub-flow name="xmlMarshalling"> | |
<!-- custom transformer that would populate your bean --> | |
<custom-transformer class="com.mulesoft.example.PayloadToBeanTransformer" /> | |
<!-- Generate the XML --> | |
<mulexml:jaxb-object-to-xml-transformer name="myMarshaller" jaxbContext-ref="myJaxB"/> | |
</sub-flow> |
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
gpg --gen-key |
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
<spring:bean id="pgpKeyManager" class="org.mule.module.pgp.PGPKeyRingImpl" init-method="initialise"> | |
<spring:property name="publicKeyRingFileName" value="./public.gpg" /> | |
<spring:property name="secretKeyRingFileName" value="./secring.gpg" /> | |
<spring:property name="secretAliasId" value="1218002276979500705" /> | |
<spring:property name="secretPassphrase" value="myPassPhrase" /> | |
</spring:bean> |
OlderNewer