SharePoint 2007 and InfoPath 2003 - InfoPath Dev
in

InfoPath Dev

SharePoint 2007 and InfoPath 2003

Last post 11-01-2007 12:46 AM by amsyo. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-25-2007 02:27 AM

    • amsyo
    • Not Ranked
    • Joined on 10-22-2007
    • Posts 8

    SharePoint 2007 and InfoPath 2003

    Hi,

    I am trying to build an InfoPath form 2003 compatible (is a must) that populates multiple drop down boxes using a web service. The form is going to be published on SharePoint 2007.

    The web service is also deployed on SharePoint, on localhost/_vti_bin/mycWebService.asmx.

    I would like to programatically modify the URL of the web service each time I deploy the form on SharePoint.

     So my idea was to code OnFormLoad() as :

                Uri templateUri = Template.Uri;
                UriBuilder serviceUri = new UriBuilder(templateUri.Scheme, templateUri.Host, templateUri.Port);
                serviceUri.Path = "/_vti_bin/mycWebService.asmx";

                DataConnection conn = DataConnections["getNames"];
                WebServiceConnection wbC = (WebServiceConnection)conn;

                wbC.ServiceUrl = serviceUri.Uri;

    Unfortunately this is 2007 Code,  so I need to convert into 2003 code.

    And now, I am kind of lost. I can't seem to find the a document that describes Object Model for 2003.

    Thank You for any details,

    Andrei Gavrila

  • 10-25-2007 12:58 PM In reply to

    Re: SharePoint 2007 and InfoPath 2003

    Hi

    First off I am not a coder so I can't help you translate your code.  On the bright side you can use the link below to find all about the object model in InfoPath 2003.

    http://msdn2.microsoft.com/en-us/library/aa947605(VS.80).aspx

    I hope this helps

    Adam Harding
    Wales
    UK
  • 11-01-2007 12:46 AM In reply to

    • amsyo
    • Not Ranked
    • Joined on 10-22-2007
    • Posts 8

    Re: SharePoint 2007 and InfoPath 2003

    I've found it.

    Ironically, on a post on infopathdev 2007-august.

    "Hi,

    This is how you can change the Web Service URL of a data connection.

    IXMLDOMDocument webserviceOperation;
    WebServiceAdapter2 webserviceAdapter = (WebServiceAdapter2) thisXDocument.DataAdapters[dataAdapterName];

    webserviceOperation = thisXDocument.CreateDOM();
    webserviceOperation.loadXML(webserviceAdapter.Operation);
    SetNodeValue(webserviceOperation.documentElement, "@serviceUrl", url);
    webserviceAdapter.Operation = webserviceOperation.xml;

     
    Thanks Agni, and sorry Adam for re-posting a question.
     
    *code is JavaScript.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.