Hi,

I'm using SOAP with JAXB to make me nice Java from that XML :-) I receive
the XML via attachement:

----------------------------------------------------------------------------
-----------
AttachmentPart attachment                                               =
(AttachmentPart)it.next();
Object content                                                          =
attachment.getContent();
javax.xml.transform.stream.StreamSource contentSource           =
(javax.xml.transform.stream.StreamSource)content;
----------------------------------------------------------------------------
------------

I need an InputStream for the unmarshal method of the generated JAXB classes
(stoccs)

This one doesn't work - it is null: 

----------------------------------------------------------------------------
--------------
InputStream ip                                                          =
contentSource.getInputStream();
----------------------------------------------------------------------------
---------------

The contentSource has only a Reader; a String Reader. The method below
works:

----------------------------------------------------------------------------
---------------
java.io.StringReader sr     =
(java.io.StringReader)contentSource.getReader();
----------------------------------------------------------------------------
---------------

But this is the JAXB-method and it requires an InputStream:

----------------------------------------------------------------------------
---------------
stoccs                                                                  =
stoccs.unmarshal   (isr); 
----------------------------------------------------------------------------
---------------

Thanx

> AXA eSolutions GmbH
> AXA Konzern AG Germany
> Oliver Lauer 
> Web Architect
> Wörthstraße 34
> D-50668 Köln
> Germany
> Tel.: +49 221 148 31277
> Fax: +49 221 148 43963
> Mobil: +49 179 59 064 59
> e-Mail: [EMAIL PROTECTED]
> _____________________________
> 


-----Ursprüngliche Nachricht-----
Von: Justin Rowles [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 24. Januar 2002 13:30
An: 'Tomcat Users List'
Betreff: RE: READER to InputStream


> No, I've a Reader and need an InputStream, sounds silly but 
> the API needs so...:-(

The abstract class Reader doesn't have any method to report which
InputStream it is connected to.

I think you may be out of luck.

On the other hand, tell us more about the problem - it sounds interesting.

J.
-- 
You're only jealous cos the little penguins are talking to me. 



***************************************************************
For more information on Ordnance Survey products and services,
visit our web site at http://www.ordnancesurvey.co.uk
***************************************************************




--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>


------------------------------------------------------------------------------
Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene Information 
nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung reichen wir Ihnen gerne 
auf Anforderung in schriftlicher Form nach. Beachten Sie bitte, dass jede Form der 
unautorisierten Nutzung, Veroeffentlichung, Vervielfaeltigung oder Weitergabe des 
Inhalts dieser E-Mail nicht gestattet ist.Diese Nachricht  ist ausschliesslich fuer 
den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie nicht der 
vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein, so bitten wir Sie, sich 
mit dem Absender der E-Mail in Verbindung zu setzen.
----------------------------
For legal and security reasons the information provided in this e-mail is not legally 
binding. Upon request we would be pleased to provide you with a legally binding 
confirmation in written form. Any form of unauthorised use, publication, reproduction, 
copying or disclosure of the content of this e-mail is not permitted. This message is 
exclusively for the person addressed or their representative. If you are not the 
intended recipient of this message and its contents, please notify the sender 
immediately.

==============================================================================


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to