Problem while calling webservice - InfoPath Dev
in

InfoPath Dev

Problem while calling webservice

Last post 12-19-2005 07:29 AM by rajesh. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 12-19-2005 07:29 AM

    • rajesh
    • Not Ranked
    • Joined on 12-19-2005
    • Posts 6

    Problem while calling webservice

    hi,

    I am having a set of Templates in my web.Using webservice i get the
    templates name as a parameter,that parameter values should populate the
    fields of the specific tepmplate.Using this web methode i am getting the
    specific template

    [WebMethod]
    public XmlDocument returnfile(string filename)
    {

    ViewStarService v1=new ViewStarService();
    XmlDocument doc =new XmlDocument();
    string nameof;
    if (v1.Login("abc","abc","",WebService2.cscg.LoginMode.FullAccess))
    {
    temp2=v1.GetTemplates();
    int tempcount=temp2.Length;
    for(int j=0;j<tempcount;j++)
    {

    int result=String.Compare(filename,temp2[j].Name);
    if (result==0)
    {
    a=j;
    break;

    }
    }
    temp3=temp2[a];
    string tempname=temp3.Name;
    name=temp3.Fields;
    int count=name.Length;
    string data="";
    data="<"+ tempname +">";

    for(int i=0;i<count;i++)
    {
    nameof=name.Name;
    data=data + "<" + nameof + ">";
    data=data + "</" + nameof + ">";

    }
    data=data+ "</"+ tempname + ">";
    doc.LoadXml(data);
    v1.Logout();
    return doc;
    }

    return null;

    }
    I am calling this webmethode in Infopath.I select the option "Design the
    form using data connection".Then i select the "Receive Data" option ,then i
    select the specific webservice,there Infopath showed the available web
    methodes in webservice.I selected the "returnfile" web methode,then it is
    asking specific file name (Tepmplate name)When i click "SETSAMPLE VALUE"
    button.After i enter the "SETSAMPLE VALUE" (template name) that will return
    all the fields of the template.Here my Requirement is i need to show all
    "templatesname" available in web as a list(All tepmplates names should come listbox) in set sample value area(Now i am
    giving file single name in Textbox).So the user can select
    the specific Template name,then the related fields are retrieved in
    Infopath.How to do this? Is it possible ? Any ideas?
    This is very urgent please help me

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