java & microsoft interoperability

Hi all,

According to the idea of Web Services technology different platforms should be able to communicate.. However, this is the theoritical point of the issue. What is the situation in the practical world?

Java Web Service , Microsoft client>> Can they communicate? What would be probable problems? Which versions of Java platform should be used? Does JAX-RPC help on this, or does it create problems?

What about JAX-WS?

Regards

[468 byte] By [cesncna] at [2007-11-26 15:20:45]
# 1
Hello.I'm trying to establish communication between a .NET web service and a Java client.Which classes should I use ?Can a Java ArrayList receive the data from a .NET ArrayList trough a web service?
NNevesa at 2007-7-8 11:48:56 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

> Hi all,

>

> According to the idea of Web Services technology

> different platforms should be able to communicate..

> However, this is the theoritical point of the issue.

> What is the situation in the practical world?

>

It works, period.

> Java Web Service , Microsoft client>> Can they

yes, no problem.

> communicate? What would be probable problems? Which

None as long as you keep within the WS-I standards.

> versions of Java platform should be used? Does

Any. The client doesn't know or care about the platform the server uses, and the server couldn't care less about the client.

> JAX-RPC help on this, or does it create problems?

>

> What about JAX-WS?

>

You can't send serialised Java objects over the line and expect a non-Java client using the same JVM version to make sense of them.

Just stick to WS-I compliant SOAP.

jwentinga at 2007-7-8 11:48:56 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3

> Hello.

>

> I'm trying to establish communication between a .NET

> web service and a Java client.

>

> Which classes should I use ?

Any you define a mapping for in your WSDL.

> Can a Java ArrayList receive the data from a .NET

> ArrayList trough a web service?

Not directly. You'll need to map them in some way.

Webservices should use arrays to send data, not collections as those aren't portable.

jwentinga at 2007-7-8 11:48:56 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4

Just to illustrate how things can go terribly wrong when you unintentionally expose a Collection through a webservice, here's generated WSDL for HashMap:

<xsd:complexType name="ArrayOfanyType">

<xsd:complexContent>

<xsd:restriction base="soapenc:Array">

<xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:anyType[]"/>

</xsd:restriction>

</xsd:complexContent>

</xsd:complexType>

<xsd:complexType name="HashMap">

<xsd:sequence>

<xsd:element name="keys" type="ArrayOfanyType"/>

<xsd:element name="values" type="ArrayOfanyType"/>

</xsd:sequence>

</xsd:complexType>

which is of course complete garbage, and makes interpreting the results of that call almost impossible.

A List would probably be mapped to an ArrayOfanyType directly, making it usable to the client but loosing all typing in the process.

jwentinga at 2007-7-8 11:48:56 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 5

jwentig:

Is for that reason that when I try to build a web service that has a web method that returns, for instance, a ResultSet, it gives a compile error saying that he can't find the wdsl file?

Or when the web method throw other exception than Exception, e.g. SQLException?

I'm using NetBeans 5.5 to do the web service. I have been reading some stuff about it, especially in the docs that sun provides, and I'm aware that NetBeans create the wsdl file for me; I just have to code the web service.

Am I correct?

Thanks for your answers. I'm a newbie in WS but I'm trying to go deeper.

NNevesa at 2007-7-8 11:48:56 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 6
You should check out the Web Services Interoperability Technologies (WSIT) project on java.net ( http://wsit.dev.java.net). It is an extension to JAX-WS that focuses on interoperating with Microsoft.
dkohlerta at 2007-7-8 11:48:56 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...