on 09-26-2008 10:37 AM
Hi,
I am new to Xcelsius and have been trying to build a web service to return an xml document to Xcelsius. The xml document is created using linq to sql and builds the document as the sample below. The web method is also reproduced. I suspect the problem is that the document is returned as a string rather than an Xdocument, Does anyone have experience of this method, could you correct my web method so that it will return the XML as a document rather than a string?
Sample returned:
<string => <?xml version="1.0" encoding="utf-8"?>
<Data>
<variable name="Turnover">
<Row>
<column>Central</column>
<column>12345</column>
</Row>
<Row>
<column>North East</column>
<column>12345</column>
</Row>
<Row>
<column>North West</column>
<column>12345</column>
</Row>
<Row>
<column>North CentralW</column>
<column>12345</column>
</Row>
<Row>
<column>South East</column>
<column>12345</column>
</Row>
<Row>
<column>South West</column>
<column>12345</column>
</Row>
</variable>
</Data>
</string>
Web method:
<WebMethod()> _
Public Function ReportDataTurnover() As String
Dim DB As New ReportsDataContext
Dim masterRep = <Data>
<variable name="Turnover">
<%= From Turnover In DB.Turnovers _
Select <Row>
<column><%= Turnover.Depot %></column>
<column><%= Turnover.Turnover %></column>
</Row> %>
End Function
Hi Joe
Have you tried removing
<string => <?xml version="1.0" encoding="utf-8"?>
</string>
from the return string and see if it works?
Charles
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.