How to convert SFTP byte payload to java in dataweave - java

I am trying to convert SFTP byte payload to java using dataweave so I can loop through the input records using an existing flow. How do I do this?
I have set it to java in Dataweave and preview shoulds the correct output but when I run it it is a byte and I transform to e.g. String before the Transform message connector it remains as a string after the transform message connector too.
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml" xmlns:ftp="http://www.mulesoft.org/schema/mule/ftp" xmlns:metadata="http://www.mulesoft.org/schema/mule/metadata" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:dw="http://www.mulesoft.org/schema/mule/ee/dw" xmlns:sftp="http://www.mulesoft.org/schema/mule/sftp" xmlns:batch="http://www.mulesoft.org/schema/mule/batch" 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"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/sftp http://www.mulesoft.org/schema/mule/sftp/current/mule-sftp.xsd
http://www.mulesoft.org/schema/mule/batch http://www.mulesoft.org/schema/mule/batch/current/mule-batch.xsd
http://www.mulesoft.org/schema/mule/ee/ftp http://www.mulesoft.org/schema/mule/ee/ftp/current/mule-ftp-ee.xsd
http://www.mulesoft.org/schema/mule/ee/dw http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ftp http://www.mulesoft.org/schema/mule/ftp/current/mule-ftp.xsd
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/current/mule-xml.xsd">
<http:request-config name="HTTP_Request_Configuration" host="${host}" port="${userprocess.port}" doc:name="HTTP Request Configuration"></http:request-config>
<sftp:connector name="SFTP" validateConnections="true" doc:name="SFTP" pollingFrequency="1000000"/>
<flow name="userexperienceFlow" >
<sftp:inbound-endpoint connector-ref="SFTP" host="localhost" port="2222" path="//input" user="${ftp.user}" password="${ftp.password}" responseTimeout="10000" doc:name="SFTP"/>
<dw:transform-message doc:name="Transform Message">
<dw:set-payload><![CDATA[%dw 1.0
%output application/java
---
payload]]></dw:set-payload>
</dw:transform-message>
<logger level="INFO" doc:name="Logger"/>
<sftp:outbound-endpoint exchange-pattern="one-way" host="localhost" port="2222" responseTimeout="10000" doc:name="SFTP" connector-ref="SFTP" password="${ftp.password}" path="//output" user="${ftp.user}" outputPattern="#[message.inboundProperties.originalFilename+'.processed']"/>
</flow>
</mule>
CSV file
UserId,UserStatus
ON1234,active
ON1235,active
Thanks

try to log message as #[message.payloadAs(java.lang.String)] instead of #[payload].
Also add <dw:input-payload mimeType="application/csv" /> line before this <dw:set-payload>
Hope this helps.

Related

What does "The prefix "vm" for element "vm:endpoint" is not bound." means and how to solve it?

