<?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>Re: InfoPath referencing a Web Service</title><link>https://www.infopathdev.com:443/forums/thread/17960.aspx</link><pubDate>Sun, 11 Feb 2007 00:34:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17960</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17960.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=17960</wfw:commentRss><description>Hi Rolf,&lt;br /&gt;&lt;br /&gt;Is your Web service running on your local machine? If so, localhost is correct. However, that won't work when you have to roll it out to a server that you want other people to access.&lt;br /&gt;&lt;br /&gt;Why do you need to write code? Just use the Data Connection wizard to add the parameter based on the field in your form.</description></item><item><title>InfoPath referencing a Web Service</title><link>https://www.infopathdev.com:443/forums/thread/17581.aspx</link><pubDate>Thu, 08 Feb 2007 16:12:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17581</guid><dc:creator>snufse</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17581.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=17581</wfw:commentRss><description>I have a form that have an identification number. Thet number is an employee code and I have already written a web service that retrieves the employee name. This is the 1st time I work with InfoPath.&lt;br /&gt;&lt;br /&gt;I am trying to do a programming interface on the ValidateEvent for the "identificationNumber" field where I need to call the web service and return the name of the employee. I put the employee's name into the "name" field in the form. &lt;br /&gt;&lt;br /&gt;Step 1: I click on the "add a web reference". That takes me to the Add Web reference pop-up screen. I locate the the URL (&lt;b&lt;a target="_blank" href=http://localhost:3035/WebServiceTest1/Service.asmx&gt;http://localhost:3035/WebServiceTest1/Service.asmx&lt;/a&gt;)&lt;/b&gt; and then click "add reference" button.&lt;br /&gt;&lt;br /&gt;The value "localhost" appears in the reference field even if my web service is "WebServiceTest1". Is this correct? I changed the reference to "WebServiceTest1" which is the actual web service. Is this ok?&lt;br /&gt;&lt;br /&gt;Step 2: I now write my code like this. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Imports WebServiceTest1&lt;br /&gt;&lt;br /&gt;Public Sub identificationNumber_Validating(ByVal sender As Object, ByVal e As XmlValidatingEventArgs)&lt;br /&gt;            Dim MyWebService As New WebServiceTest1.Service&lt;br /&gt;            Dim MyString As String&lt;br /&gt;            MyString = FormState("_identificationNumber").ToString&lt;br /&gt;            MyString = MyWebService.GetEmployeeName(MyString)&lt;br /&gt;            FormState("_name") = MyString&lt;br /&gt;        End Sub&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Does the code seem to be correct? How do I test and execute? Can anyone help? Thank you. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description></item></channel></rss>