Data from WCF is not shown - InfoPath Dev
in

InfoPath Dev

Data from WCF is not shown

Last post 07-16-2013 09:14 PM by IPDeveloper. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 07-16-2013 09:14 PM

    Data from WCF is not shown

     Hello everybody! I'm desperate and need assistance. I have InfoPath 2007 form with JS code behind. Also I have a WCF service. Here's a JS code in XDocument::OnLoad(eventObj) function to fill in drop down list with data.

    var formName = 'RegistrationForm';
    var code = XDocument.DOM.selectSingleNode('/Root/@code').text;
    var version = XDocument.DOM.selectSingleNode('/Root/@ver').text;
    try
    {
    	var ws = XDocument.DataObjects('GetReference');
    	ws.DOM.setProperty("SelectionNamespaces", "xmlns:dfs=\"http://schemas.microsoft.com/office/infopath/2003/dataFormSolution\" xmlns:ns12=\"http://tempuri.org/\"");	
    	ws.DOM.selectSingleNode("/dfs:myFields/dfs:queryFields/ns12:GetReference/ns12:processCode").text = code;
    	ws.DOM.selectSingleNode("/dfs:myFields/dfs:queryFields/ns12:GetReference/ns12:processVersion").text = version;
    	ws.DOM.selectSingleNode("/dfs:myFields/dfs:queryFields/ns12:GetReference/ns12:formCode").text = formName;
    	ws.Query();
    	XDocument.UI.Alert('Data loaded: ' + ws.DOM.xml);
    }
    catch(err)
    {
    	XDocument.UI.Alert('Oops, something went wrong. Contact developers.');
    	XDocument.View.Window.Close(true);
    }

    The problem is that drop down list is empty. But an alert after ws.Query() displays correct XML with data. Also via Fiddler I can see that request was successful and data was loaded.
    What can be a reason for such a strange behavoir?

Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.