This project is read-only.

How do I represent this class in JavaScript?

Topics: User Forum
Mar 24, 2008 at 12:50 AM
Hi,
One of the services I need to use, uses the following for a method:

<soap:Body>
<SubmitMessage xmlns="http://www.itcrowd.be/api">
<message>
<Id>int</Id>
<Title>string</Title>
<Description>string</Description>
<Snippets>
<Snippet>
<Id>int</Id>
<Language>string</Language>
<Body>string</Body>
</Snippet>
<Snippet>
<Id>int</Id>
<Language>string</Language>
<Body>string</Body>
</Snippet>
</Snippets>
</message>
</SubmitMessage>
</soap:Body>

So I have to submit a Message.

I had something like

var message = new Object();
message.Title = "some title";
message.Description = "some description";

message.Snippets = new Array();
message.Snippets0.Language = "C#"
message.Snippets0.Body = "some content";

parameters.Add("message", message);

But that doesn't seem to work....