Adam Causey
2012-01-26 20:34:06 UTC
I am trying to take a simple object and have it transformed to JSON format and read over a URL. Here is what I have in my config file, but all it does when I go to the URL is print out a slash (/)... any ideas what I need to do to get the JSON printed?
<json:object-to-json-transformer name="objToJson"
sourceClass="org.mule.TestMe" />
<flow name="jsonTest">
<inbound-endpoint address="http://localhost:9002" exchange-pattern="request-response">
<transformer ref="objToJson" />
</inbound-endpoint>
<echo-component />
</flow>
package org.mule;
public class TestMe {
public String getTest1() {
return "test1";
}
public void setTest1(String test1) {
}
public String getTest2() {
return "test2";
}
public void setTest2(String test2) {
}
}
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
<json:object-to-json-transformer name="objToJson"
sourceClass="org.mule.TestMe" />
<flow name="jsonTest">
<inbound-endpoint address="http://localhost:9002" exchange-pattern="request-response">
<transformer ref="objToJson" />
</inbound-endpoint>
<echo-component />
</flow>
package org.mule;
public class TestMe {
public String getTest1() {
return "test1";
}
public void setTest1(String test1) {
}
public String getTest2() {
return "test2";
}
public void setTest2(String test2) {
}
}
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email