Re: wrting a soap response to file



On Aug 11, 1:37 pm, jude.uliba...@xxxxxxxxxxxxxxx wrote:
On Aug 11, 1:29 pm, jude.uliba...@xxxxxxxxxxxxxxx wrote:



On Aug 11, 12:32 pm, "Mike Schilling" <mscottschill...@xxxxxxxxxxx>
wrote:

jude.uliba...@xxxxxxxxxxxxxxx wrote:
Hello:

I'm using AXIS to create a SOAP Envelope.  I can successfully send
this request to the web service and get a response back.  But now, I
want to write the response to file.  How is this done?

What form do you have the response in?  If it's XML, you can use a
java.xml.transform.Transformer to turn it into a byte stream and write
those bytes to a file.  (Use a StreamResult constructed from a File or
a FileOutputStream.)

The response is in an AXIS SOAPEnvelope object.  Let me look at any
other return values that an axis.client.Call will return.  I'll also
try the Transformer class

The Transformer constructor takes an XML source and a result.  Well,
it doesn't recognize the SOAPEnvelope as an XML source.  I'm also
getting the error that Transformer is abstract and can't be
instantiated.  Sweet.... This just gets better all the time.

Call returns a SOAPEnvelope (response = call.invoke(request)). I'm
searching through the AXIS java doc for something that will stream the
Envelope to a file. No luck yet.
.



Relevant Pages

  • RE: HTTPS WebRequest and WebResponse
    ... > // Creates an HttpWebRequest for the specified URL. ... > // Displays all the headers present in the response received from the URI. ... > // Obtain a 'Stream' object associated with the response object. ... > StreamReader readStream = new StreamReader(ReceiveStream, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Read everything from socket
    ... There is no standard way to indicate a stream is finished ... line from the RETR command ... Or from the LIST command ... the actual byte length is given of the response steam. ...
    (perl.beginners)
  • HTTPS WebRequest and WebResponse
    ... // Creates an HttpWebRequest for the specified URL. ... // Displays all the headers present in the response received from the URI. ... // Obtain a 'Stream' object associated with the response object. ... StreamReader readStream = new StreamReader(ReceiveStream, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: HttpWebRequest.GetRequestStream times out
    ... When I encounter this exception, this is printed in the log: ... Stream sendStream = httpReq.GetRequestStream; ... you never read more than 1 kB of the response, ... The request timeout is set to 100 seconds, and the requests that time out ...
    (microsoft.public.dotnet.framework.performance)
  • Re: HttpWebRequest.GetRequestStream times out
    ... Stream sendStream = httpReq.GetRequestStream; ... Stream respstrm = resp.GetResponseStream; ... bytesRead = respstrm.Read; ... Save for the somewhat scary exception handling and the fact that you never read more than 1 kB of the response, ...
    (microsoft.public.dotnet.framework.performance)