We have a wsdl that as part of it's response returns a table of type <xs:element name="anyType"/>
How do you access elements within this type of data structure, normally you have an array of elements/fields, but this data type does not appear to work in that way.
Soap AnyType field mapping
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 201
- Joined: Fri Dec 20, 2013 1:29 pm
- Location: Dartford Borough Council
- Contact:
-
- Moderator
- Posts: 416
- Joined: Fri Sep 07, 2007 3:44 pm
- Location: Sandy, UK
- Contact:
Re: Soap AnyType field mapping
Hi Neil,
The XML element is probably of type XML Any because that particular node can change depending on your request.
One approach is to call the web service and use E4X to iterate through the XML response document of the response:
An easier approach is to use a Copy Adapter to convert the XML Any element into a document that you recognise and map those values to your form.
Documentation regarding the copy adapter and E4X is in the Verj.io documentation.
If you need more help then export the web service and a test form, send to support@ebasetech.com and I will fill in the gaps.
Kind regards
Steve Upton
The XML element is probably of type XML Any because that particular node can change depending on your request.
One approach is to call the web service and use E4X to iterate through the XML response document of the response:
Code: Select all
//call the web service
resources.myWs.call();
var respDocument = resources.myWs.getDocument("responseDoc");
var resp = new XML(respDocument );
//use E4X to extract the data
var name = resp.customer.name;
....
An easier approach is to use a Copy Adapter to convert the XML Any element into a document that you recognise and map those values to your form.
Documentation regarding the copy adapter and E4X is in the Verj.io documentation.
If you need more help then export the web service and a test form, send to support@ebasetech.com and I will fill in the gaps.
Kind regards
Steve Upton
0 x
-
- Ebase User
- Posts: 201
- Joined: Fri Dec 20, 2013 1:29 pm
- Location: Dartford Borough Council
- Contact:
Re: Soap AnyType field mapping
Many thanks Steve,
We will try the Copy Adaptor approach, as you suggest it is the easiest route.
Thanks again
Neil
We will try the Copy Adaptor approach, as you suggest it is the easiest route.
Thanks again
Neil
0 x
Who is online
Users browsing this forum: No registered users and 4 guests