String xml = StaxUtils.toString(el); throw new WebServiceException( BundleUtils.getFormattedString(BUNDLE,
el = (Element)cur; if (!"http://java.sun.com/xml/ns/javaee".equals(el.getNamespaceURI())) { String xml = StaxUtils.toString(el); throw new WebServiceException( BundleUtils.getFormattedString(BUNDLE,
|| !"handler-chains".equals(el.getLocalName())) { String xml = StaxUtils.toString(el); throw new WebServiceException( BundleUtils.getFormattedString(BUNDLE, || !"handler-chain".equals(el.getLocalName())) { String xml = StaxUtils.toString(el); throw new WebServiceException( BundleUtils.getFormattedString(BUNDLE,
private static String getXMLString(Element el) { try { return StaxUtils.toString(el); } catch (Throwable t) { //ignore } return "unknown content"; }
public static String toString(Element el) throws XMLStreamException { return toString(el, 0); } public static String toString(Element el, int indent) {
public static String toString(Element el) { return toString(el, 0); } public static String toString(Element el, int indent) {
DOMLSInput(Document doc, String systemId) throws TransformerException { this.systemId = systemId; data = StaxUtils.toString(doc); }
public static String toString(Element el) { return toString(el, 0); } public static String toString(Element el, int indent) {
public static String toString(Element el) { return toString(el, 0); } public static String toString(Element el, int indent) {
public static String toString(Node src) { return toString(new DOMSource(src)); } public static String toString(Document doc) {
public static String toString(Node src) { return toString(new DOMSource(src)); } public static String toString(Document doc) {
public static String toString(Node src) { return toString(new DOMSource(src)); } public static String toString(Document doc) {
public static String toString(Node src) { return toString(new DOMSource(src)); } public static String toString(Document doc) {
public static String toString(Node src) throws XMLStreamException { return toString(new DOMSource(src)); } public static String toString(Document doc) throws XMLStreamException {
public String toString() { if (document == null) { return "<null>"; } if (document.getDocumentElement() == null) { return "<null document element>"; } try { return StaxUtils.toString(document); } catch (Throwable t) { t.printStackTrace(); return super.toString(); } }
private <T> Object readPrimitiveValue(Node node, Class<T> cls) { if (String.class == cls) { if (node.getNodeType() == Node.ELEMENT_NODE) { return StaxUtils.toString((Element)node); } return cls.cast(node.getNodeValue()); } return InjectionUtils.convertStringToPrimitive(node.getNodeValue(), cls); }
public InputSource getBaseInputSource() { if (elementMap.get(baseUri) != null) { Element ele = elementMap.get(baseUri); String content = StaxUtils.toString(ele); InputSource ins = new InputSource(new StringReader(content)); ins.setSystemId(baseUri); return ins; } InputSource result = resolve(baseUri, null); baseUri = resolver.getURI(); return result; } public String getBaseURI() {
@Override public void put(ReferenceParametersType ref, Representation newRepresentation) { String uuid = getUUID(ref); if (!storage.containsKey(uuid)) { throw new UnknownResource(); } Element representationEl = (Element) newRepresentation.getAny(); if (representationEl == null) { storage.put(uuid, ""); } else { storage.put(uuid, StaxUtils.toString(representationEl)); } }
@Override public void put(ReferenceParametersType ref, Representation newRepresentation) { String uuid = getUUID(ref); if (!storage.containsKey(uuid)) { throw new UnknownResource(); } Element representationEl = (Element) newRepresentation.getAny(); if (representationEl == null) { storage.put(uuid, ""); } else { storage.put(uuid, StaxUtils.toString(representationEl)); } }
@Test public void testEchoProviderAsync() throws Exception { String requestString = "<echo/>"; Service service = Service.create(serviceName); service.addPort(fakePortName, javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING, "http://localhost:" + PORT + "/SoapContext/AsyncEchoProvider"); Dispatch<StreamSource> dispatcher = service.createDispatch(fakePortName, StreamSource.class, Service.Mode.PAYLOAD); StreamSource request = new StreamSource(new ByteArrayInputStream(requestString.getBytes())); StreamSource response = dispatcher.invoke(request); assertEquals(requestString, StaxUtils.toString(response)); }