Java - C# datatype problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.
 
[System.Web.Services.Protocols.SoapRpcMethodAttribute("",
RequestNamespace="http://xxxx/webservices/YYYYWS",
ResponseNamespace="http://xxxx/webservices/YYYYWS")]
[return:
System.Xml.Serialization.SoapElementAttribute("getDefinitionsReturn")]
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
 
Back
Top