I am trying to integrate mule with drools, I have mainly followed the tutorial here but I am getting this error :
"The prefix "vm" for element "vm:endpoint" is not bound."
can anyone help me solve this problem?
following is my .drl file and mule flow files.
<?xml version="1.0" encoding="UTF-8"?>
<mule
xmlns:bpm="http://www.mulesoft.org/schema/mule/bpm"
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"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
http://www.mulesoft.org/schema/mule/bpm http://www.mulesoft.org/schema/mule/bpm/3.6/mule-bpm.xsd">
<http:listener-config name="HTTP_Listener_Configuration"
host="localhost" port="8084" doc:name="HTTP Listener Configuration" />
<spring:beans>
<spring:bean id="dto" class="com.hamgam.hit.esb.XMLDTO" scope="singleton" />
<spring:bean id="dto-convertor" class="com.hamgam.hit.esb.XMLToDTO" scope="singleton" />
<spring:bean id="rule-convertor" class="com.hamgam.hit.esb.RuleXMLToDRL" scope="singleton" />
</spring:beans>
<bpm:drools />
<flow name="basic_tutorialFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/{name}" doc:name="HTTP" />
<vm:endpoint name = "emc" path="drool.msg" />
<set-variable variableName="name" value="#[message.inboundProperties['http.uri.params']['name']]" />
<set-variable variableName="msg" value="#[payload]"/>
<logger level="DEBUG" doc:name="Logger" message="Current path is flowVars['name']" />
<expression-component>
app.registry['dto'] = app.registry['dto-convertor'].convert(flowVars['name']);
</expression-component>
<bpm:rules rulesDefinition="rule.drl" cepMode="true" initialFacts-ref="dto" entryPoint="XMLDTO stream" />
<choice doc:name="Choice">
<when expression="#[flowVars.emc == 'KeyValueMatched']">
<set-payload doc:name="Set Payload" value="#['KeyValueMatched! You are with us on 8084. ' + flowVars['name'] + '. Today is ' + server.dateTime.format('dd/MM/yy') + '.' ]" />
</when>
<otherwise>
<set-payload doc:name="Set Payload" value="#['Nothing! You are with us on 8084. ' + flowVars['name'] + '. Today is ' + server.dateTime.format('dd/MM/yy') + '.' ]" />
</otherwise>
</choice>
</flow>
</mule>
and the drl file :
global org.mule.module.bpm.MessageService mule;
import com.me.mit.esb.*;
rule "La Vita Ebela"
dialect "mvel"
when
$x:XMLDTO( inputXML == "inputXML" )
then
mule.generateMessage("emc", "KeyValueMatched", null, MessageExchangePattern.ONE_WAY);
end
You have to add XML namespache and scema reference to your xml file:
XML namespace:
xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
XML Schema Location:
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.6/mule-vm.xsd
So it looks like so:
<mule
xmlns:bpm="http://www.mulesoft.org/schema/mule/bpm"
xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
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"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
http://www.mulesoft.org/schema/mule/bpm http://www.mulesoft.org/schema/mule/bpm/3.6/mule-bpm.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.6/mule-vm.xsd
">
Replase vm:endpoint by vm:inbound-endpoint. As Jens said, add vm schema to your mule-config. And don't forget to include mule-transports-vm-3.6.0.jar to your test classpath.

Facing "unqualified type in strict mode for: MessageExchangePattern" while trying to integrate Mule with Drools

i am trying to integrate mule with drools, i have mainly followed the tutorial here but i am getting this error :
(1,22) unqualified type in strict mode for: MessageExchangePattern
(1,30) unqualified type in strict mode for: ONE_WAY '
it seems impossible to find the solution to me, can any one help me? thanks.
this is my .drl file :
global org.mule.module.bpm.MessageService mule;
import com.hamgam.hit.esb.*;
rule "La Vita Ebela"
dialect "mvel"
when
$x:XMLDTO( inputXML == "inputXML" )
then
mule.generateMessage("emc", "KeyValueMatched", null, MessageExchangePattern.ONE_WAY);
end
and this is mules flow :
<?xml version="1.0" encoding="UTF-8"?>
<mule
xmlns:bpm="http://www.mulesoft.org/schema/mule/bpm"
xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
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"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
http://www.mulesoft.org/schema/mule/bpm http://www.mulesoft.org/schema/mule/bpm/3.6/mule-bpm.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.6/mule-vm.xsd ">
<http:listener-config name="HTTP_Listener_Configuration"
host="localhost" port="8084" doc:name="HTTP Listener Configuration" />
<spring:beans>
<spring:bean id="dto" class="com.hamgam.hit.esb.XMLDTO" scope="singleton" />
<spring:bean id="dto-convertor" class="com.hamgam.hit.esb.XMLToDTO" scope="singleton" />
<spring:bean id="rule-convertor" class="com.hamgam.hit.esb.RuleXMLToDRL" scope="singleton" />
</spring:beans>
<bpm:drools />
<flow name="basic_tutorialFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/{name}" doc:name="HTTP" />
<vm:endpoint name = "emc" path="drool.msg" />
<set-variable variableName="name" value="#[message.inboundProperties['http.uri.params']['name']]" />
<set-variable variableName="msg" value="#[payload]"/>
<logger level="DEBUG" doc:name="Logger" message="Current path is flowVars['name']" />
<expression-component>
app.registry['dto'] = app.registry['dto-convertor'].convert(flowVars['name']);
</expression-component>
<bpm:rules rulesDefinition="rule.drl" cepMode="true" initialFacts-ref="dto" entryPoint="XMLDTO stream" />
<choice doc:name="Choice">
<when expression="#[flowVars.emc == 'KeyValueMatched']">
<set-payload doc:name="Set Payload" value="#['KeyValueMatched! You are with us on 8084. ' + flowVars['name'] + '. Today is ' + server.dateTime.format('dd/MM/yy') + '.' ]" />
</when>
<otherwise>
<set-payload doc:name="Set Payload" value="#['Nothing! You are with us on 8084. ' + flowVars['name'] + '. Today is ' + server.dateTime.format('dd/MM/yy') + '.' ]" />
</otherwise>
</choice>
</flow>
</mule>
You need to:
import org.mule.MessageExchangePattern
Otherwise your Drools MVEL script will have no idea what MessageExchangePattern.ONE_WAY is.

