To create DataView in SharePoint Desgner based on SOAP Web Service do the following Steps:
- From Navigation Pane, click Data Sources. From Ribbon, click the SOAP Service Connection Menu Item. DataSource Dialog Properties will appear:
- Service Description Location: This is the URL to the
service description (WSDL) file.
ex: http://[SharePoint Site URL]/_vti_bin/lists.asmx?wsdl
Click Connect Now so SharePoint Designer can retrieve the description file. - Data Command: Like a REST service connection, this box identifies the command that your data source is going to be configured to run. You need to support multiple datasource if you will use multiple command.
- Port: If the web service supports multiple interfaces, they will be listed here. The
default port will be selected. - Operation: When the Connect Now button is clicked, the wizard retrieves the WSDL
file, which defines all of the operations that can be performed on the web service. - Parameters: As mentioned previously, if the operation selected in the previous step
requires parameters, those will be listed.
If you tried to modify any parameter to set its value you will find check-box you must checked it if you want to your parameter dynamic read from (Control, QueryString, Cookie, Post Data,...) - The wizard has two other tabs that are the same as the other data sources.
- The Login tab can be used to set default login credentials.
- The General tab is used to provide a description of the data source configuration.
- Create a new web part page, call it TestSOAP.aspx, and open it in Edit mode. .
- Click in the web part zone, and then from the Ribbon, click Data View and add your data source.
- Drag your needed columns from the datasource and apply your adjustment and formatting of data view.
- When you finish you can export DataView by the following steps:
- click into the Web Part ribbon tab under List View Tools
- You have two options, To Site Gallery, and To File.
- If you set parameter in your web service to read from connected webpart you find ParameterBindings appeared as below (check text in red). You can add more parameters with same way:
<DataSources> <SharePoint:SoapDataSource runat="server" id="SoapDataSource1" AuthType="Basic" WsdlPath="http://ServerUrl/_vti_bin/lists.asmx?WSDL" SelectUrl="http:// ServerUrl/_vti_bin/lists.asmx" SelectAction="http://schemas.microsoft.com/ sharepoint/soap/GetList" SelectPort="ListsSoap" SelectServiceName="Lists" AuthUserName="yellowdc\spadmin" AuthPassword="P@ssw0rd">< SelectCommand> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <GetList xmlns="http://schemas.microsoft.com/sharepoint/soap/"> <listName>{listName}</listName> </GetList> </soap:Body></soap:Envelope> </SelectCommand> <SelectParameters><WebPartPages:DataFormParameter Name="listName" ParameterKey="listName" PropertyName="ParameterValues" DefaultValue="{43AFBEAA-674C-406B-9ACB-0870CD4B88F2}"/> </SelectParameters> </SharePoint:SoapDataSource> </DataSources> |
<parameterbindings> <ParameterBinding Name="listName" Location="None" DefaultValue="{43AFBEAA-674C-406B-9ACB-0870CD4B88F2}"/> <ParameterBinding Name="dvt_apos" Location="Postback;Connection"/> <ParameterBinding Name="ManualRefresh" Location="WPProperty[ManualRefresh]"/> <ParameterBinding Name="UserID" Location="CAMLVariable" DefaultValue="CurrentUserName"/> <ParameterBinding Name="Today" Location="CAMLVariable" DefaultValue="CurrentDate"/> <ParameterBinding Name="dvt_firstrow" Location="Postback;Connection"/> <ParameterBinding Name="dvt_nextpagedata" Location="Postback;Connection"/> </parameterbindings> |