[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Size file XML

Whether you can tell the web service to limit the number of results is something you have to ask them or look in their documentation.  You should be able to change your program to handle more results, depends on what you mean by 'tends to blow me out of the water'.  It might just be making the size of a field larger, would have to see your Incoming procedure and know where you are having the issue.

Scott Mildenberger

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Giel van der Merwe
Sent: Thursday, April 17, 2014 6:34 AM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Size file XML

Hi there all you clever people,

I am sort of new to the whole XML/AS400, and I hope someone has a simple answer, I call a web service at MAPIT getting GEO(LATITUDES/LONGATUDES) codes for a specific physical address,

Sometimes I get a couple of results and then all works well, but sometimes like the attached result I get 101 results, this then tends to blow me out of the water, Is there a way I can just tell the program to send me what you can, because I am only interested in the first 20 GEOCODEINFORMATION records in anyway

[http://vmisfiisintrac/Avis.WebServices.Mapit/GisService.asmx/Search?s1=MONTE CASINO&s2=SANDTON&type=Point&countryCode=ZAF    <?xml version="1.0" encoding="utf-8" ?>   - <ArrayOfGeocodeInformation xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns="http://gis.avis.co.za";>  - <GeocodeInformation>    <X>28.01386</X>     <Y>-26.02604</Y>     <Type>Point</Type>     <Desc>Ferrari Show Day</Desc>     <Suburb />     <Town />     <Province />     <Country />     <CountryCode>ZAF</CountryCode>     <Distance>0</Distance>     <Match>3180</Match>     </GeocodeInformation>  - <GeocodeInformation>    <X>28.01386</X>     <Y>-26.02604</Y>     <Type>Point</Type>     <Desc>Montecasino Summer Lovin' Soir????e</Desc>     <Suburb />     <Town />     <Province />     <Country />     <CountryCode>ZAF</CountryCode>     <Distance>0</Distance>     <Match>3172</Match>     </GeocodeInformation>  - <GeocodeInformation>    <X>28.01386</X>     <Y>-26.02604</Y>     <Type>Point</Type>     <Desc>Montecasino hosts girls night out</Desc>     <Suburb />     <Town />     <Province />     <Country />     <CountryCode>ZAF</CountryCode>     <Distance>0</Distance>     <Match>3162</Match>     </GeocodeInformation>  - <GeocodeInformation>    <X>28.01386</X>     <Y>-26.02604</Y>     <Type>Point</Type>     <Desc>Montecasino</Desc>     <Suburb />     <Town />     <Province />     <Country />     <CountryCode>ZAF</CountryCode>     <Distance>0</Distance>     <Match>3000</Match>     </GeocodeInformation>  - <GeocodeInformation>    <X>28.01386</X>     <Y>-26.02604</Y>     <Type>Point</Type>     <Desc>Happy Feliciano lifts second title</Desc>     <Suburb />     <Town />     <Province />     <Country />     <CountryCode>ZAF</CountryCode>     <Distance>0</Distance>     <Match>2800</Match>     </GeocodeInformation>  - <GeocodeInformation>    <X>28.01386</X>     <Y>-26.02604</Y>     <Type>Point</Type>     <Desc>STOMP What is it all about</Desc>     <Suburb />     <Town />     <Province />     <Country />     <CountryCode>ZAF</CountryCode>     <Distance>0</Distance>     <Match>2800</Match>     </GeocodeInformation>  - <GeocodeInformation>    <X>28.01386</X>     <Y>-26.02604</Y>     <Type>Point</Type>     <Desc>Walk of fame on stage in the Montecasino Piazza</Desc>     <Suburb />     <Town />     <Province />     <Country />     <CountryCode>ZAF</CountryCode>     <Distance>0</Distance>     <Match>2799</Match>     </GeocodeInformation>  - <GeocodeInformation>    <X>28.01386</X>     <Y>-26.02604</Y>     <Type>Point</Type>     <Desc>Win tickets to GREASE at Montecasino</Desc>     <Suburb />     <Town />     <Province />     <Country />     <CountryCode>ZAF</CountryCode>     <Distance>0</Distance>     <Match>2799</Match>     </GeocodeInformation>  - <GeocodeInformation>    <X>28.01386</X>     <Y>-26.02604</Y>     <Type>Point</Type>     <Desc>It's France versus Spain at Montecasino</Desc>     <Suburb />     <Town />     <Province />     <Country />     <CountryCode>ZAF</CountryCode>     <Distance>0</Distance>     <Match>2799</Match>     </GeocodeInformation>  - <GeocodeInformation>    <X>28.01386</X>     <Y>-26.02604</Y>     <Type>Point</Type>     <Desc>Montecasino welcomes the world</Desc>     <Suburb />     <Town />     <Province />     <Country />     <CountryCode>ZAF</CountryCode>     <Distance>0</Distance>     <Match>2799</Match>     </GeocodeInformation>  - <GeocodeInformation>    <X>28.01386</X>     <Y>-26.02604</Y>     <Type>Point</Type>     <Desc>Montecasino pays tribute to SA????????s most famous chef</Desc>     <Suburb />     <Town />     <Province />     <Country />     <CountryCode>ZAF</CountryCode>     <Distance>0</Distance>     <Match>2799</Match>     </GeocodeInformation>  - <GeocodeInformation>    <X>28.01386</X>     <Y>-26.02604</Y>     <Type>Point</Type>     <Desc>The sporting action never stops at Montecasino</Desc>     <Suburb />     <Town />     <Province />     <Country />     <CountryCode>ZAF</CountryCode>     <Distance>0</Distance>     <Match>2799</Match>     </GeocodeInformation>  - <GeocodeInformation>]<http://vmisfiisintrac/Avis.WebServices.Mapit/GisService.asmx/Search?s1=MONTE%20CASINO&s2=SANDTON&type=Point&countryCode=ZAF>SOAP = '<?xml version="1.0" encoding="UTF-8"?>'
+ '<soap:Envelope'
+ ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";'
+ ' xmlns:xsd="http://www.w3.org/2001/XMLSchema";'
+ ' xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>'
+ '<soap:Body>'
+ '<Search xmlns="http://gis.avis.co.za";>'
+ '<s1>'+ %trim(addr1) + '</s1>'
+ '<s2>'+ %trim(addr2) + '</s2>'
+ '<type>'+ %trim(geot) + '</type>'
+ '<countryCode>'+ %trim(addr3) + '</countryCode>'
+ '</Search>'
+ '</soap:Body>'
+ '</soap:Envelope>';

SoapAction = 'http://gis.avis.co.za/Search';

 url = %trim(env)+ 'WebServices.Mapit/GisService.asmx';

 if http_url_post_raw(url
                       : %addr(SOAP) + 2
                       : %len(SOAP)
                       : 1
                       : %paddr('INCOMING')
                       : HTTP_TIMEOUT
                       : HTTP_USERAGENT
                       : 'text/xml'
                       : %Trim(SoapAction)) =1;
    cnvdta = %trim(retdata);
    len = %len(%trim(cnvdta));

This is the FTPAPI mailing list.  To unsubscribe, please go to: