mule-esb

How to fix “AttributeError: 'module' object has no attribute 'SOL_UDP'” error in Python Connector Mule

流过昼夜 提交于 2021-02-19 08:45:44
问题 I'm trying to execute a basic script to return Cisco Config File as a JSON Format, and I have a success process over Python2.7.16 and Python 3.7.3, but when I'm trying to execute the same script over Python Connector for Mule ESB I receive the error refered in the title of this thread. This is for a Mule feature, the Python connector script in this tool, works with a Jython 2.7.1, and is loaded as a library for the Mule. I expect the output as a JSON file but actual output is: Root Exception

How to pass Java object to a Java function in mule

醉酒当歌 提交于 2020-01-14 03:41:13
问题 I am trying to invoke a java function in mule.I converted the payload into the Object and passed it in the function. The name of the Java object created is req . The method validate accepts a Java Object Of type Example public HashMap<String, String> validate(Example req) {.......} Example class looks like this: Class Example{ String key1; String key2; String key3; } XML configuration looks like this : <java:new constructor="Example(java.lang.String,java.lang.String,java.lang.String)" doc

Getting Response 404 while posting JSON payload to POST Rest API

烈酒焚心 提交于 2020-01-06 05:57:26
问题 I'm trying to post a JSON payload to a Public POST Rest API in MuleESB but I'm getting this error: org.mule.module.http.internal.request.ResponseValidatorException: Response code 404 mapped as failure. I'm able to call the API with JSON body via Postman Chrome App, but not via Postman Desktop App or MuleESB. I've Google-ing around in the past 2 days but still have no clue what I'm missing. Please enlighten me if you have a clue what caused this not to work. This is the JSON payload: {

How to access the payload when implementing the validator interface?

☆樱花仙子☆ 提交于 2020-01-03 01:58:06
问题 I have to validate the incoming json payload and throw custom errors if the json is not valid. I tried implementing the validator interface as shown in the above image. But how should I access the payload now?In earlier versions the method accepted a mule event through which we could easily get the payload: public interface Validator { /** * Performs the validation and generates a * {@link ValidationResult} back. * * @param event the current {@link MuleEvent} * @return a {@link

How do you accumulate values within a ForEach loop in Mule?

一世执手 提交于 2019-12-25 03:32:14
问题 I have the below json output: { "results": [ { "ID": "1", "ImageID": "2", "Name": "Test1", "Owner": "sysadmin", "Author": "sysadmin", "Creator": "sysadmin" }, { "ID": "2", "ImageID": "23", "Name": "Test2", "Owner": "sysadmin", "Author": "sysadmin", "Creator": "sysadmin" } ] } For each ID in above response, i need to invoke the rest service passing ID as a parameter and the rest service will send me a response back. I have to consolidate all the output into a single json response in mule. I

How do you accumulate values within a ForEach loop in Mule?

只愿长相守 提交于 2019-12-25 03:32:01
问题 I have the below json output: { "results": [ { "ID": "1", "ImageID": "2", "Name": "Test1", "Owner": "sysadmin", "Author": "sysadmin", "Creator": "sysadmin" }, { "ID": "2", "ImageID": "23", "Name": "Test2", "Owner": "sysadmin", "Author": "sysadmin", "Creator": "sysadmin" } ] } For each ID in above response, i need to invoke the rest service passing ID as a parameter and the rest service will send me a response back. I have to consolidate all the output into a single json response in mule. I

Anypoint Studio 7.1 start-up error

我与影子孤独终老i 提交于 2019-12-22 06:43:34
问题 I am trying to experiment with Mule Runtime 4 & Anypoint Studio 7.1. I got the downloadable from - https://mule-studio.s3.amazonaws.com/7.1.1-GA/AnypointStudio-for-win-64bit-7.1.1-201803182216.zip while starting up AnypointStudio.exe, I keep getting the error message - A JDK must be installed in order to run Anypoint Studio. Please install a JDK and try again. But I do the required version of JDK installed in my machine, as per https://docs.mulesoft.com/anypoint-studio/v/7.1/faq-jdk

Issue writing file to sftp - carriage return removed

馋奶兔 提交于 2019-12-13 20:28:20
问题 I have a simple requirement where i have to write a csv to linux sftp . In the current implementation Which I have done CR-'carriage return' is being removed when writting the csv to sftp using mulesoft sftp connector . I have set encoding=US-ASCII on the sftp connector , in the dataweave , even in the property file as mule.encoding=US-ASCII. Nothing seems like working in cloud hub , but surprisingly the same works fine in my local . I understand after reading few blogs/ white papers that

Aggregate two payloads in Mule ESB

我的未来我决定 提交于 2019-12-13 07:36:10
问题 My mule code is hitting two tables and getting some details. First one is order details, which I am storing in a flow variable i.e order and another database is returning order item details which I am storing in orderitem variable. I want to aggregate both the payload based on one condition. Every orderId has order items (which is stored in flowVars.orderitem) and map these order items to respective orderID. flowVars.order value is as below [{partnerId=e83185e9f33e4234ba9eaa81dba515ad,

Mule ESB How to implement a counter variable to count how much times a flow is called

流过昼夜 提交于 2019-12-13 03:56:41
问题 I am wordering about how to implement a counter which is will increase 1 step when flow is called. For example: I have a flow named: http://localhost:8080/doSomething and a variable counter. The counter variable will increase by 1 when I hit enter in doSomething service Many thanks 回答1: You need a persistent storage solution. Variables in Mule do not live across invocations. Mule has a concept of Object Stores: https://docs.mulesoft.com/mule-user-guide/v/3.7/mule-object-stores If you are a