-
Notifications
You must be signed in to change notification settings - Fork 0
/
xml_getgeoipresponse__to_json.grf
71 lines (71 loc) · 6.34 KB
/
xml_getgeoipresponse__to_json.grf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?xml version="1.0" encoding="UTF-8"?>
<Graph __version="3.5.0" author="matiaspentreath" created="Mon Apr 28 12:27:05 GMT-03:00 2014" description="Xml<GetGeoIPResponse> To JSON" guiVersion="3.4.3.P" id="1398718161702" licenseCode="Unlicensed" licenseType="Unknown" modified="Mon Apr 28 12:27:05 GMT-03:00 2014" modifiedBy="matiaspentreath" name="Xml_GetGeoIPResponse__To_JSON" revision="1.0" showComponentDetails="false">
<Global>
<Metadata __index="0" __referenceCounter="1" __sourcePath="{http://www.webservicex.net/=ns0}/ns0:GetGeoIPResponse" _dataStructure="OBJECT" _id="__id" _type="Input" id="c1a1282e-9ad6-47a0-9a9d-0d38c41d8c34">
<Record fieldDelimiter="," name="GetGeoIPResponse" recordDelimiter="\n\\|\r\n\\|\r" type="delimited">
<Field __artificialType="_id" __systemManaged="true" name="__id" type="string"/>
<Field __index="0" __schemaType="{http://www.webservicex.net/}GeoIP" __sourcePath="{http://www.webservicex.net/=ns0}/ns0:GetGeoIPResponse/ns0:GetGeoIPResult/ns0:ReturnCode" containerType="SINGLE" label="ReturnCode" name="ReturnCode" type="integer"/>
<Field __index="1" __schemaType="{http://www.webservicex.net/}GeoIP" __sourcePath="{http://www.webservicex.net/=ns0}/ns0:GetGeoIPResponse/ns0:GetGeoIPResult/ns0:IP" containerType="SINGLE" label="IP" name="IP" type="string"/>
<Field __index="2" __schemaType="{http://www.webservicex.net/}GeoIP" __sourcePath="{http://www.webservicex.net/=ns0}/ns0:GetGeoIPResponse/ns0:GetGeoIPResult/ns0:ReturnCodeDetails" containerType="SINGLE" label="ReturnCodeDetails" name="ReturnCodeDetails" type="string"/>
<Field __index="3" __schemaType="{http://www.webservicex.net/}GeoIP" __sourcePath="{http://www.webservicex.net/=ns0}/ns0:GetGeoIPResponse/ns0:GetGeoIPResult/ns0:CountryName" containerType="SINGLE" label="CountryName" name="CountryName" type="string"/>
<Field __index="4" __schemaType="{http://www.webservicex.net/}GeoIP" __sourcePath="{http://www.webservicex.net/=ns0}/ns0:GetGeoIPResponse/ns0:GetGeoIPResult/ns0:CountryCode" containerType="SINGLE" label="CountryCode" name="CountryCode" type="string"/>
</Record>
</Metadata>
<Metadata __index="0" __referenceCounter="1" __sourcePath="{}/GetGeoIPResponse" _dataStructure="OBJECT" _id="__id" _type="Output" id="7ed63b49-3ccc-478d-bec0-30c77bdde51a">
<Record fieldDelimiter="," name="GetGeoIPResponse" recordDelimiter="\n\\|\r\n\\|\r" type="delimited">
<Field __artificialType="_id" __systemManaged="true" name="__id" type="string"/>
<Field __index="4" __sourcePath="{}/GetGeoIPResponse/GetGeoIPResult/CountryCode" containerType="SINGLE" label="CountryCode" name="CountryCode" type="string"/>
<Field __index="3" __sourcePath="{}/GetGeoIPResponse/GetGeoIPResult/CountryName" containerType="SINGLE" label="CountryName" name="CountryName" type="string"/>
<Field __index="1" __sourcePath="{}/GetGeoIPResponse/GetGeoIPResult/IP" containerType="SINGLE" label="IP" name="IP" type="string"/>
<Field __index="0" __sourcePath="{}/GetGeoIPResponse/GetGeoIPResult/ReturnCode" containerType="SINGLE" label="ReturnCode" name="ReturnCode" type="integer"/>
<Field __index="2" __sourcePath="{}/GetGeoIPResponse/GetGeoIPResult/ReturnCodeDetails" containerType="SINGLE" label="ReturnCodeDetails" name="ReturnCodeDetails" type="string"/>
</Record>
</Metadata>
<Dictionary>
<Entry id="DictionaryEntry0" input="true" name="inputPayload" output="false" type="object"/>
<Entry id="DictionaryEntry1" input="false" name="outputPayload" output="true" type="object"/>
</Dictionary>
</Global>
<Phase number="0">
<Node enabled="enabled" guiName="Foreach 'ns0:GetGeoIPResponse' -> 'GetGeoIPResponse'" guiX="460" guiY="20" id="FOREACH_NS0_GET_GEO_IPRESPONSE_GET_GEO_IPRESPONSE" transformClass="com.mulesoft.datamapper.transform.MelRecordTransform" type="REFORMAT">
<attr name="melScript"><![CDATA[//MEL
//START -> DO NOT REMOVE
output.__id = input.__id;
//END -> DO NOT REMOVE
output.ReturnCode = input.ReturnCode;
output.IP = input.IP;
output.ReturnCodeDetails = input.ReturnCodeDetails;
output.CountryName = input.CountryName;
output.CountryCode = input.CountryCode;
]]></attr>
</Node>
<Node cacheInMemory="true" charset="UTF-8" enabled="enabled" fileURL="dict:outputPayload" guiName="JSON WRITER" guiX="900" guiY="20" id="JSON_WRITER0" type="JSON_WRITER">
<attr name="mapping"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<GetGeoIPResponse xmlns:clover="http://www.cloveretl.com/ns/xmlmapping" clover:inPort="0">
<GetGeoIPResult>
<ReturnCode>$0.ReturnCode</ReturnCode>
<IP>$0.IP</IP>
<ReturnCodeDetails>$0.ReturnCodeDetails</ReturnCodeDetails>
<CountryName>$0.CountryName</CountryName>
<CountryCode>$0.CountryCode</CountryCode>
</GetGeoIPResult>
</GetGeoIPResponse>]]></attr>
<attr name="_data_format"><![CDATA[JSON]]></attr>
</Node>
<Node charset="UTF-8" enabled="enabled" fileURL="dict:inputPayload" guiName="XML READER" guiX="20" guiY="20" id="XML_READER0" type="XML_READER">
<attr name="mapping"><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Context namespacePaths="ns0="http://www.webservicex.net/"" outPort="0" sequenceField="__id" xpath="/ns0:GetGeoIPResponse">
<Mapping cloverField="ReturnCode" namespacePaths="ns0="http://www.webservicex.net/"" trim="true" xpath="ns0:GetGeoIPResult/ns0:ReturnCode"/>
<Mapping cloverField="IP" namespacePaths="ns0="http://www.webservicex.net/"" trim="true" xpath="ns0:GetGeoIPResult/ns0:IP"/>
<Mapping cloverField="ReturnCodeDetails" namespacePaths="ns0="http://www.webservicex.net/"" trim="true" xpath="ns0:GetGeoIPResult/ns0:ReturnCodeDetails"/>
<Mapping cloverField="CountryName" namespacePaths="ns0="http://www.webservicex.net/"" trim="true" xpath="ns0:GetGeoIPResult/ns0:CountryName"/>
<Mapping cloverField="CountryCode" namespacePaths="ns0="http://www.webservicex.net/"" trim="true" xpath="ns0:GetGeoIPResult/ns0:CountryCode"/>
</Context>
]]></attr>
<attr name="_data_format"><![CDATA[XML]]></attr>
<attr name="__metadata"><![CDATA[true]]></attr>
</Node>
<Edge debugMode="true" fromNode="FOREACH_NS0_GET_GEO_IPRESPONSE_GET_GEO_IPRESPONSE:0" guiBendpoints="" id="Edge1" inPort="Port 0 (in)" metadata="7ed63b49-3ccc-478d-bec0-30c77bdde51a" outPort="Port 0 (out)" toNode="JSON_WRITER0:0"/>
<Edge debugMode="true" fromNode="XML_READER0:0" guiBendpoints="" id="Edge0" inPort="Port 0 (in)" metadata="c1a1282e-9ad6-47a0-9a9d-0d38c41d8c34" outPort="Port 0 (out)" toNode="FOREACH_NS0_GET_GEO_IPRESPONSE_GET_GEO_IPRESPONSE:0"/>
</Phase>
</Graph>