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

Re: Ftpapi Digest, Vol 113, Issue 20



   �u can validate the XML you get with one of the many online XML
   validators..
   Such as : [1]http://www.xmlvalidation.com/
   If the XML is not valid, you have two choices.
   1) Get the service to send back a valid XML doc.
   2) Parse the doc yourself, instead of asking HTTP API to do it.
   Charles
   On Wed, Mar 23, 2016 at 6:21 PM, Baeten, John
   <[2]John.Baeten@xxxxxxxxxx> wrote:

     Thank you for that information.� It looks like the original XML
     that I am trying to retrieve does not have the <?xml version=1.0"...
     But if I can get that part to work the next URL call give me back
     that information (well just the first part) as shown below.
     The URL is:
     [3]https://xxxendservicewebapp.xxxwebsites.net/api/EndServiceMessage
     /GetMessage?id=8073fc27-93d4-42c6-9fe6-a68629785ef5
     When I put that into Firefox I get back:
     (also I see some of the XML is not correct, example is <Comments
     />)� So I am not sure if that is why I am not able to have the
     program download it.
     <string><?xml version="1.0" ?>
     <EndService>
     � <Service>
     � � <RouteID>6264</RouteID>
     � � <EmployeeID>[4]Sam@xxxxxxx</EmployeeID>
     � � <ServiceID>8073fc27-93d4-42c6-9fe6-a68629785ef5</ServiceID>
     � � <ServiceName>152606</ServiceName>
     � � <GMTOffsetInMinutes>330</GMTOffsetInMinutes>
     � � <ServiceStart>2016-02-29T10:11:25</ServiceStart>
     � � <ServiceEnd>2016-02-29T10:24:08</ServiceEnd>
     � � <NextServiceStart />
     � � <TotalAmount>0.00</TotalAmount>
     � � <Comments />
     � �     <SourceSystemModifyTS>2016-02-29T10:24:08</SourceSystemModifyTS>
     � � <ServiceAddressID>S60012005121937626000</ServiceAddressID>
     � � <ReasonID />
     � � <LanguageId>EN</LanguageId>
     � � <ServiceAddressSurveyID />
     � � <TaxAmount />
     � � <WorkOrder>
     � � �     <WorkOrderID>ac4c3400-66db-4790-86b5-8e895be0f76c</WorkOrderID>
     � � � <WorkOrderName>152606</WorkOrderName>
     � � � <VisitTypeID>17</VisitTypeID>
     � � � <MobileCreateFlag>true</MobileCreateFlag>
     � � </WorkOrder>
     � � �     <SourceSystemModifyTS>2016-02-29T10:24:08</SourceSystemModifyTS>
     � � </ServiceSignOff>
     � � <ServiceSubTypes>
     � � � <ServiceSubType>
     � � � � <TypeID>1</TypeID>
     � � � � <SubTypeID>A</SubTypeID>
     � � � � <CallID />
     � � � � <PricePerService />
     � � � � <ServiceQuantity />
     � � � � <PriceChangeFlag />
     � � � � <PriceChangeReason />
     � � � � <SourceSystemModifyTS />
     � � � </ServiceSubType>
     � � </ServiceSubTypes>
     � </Service>
     </EndService></string>
     When I copy that same URL and put it in the program I get back:
     XML parse failed at line 1, col 17: not well-formed (invalid token)
     I guess my new question is - are then sending me messed up XML and
     that is why the program cannot load/display it in any way?� And if
     that is the case, why can I see the XML by using Firefox with no
     issues?� For the HTTP API programs to work, does the XML need to be
     a true XML document with the <?xml version="1.0"
     encoding="ISO-8859-1" ?> at the top?
     Can you please tell me how to turn on the debug log?� When I was in
     the program I did see it going to write a debug log, but skipped it
     because it was not turned on.� Where do you go to turn it on?
     Thanks again,
     John Baeten

References

   1. http://www.xmlvalidation.com/
   2. mailto:John.Baeten@xxxxxxxxxx
   3. https://xxxendservicewebapp.xxxwebsites.net/api/EndServiceMessage/GetMessage?id=8073fc27-93d4-42c6-9fe6-a68629785ef5
   4. mailto:Sam@xxxxxxx
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------