FAQ Database Discussion Community


How get payload inside webservice class mule

soap,mule,esb
I need payload value inside ShipmentProcessImpl class or MuleEventContext object. <flow name="soaptest_rFlow1" doc:name="soaptest_rFlow1"> <http:inbound-endpoint exchange-pattern="request-response" host="${host}" port="${port}" doc:name="HTTP" path="${deliveryUpdatePath}" /> <byte-array-to-string-transformer doc:name="Byte Array to String" /> <logger category="ProTSP Listener Logger" level="INFO" message="#[payload]" doc:name="Logger" /> <cxf:jaxws-service serviceClass="org.tempuri.ShipmentProcess"...

Getting “muleContext cannot be resolved” error in mule Junit test code

java,junit,mule,junit4,junit3
I am getting error "Unresolved compilation problem: muleContext cannot be resolved" at the line "MuleClient client = muleContext.getClient();" in JUnit test code in Mule. As per my understanding this code is correct. Since i am new to JUnit, i am not getting why this error is coming. Can anyone help...

Sending detailed email of exception in Mule ESB using SMTP connector

xml,mule,mule-el
I have a "Catch Exception Strategy" in my flow and I use the SMTP connector to send an email to the admin (me). I am able to send the exception using #[exception] but I would like to send a more detailed message including : The complete URL requests The original...

Mule Datamapper JSON to XML Transformation

mule,datamapper
JSON Input Payload information, Where i have issue with. { "name": "xyz", "city": "california", "serialNumber": [ "T2323" , "T2332" ] } Expected transformed Output Payload : <COMPANY_ITEM_INFO> <COMPANY_NAME>xyz</COMPANY_NAME> <COMPANY_CITY>california</COMPANY_NAME> <Inv_Update SEGMENT="1"> <SERIALNO>T2323</SERIALNO> </Inv_Update SEGMENT="1"> <Inv_Update SEGMENT="1"> <SERIALNO>T2332</SERIALNO> </Inv_Update SEGMENT="1"> </COMPANY_ITEM_INFO> Actual Output...

Where can I download MuleSoft Community Edition?

mule,esb,mule-studio
Have they got rid of Community edition? I can't find a link to download it anywhere on their site. Is there another link I can download it from somewhere? Thanks...

Mule Server 3.6 > Anypoint Studio > Raw JSON as POST data

mule,esb,mule-studio
Still learning Mulesoft's Anypoint Studio... I am confused as how will I be able to access raw JSON POST data via the HTTP Listener then use the Choice flow control to execute conditions based on a value from a given JSON index. Anyone can show/tell me how to do this?

Explanation of $ in Mule MEL

mule,mel
I cannot find any documentation around the use of $ in MEL other than a couple of lines here You can refer to any Java class by its fully qualified name or if it is one of the classes in the automatically-imported Java classes, by its unqualified name. References use...

How read a json file with mule?

json,mule,esb
I have this section in my source code: <file:inbound-endpoint connector-ref="fileConnector" path="C:/tmp/input" encoding="UTF-8" mimeType="application/json"> <file:filename-wildcard-filter pattern="*.json"/> </file:inbound-endpoint> <json:json-to-object-transformer returnClass="java.util.HashMap"/> <logger level="INFO" message="#[message.payload]"/> everything compile fine! but at execute throws the next exception: "Message: failed to transform from "json" to "java.util.HashMap" Code: MULE-ERROR-109" Can...

Why would my Mule project suddenly start complaining about “Invalid keystore format”

mule,mule-studio
While trying to learn how to use the Imap connector in Mule studio, I came across this tutorial. I downloaded it and imported it into AnyPoint studio as a project, and as it were in that tutorial, it worked great (after sending the connector to the right host/port etc.) I...

Explanation and example for use of ackExpression in Until Successful Scope

mule
I am trying to understand the use of Until Successful Scope but am consfused with the use of ackExpression attribute, the documentation has precious little on it here Specifies an expression that, when evaluated to true, determines the synchronous response of until-successful. The blog here also has a couple of...

Mule Batch Negative seek offset

mule
I am getting following error message while starting/running the application. [batch-job-batchprocessBatch1-work-manager.03] com.mulesoft.module.batch.engine.threading.BatchRecordWork: Exception found while processing block 'be158611-147c-11e5-9d15-0026b9eef95d' for instance 'a4815df0-147c-11e5-85c6-0026b9eef95d' of batch job 'batchprocessBatch1'. Records will be queued back java.lang.IllegalAccessError: sun/nio/cs/UTF_8 at sun.nio.cs.UTF_8ConstructorAccess.newInstance(Unknown Source) at...

swagger generation in mule with jetty

java,jetty,mule,swagger
I am trying to generate swagger from my apis.I am using mule and added this jetty connector for that. My mule server is running on 8080 <jetty:connector name="jettyConnector"> <jetty:webapps directory="${app.home}/webapps" port="8083"/> </jetty:connector> I have added web .xml under src/main/app/webapps/swaggerdoc/WEB-INF/web.xml and the content is: <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"...

