/** * Parse an EndpointReferenceType from a DOM element. Handles all of * the WS-Addressing namespaces currently supported. * @param ref * @throws JAXBException */ public static EndpointReferenceType parseEndpointReference(Element ref) throws JAXBException { Element child = DOMUtils.getFirstElement(ref); String tns = null; while (child != null && tns == null) { if (isSupported(child.getNamespaceURI())) { tns = child.getNamespaceURI(); } child = DOMUtils.getNextElement(child); } if (tns == null) { return null; } JAXBContext ctx = getExposedJAXBContext(tns); JAXBElement<?> o = ctx.createUnmarshaller().unmarshal(ref, getExposedReferenceType(tns)); if (o != null) { return convertToNative(o.getValue()); } return convertToNative(null); } /**
/** * Parse an EndpointReferenceType from a DOM element. Handles all of * the WS-Addressing namespaces currently supported. * @param ref * @throws JAXBException */ public static EndpointReferenceType parseEndpointReference(Element ref) throws JAXBException { Element child = DOMUtils.getFirstElement(ref); String tns = null; while (child != null && tns == null) { if (isSupported(child.getNamespaceURI())) { tns = child.getNamespaceURI(); } child = DOMUtils.getNextElement(child); } if (tns == null) { return null; } JAXBContext ctx = getExposedJAXBContext(tns); JAXBElement<?> o = ctx.createUnmarshaller().unmarshal(ref, getExposedReferenceType(tns)); if (o != null) { return convertToNative(o.getValue()); } return convertToNative(null); } /**
JAXBElement<?> o = um.unmarshal(ref, getExposedReferenceType(tns)); if (o != null) { return convertToNative(o.getValue()); return convertToNative(null); } finally { JAXBUtils.closeUnmarshaller(um);
JAXBElement<?> o = um.unmarshal(ref, getExposedReferenceType(tns)); if (o != null) { return convertToNative(o.getValue()); return convertToNative(null); } finally { JAXBUtils.closeUnmarshaller(um);