/** * return a coordinator endpoint appropriate to the type of participant * @param participant * @return either the secure terminaton participant endpoint or the non-secure endpoint */ MAPEndpoint getCoordinator(W3CEndpointReference participant) { NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, participant); String address = nativeRef.getAddress(); if (address.startsWith("https")) { return secureTerminationCoordinator; } else { return terminationCoordinator; } }
/** * Directly read a NativeEndpointReference from the given source * instead of leveraging the Provider's readEndpointReference method. * * @param eprInfoset * @return */ public static EndpointReference readFrom(Source eprInfoset) { if (eprInfoset == null) throw new NullPointerException("Provided eprInfoset cannot be null"); try { return new NativeEndpointReference(eprInfoset); } catch (Exception e) { throw new WebServiceException(e); } }
/** * Creates an EPR from infoset representation * * @param source A source object containing valid XmlInfoset * instance consistent with the W3C WS-Addressing Core * recommendation. * * @throws WebServiceException * If the source does NOT contain a valid W3C WS-Addressing * EndpointReference. * @throws NullPointerException * If the <code>null</code> <code>source</code> value is given */ public NativeEndpointReference(final Source source) { NativeEndpointReference epr = unmarshalNativeEndpointReference(source); this.address = epr.address; this.metadata = epr.metadata; this.referenceParameters = epr.referenceParameters; }
public static <T extends EndpointReference> T transform(Class<T> clazz, EndpointReference epr) { assert epr != null; if (clazz.isAssignableFrom(W3CEndpointReference.class)) { if (epr instanceof W3CEndpointReference) { return (T)epr; } else if (epr instanceof NativeEndpointReference) { return (T)W3CEndpointReference.readFrom(getSourceFromEndpointReference(epr)); } else { throw new WebServiceException("Unsupported EndpointReference: " + epr); } } else if (clazz.isAssignableFrom(NativeEndpointReference.class)) { return (T)NativeEndpointReference.readFrom(getSourceFromEndpointReference(epr)); } //transformations from different types of EndpointReference could be supported in future... throw new WebServiceException("EndpointReference of type " + clazz + " not supported."); }
public static <T extends EndpointReference> T transform(Class<T> clazz, EndpointReference epr) { assert epr != null; if (clazz.isAssignableFrom(W3CEndpointReference.class)) { if (epr instanceof W3CEndpointReference) { return (T)epr; } else if (epr instanceof NativeEndpointReference) { return (T)W3CEndpointReference.readFrom(getSourceFromEndpointReference(epr)); } else { throw new WebServiceException("Unsupported EndpointReference: " + epr); } } else if (clazz.isAssignableFrom(NativeEndpointReference.class)) { return (T)NativeEndpointReference.readFrom(getSourceFromEndpointReference(epr)); } //transformations from different types of EndpointReference could be supported in future... throw new WebServiceException("EndpointReference of type " + clazz + " not supported."); }
/** * return a participant endpoint appropriate to the type of coordinator * @param coordinator * @return either the secure terminaton coordinator endpoint or the non-secure endpoint */ MAPEndpoint getParticipant(W3CEndpointReference coordinator) { NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, coordinator); String address = nativeRef.getAddress(); if (address.startsWith("https")) { return secureTerminationParticipant; } else { return terminationParticipant; } }
/** * Directly read a NativeEndpointReference from the given source * instead of leveraging the Provider's readEndpointReference method. * * @param eprInfoset * @return the endpointreference */ public static EndpointReference readFrom(Source eprInfoset) { if (eprInfoset == null) throw new NullPointerException("Provided eprInfoset cannot be null"); try { return new NativeEndpointReference(eprInfoset); } catch (Exception e) { throw new WebServiceException(e); } }
public static <T extends EndpointReference> T transform(Class<T> clazz, EndpointReference epr) { assert epr != null; if (clazz.isAssignableFrom(W3CEndpointReference.class)) { if (epr instanceof W3CEndpointReference) { return (T)epr; } else if (epr instanceof NativeEndpointReference) { return (T)W3CEndpointReference.readFrom(getSourceFromEndpointReference(epr)); } else { throw new WebServiceException("Unsupported EndpointReference: " + epr); } } else if (clazz.isAssignableFrom(NativeEndpointReference.class)) { return (T)NativeEndpointReference.readFrom(getSourceFromEndpointReference(epr)); } //transformations from different types of EndpointReference could be supported in future... throw new WebServiceException("EndpointReference of type " + clazz + " not supported."); }
/** * return a participant endpoint appropriate to the type of coordinator * @param coordinator * @return either the secure terminaton coordinator endpoint or the non-secure endpoint */ MAPEndpoint getParticipant(W3CEndpointReference coordinator) { NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, coordinator); String address = nativeRef.getAddress(); if (address.startsWith("https")) { return secureTerminationParticipant; } else { return terminationParticipant; } }
/** * Directly read a NativeEndpointReference from the given source * instead of leveraging the Provider's readEndpointReference method. * * @param eprInfoset * @return */ public static EndpointReference readFrom(Source eprInfoset) { if (eprInfoset == null) throw new NullPointerException("Provided eprInfoset cannot be null"); try { return new NativeEndpointReference(eprInfoset); } catch (Exception e) { throw new WebServiceException(e); } }
public static <T extends EndpointReference> T transform(Class<T> clazz, EndpointReference epr) { assert epr != null; if (clazz.isAssignableFrom(W3CEndpointReference.class)) { if (epr instanceof W3CEndpointReference) { return (T)epr; } else if (epr instanceof NativeEndpointReference) { return (T)W3CEndpointReference.readFrom(getSourceFromEndpointReference(epr)); } else { throw new WebServiceException("Unsupported EndpointReference: " + epr); } } else if (clazz.isAssignableFrom(NativeEndpointReference.class)) { return (T)NativeEndpointReference.readFrom(getSourceFromEndpointReference(epr)); } //transformations from different types of EndpointReference could be supported in future... throw new WebServiceException("EndpointReference of type " + clazz + " not supported."); }
/** * return a completion initiator endpoint appropriate to the type of completion coordinator * @param participant * @return either the secure terminaton participant endpoint or the non-secure endpoint */ MAPEndpoint getCompletionInitiator(W3CEndpointReference participant) { NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, participant); String address = nativeRef.getAddress(); if (address.startsWith("https")) { return secureCompletionInitiator; } else { return completionInitiator; } }
/** * Directly read a NativeEndpointReference from the given source * instead of leveraging the Provider's readEndpointReference method. * * @param eprInfoset * @return */ public static EndpointReference readFrom(Source eprInfoset) { if (eprInfoset == null) throw new NullPointerException("Provided eprInfoset cannot be null"); try { return new NativeEndpointReference(eprInfoset); } catch (Exception e) { throw new WebServiceException(e); } }
/** * return a completion coordinator endpoint appropriate to the type of completion initiator * @param participant * @return either the secure terminaton participant endpoint or the non-secure endpoint */ MAPEndpoint getCompletionCoordinator(W3CEndpointReference participant) { NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, participant); String address = nativeRef.getAddress(); if (address.startsWith("https")) { return secureCompletionCoordinator; } else { return completionCoordinator; } }
/** * return a completion initiator endpoint appropriate to the type of completion coordinator * @param participant * @return either the secure terminaton participant endpoint or the non-secure endpoint */ MAPEndpoint getCompletionInitiator(W3CEndpointReference participant) { NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, participant); String address = nativeRef.getAddress(); if (address.startsWith("https")) { return secureCompletionInitiator; } else { return completionInitiator; } }
/** * return a coordinator endpoint appropriate to the type of participant * @param participant * @return either the secure terminaton participant endpoint or the non-secure endpoint */ MAPEndpoint getCoordinator(W3CEndpointReference participant) { NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, participant); String address = nativeRef.getAddress(); if (address.startsWith("https")) { return secureTerminationCoordinator; } else { return terminationCoordinator; } }
/** * return a completion initiator endpoint appropriate to the type of completion coordinator * @param participant * @return either the secure terminaton participant endpoint or the non-secure endpoint */ MAPEndpoint getCompletionInitiator(W3CEndpointReference participant) { NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, participant); String address = nativeRef.getAddress(); if (address.startsWith("https")) { return secureCompletionInitiator; } else { return completionInitiator; } }
/** * return a completion coordinator endpoint appropriate to the type of completion initiator * @param participant * @return either the secure terminaton participant endpoint or the non-secure endpoint */ MAPEndpoint getCompletionCoordinator(W3CEndpointReference participant) { NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, participant); String address = nativeRef.getAddress(); if (address.startsWith("https")) { return secureCompletionCoordinator; } else { return completionCoordinator; } }
/** * return a coordinator endpoint appropriate to the type of participant * @param participant * @return either the secure terminaton participant endpoint or the non-secure endpoint */ MAPEndpoint getCoordinator(W3CEndpointReference participant) { NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, participant); String address = nativeRef.getAddress(); if (address.startsWith("https")) { return secureTerminationCoordinator; } else { return terminationCoordinator; } }
/** * return a completion coordinator endpoint appropriate to the type of completion initiator * @param participant * @return either the secure terminaton participant endpoint or the non-secure endpoint */ MAPEndpoint getCompletionCoordinator(W3CEndpointReference participant) { NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, participant); String address = nativeRef.getAddress(); if (address.startsWith("https")) { return secureCompletionCoordinator; } else { return completionCoordinator; } }