You are viewing limited content. For full access, please sign in.

Question

Question

Populate a form using a Webservice to get Metadata from DB

asked on November 5, 2015 Show version history

We have a client with a DB in oracle, to get metadata from this DB,  they offer a webservice .

We create a form, it need populate name and more fields from the webservice mentionated.

How we do to call the webservice and populate each row in the forms table?

 

A example below show how we check the webservice now , we insert 2 fields NUT and NUE  (yellow mark) and the response retrieve more fields related.

 

 

The forms we using

 

 

 

Thank you for your attentions.

 

 

 

 

0 0

Replies

replied on November 16, 2015

Best way to go about this would be to call the webservice in Javascript using jQuery.ajax through JSONP (if the webservice is not located in the same domain) or regular json. Once you have the xml, use jQuery.parseXML() function to parse the document, then use .find() to search for each property you need to assign. It would be best to assign each field in your table a class so you can match the field with the xml data received. Once you have the data simply assign it using "$('td.' + nameoffieldclass + ' input.singleline').val(xmldoc.find('nameoffieldtoassign'));".

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.