NetTalk Central

Author Topic: How to receive data from a webservice  (Read 2947 times)

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
How to receive data from a webservice
« on: August 15, 2014, 06:09:06 AM »
Hi all,

I'm having a problem getting data back from a webservice. Or more specific: I do get the data back (I can display the received page ok), but I can't figure out how to define ServiceResults and ServiceErrors in my webclient so that xFiles know how to load the returned data. Also, I'm not sure what to use for file and record boundaries respectively.

All I do in the webservice method is adding some entries to one or the other queue in order to report back to the client

I can't find anything in the docs or here in NTCentral and there's not a working example demonstrating this, so I'm a little lost.

Can somebody shed some light, please?

Peter

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: How to receive data from a webservice
« Reply #1 on: August 17, 2014, 09:40:33 AM »
Problem solved.

It turns out that you MUST define external names in your queue definition in the webclient procedure.

I'd say this is an error in xFiles. The docs specifically mention that you only need to define external names if the tag is something that Clarion doesn't like or if you want to use field names that are different from the tag names in your program and that was not the case in my situation.

Peter

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: How to receive data from a webservice
« Reply #2 on: August 17, 2014, 10:33:29 PM »
>> I'd say this is an error in xFiles.

I'm not so sure. XML is case sensitive by default, and so if your tags are mixed case you either set external names, or set

xml.TagCase = xf:CaseAny

Cheers
Bruce