@Override public byte[] asByteArray() { if (buf == null) { ByteArrayBuffer baf = new ByteArrayBuffer(); try { baf.write(part.readOnce()); } catch(IOException ioe) { throw new WebServiceException(ioe); } finally { if (baf != null) { try { baf.close(); } catch (IOException ex) { Logger.getLogger(MimeMultipartParser.class.getName()).log(Level.FINE, null, ex); } } } buf = baf.toByteArray(); } return buf; }
@Override public byte[] asByteArray() { if (buf == null) { ByteArrayBuffer baf = new ByteArrayBuffer(); try { baf.write(part.readOnce()); } catch(IOException ioe) { throw new WebServiceException(ioe); } finally { if (baf != null) { try { baf.close(); } catch (IOException ex) { Logger.getLogger(MimeMultipartParser.class.getName()).log(Level.FINE, null, ex); } } } buf = baf.toByteArray(); } return buf; }
@Override public byte[] asByteArray() { if (buf == null) { ByteArrayBuffer baf = new ByteArrayBuffer(); try { baf.write(part.readOnce()); } catch(IOException ioe) { throw new WebServiceException(ioe); } finally { if (baf != null) { try { baf.close(); } catch (IOException ex) { Logger.getLogger(MimeMultipartParser.class.getName()).log(Level.FINE, null, ex); } } } buf = baf.toByteArray(); } return buf; }
private Packet decodePacket(@NotNull WSHTTPConnection con, @NotNull Codec codec) throws IOException { String ct = con.getRequestHeader("Content-Type"); InputStream in = con.getInput(); Packet packet = new Packet(); packet.soapAction = fixQuotesAroundSoapAction(con.getRequestHeader("SOAPAction")); packet.wasTransportSecure = con.isSecure(); packet.acceptableMimeTypes = con.getRequestHeader("Accept"); packet.addSatellite(con); addSatellites(packet); packet.isAdapterDeliversNonAnonymousResponse = true; packet.component = this; packet.transportBackChannel = new Oneway(con); packet.webServiceContextDelegate = con.getWebServiceContextDelegate(); packet.setState(Packet.State.ServerRequest); if (dump || LOGGER.isLoggable(Level.FINER)) { ByteArrayBuffer buf = new ByteArrayBuffer(); buf.write(in); in.close(); dump(buf, "HTTP request", con.getRequestHeaders()); in = buf.newInputStream(); } codec.decode(in, ct, packet); return packet; }
private Packet decodePacket(@NotNull WSHTTPConnection con, @NotNull Codec codec) throws IOException { String ct = con.getRequestHeader("Content-Type"); InputStream in = con.getInput(); Packet packet = new Packet(); packet.soapAction = fixQuotesAroundSoapAction(con.getRequestHeader("SOAPAction")); packet.wasTransportSecure = con.isSecure(); packet.acceptableMimeTypes = con.getRequestHeader("Accept"); packet.addSatellite(con); addSatellites(packet); packet.isAdapterDeliversNonAnonymousResponse = true; packet.component = this; packet.transportBackChannel = new Oneway(con); packet.webServiceContextDelegate = con.getWebServiceContextDelegate(); packet.setState(Packet.State.ServerRequest); if (dump || LOGGER.isLoggable(Level.FINER)) { ByteArrayBuffer buf = new ByteArrayBuffer(); buf.write(in); in.close(); dump(buf, "HTTP request", con.getRequestHeaders()); in = buf.newInputStream(); } codec.decode(in, ct, packet); return packet; }
private Packet decodePacket(@NotNull WSHTTPConnection con, @NotNull Codec codec) throws IOException { String ct = con.getRequestHeader("Content-Type"); InputStream in = con.getInput(); Packet packet = new Packet(); packet.soapAction = fixQuotesAroundSoapAction(con.getRequestHeader("SOAPAction")); packet.wasTransportSecure = con.isSecure(); packet.acceptableMimeTypes = con.getRequestHeader("Accept"); packet.addSatellite(con); addSatellites(packet); packet.isAdapterDeliversNonAnonymousResponse = true; packet.component = this; packet.transportBackChannel = new Oneway(con); packet.webServiceContextDelegate = con.getWebServiceContextDelegate(); packet.setState(Packet.State.ServerRequest); if (dump || LOGGER.isLoggable(Level.FINER)) { ByteArrayBuffer buf = new ByteArrayBuffer(); buf.write(in); in.close(); dump(buf, "HTTP request", con.getRequestHeaders()); in = buf.newInputStream(); } codec.decode(in, ct, packet); return packet; }