Consuming Web Services  
Author Message
scottrbutler@hotmail.com





PostPosted: 2005-8-26 4:58:00 Top

java-programmer, Consuming Web Services Can someone point me to a decent resource about consuming a web service
in Java? Or maybe reccomend a book?

Thanks,
Scott

 
Andrew Thompson





PostPosted: 2005-8-26 5:04:00 Top

java-programmer >> Consuming Web Services On 25 Aug 2005 13:57:45 -0700, email***@***.com wrote:

> Can someone point me to a decent resource about consuming ..

[1]

>.. a web service in Java?

Ehhh?
[1] <http://www.google.com/search?hl=en&q=definition+consuming>

What does 'consuming' mean to you?

--
Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
"What did you bring me, dear mother, to keep me from the gallis' pole?"
Leadbelly 'The Gallis' Pole'
 
scottrbutler@hotmail.com





PostPosted: 2005-8-26 5:31:00 Top

java-programmer >> Consuming Web Services I have a web service, it returns an XML stream. I need to access the
XML to get to the data.

 
 
Andrew Thompson





PostPosted: 2005-8-26 6:02:00 Top

java-programmer >> Consuming Web Services On 25 Aug 2005 14:31:13 -0700, email***@***.com wrote:

> I have a web service, it returns an XML stream. I need to access the
> XML to get to the data.

Oh, riiiigt.

OK, try this snippet..

DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
/*
factory.setValidating(true);
factory.setNamespaceAware(true);
factory.setSchema(schema);*/
try {
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse( f );
...

DocumentBuilder.parse() also accepts a stream, so..

HTH

--
Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
"Let us not talk falsely now, the hour is getting late."
Bob Dylan 'All Along The Watchtower'