Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / December 2007

Tip: Looking for answers? Try searching our database.

WCF / J2EE interoperability - DataTable

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Elyo Ravuna - 07 Dec 2007 17:36 GMT
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
John Saunders [MVP] - 08 Dec 2007 02:03 GMT
> 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?
Signature

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

Elyo Ravuna - 08 Dec 2007 11:56 GMT
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

> > 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?
Spam Catcher - 08 Dec 2007 21:48 GMT
=?Utf-8?B?RWx5byBSYXZ1bmE=?= <akora@community.nospam> wrote in
news:FE56E18B-B0B8-44ED-9DCC-A2F92A0526F1@microsoft.com:

> 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.

Signature

spamhoneypot@rogers.com (Do not e-mail)

Steven Cheng[MSFT] - 10 Dec 2007 03:13 GMT
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@community.nospam>
References:  <9B0E1E0E-4B87-4306-84AB-881AFDC46623@microsoft.com>
<ezP7a6TOIHA.3940@TK2MSFTNGP05.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:

> > 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
Manas Singh - 18 Dec 2007 21:19 GMT
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

> Hi Elyo,
>
[quoted text clipped - 38 lines]
> ----
> > John Saunders | MVP - Windows Server System - Connected System Developer

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.