Call webservice from VBscript - InfoPath Dev
in

InfoPath Dev

Call webservice from VBscript

Last post 09-28-2006 04:04 PM by scottr. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-26-2006 03:23 PM

    • scottr
    • Not Ranked
    • Joined on 09-26-2006
    • Posts 5

    Call webservice from VBscript

    I'm trying to delete a file from SharePoint in infopath once the submit button is pressed. The submit button also submits data to a database and does a couple other things. I've followed a "How to" written by Agni -
    http://infopathdev.com/howto/tutorials/default.aspx?i=1d52979046884d8186c9393a1ea95109
    Problem is, I'm trying to use VBScript to call the webservice and pass a parameter to it, but can't seem to figure it out.

    Anyone have any suggestions

    PS. I'm not a coder, so take it easy on me...thanks
  • 09-28-2006 06:06 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Call webservice from VBscript

    Hi scottr Welcome to the Forums,

    In VBScript you should not declare type of the parameter for calling of the function. Have you get the WebService adapter in VB Script? Can you explain me what is the error you are getting exactly
  • 09-28-2006 04:04 PM In reply to

    • scottr
    • Not Ranked
    • Joined on 09-26-2006
    • Posts 5

    Re: Call webservice from VBscript

    Well I can't really remember the error message I'm getting, but like I said I'm trying to use a "Delete file from SharePoint" how-to (see above) but I'm stuck on the last step. It says to put the following code in formcode.cs

    private void deleteFile(string fileName)
    { thisXDocument.GetDOM("UpdateListItemsConfig").selectSingleNode("/UpdateListItemsConfig/SharepointDelete/Batch/Method/Field[@Name = 'FileRef']").text = fileName;
    WebServiceAdapter2 deleteFileFromSharepoint = (WebServiceAdapter2)thisXDocument.DataAdapters["SharePointDelete"];
    deleteFileFromSharepoint.Submit();

    I understand that this is C# code and will not work in VB, but I'm having a hard time trying to convert it over. I've tried removing the 'fileName' and putting the URL to the file I wanted to delete. I also remove 'this' from thisXDocument....
    I believe the problem lies somewhere with the 'WebServiceAdapter2'

    Help from anyone is greatly appreciated.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.