Tag: Code
-
Call a Java Method from a *.jar file in DataWeave
Overview Reuse is a major tenant of the MuleSoft Anypoint Platform. Instead of being a black box where developers don’t know what the code is doing under the covers, they can reuse code or leverage their own code within a Mule application. Sometimes this code can be sitting in a *.jar file and the developer…
-
Download all Objects from an Amazon S3 Bucket using MuleSoft
Here’s a quick example on how you can download all the Objects from an Amazon S3 Bucket using the Amazon S3 Connector. You can see the flow and the corresponding code (minus the HTTP and Amazon S3 Configuration) below. <flow name=”s3-exampleFlow”> <http:listener config-ref=”HTTP_Listener_Configuration” path=”/bucket” doc:name=”HTTP” /> <s3:list-objects config-ref=”Amazon_S3__Configuration” bucketName=”s3-mule-bucket” doc:name=”Amazon S3 – List Objects in Bucket”…
-
Document object to String object (Java Code)
Converting a Document object to a String object in Java is an issue I’ve run into a couple times at work. I wanted to see the output of a WebService call response that was in XML in the console. Here’s a quick code snippet I found that handles this: // xmlDoc is the Document object…