What is the relation of numberOfConcurrentTransactedReceivers with the number of threads mule spawns

mule
I understand that mule has 3 thread pools and how they work, however I am amazed at the lack of documentation around numberOfConcurrentTransactedReceivers, there is virtually nothing that talks about it directly not even Dossots book. There is one blog post which indirectly mentions it, but nothing concrete. This answer...

Anypoint studio/Mule hangs during startup

mule,mule-studio
I am new to Mule and Anypoint studio. I worked with Mule before. After a while I came back to work with it again. I upgrade to Anypoint Studio March 2015 Release Version: 5.1.0 Build Id: 201503171252 (sorry but I do not remember my old version and it over wrote...

Mule OAuth Provider Accesstoken expiry time

oauth,mule
I am using Mule enterprise edition and struggling to find the default expiry time for tokens issued using the Mule OAuth provider. So if my provider configuration is like the below, for how long will the issued access token be valid ? 12 hours/24 hours or something else ? <oauth2-provider:config...

How to increase the DB connection Timeout

mule,mule-studio,mule-component
I have got the connection Timeout in DB. Already I have set connection Timeout to '60sec' in DB. I got the below error. After connecting with DB people ,have found that. The below error is not query command timeout and mostly of connection establishing Mule to DB timeout. I have...

Mule getting data from ConsumerIterator

mule
My mule flow is: <sfdc:query config-ref="SFDC__DevInt" query="dsql:SELECT Id FROM Account WHERE Name = #[flowVars.Name]" doc:name="Salesforce"/> <logger message="Select query: #[message.payload]" level="INFO" doc:name="Logger"/> <foreach doc:name="For Each"> <logger message="#[message.payload]" level="INFO" doc:name="Logger"/> <logger message="#[message.payload.Id]" level="INFO" doc:name="Logger"/> </foreach> Above for loops returns the id. Instead of looping is there any direct way of getting data...

How can I access Mule ESB Community edition via browser?

amazon-web-services,amazon-ec2,mule,mule-component
I am trying to access it via browser, I had no issue with EE but CE is proving difficult. On Putty I have it saying: Mule is already running. And when I go to http://ec2----.us-west-2.compute.amazonaws.com:8585/ it won't load properly. I do have the port 8585 open for inbound traffic as...

mule db2 sfdc account data loading

salesforce,mule
My Java code is: public class Db2sfdc { public Map<String, Object> getPayloadData(@Payload String src){ HashMap<String, Object> sfdcFields = new HashMap<String, Object>(); Map<String, Object> payloadMap = new HashMap<String, Object>(); List<Map<String, Object>> objects = new ArrayList<Map<String,Object>>(); sfdcFields.put("Client_Alert_Description__c", "Mule interation"); sfdcFields.put("Client_Status_Reason__c","POC update"); sfdcFields.put("Credit_Terms__c", "POC Terms");...

Mule AMQP connector fails trying to requeue message

mule,amqp,mule-component
I'm using the AMQP endpoint and have got it working (with one caveat mentioned here [Possible bug with Mule AMQP transport 3.6.2 community) in other places in my Mule application. I'm trying to build a reliable SMTP queue but having problems. I made the assumption that if the SMTP connector...

Mule Server 3.6 > Anypoint Studio > Data Extraction

json,mule,esb,mule-studio
How can extract information against a JSON data, when I have a sessionVars.filters containing: ["account", "billing"] ...where my JSON data contains: { "billing": { "BillNumber": 25, "BillPeriod": "06 Dec 14 - 05 Jan 15", "AccountNumber": 78781843, "PreviousBalance": 0.00, "CurrentBalance": 1237.49, "DueDate": "Jan 26, 2015", "TotalAmountDue": 1237.49, "PreviousBalance": 0.00, "CurrentBalance": 1237.49,...

Dynamic address for HTTP inbound endpoint Mule

mule,mel
I am trying to get dynamic address for my http inbound endpoint for SOAP service. <http:inbound-endpoint exchange-pattern="request-response" address="#[app.registry.appversion.getNewAddress()]" doc:name="HTTP"/> Spring context has bean definition: <bean id="appversion" class="com.visit.util.Application"> getNewAddress() in Application class returns a String. However, it throws exception as: Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:PropertyAccessException 1:...

Mule TransformerException: An invalid return type “class [B” was specified for transformer “JAXBMarshallerTransformer”

java,soap,mule
I'm using Mule CXF Component to call a web service from localhost. the called web service return an object of type SoapResult but Mule on transforming it, detect the return type as "[B". finally the JAXBMarshallerTransformer chosen and transformation fails with this stack: org.mule.api.transformer.TransformerException: An invalid return type "class [B"...

Mule attachment returning values

mule
<flow..> ... <jersey:resources doc:name="REST"> <component class="com.rest.SyncAccountService"/> </jersey:resources> <set-payload value="#[message.payload]" doc:name="Set Payload"/> <set-property propertyName="mimeType" value="application/octet-stream" doc:name="Property"/> <set-property propertyName="Content-Disposition" value="attachment;filename=${file_name}" doc:name="Property"/> <set-variable variableName="status" value="Success" doc:name="Status"/> <flow-ref...

How to route in Mule ESB using request path

java,xml,mule
Hello I am trying to add a router in flow, so that I can re-use my code and to avoid duplication. I normally do a flow for each request path for example : HTTP LISTENER = localhost:8080/mule1 HTTP LISTENER = localhost:8080/mule2 I would like to know if it's possible to...

Mule xpath fails with Message payload is of type: String

mule,mule-studio,mule-el
I recently started using Mule with Anypoint studio and of course I get error very often. Currently I am accessing a SOAP service with <cxf:jaxws-client> and <http:outbound-endpoint> and from the SOAP response that I get I want to perform a check on a specific body element. Here is my flow:...

how to achieve retry mechanism for ftp outbound end point using vm transaction?

ftp,mule,mule-studio,mule-component
We have tried like using vm as outbound in flow1 and inbound in flow2. In flow2 we are using FTP as outbound end point and we have enabled the vm transaction even then also its not working. Do we need to enable transaction for retrying? As per below question we...

Mule consuming JMS topic message

mule
My flow is: <flow name="activemqFlow3" doc:name="activemqFlow3"> <http:inbound-endpoint exchange-pattern="request-response" host="${hostname}" port="${port}" path="producetopic" doc:name="HTTP"/> <set-payload value="===TOPIC===" doc:name="Set Payload"/> <jms:outbound-endpoint topic="sfdc" connector-ref="Active_MQ" doc:name="JMS" /> </flow> <flow name="activemqFlow4" doc:name="activemqFlow4"> <jms:inbound-endpoint doc:name="JMS" connector-ref="Active_MQ" topic="sfdc"/> <logger...

Mule - Configure dynamically an SQS Connector

mule,mule-studio
i'm trying to pass in a dynamic way the connection details to an SQS Connector. Is this possible to accomplish? Thanks....

Getting Exception “Failed to load transport: org/mule/transport D”

java,junit,mule,junit4,junit3
I am getting below exception in Junit test code in Mule. You can find my mule flow and test code here :Getting "muleContext cannot be resolved" error in mule Junit test code Can anyone help me to resove this error please. org.mule.api.registry.ServiceException: Failed to load transport: org/mule/transport D at org.mule.registry.MuleRegistryHelper.createServiceDescriptor(MuleRegistryHelper.java:563)...

MuleSoft - use decryption with null paylod

mule
I'm trying to use MuleSoft's decryption on HTTP requests. I'm doing this also on GET requests. I get the following error: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ERROR 2015-05-17 13:00:35,630 [[broker1-secure].HTTP_Listener_Configuration.worker.01] org.mule.exception.DefaultMessagingExceptionStrategy: ******************************************************************************** Message : Failed to invoke decrypt. Message payload is of type: NullPayload Code : MULE_ERROR-29999...

Oracle Data source configuration in MULE(AnyPoint Studio)

oracle,oracle11g,mule,datasource,mule-studio
I use this config for oracle database in Mule: <spring:beans> <spring:bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" destroy-method="shutdown" name="Bean"> <spring:property name="driverName" value="oracle.jdbc.driver.OracleDriver"/> <spring:property name="url" value="jdbc:oracle:thin:@192.168.28.129:1521:orcl"/> <spring:property name="user" value="username" /> <spring:property name="password" value="123456" /> </spring:bean>...

How to combine two JSON in MULE?

json,mule
I have just started working on MULE and I am trying to combine 2 JSONs (say 1 is coming from http post and another is set as Payload in sub flow). Now how can i combine the 2 JSONs. I tried with custom Transformer but no success.So please suggest how...

Mailing multiple files from inbound file connector in a single mail

mule,mule-studio,mule-el
I can't seem to figure out how I can achieve the following: 1) Mule needs to pick up files from a directory and put it on an ftp (this part is working) 2) Next, it needs to mail the files that were uploaded in a single mail, with the body...

Mule - Exported project - Error java.io.FileNotFoundException

deployment,path,wsdl,mule
I have exported my mule project which contains a WSDL file in src.main.resources/wsdl-request. The type of export is AnyPoint Studio Project to AnyPoint Deployable Archive. The problem is that when I execute the deployable archive in the server it return this error: Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'file:/C:/Users/usrAdmin/AnypointStudio/workspace/mule-project-test/src/main/resources/wsdl-test/Request.wsdl'....

Mulesoft Anypoint Studio DevKit - @Connector vs @Module ( No need for config-ref )

mule,mule-studio,mule-component
I am trying to create a component that does not need a connection to another source or for that fact a connection strategy... but no matter what I try I cannot prevent the component from having a "Basic Settings" > "Connector Configuration" dropdown/create/edit section in the "Mule Properties" section when...

Change the prefix in CXF with interceptor

soap,cxf,mule,mule-studio
I am trying to change <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> to <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> I am using Mule and CXF. We are exposing a SOAP service and the wsdl is from a legacy system (we imported it and generated the classes). It is necessary to change the prefix from 'soap' to just...

Set value to payload using expression transformer

mule,mule-studio,mule-component
I am wanting to invoke a function on payload which is a Java pojo to set a value. <set-variable variableName="name" value="xyz" doc:name="Variable"/> <foreach doc:name="For Each"> <expression-transformer expression="#[payload.setEventId(flowVars['name'])]" doc:name="Expression"/> <logger message="#[payload.getEventId()]" level="INFO" doc:name="Logger"/> </foreach> But this is giving me error. Root Exception stack trace: org.mule.api.transformer.TransformerException: Expression Evaluator "null" with expression...

How to use flowvariable in a Mule Query

mule,datamapper
I am trying to use a query with flowvariable in the where clause in Mule ESB (Connecting with Salesforce) SELECT id FROM Account WHERE CX_ID__c = '"flowvars.orgpayload.CXM_ID+"' LIMIT 1 But I am not getting an error here. Any pointers on how to use flow variable in a query would help....

Mule Queued-Asynchronous Flow Queue vs. VM Queue

mule,message-queue
While studying and using Mule, I couldn't figure out if there's a difference between a queued-asynchronous flow queue and a VM queue. My question is, are they the same queues (just with different names along the documentation) or different ones? In a concrete example: <flow name="fooFlow" processingStrategy="queued-asynchronous"> <vm:inbound-endpoint path="foo" exchange-pattern="one-way"/>...

Mule ESB, Synchronize custom java class within flow

java,multithreading,mule,esb,mule-studio
I wrote custom java class, a special http connector in the flow with request-response mule-http connector. But if there are too many requests calls this flow, an IllegalStateException occured. As far as i know the data or variables from one thread copies to another thread and I get an IllegalState......

Rollback strategy with maxRedeliveryAttempts and VM inbound configured does not redeliver messages

exception,mule
My flow looks like the below, I expect the message to be redelivered 2 times and then the Redelivery is exhaused SAD logger to be printed. But after the component throws the exception the re delivery mechanism does not kick in <vm:connector name="VM" validateConnections="true" doc:name="VM" /> <flow name="TriggerFlow" > <http:listener...

Mule comparing map keys in choice

mule
I have a Map payload and I'm using foreach to get the key/value pair to further process in the flow. Example map payload: {key1=[org.myorg.domain.MyObj@7d9bae39, org.myorg.domain.MyObj@2a23741b], key2=[org.myorg.domain.MyObj@7d9abd39, org.myorg.domain.MyObj@23de741b]} and a choice inside of it to direct it to the appropriate subflow as follows: <foreach doc:name="For Each"> <choice doc:name="Choice"> <when expression="#[message.payload.key1 ==...

Mule ExpressionRuntimeException Message payload is of type: LinkedList

mule,raml
error message: Message : Execution of the expression "payload.get(0).get('ACCESS_TOKEN')" failed. (org.mule.api.expression.ExpressionRuntimeException). Message payload is of type: LinkedList Code : MULE_ERROR--2 -------------------------------------------------------------------------------- Exception stack is: 1. Index: 0, Size: 0 (java.lang.IndexOutOfBoundsException) java.util.LinkedList:553 (null) 2. null (java.lang.reflect.InvocationTargetException) sun.reflect.GeneratedMethodAccessor323:-1 (null) 3. cannot invoke method: get...

Can no longer build Mule projects due to closure of Codehaus

maven,mule
After the closure of codehaus, I can no longer build any Mule project that uses the mule-scripting-component because it is trying to download an artifact from codehaus(which it can no longer due to the closure of aforementioned site). When I try to build I get the following error: Could not...

Mule flow adding weird characters to beginning of file

encoding,utf-8,mule
I'm simply moving files, but for some reason they are appending weird characters to the front of the file. Before: (Encoded with UTF-8) testCol1,testCol2,testCol3 After: (Encoded with ANSI) ¬í ur [B¬óøTà xp žÌtestCol1,testCol2,testCol3 Things I've tried: Explicitly setting the encoding to utf-8. Explicitly setting the encoding to ANSI. Using a...

Mule avoid downloading file after db select statement

mule
<flow name="testFlow1" doc:name="testFlow1"> <http:inbound-endpoint exchange-pattern="request-response" host="${hostname}" port="${port}" path="dbtest" doc:name="HTTP"/> <db:select config-ref="PostgreSQL" doc:name="Database"> <db:parameterized-query><![CDATA[SELECT id, name, int_status FROM test]]></db:parameterized-query> </db:select> <!--line 6 --> <!-- <set-payload value="==no downlaod=#[payload]" doc:name="Set Payload"/>--> </flow> when I run the application...

How to write dependent queries in MULE CE?

mule,esb,mule-component
I hear that we con't write two Inbound-endpoints in one flow, but below is my requirement, Second select query needs first query payload value. When I run this giving an exception. Please let me know if there is any alternate way to write this. <flow name="Some"> <jdbc:inbound-endpoint queryKey="SelectSome" connector-ref="ProConnector" doc:name="SomeFromPro"...

Revoking OAuth tokens in Mule

oauth-2.0,mule
I have configured a OAuth provider in Mule using the OAuth connector, and I give out access tokens to users as and when they login, they get a new access token for each device they login with, my question is what is the best thing to do when a user...

Mule HTTPS Listener won't respond

ssl,mule,keystore
I have trouble with the HTTPS setup in Mule. I have tried both at work and at home with fresh Anypoint Installs. I have checked every StackOverflow posts every tutorial every blogposts but nothing is doing it. I have also tried EE and CE runtimes. I am using the lastest...

Mule - Retry connection with basic flow

java,http,soap,exception-handling,mule
I have a basic mule flow: HTTP => SOAP => JAVA CLASS <mule xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans...

Design of request-reply scope in mule, why does the reply section mandate a outbound endpoint

mule
The request-reply scope mandates that we place a outbound endpoint in the reply section of the scope, I am wondering why is the scope designed as such ? Why can't this detail be handled internally by Mule ? All MP's can be placed only after the request-reply scope and so...

Mule Flow not able to invoke exception strategy

mule
I have following Code for my Mule FLOW and seems like something is wrong with my code which is not allowing to invoke Catch Exception Strategy, What are the corrections required here ? <flow name="Mule_Common_FTP_EDI_FilesProcessing_Inbound" doc:name="Mule_Common_FTP_EDI_FilesProcessing_Inbound" processingStrategy="synchronous"> <quartz:inbound-endpoint cronExpression="${ftp.edi.inbound.cronExpression}" responseTimeout="${ftp.edi.inbound.root.responseTimeout}" jobName="pollingFTPFiles" doc:name="Quartz"...

jms selector expression in Mule is not working

jms,mule,mule-studio
<flow name="readqueueFlow1" doc:name="readqueueFlow1" > <jms:inbound-endpoint queue="MyTestQueue" connector-ref="Active_MQ-Priority" doc:name="JMS"> <jms:selector expression="JMSCorrelationID=’353’" /> </jms:inbound-endpoint> </flow> Its working but when i try to use the below one its not deploying <!-- When we don't provide single quote it is failing in deployment --> <jms:selector expression="JMSCorrelationID='#[flowVars.reqId]'" /> <!-- Payload contains reqId, when we provide...

How to keep mule CE 5.3.0 running

mule,esb
I've created my mule application, and i deploy it on mule ce 5.3.0 my question now is how to keep my server running which means even if i close my CMD (the window where my mule is running) my application keep running.

Mule: How to configure custom component factory?

mule,mule-component
I want a custom factory to create my java component. Is it possible in Mule?

Problems with sync AMQP connector in Mule

mule,amqp
I'm trying to process a queue of XML objects in Mule in a durable manner, which have been split from an original xml file, and are then being routed using a "choice" component. Each leg of the choice component leads to an AMQP endpoint with a different queue. The other...

mule database iterating data and mapping

mule
I am trying to fetch data from db, do mapping and upload to cloud for each record from db one by one. I have done below approach: select data from db, map each record from the db, then upload. Mule flow: <flow name="psi2sfdcFlow2" doc:name="psi2sfdcFlow2"> <http:inbound-endpoint exchange-pattern="request-response" host="${hostname}" port="${port}" path="psi2sfdc" doc:name="HTTP"/>...

Message enricher and MEL

mule,mel
The message enricher documentation uses a term "variable" for example <flow name="orderProcessingFlow"> <inbound-endpoint ref="orderEndpoint"/> <enricher target="#[variable:state]"> <outbound-endpoint ref="stateLookup"/> </enricher> <outbound-endpoint ref="orderStep2"/> </flow> I did not find any documentation on that keyword, I can figure out it basically adds a flow variable, but is there anything more to it ? (without...

Is there a way to mock non-global filters in a sub-flow using MUnit?

mule,munit
I wanted to know if there was a way to mock a custom-filter that is within a sub-flow using MUnit. I'm using Mule 3.4.0 and MUnit 3.4.0.M5. The sample flow looks like the following. <sub-flow name="a"> <choice> <when expression="something..."> <custom-filter doc:name="filter a">...</custom-filter> </when> <otherwise> ... </otherwise> </choice> </sub-flow> I've had...

Mule Server 3.6 > Anypoint Studio > Request Connector

json,post,mule,esb,mule-studio
How do I set the Request Connector to send Raw JSON data using POST method? On my Set Payload transformer I have this: #[{ "productId": #[sessionVars.productId] }] When I run my Mule App, I get the following error: Error sending HTTP request. Message payload is of type: String What am...

Mule SFDC connector: redirect_uri_mismatch&error_description=redirect_uri must match configuration

oauth-2.0,salesforce,mule
I am connecting to SFDC with mule connector by oauth, trying to authorize but getting following error message. <flow name="sfdcFlow1" doc:name="sfdcFlow1"> <http:inbound-endpoint exchange-pattern="request-response" host="${hostname}" port="${port}" path="sfdc" doc:name="HTTP"/> <sfdc:authorize config-ref="Salesforce__OAuth_v2_0" display="POPUP" accessTokenUrl="https://na1.salesforce.com/services/oauth2/token" authorizationUrl="https://na1.salesforce.com/services/oauth2/authorize" doc:name="Salesforce"/>...

Mule 3.6.1 and Logentries using log4j2

mule,mule-studio,log4j2,logentries
We are building our application with Mule 3.6.1. In order to overwrite their log, we need to use log4j2.xml. I followed the example for making one here: https://logentries.com/doc/java/. When I run our application I am getting: 2015-05-06 09:56:37,603 ERROR Error processing element Logentries: CLASS_NOT_FOUND 2015-05-06 09:56:37,606 ERROR Unable to locate...

Mule Mongo Connector to produce INNER JOIN results

mongodb,join,mule
I have two collections, one of organizations and one of brands within the organization, and I am trying to produce a result set that will have the brands related to the organization show up as as a nested JSON inside the organization JSON result. The code for getting the results...

Mule Import CSV into Mysql with NULL date

mule,esb,mule-studio
I am using MULE to import a CSV file into a Mysql database. However when importing the CSV, if there is an empty field that is mapped to a date field in Mysql, the import fails out. Here is the Mysql Fields: Description RecDate --------------------------- Varchar(50) Date Here is the...

Mule - Throw Exception with until-successful

java,exception,soap,exception-handling,mule
This is my mule flow: HTTP => Logger => SOAP (CXF) => Until Successful [JAVA] => LOGGER Spring : <spring:beans> <spring:bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <spring:property name="locations"> <spring:list> <spring:value>test.properties</spring:value> </spring:list> </spring:property> </spring:bean> <spring:bean id="testIntegration" class="x.x.x.IntegrationClass" init-method="init">...

How to read mail and insert into database using Mule?

java,email,mule,javamail
I have to create an application in Mule which will read the mail from a store and save it's details in a database. I know how to insert the data into the database but I am unable to find any solution about the mail. How do I read the mail...

MuleESB AnyPointStudio JPA implementation

java,hibernate,jpa,mule,esb
I'm using the CE Mule Server 3.5.0, and AnyPoint Studio as IDE. I just can't find a way to implement the JPA with EntityManager; honestly there aren't tutorials or explanations on how to do that, how to put a DS in the MuleServer or use DBconnector as DS...just don't know......

what is the max retries for until successful scope in mule 3.4.2

mule,mule-studio,mule-component,mule-el
what is the max retries for until successful scope in mule 3.4.2? how many maximum retries we can accoumdate for until successful.is there any limit we have for retries? or else shall I use as many I can?...

“Failed to Deploy Artefact error” in Eclipse Mule ESB project

mule
I'm trying to run a trivial http echo app against the 3.50 CE runtime and I get the following stack trace(s) when I try to run ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Failed to deploy artifact 'default', see below + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ java.lang.NullPointerException at org.mule.module.launcher.DefaultArchiveDeployer.guardedDeploy(DefaultArchiveDeployer.java:274) ... Exception in thread "main" java.lang.NullPointerException at...

Mule ESB Community Standalone Runtime

mule
Can anyone tell me if it is possible to use community Runtime of Mule ESB with out any trail? If so, can you please provide me the link to download the community Runtime. I googled it, but couldn't find.

Get XML from URL with Mule

xml,http,mule,flow
I have a basic mule flow: <?xml version="1.0" encoding="UTF-8"?> <mule xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml" xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" xmlns:jersey="http://www.mulesoft.org/schema/mule/jersey" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"...

Mule: Migrating to the New HTTP Connector

http,mule,cxf
I've upgraded from Mule 3.5.x to 3.6.x and since the old http transport is deprecated in 3.6.x I wanted to migrate to the new HTTP connector. Here is the original code for calling my webservice: <http:outbound-endpoint ref="OrderEndpoint" doc:name="GetApprovedOrder"> <cxf:jaxws-client serviceClass="com.acme.orders.IOrderServiceBean" port="OrderServiceBean_v2_0Port" operation="getApprovedOrderOp" /> </http:outbound-endpoint> The point I have got to...

How to save the response from a HTTP call until successs in Mule?

mule,mule-component
We are trying to call a REST service with a Mule HTTP connector. If we dont get a success, we want to re-send the request, something like this: <until-successful objectStore-ref="objectStore" failureExpression="#[header:INBOUND:http.status != 200]" maxRetries="6" secondsBetweenRetries="600"> <http:request config-ref="ComAroundREST_API" path="api/v1/mostread" method="GET" doc:name="GetMostReadRESTCall"> <http:request-builder> <http:query-param paramName="Take" value="5"/> </http:request-builder>...

Wiretap router versus Async scope

mule,mule-studio
Based on my understanding of the Wire Tap router (scroll to bottom of the link) and the Async scope, I think there is significant overlap in the functionality that they both provide. Similarities Both create a copy of the message and send it across to MP's The original flow continues...

Roll back exception strategy for Mule request response VM

exception,jms,mule,rollback
I am using mule request response VM and need the rollback messages to be reprocessed by VM in case of some exceptions, say connection issues. However, the rollback exception strategy does not appear to work when I use exchange pattern as request response for VM. The reason I used request...

Mule:Retrieving object store in an MEL in Mule 3.5

mule,mule-studio,mule-component,mule-el
Having a requirement to test a object store whether it contains a key or not in a choice router <objectstore:config name="storeDownload" doc:name="ObjectStore" persistent="false" partition="test"/> <choice> <when expression="#[app.registry.storeDownload.contains('#[flowVars.startKey]').equals('false')]"> Getting an error 1. Expression Evaluator "registry" with expression "ON" returned null but a value was required. (org.mule.api.expression.ExpressionRuntimeException) org.mule.expression.RegistryExpressionEvaluator:101...

How to write Mule console output in a Text File

mule,esb
How to write a Mule Console Output to a text file. i am not able to see the full console output for big batch runs.

Data Transformation in Mule ESB

mule,datamapper
My Mule flow query a Database and inserts the data queried in Salesforce. One of the column in DB has values say 'C','P'&'U' this needs to be inserted into a picklist in Salesforce which has values 'Company', 'Person', 'Unknown' where C should map to Company and P to Person etc....

Mule ESB 3.6 Object To XML not working correctly after Database Connector

xml,mule,mule-studio
I'm new to Mule ESB (3.6) and was testing out a simple flow to retrieve records from a MS SQL Server Express DB and convert results to XML using the 'Object to XML' Transformer. The 'Customer' table only has 2 rows and my query is just returning all fields in...

Mule ESB Server 3.6.1 - HTTP Component URI Params via GET method to Java Component

mule
I am new to Mule ESB... Using Anypoint Studio, how will I be able to access a HTTP GET params in a Java Component? An example would be great!

Payload class type changes when exiting from sub-flow

mule
I am playing around with example on the mulesoft portal, I see some weird behavior when using sub-flows in this example. The Payload class type changes when exiting from sub-flow. The interesting section is below <sub-flow name="Samsung_SubFlow"> <data-mapper:transform config-ref="OrderIrem_To_OrderRequest" doc:name="OrderItem To OrderRequest"/> <http:request config-ref="HTTP_Request_Configuration" path="samsung/orders" method="POST" port="9090" doc:name="samsung/orders"/> --> <flow-ref...

How to add namespaces and prefixes to elements using Groovy Markup Builder

xml,soap,groovy,mule
I am using Mule ESB to convert an input JSON to an XML to be sent to a SOAP webservice. I am able to build the structure and add namespace to the root element but my XML output that my SOAP needs is quite precise and asks for prefixes and...

Mule: Key of a map contained in a spring bean to be constructed at runtime by concatenating from flowvar and a property in MEL

mule,mule-studio,mule-component,mule-el
Having a hashmap in a spring bean(detail) whose keys at runtime are to be constructed using a concatenation of flowVars (msVendorCode) and a property read from a property file(QUEUENAME & QUEUEROUTINGKEY) <amqp:outbound-endpoint exchangeName="${QUEUEEXCHANGE}" queueName="#{detail.vendor['#[flowVars.msVendorCode]' + '${QUEUENAME}']}" connector-ref="vendorConnector" routingKey="#{detail.vendor['#[flowVars.msVendorCode]' + '${QUEUEROUTINGKEY}']}" doc:name="AMQP" /> How can i at runtime construct a map...

Using Arraylist in Mule to query Salesforce

java,salesforce,mule,esb
We are trying to query Salesforce with an ArrayList in the where statement. Below is is the error we ran into when we tried using the ArrayList in the where clause. Query we used against Salesforce: Select Id,Billing_Number__c from Call_Log__c where Id in #[flowVars.successlist] successlist contains the values ['a1o90000001msXwAAI', 'a1o90000001msXxAAI']....

Which mule transports does the re-connection strategy work with

mule
The reconnection strategies documentation only uses JMS examples, however the FTP transport documentation does state the use of re-connection strategies, without any details or examples though. Further if you look at this answer @David mentions that re-connection will work with only some transports (connected transport). So my first question --...

Bug: Mule xpath3 transform gets transformed namespaces wrong in edge-case

xml,xpath,mule
When XML which contains the XMLSchema namespace xmlns:xs="http://www.w3.org/2001/XMLSchema" but only utilised within an XMLSchema-instance xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" such as: <nsp:Value xsi:type="xs:int">1</nsp:Value> is transformed using xpath3 such as: #[xpath3('//nsp:Configuration', message.payload, 'NODESET')] then the XMLSchema namespace definition will not be added to the outgoing XML. All other namespace definitions will be added fine, but...

getting file from sfdc with mule

salesforce,mule
I need to get file from sfdc and send it to ftp server. I am using mulesoft to connect sfdc. I have seen below docs in sfdc, but this is like getting content and do mapping and convert to file. Instead of this, I need to get file directly from...

How does Mule API Console work?

javascript,api,mule,esb
Does anyone know where the web content of the API Console is located - I would expect the css, html and js to be bundled in the app... however I can't seem to find it anywhere!! Where does the api console get these files from?

Insert Arraylist in Database in Mule

arraylist,mule,esb
I am trying to insert the contents of an ArrayList to a SQL Server database using Mule ESB. The ArrayList looks like [ {Id=a1o90000001muvWAAQ, Billing_Number__c=1000005, type=Call_Log__c}, {Id=a1o90000001muvXAAQ, Billing_Number__c=1000006, type=Call_Log__c} ] How should I insert this into the database in an optimized way? My mule flow is as below. <sfdc:query config-ref="Salesforce__Basic_authentication"...

Getting Error While Using HTTP on Mule ESB canvas

mule,mule-studio
I am just trying to write a hello world application with help of below video https://www.youtube.com/watch?v=AUfUMXwzu24 I have just used HTTP from pallet and it is giving me below error "Required attribute config-ref is not defined in listener" in Anypoint studio it is showing error in below line <http:listener config-ref=""...

FunctionalTestCase Mule 3.6.0

unit-testing,mule
I'm migrating my FunctionalTestCase from Mule 3.5.0 to Mule 3.6.0, when I try to post a json like: Map properties = new HashMap(); properties.put("Content-Type", "application/json"); properties.put("http.method", "POST"); muleMessage.addProperties(properties, PropertyScope.OUTBOUND); AbstractMuleContextTestCase.muleContext.getClient().send(url, muleMessage); I always get NullPayload in the flow that I'm testing, how it's the proper way to do a post...

How to convert Date String to Calendar Date using Groovy in MarkupBuilder?

java,date,groovy,mule
I am trying to convert a Date (String) like this 2015-03-26 15:26:38 to a Calendar Date like this: 2015-03-26T15:26:38.000Z to Send to a SOAP webservice. I am in Mule ESB and using the Groovy Markup builder to convert JSON to XML and the date format is all I am missing....

Mule:Assigning objectstore variable value to a flowVar

mule,mule-studio,mule-component,mule-el
I have to maintain a count of messages (processing various different type of messages) that are processed in a flow. Using mule object store extension for this purpose <objectstore:config name="storeDownLoad" doc:name="ObjectStore"/> <objectstore:store key="countA" value-ref="3" config-ref="storeDownLoad" /> How can i add one for each key value and reassign it to object...

how to retrieve particular xml element in mule

mule
<splitter evaluator="xpath" expression="/productdata/productsList" doc:name="Splitter"/> <transformer ref="domToXml" doc:name="Transformer Reference"/> <logger level="INFO" doc:name="Logger" message=" productsList...#[message.payload]" /> i have input xml data as below . I want to display all productname.above code doesn't. any help appreciated. <productdata> <productsList> <product> <productid>100</productid> <productname>handbag</productname>...

How to access Mule flow variables in java code?

java,mule,mule-el
Browsing around, I found something that look like below: import org.mule.api.MuleMessage; import org.mule.api.transformer.TransformerException; import org.mule.transformer.AbstractMessageTransformer; import java.util.Scanner; public class javaTest extends AbstractMessageTransformer{ public Object transformMessage(MuleMessage message, String outputEncoding) throws TransformerException{ message.getInvocationProperty("test"); return message; } } I am using this code, where message is a Mule flow variable that I just...

Application is deployed on cloudhub but can't reach it

deployment,mule,cloudhub
I've deployed my application on cloudhub.io after testing in on my local machine. The log says the application has been successfully deployed and is running as it should, but when i try to use it, i get a page that says : If you deployed your application and expected to...

request-reply scope versus request-reponse exchange pattern

mule,messaging
I am trying to understand a use case for the request-reply scope when would this be preferred over request-response exchange pattern ?, especially if the underlying transport is JMS, I am guessing using the exchange pattern or the scope will do exactly the same things internally and functionally from a...

Using multiple MEL expressions in Set payload

mule,mel
Trying to wrap my head around MEL and so running through a few examples. I am trying to evaluate multiple MEL expressions as part of the Set Payload component and looks like only the last expression is evaluated by mule. My flow looks like the below <flow name="dummysoapFlow"> <http:listener config-ref="DummyHttp"...

get value from request header in http call -mule

mule,mule-studio,mule-el,mule-component,mule-module-jpa
I am developing a mule application. My start point is http. I need to authenticate my http calls using an authentication token which I am sending as request header. Now, How do I get this request header value in my Mule application?