Getting Object reference not set to an instance of an object error when run the Web Service - InfoPath Dev
in

InfoPath Dev

Getting Object reference not set to an instance of an object error when run the Web Service

Last post 04-21-2010 05:46 AM by UdayaHerath. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 04-21-2010 05:46 AM

    Getting Object reference not set to an instance of an object error when run the Web Service

     

    In Infopath 2003 I have added the web service as my secondary data source. It has a query field call tmsSummaryId(its int64). It is a parameter of my web service method.

    I am trying to query the web service using user Input

    I wrote following code.

    public void CTRL1_23_OnClick(DocActionEvent e)
            {
               
                    // Write your code here.
                    IXMLDOMNode filed6 = thisXDocument.DOM.selectSingleNode("//my:field6");
                    IXMLDOMDocument2 domXml = (IXMLDOMDocument2)thisXDocument.DataObjects["GetCustomerData"].DOM;
                    domXml.setProperty("SelectionNamespaces", "xmlns:dfs='http://schemas.microsoft.com/office/infopath/2003/dataFormSolution' xmlns:ns1=' http://localhost:6548/BusinessServices'");
                    IXMLDOMNode queryField = domXml.selectSingleNode("/dfs:myFields/dfs:queryFields");
                    //IXMLDOMNode queryField = domXml.selectSingleNode("/dfs:myFields/dfs:dataFields/GetCustomerDataResponse/GetCustomerDataResult/ParentName");
                    //filed2.text = queryField.nodeValue;
                    queryField.text =field6.text;


                    thisXDocument.DataObjects["GetCustomerData"].Query();
               
               
               
            }

    when the executing the Query() method is giving an error calling

    System.NullReferenceException: Object reference not set to an instance of an object

    Can any one please help on this

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