HighTechTalks DotNet Forums  

WCF / J2EE interoperability - DataTable

Dotnet Framework (Webservices) microsoft.public.dotnet.framework.webservices


Discuss WCF / J2EE interoperability - DataTable in the Dotnet Framework (Webservices) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Elyo Ravuna
 
Posts: n/a

Default WCF / J2EE interoperability - DataTable - 12-07-2007 , 12:36 PM






My web service is based on WCF. One of the operations needs to return a
two-dimensional data structure. May I return a DataTable without losing
interoperability with J2EE ?

Sincerely.
Elyo Ravuna


Reply With Quote
  #2  
Old   
John Saunders [MVP]
 
Posts: n/a

Default Re: WCF / J2EE interoperability - DataTable - 12-07-2007 , 09:03 PM






"Elyo Ravuna" <akora (AT) community (DOT) nospam> wrote

Quote:
My web service is based on WCF. One of the operations needs to return a
two-dimensional data structure. May I return a DataTable without losing
interoperability with J2EE ?
Of course not. Does J2EE know about .NET objects at all?
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer




Reply With Quote
  #3  
Old   
Elyo Ravuna
 
Posts: n/a

Default Re: WCF / J2EE interoperability - DataTable - 12-08-2007 , 06:56 AM



Thank you for the answer, that's exactly what I thought.

I can think of many workarounds but I would be very glad to hear the
best-practices.

Elyo Ravuna


"John Saunders [MVP]" wrote:

Quote:
"Elyo Ravuna" <akora (AT) community (DOT) nospam> wrote in message
news:9B0E1E0E-4B87-4306-84AB-881AFDC46623 (AT) microsoft (DOT) com...
My web service is based on WCF. One of the operations needs to return a
two-dimensional data structure. May I return a DataTable without losing
interoperability with J2EE ?

Of course not. Does J2EE know about .NET objects at all?
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer




Reply With Quote
  #4  
Old   
Spam Catcher
 
Posts: n/a

Default Re: WCF / J2EE interoperability - DataTable - 12-08-2007 , 04:48 PM



=?Utf-8?B?RWx5byBSYXZ1bmE=?= <akora (AT) community (DOT) nospam> wrote in
news:FE56E18B-B0B8-44ED-9DCC-A2F92A0526F1 (AT) microsoft (DOT) com:

Quote:
I can think of many workarounds but I would be very glad to hear the
best-practices.
Send an array of DTOs (Data Transfer Objects) or an XML document.

I usually like to use DTOs since most languages can parse them fine and
thus save the prasing logic required for an XML document.

--
spamhoneypot (AT) rogers (DOT) com (Do not e-mail)


Reply With Quote
  #5  
Old   
Steven Cheng[MSFT]
 
Posts: n/a

Default Re: WCF / J2EE interoperability - DataTable - 12-09-2007 , 10:13 PM



Hi Elyo,

Since .NET 2.0 datatable can be serialized into XML, I think you may pass
it as a XML document/fragment to J2EE. However, it still require your J2EE
client to be able to correctly parse the XML fragment. You may either use
XML API or some XML-Object mapping framework to do this in J2EE.

Anyway, directly return .NET object to heterogenious client is not
recommended(no matter whether it is xml serializable or not).

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
From: =?Utf-8?B?RWx5byBSYXZ1bmE=?= <akora (AT) community (DOT) nospam>
References: <9B0E1E0E-4B87-4306-84AB-881AFDC46623 (AT) microsoft (DOT) com>
<ezP7a6TOIHA.3940 (AT) TK2MSFTNGP05 (DOT) phx.gbl>
Subject: Re: WCF / J2EE interoperability - DataTable
Date: Sat, 8 Dec 2007 03:56:01 -0800


Thank you for the answer, that's exactly what I thought.

I can think of many workarounds but I would be very glad to hear the
best-practices.

Elyo Ravuna


"John Saunders [MVP]" wrote:

Quote:
"Elyo Ravuna" <akora (AT) community (DOT) nospam> wrote in message
news:9B0E1E0E-4B87-4306-84AB-881AFDC46623 (AT) microsoft (DOT) com...
My web service is based on WCF. One of the operations needs to return a
two-dimensional data structure. May I return a DataTable without losing
interoperability with J2EE ?

Of course not. Does J2EE know about .NET objects at all?
--

----------------------------------------------------------------------------
----
Quote:
John Saunders | MVP - Windows Server System - Connected System Developer





Reply With Quote
  #6  
Old   
Manas Singh
 
Posts: n/a

Default Re: WCF / J2EE interoperability - DataTable - 12-18-2007 , 04:19 PM



Steven is right - you should use XML to send your data rather than directly
returning .NEt object.
While sending data in XML if you are using SOAP then you should use SOAP
encodings. SOAP encodings are standards and it has encoding for Arrays -
which can be arrays of simple types as well as arrays of compound types.

Thx,
Manas Singh
www.manassingh.com

"Steven Cheng[MSFT]" wrote:

Quote:
Hi Elyo,

Since .NET 2.0 datatable can be serialized into XML, I think you may pass
it as a XML document/fragment to J2EE. However, it still require your J2EE
client to be able to correctly parse the XML fragment. You may either use
XML API or some XML-Object mapping framework to do this in J2EE.

Anyway, directly return .NET object to heterogenious client is not
recommended(no matter whether it is xml serializable or not).

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
From: =?Utf-8?B?RWx5byBSYXZ1bmE=?= <akora (AT) community (DOT) nospam
References: <9B0E1E0E-4B87-4306-84AB-881AFDC46623 (AT) microsoft (DOT) com
ezP7a6TOIHA.3940 (AT) TK2MSFTNGP05 (DOT) phx.gbl
Subject: Re: WCF / J2EE interoperability - DataTable
Date: Sat, 8 Dec 2007 03:56:01 -0800


Thank you for the answer, that's exactly what I thought.

I can think of many workarounds but I would be very glad to hear the
best-practices.

Elyo Ravuna


"John Saunders [MVP]" wrote:

"Elyo Ravuna" <akora (AT) community (DOT) nospam> wrote in message
news:9B0E1E0E-4B87-4306-84AB-881AFDC46623 (AT) microsoft (DOT) com...
My web service is based on WCF. One of the operations needs to return a
two-dimensional data structure. May I return a DataTable without losing
interoperability with J2EE ?

Of course not. Does J2EE know about .NET objects at all?
--

----------------------------------------------------------------------------
----
John Saunders | MVP - Windows Server System - Connected System Developer





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.