[jdom-interest] InputSource?

Alex Rosen arosen at silverstream.com
Tue Feb 19 08:01:12 PST 2002


Did you try the suggestion in the JDOM FAQ?

> -----Original Message-----
> From: jdom-interest-admin at jdom.org
> [mailto:jdom-interest-admin at jdom.org]On Behalf Of Steve Beech
> Sent: Monday, February 18, 2002 9:04 AM
> To: 'jdom-interest'
> Subject: [jdom-interest] InputSource?
> 
> 
> Dear All,
> 
> I have a problem. I have a server/client set up and want to 
> send a XML doc
> from client to server.
> Server then reads XML doc using JDOM.
> 
> On the client I create a printwriter on the socket like so....
> out = new PrintWriter(testSocket.getOutputStream(), true);
> and write my xml doc using....
> out.println("<logonRequest><userID>P98047183</userID></logonRe
> quest>");
> 
> On server I open an input source thus:
> InputSource is = new InputSource(socket.getInputStream());
> 
> and then call my JDOM method:
> 
> jdh.saxDoc(is, out);
> 
> Method is as follows:
> 
> public void saxDoc (InputSource is, PrintWriter out) throws 
> IOException,
> JDOMException {        
>         SAXBuilder builder = new SAXBuilder(false);
>         Document doc = builder.build(is);
>     }
> 
> However, this just hangs and never appears to finish 
> building. I think I
> must be using InputSource incorrectly or something.
> Can anybody help?
> 
> Thanks in advance,
> Steve
> 
> --------------------------------------------------------------
> --------------
> -------------------------
> Steve Beech                                                   
>     Tel: 0116
> 207 8162
> Software Developer                                   e-mail:
> jbeech at dmu.ac.uk
> Room 0.36 Portland Building        e-mail: steve at monkey-media.co.uk
> De Montfort University
> The Gateway, Leicester LE1 9BH
> --------------------------------------------------------------
> --------------
> ------------------------
> 
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/yo
uraddr at yourhost.com



More information about the jdom-interest mailing list