- Open Microsoft SharePoint Designer 2010.
- Click on Open Site.
- Under Site name enter the location to the SharePoint site you wish to connect too. Click Open.
- Under the quick launch area (located to the left of the screen) expand the Site Objects tab.
- Click on Data Sources. The summary area should now show you a list of data sources that are inside SharePoint. Such as lists, document libraries, etc.
- Click on SOAP Service Connection in the ribbon, located at the top of the screen. You will see the following:
- The Service description location is where you will want to put the path to your ASP.NET WSDL. Should be something like https://localhost/ws-server/MyWebService.asmx?WSDL or whatever you setup.
- Click on Connect Now or Reconnect. You should see your other fields light up.
To add this Web Service directly to a page in SharePoint do the following:
- Still remaining in SharePoint Designer, click on the Site Pages option under Site Objects.
- Add a new ASPX page. You can add this page by:
- Click on the drop-down menu for Page from your ribbon at the top of the screen.
- Select ASPX and rename the file.
- Right-click on the newly created file from your summary screen.
- Select Edit File in Advanced Mode from the context menu.
- You will see some code but, what you are interested in is the code between the <form> tags. Click and place your cursor between those tags. Or whatever you have setup on the page to meet your needs.
- From your ribbon you will want to select the Insert tab.
- Under the Data Views & Forms category you will want to select Data View. This will present you with a list of options.
- Scroll down until you find the SOAP service you created under Data Sources earlier. If everything is successful, you should see a new DataFormWebPart that contains data fed back from the Web Service you just called. If you get an error you may need to check your logs to determine why.
No comments:
Post a Comment