/** * @return the xml preamble found during scanning */ public String getXmlPreamble() { try { return buffer.getString(xmlPreamble.startIdx, xmlPreamble.endIdx + 1, "UTF-8"); //$NON-NLS-1$ } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } }
/** * @return the soap envelope declaration found during scanning */ public String getHeaders() { try { return buffer.getString(headers.startIdx, headers.endIdx + 1, "UTF-8"); //$NON-NLS-1$ } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } }
/** * @return the soap envelope declaration found during scanning */ public String getEnvelopeDeclaration() { try { return buffer.getString(envelopeDecl.startIdx, envelopeDecl.endIdx + 1, "UTF-8"); //$NON-NLS-1$ } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } }
/** * @return the soap envelope declaration found during scanning */ public String getHeaders() { try { return buffer.getString(headers.startIdx, headers.endIdx + 1, "UTF-8"); //$NON-NLS-1$ } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } }
/** * @return the xml preamble found during scanning */ public String getXmlPreamble() { try { return buffer.getString(xmlPreamble.startIdx, xmlPreamble.endIdx + 1, "UTF-8"); //$NON-NLS-1$ } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } }
/** * @return the soap envelope declaration found during scanning */ public String getEnvelopeDeclaration() { try { return buffer.getString(envelopeDecl.startIdx, envelopeDecl.endIdx + 1, "UTF-8"); //$NON-NLS-1$ } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } }
/** * @param index */ private int consumeEnvelopeDecl(int index) { int end = findFrom('>', index); if (end == -1) { // Not enough buffer - need more data. return buffer.length(); } try { String str = buffer.getString(index, end + 1, "UTF-8"); //$NON-NLS-1$ String [] split = str.split(" "); //$NON-NLS-1$ if (split[0].endsWith("Envelope")) { //$NON-NLS-1$ envelopeDecl.startIdx = index; envelopeDecl.endIdx = end; return end + 1; } } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } // We found a section of XML that should have been a soap:Envelope, but wasn't. return -1; }
/** * @param index */ private int consumeEnvelopeDecl(int index) { int end = findFrom('>', index); if (end == -1) { // Not enough buffer - need more data. return buffer.length(); } try { String str = buffer.getString(index, end + 1, "UTF-8"); //$NON-NLS-1$ String [] split = str.split(" "); //$NON-NLS-1$ if (split[0].endsWith("Envelope")) { //$NON-NLS-1$ envelopeDecl.startIdx = index; envelopeDecl.endIdx = end; return end + 1; } } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } // We found a section of XML that should have been a soap:Envelope, but wasn't. return -1; }
/** * @return the URL consumed from the buffer */ private String consumeURL() { String rval = null; int pos = position + "http://".length(); //$NON-NLS-1$ while (pos < buffer.length() && isValidURLChar(pos)) { pos++; } if (pos < buffer.length() || atEnd) { try { rval = buffer.getString(position, pos, "UTF-8"); //$NON-NLS-1$ } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } position = pos; } return rval; }
String str = buffer.getString(index, end + 1, "UTF-8"); //$NON-NLS-1$ String [] split = str.split("[ >]"); //$NON-NLS-1$ if (!split[0].endsWith("Header")) { //$NON-NLS-1$
String str = buffer.getString(index, end + 1, "UTF-8"); //$NON-NLS-1$ String [] split = str.split("[ >]"); //$NON-NLS-1$ if (!split[0].endsWith("Header")) { //$NON-NLS-1$