I want to Create Complex Form Contains Multiple SharePoint Lists using web service data connection in infopath 2010.
But when I'm trying to add a data connection to the infopath everything goes ok except when trying to entering sample values to getlistItem Method it gives me errors.
Steps to get error message:
1- in infopath 2010 ->Data Menu>select Data Connections > add Data Connection(Secondery)
2-select Create New Connection to Receive Data >select Receive Data>press Next>select SOAP WEB SERVICE>press NEXT.
3- enter web service url for my site http://servername/site /_VTI_BIN/LISTS.ASMX > ENTER login data>PRESS NEXT
4- select GetListItems Web Method
5- finally set sample value
- tnsListName:
myListName
- tnsQuery:
Trial1>>>>>>>>> <Where> <Eq> <FieldRef Name="ows_ID"/> <Value Type="Integer">1</Value> </Eq> </Where>
Trial2>>>>>>>>> <Query> <Where> <Eq> <FieldRef Name="ows_ID"/> <Value Type="Integer">1</Value> </Eq> </Where> </Query>
Trial3>>>>>>>>> <Where> <Eq> <FieldRef Name="ID"/> <Value Type="Integer">1</Value> </Eq> </Where>
Trial4>>>>>>>>> <Query><Where> <Eq> <FieldRef Name=quot;OWS_IDquot;/> <Value Type=quot;Integerquot;>1</Value> </Eq> </Where><Query/>
Error message :
The SOAP response indicates that an error occurred on the server:
Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.
<detail><errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">Element <Query> of parameter query is missing or invalid.</errorstring><errorcode xmlns="http://schemas.microsoft.com/sharepoint/soap/">0x82000000</errorcode></detail>