Use Omnis as web services consumer
Hi Miguel,
One more comment on this topic. As your response is an XML, and some databases have an XML data type, for example DB2, you could store the result of the XML in a database row, and then user database functions to read data from the XML. DB2 has the option to use XPATH search criterion on an XML in a row, and extract data into a list or row, with columns in the list or row mapping fields in your XML. This is much faster than doing XML parsing in Omnis. Depends on wat database you ue though.
Regards
Rudolf Bargholz
—–Ursprüngliche Nachricht—–
Von: omnisdev-en [mailto:omnisdev-en-bounces@lists.omnis-dev.com] Im Auftrag von Rudolf Bargholz
Gesendet: Donnerstag, 29. Juni 2017 16:56
An: OmnisDev List – English <omnisdev-en@lists.omnis-dev.com>
Betreff: AW: Use Omnis as web services consumer
Hi Miguel,
SOAP is an XML format, so you can use the oXml Studio object to parse the XML response you get from your SOAP service. You will have to read up on how to use the oXml component, but this uses Apache Xerces as a parser, so you have all the same commands available as you would when using other tools, for example $getelementsbytagname(‘MyNode’,lErrorText) Returns lNodeList, or $getattribute(‘AttributeName’). We have written helper methods to extract child-nodes of a specific node into a row variable, or attributes of a specific node into a row variable, but in essence you will need to program how you respond to the response, as this can be either simple in format, or endlessly complex, so there is not much Omnis can do to make your life easy here.
Regards
Rudolf Bargholz
—–Ursprüngliche Nachricht—–
Von: omnisdev-en [mailto:omnisdev-en-bounces@lists.omnis-dev.com] Im Auftrag von Miguel Mas (gmail)
Gesendet: Donnerstag, 29. Juni 2017 14:18
An: OmnisDev List – English <omnisdev-en@lists.omnis-dev.com>
Betreff: Use Omnis as web services consumer
Hi,
I want to use Omnis as SOAP webservice consumer, and after doing the first test I’m very very very confused (I have already experience in using Omnis as SOAP webservice consumer).
My main problem is how to process the response of the remote webservice.
When I use the Class Wizard to create a webservice object, it creates schemas with the remote request parameters (so I’m sure that it’s able to receive and process the wsdl) but it does not create schemas for the response.
Does anybody know how to process the response?
A simple webservice consumer example would be good !!!.
Regards,
Miguel
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com _____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com