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
#!/bin/sh | |
# | |
# chkconfig: 35 99 99 | |
# description: Node.js /home/nodejs/sample/app.js | |
# | |
. /etc/rc.d/init.d/functions | |
USER="nodejs" |
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.FileInputStream; | |
import org.mule.api.MuleEventContext; | |
import org.mule.api.lifecycle.Callable; | |
public class CloseStreamWorkaround implements Callable { | |
@Override | |
public Object onCall(MuleEventContext eventContext) throws Exception { | |
FileInputStream fileInput = (FileInputStream) eventContext.getMessage().getPayload(); |
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 javax.xml.XMLConstants | |
import javax.xml.transform.stream.StreamSource | |
import javax.xml.validation.SchemaFactory | |
class jasonXsdValdation { | |
static def xml = """ | |
<?xml version="1.0" encoding="UTF-8"?> | |
<jason> |
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
build | |
Builds a job, and optionally waits until its completion. | |
cancel-quiet-down | |
Cancel the effect of the "quiet-down" command. | |
clear-queue | |
Clears the build queue | |
connect-node | |
Reconnect to a node | |
copy-job | |
Copies a job. |
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"?> | |
<mule xmlns="http://www.mulesoft.org/schema/mule/core" | |
version="EE-3.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd"> | |
<flow name="@service.op.name.capitalcase@JMSHandler" doc:name="@service.op.name.capitalcase@JMSHandler"> | |
<logger message="#[message.payload]" level="WARN"category="@service.op.name.lowercase@.JMSHandler.Response" doc:name ="Log@service.op.name.lowercase@ Service Response" /> | |
//rest of actual flow content with placeholders |
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
package com.sixtree.xs2xml; | |
import java.io.File; | |
import javax.xml.namespace.QName; | |
import javax.xml.transform.TransformerConfigurationException; | |
import javax.xml.transform.stream.StreamResult; | |
import jlibs.xml.Namespaces; | |
import jlibs.xml.sax.XMLDocument; |
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 org.mule.api.transport.OutputHandler | |
// store the current payload at the time the script is invoked | |
// (i.e. the back-end response stream/iterator) | |
def itr = payload; | |
// return a Groovy closure / lambda | |
return {evt, out -> | |
// define a stream XML builder object |
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 the GroovyMap | |
import au.com.sixtree.esb.mapper.GroovyMap | |
//We have a customized version of DOMCategory helper class, this provides us with xpath like features to access elements | |
//The default version involves a slightly different syntax. | |
import au.com.sixtree.java.esb.mapper.DOMCategory | |
//GroovyMap's toXMLDom() method takes input as the root/documentElement of the XML tree, type @Element | |
//very similar to accessing the root element in Java - payload.getDocumentElement() | |
return GroovyMap.toXmlDom(payload.documentElement) { | |
//inputs is a list of input arguments |
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
// no need to use builder here, just raw Groovy map syntax | |
//get DOMCategory to get access to GPATH style operations like getNode getNodeAt etc. | |
import au.com.sixtree.java.esb.mapper.DOMCategory; | |
//declare a java.util.Map to hold results | |
def result = [:] | |
//get input root element | |
def _in = payload.documentElement | |
use(DOMCategory) { |
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
/* | |
* Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com | |
* The software in this package is published under the terms of the CPAL v1.0 | |
* license, a copy of which has been included with this distribution in the | |
* LICENSE.txt file. | |
*/ | |
package org.mule.api.transport; | |
import org.mule.api.MuleEvent; |
OlderNewer