How to make a XML Message ?

Primary tabs

Hi All,

Actually I am trying to implement a RESt API where in I will get ZIPCODE as request and I need to call external API which will take ZIPCODE as input and give State and City in response.

But the problem is the request is in XML Format and also response is in XML format.

Example :<CSLookupRequest USERID="USERID">
<ZipCode ID='0'>

and in Response 

<?xml version="1.0" encoding="UTF-8"?>
    <ZipCode ID="0">

So Basically,
1) How can I create a XML message where in I can pass ZIPCODE and send in Request URL and

2) How to read the XML response like State and City from XML.

  • 0
  • 0
  • 167
  • 1
  • 1


If you have an XSD, it's as simple as importing it and using imported classes.

If you do not have a schema, you'll need to either generate an XSD from XML (there are many tools online) or just plain create Caché classes and make them XML-enabled.


That said, is XML really a part of the url?