Obtaining Mule Variable Values in Java

In Mule 3.4, how do I obtain the value of the Mule variable set from the "set-variable" tag in Java? Also how do I obtain values of Mule variables in different flows such as counter in flow1 and prevCounter in flow2? I can't find this on Mule's website.
Below is the Mule XML:
<mule xmlns:smtp="http://www.mulesoft.org/schema/mule/smtp" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:mongo="http://www.mulesoft.org/schema/mule/mongo" xmlns:quartz="http://www.mulesoft.org/schema/mule/quartz" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:core="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/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd
http://www.mulesoft.org/schema/mule/mongo http://www.mulesoft.org/schema/mule/mongo/2.0/mule-mongo.xsd
http://www.mulesoft.org/schema/mule/quartz http://www.mulesoft.org/schema/mule/quartz/current/mule-quartz.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
http://www.mulesoft.org/schema/mule/smtp http://www.mulesoft.org/schema/mule/smtp/current/mule-smtp.xsd">
<quartz:connector name="Quartz3" validateConnections="true" doc:name="Quartz"/>
<flow name="flow1" doc:name="flow1">
<set-variable variableName="#['counter']" value="#[0]" doc:name="Variable"/>
<flow-ref name="flow2" doc:name="Flow Reference"/>
</flow>
<flow name="flow2" doc:name="flow2">
<logger level="INFO" doc:name="Logger"/>
<set-variable variableName="prevCounter" value="#[flowVars['counter']]" doc:name="Variable"/>
<set-variable variableName="counter" value="#[flowVars['counter']+1]" doc:name="Variable"/>
<choice doc:name="Choice">
<when expression="#[flowVars['counter']==5]">
<logger level="INFO" doc:name="Logger"/>
</when>
<otherwise>
<flow-ref name="flow2" doc:name="Flow Reference"/>
</otherwise>
</choice>
</flow>
</mule>
You can get them from the Mule message with message.getInvocationProperty('counter').
Flow variables exist only during the flow of a message, so you can only access what was declared before in the same flow (or the flow that calls the current flow like you are doing right there in flow2). If you need them somewhere outside of the flow, you have to send them there from the flow.
Values stored with set-variable can be retrieved with MEL as flowVars['varName'].
Take a look at this:
http://blogs.mulesoft.org/wp-content/uploads/2012/12/refcard-mel.pdf
Please try to create session variable or Flow variable in java and to retrive them in java MEL wont support you should use syntax some thing like message.getInvocationProperty('name') if those are flow variables.

Using XML Transformer in Mule

