:: Forum >>

Help please with xml webservice

Hi

Can any one tell me why the follow does not work for me, i cant see what is wrong with it

I have a web service that out put the following xml

<?xml version="1.0" encoding="utf-8" ?>
- <ArrayOfContact xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://tempuri.org/">
- <contact>
<ID>1</ID>
<FirstName>bob</FirstName>
<LastName>brown</LastName>
</contact>
- <contact>
<ID>2</ID>
<FirstName>jack</FirstName>
<LastName>doe</LastName>
</contact>
</ArrayOfContact>


then i have the following Javascript

var data = new Active.XML.Table;
data.setURL("http://localhost/MyWebService/Service1.asmx/GetContact");
//data.setParameter("", ""); no params needed
data.setNamespace("xi", "http://tempuri.org/");
data.setColumns(["xi:FirstName"]);
data.request();

var obj = new Active.Controls.Grid;

obj.setDataModel(data);
obj.setColumnProperty("texts", ["FirstName"]);
document.write(obj);


Why does this not work??
Luke Farbotko
Thursday, September 30, 2004
Is there any one oyt there that can see what might have done wrong?? i am lost
Luke Farbotko
Sunday, October 3, 2004
I cannot see whats wrong - everything seems ok :-(
Alex (ActiveWidgets)
Monday, October 4, 2004
I'm not a pro, but this is what I do with mine..
var data = new Active.XML.Table;
data.setURL("http://localhost/MyWebService/Service1.asmx/GetContact");
//data.setParameter("", ""); no params needed
data.setNamespace("xi", "http://tempuri.org/");
data.setColumns(["xi:FirstName"]);
data.request();

TO....

var data = new Active.XML.Table;
data.setURL("http://******/Get_Quotes.xml?mandID=ON");
table.setRows("//root/*");
data.setColumns(["FirstName", "LastName"]);
data.request();


And change your template that calls for the SQL data to something like...

<root xmlns:sql="urn:schemas-microsoft-com:xml-sql">
<sql:header>
<sql:param name="mangID"></sql:param>
</sql:header>
<sql:query>
exec dbo.Get_Quotes @mangID
</sql:query>
</root>


It just looks like Active W cannot find your data in your xml table, so it has to do with your 'setRows'
Matt
Tuesday, October 5, 2004
Hello Luke,

My name is Remi Farbotko, Im working in the polish weekly magazine in London. I wondering that you are my family maybe. That's could be quite nice, because there is not so many people with this surname on the world. If you are interested about this question, please contact me.

Regards

Remi
Remigiusz Farbotko

Marketing Department

Cooltura – polish weekly magazine

137 Dawes Rd

SW6 7EB London

Tel: 0207 386 3947

Fax:0207 386 3771

Email: [email protected]
remi
Monday, April 18, 2005

This topic is archived.


Back to support forum

Forum search