G
G.N.Rajesh
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 in set sample value area(Now i am
giving file single name there is no selection option).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?
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 in set sample value area(Now i am
giving file single name there is no selection option).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?