Feel free to just answer my topic question or read on to get a more detailed version of what Im asking -
When I print out some values to see what they are I get:
The first line, responseBody is of the type InputStream
The second line deviceCollection of the type DeviceCollection, in teh deviceContainer - It is this line I am mainly concered with. It is a stream so I had no idea what to expect when I print it out, just as long as it wasnt null!! But I dont know what to make of printing deviceCollection: deviceContainer.DeviceCollection@1764be1 - does this mean I actually was able to bind the responseBody to deviceCollection as a stream? (through this line: deviceCollection = access.readXML(method.getResponseBodyAsStream(null));)
And the third line data is of the type TreeNode, but that line is pretty obvious
So Im unsure how to interpret this. The first line seems to suggest it is working correctly right, because it is calling an auto close method on the stream right? However when I change some things in that class and try to also print out responseBody as a String, I get:
I think this also might be OK though, because if Im right it is saying it received the data I wanted and printed it out as a string, but when it also tried to print it as the stream, the stream was already closed. I think this is what this means, please clear this up for me though. deviceCOllection form teh third line also changes to null when I do this, but I would guess that is also the result of the stream being auto closed right?
It is this second line that Im mainly concerned with. Im trying to bind the responseBody which is that xml to deviceCollection. It seems I was successful in that first bit up there right? Or am I misinterpreting?
True wisdom is in knowing you know nothing - Socrates
And the data that should be in deviceColelction is some xml froma web service:
I am trying to get it to this point, so I can then somehow bind the three nodes to a TreeNode, but I dont know hwo I am going to do so yet. One step at a time seeing as how Im learning a lot of this as I go
Is there a way I can see if the data contained therein is that xml I posted up there? I tried doing System.out.println("printing deviceCollection = access.readXML(method.getResponseBodyAsStream(null));: "
but it gves me the exact same output as above. But I guess that is what you meant by it having a default toString representation. SO I guess I should say, is there a way for me to figure out what its internal state would be?