*> binding name=ResolveIP, style=document        01  soap-in-ResolveIP identified by 'soapenv:Envelope'.            03 identified by 'xmlns:soapenv' is attribute.             05 filler pic x(39) value 'http://www.w3.org/2003/05/soap-envelope'.            03 identified by 'xmlns:tns' is attribute.             05 filler pic x(20) value 'http://ws.cdyne.com/'.            03 identified by 'soapenv:Body'.                06 identified by 'tns:ResolveIP'.                 07 identified by 'tns:ipAddress'.                  08 a-ipAddress pic x any length.                 07 identified by 'tns:licenseKey'.                  08 a-licenseKey pic x any length.        01  soap-out-ResolveIP identified by 'Envelope'                  namespace 'http://www.w3.org/2003/05/soap-envelope'.            03 identified by 'Body'.                06 identified by 'ResolveIPResponse'                   namespace 'http://ws.cdyne.com/'.                 07 identified by 'ResolveIPResult'.                  08 identified by 'City'.                   09 a-City pic x any length.                  08 identified by 'StateProvince'.                   09 a-StateProvince pic x any length.                  08 identified by 'Country'.                   09 a-Country pic x any length.                  08 identified by 'Organization'.                   09 a-Organization pic x any length.                  08 identified by 'Latitude'.                   09 a-Latitude pic s9(16)v9(2).                  08 identified by 'Longitude'.                   09 a-Longitude pic s9(16)v9(2).                  08 identified by 'AreaCode'.                   09 a-AreaCode pic x any length.                  08 identified by 'TimeZone'.                   09 a-TimeZone pic x any length.                  08 identified by 'HasDaylightSavings'.                   09 a-HasDaylightSavings pic x any length.                  08 identified by 'Certainty'.                   09 a-Certainty pic s9(5).                  08 identified by 'RegionName'.                   09 a-RegionName pic x any length.                  08 identified by 'CountryCode'.                   09 a-CountryCode pic x any length.  | 
       configuration section.        repository.            class http-client as "com.iscobol.rts.HTTPClient"  | 
       WORKING-STORAGE SECTION.        copy "ip2geo.cpy".  | 
           move "209.235.175.10"   to a-ipAddress            http:>doPostEx (                            "http://ws.cdyne.com/ip2geo/ip2geo.asmx"                            "text/xml; charset=utf-8"                            soap-in-ResolveIP).  | 
           http:>getResponseCode (response-code).            display "Response code: " response-code.            if response-code = 200               http:>getResponseXML (soap-ResolveIP-output)               display "City=" a-city               display "StateProvince=" a-stateProvince               display "Country=" a-country               display "Organization=" a-Organization               display "Latitude=" a-latitude               display "Longitude=" a-longitude               display "AreaCode=" a-areaCode               display "TimeZone=" a-timeZone               display "Daylight savings=" a-HasDaylightSavings               display "Certainty=" a-certainty               display "RegionName=" a-regionName               display "CountryCode=" a-countryCode  | 
iscc IP2GEO.cbl  | 
iscrun IP2GEO  | 
