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 / September 2006

Tip: Looking for answers? Try searching our database.

Read XML serialization of an ADO.NET Recordset  in Java

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
roboB - 20 Sep 2006 17:10 GMT
Whth .NET WS I have serialized an ADO.NET Recordset in an XML Stream like this:

<xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
      xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
      xmlns:rs='urn:schemas-microsoft-com:rowset'
      xmlns:z='#RowsetSchema'>
<s:Schema id='RowsetSchema'>
      <s:ElementType name='row' content='eltOnly'>
              <s:AttributeType name='FIELD' rs:number='1' rs:nullable='true'>
                      <s:datatype dt:type='string' rs:dbtype='str'
dt:maxLength='512'/>
              </s:AttributeType>
              ...
              <s:AttributeType name='FIELDn' rs:number='n'
                       rs:nullable='true' rs:writeunknown='true'>
                      <s:datatype dt:type='string' rs:dbtype='str'
dt:maxLength='180'/>
              </s:AttributeType>
              <s:extends type='rs:rowbase'/>
      </s:ElementType>
</s:Schema>
<rs:data>
      <z:row FIELD1='C' ... FIELDn='(A)'/>
      <z:row FIELD1='C' ... FIELDn='(B)'/>
      ...
</rs:data>
</xml>

Now in my Java application I use Axis to obtain the WS Stream. How can
I deserialize this XML in Java classes?

I have seen JAXB, but it wants two file: an XSD Schema and a XML file....

Thanks

Roberto
John Saunders - 21 Sep 2006 01:36 GMT
> Whth .NET WS I have serialized an ADO.NET Recordset in an XML Stream like
> this:
[quoted text clipped - 30 lines]
>
> I have seen JAXB, but it wants two file: an XSD Schema and a XML file....

If that's what JAXB wants, then why not give it to JAXB?

Why would you expect Java or anything else to understand this XML format?
Does JAXB know about the 'urn:schemas-microsoft-com:rowset' namespace? If
not, then how will it be able to interpret an rs:data element?

You should think this through, starting with the WSDL file and its
associated schemas, and then, maybe finally deciding how to serialize your
ADO.NET Recordset. That's the final thing you should be doing, not the
first.

John
roboB - 24 Sep 2006 10:24 GMT
Ok, Jhon, pehaps I was not so very clear.

Some question more spicifically:

1) Why Does Microsoft persist an ADO.NET recordset in this mode if this is
not so very  useful to deserialize in Java environment? WS are made to do
interoperability more accessible...

2) How Do you think it is more convenient to serialize and deserialize
ADO.NET recordset in Java?

Thanks to you

> > Whth .NET WS I have serialized an ADO.NET Recordset in an XML Stream like
> > this:
[quoted text clipped - 43 lines]
>
> John
John Saunders - 24 Sep 2006 19:10 GMT
> Ok, Jhon, pehaps I was not so very clear.
>
[quoted text clipped - 3 lines]
> not so very  useful to deserialize in Java environment? WS are made to do
> interoperability more accessible...

Why would Java be an overwhelming consideration for Microsoft?

> 2) How Do you think it is more convenient to serialize and deserialize
> ADO.NET recordset in Java?

Why do you want Java or any other platform to have to understand what a
DataSet is? Pretend that DataSets don't exist and that you still have to
send the same data. Then separate the data to be sent from the platform
sending it.

John

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.