Expand my Community achievements bar.

SOLVED

Getting data from a WSDL service

Avatar

Level 7

I would like to populate a repeating subform with information retrieved form a WSDL service.

Through a form, I submit an id which is used in the workflow to get multple rows. The result is assigned to an XML variable which displays as a text field in the form.

How can I merge the XML variable's data within the PDF ?

Aditya

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

In the script on the Button that executes the wsdl, comment out the 2nd last line.

xfa.data.nodes.remove(oRemoveNode);

When the node is removed it is remerging the data dom with the template and thuscausinng the DDlist to clear.

paul

View solution in original post

30 Replies

Avatar

Former Community Member

No that is not the service that I sent you ....Jon Brinkman created a sample that uses that one ...maybe you are getting confused.

Paul

Avatar

Level 7

I checked twice, the pdf you attached with the LCA, in one of the previous posts, did not have any data connections and it only had the script to fill the dropdown. Could it have been shipped with the LCA ?

Aditya

Avatar

Former Community Member

Sorry I posted the wrong form .....here is the matching form that you need. I will remove the other one and replace it as well so others do not get confused.

paul

Avatar

Level 7

I get the message box every for  every name added to the list but nothing appears in the DDL.

Aditya

Avatar

Correct answer by
Former Community Member

In the script on the Button that executes the wsdl, comment out the 2nd last line.

xfa.data.nodes.remove(oRemoveNode);

When the node is removed it is remerging the data dom with the template and thuscausinng the DDlist to clear.

paul

Avatar

Level 7

It worked !! Can I use a similar functionality if I wanted to merge it with static fields in the form like using an id to prefill name, phone, address, etc.? Will the code below do the job ?

    xfa.datasets.data.loadXML(xml_result.rawValue, false, false);
    xml_result.rawValue = xfa.datasets.data.saveXML();

Aditya

Avatar

Former Community Member

If you are getting individual values pack from the web service for each field then you can simply bind the result to the field (liek I did for the XML string that came back from the call). This technique was specific to fillinng in the dropdown bacuse the returned XML had to be parsed to pull out the appropriate nodes and Designer cannot introspect the XML that is contained within the result node.

Make sense?

paul

Avatar

Level 7

It does, In fact I thought of it that way initially but wouldn't it be a manual process if I had more than 20 fields ?

Aditya

Avatar

Former Community Member

Depends how the webservice is set up. If you have 20 unique output vars in the orchestration then you will have 20 nodes in the lca and you can simply bind. If there is a single xml var in the orchestration that holds 20 values in its xml then you will have to do it like in the sample.

Paul

Avatar

Former Community Member

Hi Paul,

I am try to use your sample by changing dataview connection to point to my wsdl but could not make it work right. When I mannually invoke the wsdl in workbench I do get some results but when I try to run the form, I do not get any data in the xml_result.

Can you help on this. Please provide me your email so I can send you the form.

Thanks,

Han Dao

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----