I currently receive a string message from a queue, The string message contains XML. How do I pick each element and convert to a POJO. This is the content of my queue
<MsgContent>
<MsgHeader>
<code>1010</code>
</MsgHeader>
<MsgBody>
<value>fundstransfer</value>
</MsgBody>
</MsgContent>
I want to be able to get the values of the two keys(code and value)
This is my mule configuration xml
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml" xmlns:data- mapper="http://www.mulesoft.org/schema/mule/ee/data-mapper" xmlns:xm="http://www.mulesoft.org/schema/mule/xml" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:jms="http://www.mulesoft.org/schema/mule/jms" 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.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/current/mule-xml.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/current/mule-jms.xsd
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ee/data-mapper http://www.mulesoft.org/schema/mule/ee/data-mapper/current/mule-data-mapper.xsd">
<jms:activemq-connector name="Active_MQ" brokerURL="tcp://localhost:61616" validateConnections="true" doc:name="Active MQ"/>
<mulexml:jaxb-context name="myJaxb" doc:name="myJaxb" packageNames="com.test.jaxb" />
<flow name="JMSMessageFlow1" doc:name="JMSMessageFlow1">
<jms:inbound-endpoint queue="StudioIns" connector-ref="Active_MQ" doc:name="JMS" />
<custom-transformer class="org.mule.module.xml.transformer.XmlToXMLStreamReader" />
<mulexml:jaxb-xml-to-object-transformer jaxbContext-ref="myJaxb" returnClass="com.test.jaxb.MsgContent"/>
<component class="com.test.HelloMessage" doc:name="Java"/>
<file:outbound-endpoint path="D:\Documents\MuleStudio\workspace\jmsmessage\src\main\java\com\test" outputPattern="output.csv" responseTimeout="10000" doc:name="File"/>
</flow>
But still can't retrieve the objects
You can't use the xml namespace for this, it's reserved. People typically use xm or mulexml.
For example:
xmlns:xm="http://www.mulesoft.org/schema/mule/xml"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/current/mule-xml.xsd"
...
<xm:xml-to-object-transformer />
In my app i have a xml declaring all the transformers i need to use so that i just reference them on my flows. See below. (You dont need to use iso-8859-1). This one considers you intend to use JAXB to bind the XML to POJO.
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mxml="http://www.mulesoft.org/schema/mule/xml"
xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
xmlns:spring="http://www.springframework.org/schema/beans"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.2/mule.xsd
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/3.2/mule-xml.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.1/mule-vm.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<mxml:jaxb-context
name="jaxb-context"
packageNames="my.package.v1:my.package.v2:soap.package" />
<mxml:jaxb-xml-to-object-transformer
name="xml-to-object"
encoding="ISO-8859-1"
jaxbContext-ref="jaxb-context"
ignoreBadInput="true" />
<mxml:jaxb-object-to-xml-transformer
name="object-to-xml"
encoding="ISO-8859-1"
jaxbContext-ref="jaxb-context"
returnClass="java.lang.String"
ignoreBadInput="true" />
<byte-array-to-string-transformer
name="byte-array-to-string"
encoding="ISO-8859-1"
returnClass="java.lang.String" />
<string-to-byte-array-transformer
name="string-to-byte-array"
encoding="ISO-8859-1"
returnClass="byte[]" />
<custom-transformer
name="xml-to-xml-stream-reader"
class="org.mule.module.xml.transformer.XmlToXMLStreamReader" />
<object-to-string-transformer name="object-to-string" />
<flow name="ByteArrayToObjectXml">
<vm:inbound-endpoint
path="myapp/conversor/byte-array-to-object-xml"
exchange-pattern="request-response" />
<transformer ref="byte-array-to-string" />
<transformer ref="xml-to-object" />
</flow>
I have resolved it now. The major issue is that one must have a valid and correct JAXB Binding Class. Thanks all

Embedding Restlets in Mule can't work in Mule 3.1.2

I configure a flow in mule-config.xml based on the documentation(click here). Here is the content in mule-config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:tcp="http://www.mulesoft.org/schema/mule/tcp"
xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf"
xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:restlet="http://www.mulesource.org/schema/mule/restlet"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.1/mule.xsd
http://www.mulesoft.org/schema/mule/tcp http://www.mulesoft.org/schema/mule/tcp/3.1/mule-tcp.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.1/mule-vm.xsd
http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/3.1/mule-cxf.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.1/mule-http.xsd
http://www.mulesoft.org/schema/mule/restlet http://www.mulesoft.org/schema/mule/restlet/3.1/mule-restlet.xsd">
<description>
This configuration uses an HTTP endpoint to receive requests.
</description>
<flow name="fuxk">
<inbound-endpoint address="http://localhost:9002">
</inbound-endpoint>
<restlet:component restlet-ref="helloWorld"/>
</flow>
<spring:bean id="helloWorld" class="com.ggd543.mulerestletdemo.HelloWorldApplication"/>
</mule>
This configuration uses an HTTP endpoint to receive requests.But when I start up the mule instance , I got the following error:
It seams that the documentation is based on mule 2.x . How do I change the configuration in mule-config.xml for Mule 3.1.2 ?
Replace mulesource.org with mulesoft.org in all your Restlet namespace definitions.

Categories

Resources