468,309 Members | 1,121 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,309 developers. It's quick & easy.

Java - C# datatype problem

Hi,

I am writing a C# client to consume a Java web service. The web service
returns a vector how do i consume that in C#? I am writing a C# web
application.
Dec 14 '05 #1
2 1526
GeRmlc,

The web service should expose a WSDL document indicating the types that
are being passed in and returned from the web service. When you set a web
reference, a proxy should be generated which will expose this type to you.
It doesn't matter that a vector is used on the java side. The WSDL should
expose a type which can be consumed by any web client.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"GeRmIc" <Ge****@discussions.microsoft.com> wrote in message
news:4E**********************************@microsof t.com...
Hi,

I am writing a C# client to consume a Java web service. The web service
returns a vector how do i consume that in C#? I am writing a C# web
application.

Dec 14 '05 #2
[System.Web.Services.Protocols.SoapRpcMethodAttribu te("",
RequestNamespace="http://xxxx/webservices/YYYYWS",
ResponseNamespace="http://xxxx/webservices/YYYYWS")]
[return:
System.Xml.Serialization.SoapElementAttribute("get DefinitionsReturn")]
public object[] getDefinitions(int termcode, string languagecode) {
object[] results = this.Invoke("getDefinitions", new object[] {
termcode,
languagecode});
return ((object[])(results[0]));
}

this is a code snippet from the reference.cs file, when I try to access
getDefinition and put the return value in an Object it compiles file but the
problem is how do i get the values out from the object and display it?

The documentation of the webservice states that these are the things
returned from the WS.

An array of vectors containing the follwing (if existing):
Vector[0] – the snotes
Vector[1] – the hnotes
Vector[2] – the definitions
Vector[3] – the other comments

Dec 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Rhino | last post: by
458 posts views Thread by wellstone9912 | last post: by
jeffbroodwar
1 post views Thread by jeffbroodwar | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.