Newbie to accessing webservices.... - InfoPath Dev
in

InfoPath Dev

Newbie to accessing webservices....

Last post 10-06-2011 11:40 AM by Sailor. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-04-2011 11:08 AM

    • Sailor
    • Top 75 Contributor
    • Joined on 09-15-2009
    • Canada
    • Posts 107

    Newbie to accessing webservices....

    Hello,

     I am quite new to Infopath, but I've created a number of succesful form in the past two years.  These have been quite basic, with connections only to WSS 3.0.  I now want to create a form that will populate user information, but research tells me that this isn't easily possible using WSS.  I'm in a large corporation, where I've been told there is an existing webservice that should get me what I need.  

    In Infopath I've created a SOAP connection to the webservice (GetUserByLANid).  This gives me query and data fields in my data connection.  On FormLoad I want to populate text fields (LastName, FirstName, etc) from the webservice based on LanID.  I have a field (LanID) already populating using the userName() function.  I just simply don't know how to pass the value in the LanID field to the webservice, to return the results.

     This has to be very simple I'm sure...but you don't know what you don't know:-)  Can anyone suggest a easy to follow sample of how to do this?

     Thank you

  • 10-06-2011 11:40 AM In reply to

    • Sailor
    • Top 75 Contributor
    • Joined on 09-15-2009
    • Canada
    • Posts 107

    Re: Newbie to accessing webservices....

     I was hoping someone would point me in the right direction.

    As a test, I created a new blank form using the Webservice template so I get the automatic query button.  Just so I understand...if I drag the query field (LanID) on to the form and drag the data fields (LastName, FirstName, etc) into the form and enter a valid LanID then process QUERY I should get a result?

     Nothing happens...

     Here's the webservice test page

     

    SOAP 1.2

    The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

    POST /lookup.asmx HTTP/1.1
    Host: practitionerlookup
    Content-Type: application/soap+xml; charset=utf-8
    Content-Length: length
    
    <?xml version="1.0" encoding="utf-8"?>
    <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
      <soap12:Body>
        <GetEmployeeByLanId xmlns="http://practitionerpookup/">
          <lanId>string</lanId>
        </GetEmployeeByLanId>
      </soap12:Body>
    </soap12:Envelope>
    HTTP/1.1 200 OK
    Content-Type: application/soap+xml; charset=utf-8
    Content-Length: length
    
    <?xml version="1.0" encoding="utf-8"?>
    <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
      <soap12:Body>
        <GetEmployeeByLanIdResponse xmlns="http://practitionerpookup/">
          <GetEmployeeByLanIdResult>
            <EmployeeId>string</EmployeeId>
            <LastName>string</LastName>
            <FirstName>string</FirstName>
            <Phone>string</Phone>
            <Email>string</Email>
          </GetEmployeeByLanIdResult>
        </GetEmployeeByLanIdResponse>
      </soap12:Body>
    </soap12:Envelope>

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