Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Need to xpose odata service to client

$
0
0

hi all,

         iam new to hana platform, i have webservice which is xposed to client, please see the code below i want replicate that in hana, is that possible.

 

 

Sub CreateXML()

        Dim spTA As New sp_GETXML_WSTableAdapter

        Dim spTB As dsTradenet.sp_GETXML_WSDataTable = spTA.GetData("TW-2461")

        Dim spPTA As New sp_GETXML_WS_PRODTableAdapter

        Dim spPTB As dsTradenet.sp_GETXML_WS_PRODDataTable

 

 

        Dim dr As DataRow

        Dim dp As DataRow

 

 

        Dim doc As XmlDocument = New XmlDocument()

        Dim docNode As XmlNode = doc.CreateXmlDeclaration("1.0", "UTF-8", Nothing)

        doc.AppendChild(docNode)

 

 

        Dim enqNode As XmlNode = doc.CreateElement("ENQUIRIES")

        doc.AppendChild(enqNode)

 

 

        Dim allNode As XmlNode = doc.CreateElement("ALL")

        enqNode.AppendChild(allNode)

 

 

 

 

        For Each dr In spTB.Rows

            Dim recNode As XmlNode = doc.CreateElement("REPREC")

            allNode.AppendChild(recNode)

 

 

            For x As Integer = 0 To dr.Table.Columns.Count - 1

                Dim r As XmlNode = doc.CreateElement(dr.Table.Columns(x).ColumnName)

                r.AppendChild(doc.CreateTextNode(cnn(dr.Item(x))))

                recNode.AppendChild(r)

            Next

 

 

            spPTB = spPTA.GetData(dr.Item("DOCREF"))

 

 

            For Each dp In spPTB.Rows

                Dim prodNode As XmlNode = doc.CreateElement("PRODUCTS")

                For y As Integer = 0 To dp.Table.Columns.Count - 1

                    Dim p As XmlNode = doc.CreateElement(dp.Table.Columns(y).ColumnName)

                    p.AppendChild(doc.CreateTextNode(dp.Item(y)))

                    prodNode.AppendChild(p)

                Next

                recNode.AppendChild(prodNode)

            Next

        Next

 

 

        doc.Save("c:\temp\doc.xml")

    End Sub


Viewing all articles
Browse latest Browse all 6412

Trending Articles