dev@jax-ws.java.net

Re: some rearch/tango questions

From: Bobby Bissett - Javasoft <Robert.Bissett_at_Sun.COM>
Date: Fri, 03 Mar 2006 17:20:47 -0500

>
> Wait, you aren't passing in OutputStream, do you?
>
>

Yep, that's what I'm doing. My code basically does:

   InputStream beginStream =
       new ByteArrayInputStream(WXF_START.getBytes());
   InputStream wsdlStream = wsdlRetriever.getWsdlAsStream(request);
   InputStream endStream = new ByteArrayInputStream(WXF_END.getBytes());

   Vector<InputStream> streams = new Vector<InputStream>();
   streams.add(beginStream);
   streams.add(wsdlStream);
   streams.add(endStream);

   // stream requires an Enumeration if there are more than 2 streams
   return new SequenceInputStream(streams.elements());

Then I take that resulting stream and create a Message with it. That
getWsdlAsStream() method is what calls SDDocument.writeTo and passes it
a ByteArrayOuputStream, which I then convert and return.

Cheers,
Bobby