<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Web Services</title><link>https://www.infopathdev.com:443/forums/48.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Problem while calling webservice</title><link>https://www.infopathdev.com:443/forums/thread/17505.aspx</link><pubDate>Mon, 19 Dec 2005 15:29:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17505</guid><dc:creator>rajesh</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17505.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=17505</wfw:commentRss><description>hi,&lt;br /&gt;&lt;br /&gt;I am having a set of Templates in my web.Using webservice i  get the &lt;br /&gt;templates name as a parameter,that parameter values should populate the &lt;br /&gt;fields of the specific tepmplate.Using this web methode i am getting the &lt;br /&gt;specific template&lt;br /&gt;&lt;br /&gt;[WebMethod]&lt;br /&gt;		public  XmlDocument  returnfile(string filename)&lt;br /&gt;		{	&lt;br /&gt;			&lt;br /&gt;			ViewStarService v1=new ViewStarService();&lt;br /&gt;			XmlDocument doc =new XmlDocument();&lt;br /&gt;			string nameof;&lt;br /&gt;			if 		(v1.Login("abc","abc","",WebService2.cscg.LoginMode.FullAccess))&lt;br /&gt;			{&lt;br /&gt;				temp2=v1.GetTemplates();&lt;br /&gt;				int tempcount=temp2.Length;&lt;br /&gt;				for(int j=0;j&amp;lt;tempcount;j++)&lt;br /&gt;				{&lt;br /&gt;					&lt;br /&gt;					int result=String.Compare(filename,temp2[j].Name);&lt;br /&gt;					if (result==0)&lt;br /&gt;					{&lt;br /&gt;						a=j;&lt;br /&gt;						break;&lt;br /&gt;		&lt;br /&gt;					}&lt;br /&gt;				}&lt;br /&gt;				temp3=temp2[a];&lt;br /&gt;				string tempname=temp3.Name;&lt;br /&gt;				name=temp3.Fields;&lt;br /&gt;				int count=name.Length;&lt;br /&gt;				string data="";&lt;br /&gt;				data="&amp;lt;"+ tempname +"&amp;gt;";&lt;br /&gt;		   	&lt;br /&gt;				for(int i=0;i&amp;lt;count;i++)&lt;br /&gt;				{&lt;br /&gt;					nameof=name&lt;i&gt;.Name;&lt;br /&gt;					data=data + "&amp;lt;" + nameof + "&amp;gt;"; &lt;br /&gt;					data=data + "&amp;lt;/" + nameof + "&amp;gt;"; &lt;br /&gt;				&lt;br /&gt;				}&lt;br /&gt;				data=data+ "&amp;lt;/"+ tempname + "&amp;gt;";&lt;br /&gt;				doc.LoadXml(data);&lt;br /&gt;				v1.Logout();&lt;br /&gt;				return doc;&lt;br /&gt;				}&lt;br /&gt;						&lt;br /&gt;			return null;&lt;br /&gt;					&lt;br /&gt;		}&lt;br /&gt;I am calling this webmethode in Infopath.I select the option "Design the &lt;br /&gt;form using data connection".Then i select the "Receive Data" option ,then i &lt;br /&gt;select the specific webservice,there Infopath showed the available web &lt;br /&gt;methodes in webservice.I selected the "returnfile" web methode,then it is &lt;br /&gt;asking specific file name (Tepmplate name)When i click "SETSAMPLE VALUE" &lt;br /&gt;button.After i enter the "SETSAMPLE VALUE" (template name) that will return &lt;br /&gt;all the fields of the template.Here my Requirement is i need to show all &lt;br /&gt;"templatesname" available in web as a list(All tepmplates names should come listbox) in set sample value area(Now i am &lt;br /&gt;giving file single name in Textbox).So the user can select &lt;br /&gt;the specific Template name,then the related fields are retrieved in &lt;br /&gt;Infopath.How to do this? Is it possible ? Any ideas?&lt;br /&gt;This is very urgent please help me&lt;br /&gt;&lt;br /&gt;Rajesh&lt;br /&gt;Developer</description></item></channel></rss>