...
Code Block |
---|
|
{"array":[1,2]} |
XML (RJsonStreamBuilder):
Code Block |
---|
|
<jsonObject>
<array>1</array>
<array>2</array>
</jsonObject> |
XML (JsonBuilder):
Code Block |
---|
|
<jsonObject>
<?xml-multiple array?>
<array>1</array>
<array>2</array>
</jsonObject> |
...
XML (RJsonStreamBuilder):
Code Block |
---|
|
<jsonObject></jsonObject> |
XML (JsonBuilder):
Code Block |
---|
|
<jsonObject>
<?xml-multiple array?>
</jsonObject> |
...
XML (RJsonStreamBuilder):
Code Block |
---|
|
<jsonArray>
<jsonElement>1</jsonElement>
<jsonElement>2</jsonElement>
</jsonArray> |
XML (JsonBuilder):
Code Block |
---|
|
<jsonArray>
<?xml-multiple jsonElement?>
<jsonElement>1</jsonElement>
<jsonElement>2</jsonElement>
</jsonArray> |
...
XML (RJsonStreamBuilder):
Code Block |
---|
|
<jsonArray>
<jsonElement>1</jsonElement>
<jsonElement>
<jsonArray></jsonArray>
</jsonElement>
</jsonArray> |
XML (JsonBuilder):
Code Block |
---|
|
<jsonArray>
<?xml-multiple jsonElement?>
<jsonElement>1</jsonElement>
<jsonElement>
<jsonArray>
<?xml-multiple jsonElement?>
</jsonArray>
</jsonElement>
</jsonArray> |
...
Code Block |
---|
language | html/xml |
---|
linenumbers | true |
---|
|
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="singleresponse"
transports="https,http"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<outSequence>
<payloadFactory media-type="json">
<format>{
"location_response" : {
"name" : "$1",
"tags" : $2
}}
</format>
<args>
<arg evaluator="json" expression="$.name"/>
<arg evaluator="json" expression="$.types"/>
</args>
</payloadFactory>
<send/>
</outSequence>
<endpoint>
<address uri="http://localhost:828018280/location"/>
</endpoint>
</target>
<description/>
</proxy> |
...
Code Block |
---|
language | html/xml |
---|
linenumbers | true |
---|
|
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="locations"
transports="https,http"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<outSequence>
<script language="js"
key="conf:/repository/esb/transform.js"
function="transform"/>
<send/>
</outSequence>
<endpoint>
<address uri="http://localhost:828018280/locations"/>
</endpoint>
</target>
<description/>
</proxy> |
...
For additional examples that demonstrate different ways to manipulate JSON payloads within the ESB mediation flow, see the following samples:
...
Anchor |
---|
| troubleshooting |
---|
| troubleshooting |
---|
|
...