Mariano Capurro
2012-06-27 12:15:34 UTC
Hi
<br /><br />
can you please share if you are getting exceptions or provide more details on your problem?
<br /><br />
I guess that you need to build the Java Transformers. To do so, create a class that extends org.mule.transformer.AbstractMessageTransformer. You will need to implement the method:
<br /><br />
<code>
<br />
public Object transformMessage(MuleMessage message, String outputEncoding) throws TransformerException
<br />
{
<br /><br />
}
<br />
</code>
<br /><br />
The object MuleMessage has all the methods to access your properties and mainly the message payload. The returned object will be the payload used to answer back.
<br /><br />
You can also define what is the type of the payload you accept in the constructor of your transformer and your return type:
<br /><br />
<code>
<br />
public MyTransformer() {
<br />
this.registerSourceType(DataTypeFactory.create(MyInputClass.class));
<br />
this.setReturnDataType(DataTypeFactory.create(MyOutputClass.class));
<br />
}
<br />
</code>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
<br /><br />
can you please share if you are getting exceptions or provide more details on your problem?
<br /><br />
I guess that you need to build the Java Transformers. To do so, create a class that extends org.mule.transformer.AbstractMessageTransformer. You will need to implement the method:
<br /><br />
<code>
<br />
public Object transformMessage(MuleMessage message, String outputEncoding) throws TransformerException
<br />
{
<br /><br />
}
<br />
</code>
<br /><br />
The object MuleMessage has all the methods to access your properties and mainly the message payload. The returned object will be the payload used to answer back.
<br /><br />
You can also define what is the type of the payload you accept in the constructor of your transformer and your return type:
<br /><br />
<code>
<br />
public MyTransformer() {
<br />
this.registerSourceType(DataTypeFactory.create(MyInputClass.class));
<br />
this.setReturnDataType(DataTypeFactory.create(MyOutputClass.class));
<br />
}
<br />
</code>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email