Web Service Call Does Not Work - InfoPath Dev
in

InfoPath Dev

Web Service Call Does Not Work

Last post 10-05-2006 02:13 AM by nukkumatti. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-05-2006 01:21 AM

    Web Service Call Does Not Work

    Hi all,

    does anybody know why the following code does not execute my Web Service ?

    IXMLDOMDocument3 myDoc	= (IXMLDOMDocument3)thisXDocument.GetDOM("NextIDNumber");
    myDoc.setProperty("SelectionNamespaces", "xmlns:my=\"http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-06-19T07-15-47\" xmlns:xsf=\"http://schemas.microsoft.com/office/infopath/2003/solutionDefinition\" xmlns:msxsl=\"urn:schemas-microsoft-com:xslt\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xdUtil=\"http://schemas.microsoft.com/office/infopath/2003/xslt/Util\" xmlns:xdXDocument=\"http://schemas.microsoft.com/office/infopath/2003/xslt/xDocument\" xmlns:xdMath=\"http://schemas.microsoft.com/office/infopath/2003/xslt/Math\" xmlns:xdDate=\"http://schemas.microsoft.com/office/infopath/2003/xslt/Date\" xmlns:xd=\"http://schemas.microsoft.com/office/infopath/2003\" xmlns:dfs=\"http://schemas.microsoft.com/office/infopath/2003/dataFormSolution\" xmlns:tns=\"http://tempuri.org/\" xmlns:_xdns0=\"http://schemas.microsoft.com/office/infopath/2003/changeTracking\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:diffgr=\"urn:schemas-microsoft-com:xml-diffgram-v1\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\"");
    ID.text = myDoc.selectSingleNode("/dfs:myFields/dfs:dataFields/tns:NextIDNumberResponse/tns:NextIDNumberResult/NewDataSet/Table1/ID_Number").text;


    When I set the check box in the data connection wizard to automatically retrieve the data when... it works. The problem is that I want to call the service only one in a button event.
    BTW: I don't get any error message.

    Thx in advance
    Listen to Motörhead cos they play Rock'n Roll :)
  • 10-05-2006 02:13 AM In reply to

    Re: Web Service Call Does Not Work

    Okay I got it working. The following two lines were missing.

    WebServiceAdapter2 myWebAdapter = (WebServiceAdapter2)thisXDocument.DataAdapters["NextIDNumber"];
    myWebAdapter.Query();
    Listen to Motörhead cos they play Rock'n Roll :)
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.