5
GetListItems 함수를 호출하는 중 Visual Studio 2008 Express에서는 작동하지만 Visual Basic 2010 Express에서는 작동하지 않으므로 종류가 이상합니다.System.Xml.XmlNode를 System.Xml.Linq.XElement로 변환 할 수 없습니다.
Dim ndQuery As XmlNode = xmlDoc.CreateNode(XmlNodeType.Element, "Query", "")
Dim ndViewFields As XmlNode = xmlDoc.CreateNode(XmlNodeType.Element, "ViewFields", "")
Dim ndQueryOptions As XmlNode = xmlDoc.CreateNode(XmlNodeType.Element, "QueryOptions", "")
ndQueryOptions.InnerXml = "<IncludeMandatoryColumns>False</IncludeMandatoryColumns>" & _
"<DateInUtc>True</DateInUtc>"
ndViewFields.InnerXml = "<FieldRef Name=""LinkFilename"" />" & _
"<FieldRef Name=""Empresa"" />" & _
"<FieldRef Name=""Puesto"" />" & _
"<FieldRef Name=""Fecha_x0020_Vigente"" />" & _
"<FieldRef Name=""Oferta_x0020_vigente"" />"
ndQuery.InnerXml = ""
Try
Dim ndListItems As XmlNode = IntranetLists.GetListItems(ListUUID, Nothing, _
ndQuery, ndViewFields, Nothing, ndQueryOptions, Nothing)
그리고이 함수 미안 호출입니다 :
Public Function GetListItems(ByVal listName As String, ByVal viewName As String, ByVal query As System.Xml.Linq.XElement, ByVal viewFields As System.Xml.Linq.XElement, ByVal rowLimit As String, ByVal queryOptions As System.Xml.Linq.XElement, ByVal webID As String) As System.Xml.Linq.XElement
Dim inValue As ListasIntranetGureak.GetListItemsRequest = New ListasIntranetGureak.GetListItemsRequest()
inValue.Body = New ListasIntranetGureak.GetListItemsRequestBody()
inValue.Body.listName = listName
inValue.Body.viewName = viewName
inValue.Body.query = query
inValue.Body.viewFields = viewFields
inValue.Body.rowLimit = rowLimit
inValue.Body.queryOptions = queryOptions
inValue.Body.webID = webID
Dim retVal As ListasIntranetGureak.GetListItemsResponse = CType(Me,ListasIntranetGureak.ListsSoap).GetListItems(inValue)
Return retVal.Body.GetListItemsResult
End Function
가 작동하지 않는 경우, 알려주세요 우리는 그것이 작동하지 않는 길 *. http://tinyurl.com/so-hints –
게시 한 코드의 첫 번째 섹션은 무엇입니까? 그것은 분명히 불완전합니다. 내가 겪고있는 오류를보기 위해 문제를 재현 할 수있는 방법은 없습니다. –
이 예에서는 XElement를 XmlNode로 변환합니다. 하지만 질문 XmlNode XElement 묻습니다 ... –