[jboss-svn-commits] JBL Code SVN: r25483 - in labs/jbosstm/trunk/XTS: WS-T/dev/src11/com/arjuna/webservices11/wsarjtx/client and 4 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Mar 3 12:21:25 EST 2009
Author: adinn
Date: 2009-03-03 12:21:24 -0500 (Tue, 03 Mar 2009)
New Revision: 25483
Added:
labs/jbosstm/trunk/XTS/WS-C/dev/src11/com/arjuna/webservices11/wsaddr/EndpointHelper.java
labs/jbosstm/trunk/XTS/WS-C/dev/src11/com/arjuna/webservices11/wsaddr/NativeEndpointReference.java
Modified:
labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsarjtx/client/TerminationCoordinatorClient.java
labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsarjtx/client/TerminationParticipantClient.java
labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsat/client/CompletionCoordinatorClient.java
labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsat/client/CompletionInitiatorClient.java
labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsat/client/CoordinatorClient.java
labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsat/client/ParticipantClient.java
labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsba/client/CoordinatorCompletionCoordinatorClient.java
labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsba/client/CoordinatorCompletionParticipantClient.java
labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsba/client/ParticipantCompletionCoordinatorClient.java
labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsba/client/ParticipantCompletionParticipantClient.java
labs/jbosstm/trunk/XTS/WSTX/classes11/com/arjuna/mwlabs/wst11/at/context/TxContextImple.java
labs/jbosstm/trunk/XTS/WSTX/classes11/com/arjuna/mwlabs/wst11/ba/context/TxContextImple.java
Log:
modified XTS code not to rely on W3CEndpointReference.getAddress() which is disappearing in JBossWSW 3.1.0 -- fixes JBTM-502
Added: labs/jbosstm/trunk/XTS/WS-C/dev/src11/com/arjuna/webservices11/wsaddr/EndpointHelper.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/dev/src11/com/arjuna/webservices11/wsaddr/EndpointHelper.java (rev 0)
+++ labs/jbosstm/trunk/XTS/WS-C/dev/src11/com/arjuna/webservices11/wsaddr/EndpointHelper.java 2009-03-03 17:21:24 UTC (rev 25483)
@@ -0,0 +1,54 @@
+package com.arjuna.webservices11.wsaddr;
+
+import com.arjuna.webservices11.wsaddr.NativeEndpointReference;
+
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.WebServiceException;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import java.io.ByteArrayOutputStream;
+import java.io.ByteArrayInputStream;
+
+/**
+ * helper class to allow transformation of W3CEndpointreference instances to
+ * internal types which are not opaque
+ */
+public class EndpointHelper
+{
+ 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.");
+ }
+
+ private static Source getSourceFromEndpointReference(EndpointReference epr)
+ {
+ ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+ StreamResult result = new StreamResult(outputStream);
+ epr.writeTo(result);
+ return new StreamSource(new ByteArrayInputStream(outputStream.toByteArray()));
+ }
+}
Added: labs/jbosstm/trunk/XTS/WS-C/dev/src11/com/arjuna/webservices11/wsaddr/NativeEndpointReference.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/dev/src11/com/arjuna/webservices11/wsaddr/NativeEndpointReference.java (rev 0)
+++ labs/jbosstm/trunk/XTS/WS-C/dev/src11/com/arjuna/webservices11/wsaddr/NativeEndpointReference.java 2009-03-03 17:21:24 UTC (rev 25483)
@@ -0,0 +1,292 @@
+package com.arjuna.webservices11.wsaddr;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.annotation.XmlAnyAttribute;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.WebServiceException;
+
+import org.w3c.dom.Element;
+
+/**
+ * internal representation of endpoint reference
+ */
+
+// XmlRootElement allows this class to be marshalled on its own
+ at XmlRootElement(name = "EndpointReference", namespace = NativeEndpointReference.NS)
+ at XmlType(name = "EndpointReferenceType", namespace = NativeEndpointReference.NS)
+public final class NativeEndpointReference extends EndpointReference
+{
+ protected static final String NS = "http://www.w3.org/2005/08/addressing";
+
+ private final static JAXBContext jc = getJaxbContext();
+
+ // private but necessary properties for databinding
+ @XmlElement(name = "Address", namespace = NS)
+ private Address address;
+ @XmlElement(name = "ReferenceParameters", namespace = NS)
+ private Elements referenceParameters;
+ @XmlElement(name = "Metadata", namespace = NS)
+ private Elements metadata;
+ @XmlAnyAttribute
+ Map<QName, String> attributes;
+ @XmlAnyElement
+ List<Element> elements;
+
+ // not marshalled
+ private QName serviceName;
+ private QName endpointName;
+ private URL wsdlLocation;
+
+ public NativeEndpointReference()
+ {
+ }
+
+ /**
+ * 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(Source source)
+ {
+ try
+ {
+ NativeEndpointReference epr = jc.createUnmarshaller().unmarshal(source, NativeEndpointReference.class).getValue();
+ this.address = epr.address;
+ this.metadata = epr.metadata;
+ this.referenceParameters = epr.referenceParameters;
+ }
+ catch (JAXBException e)
+ {
+ throw new WebServiceException("Error unmarshalling NativeEndpointReference ", e);
+ }
+ catch (ClassCastException e)
+ {
+ throw new WebServiceException("Source did not contain NativeEndpointReference", e);
+ }
+ }
+
+ @XmlTransient
+ public String getAddress()
+ {
+ return address != null ? address.getUri() : null;
+ }
+
+ public void setAddress(String address)
+ {
+ this.address = new Address(address);
+ }
+
+ @XmlTransient
+ public QName getServiceName()
+ {
+ return serviceName;
+ }
+
+ public void setServiceName(QName serviceName)
+ {
+ this.serviceName = serviceName;
+ }
+
+ @XmlTransient
+ public QName getEndpointName()
+ {
+ return endpointName;
+ }
+
+ public void setEndpointName(QName endpointName)
+ {
+ this.endpointName = endpointName;
+ }
+
+ @XmlTransient
+ public List<Element> getMetadata()
+ {
+ return metadata != null ? metadata.getElements() : null;
+ }
+
+ public void setMetadata(List<Element> metadata)
+ {
+ this.metadata = new Elements(metadata);
+ }
+
+ @XmlTransient
+ public URL getWsdlLocation()
+ {
+ return wsdlLocation;
+ }
+
+ public void setWsdlLocation(String wsdlLocation)
+ {
+ try
+ {
+ this.wsdlLocation = wsdlLocation != null ? new URL(wsdlLocation) : null;
+ }
+ catch (MalformedURLException e)
+ {
+ throw new IllegalArgumentException("Invalid URL: " + wsdlLocation);
+ }
+ }
+
+ @XmlTransient
+ public List<Element> getReferenceParameters()
+ {
+ return referenceParameters != null ? referenceParameters.getElements() : null;
+ }
+
+ public void setReferenceParameters(List<Element> metadata)
+ {
+ this.referenceParameters = new Elements(metadata);
+ }
+
+ /**
+ * 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);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void writeTo(Result result)
+ {
+ try
+ {
+ Marshaller marshaller = jc.createMarshaller();
+ marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
+ marshaller.marshal(this, result);
+ }
+ catch (JAXBException e)
+ {
+ throw new WebServiceException("Error marshalling NativeEndpointReference. ", e);
+ }
+ }
+
+ private static JAXBContext getJaxbContext()
+ {
+ try
+ {
+ return JAXBContext.newInstance(new Class[] { NativeEndpointReference.class });
+ }
+ catch (JAXBException ex)
+ {
+ throw new WebServiceException("Cannot obtain JAXB context", ex);
+ }
+ }
+
+ private static class Address
+ {
+ @XmlValue
+ String uri;
+ @XmlAnyAttribute
+ Map<QName, String> attributes;
+
+ protected Address()
+ {
+ }
+
+ public Address(String uri)
+ {
+ this.uri = uri;
+ }
+
+ @XmlTransient
+ public String getUri()
+ {
+ return uri;
+ }
+
+ public void setUri(String uri)
+ {
+ this.uri = uri;
+ }
+
+ @XmlTransient
+ public Map<QName, String> getAttributes()
+ {
+ return attributes;
+ }
+
+ public void setAttributes(Map<QName, String> attributes)
+ {
+ this.attributes = attributes;
+ }
+ }
+
+ private static class Elements
+ {
+ @XmlAnyElement
+ List<Element> elements;
+ @XmlAnyAttribute
+ Map<QName, String> attributes;
+
+ protected Elements()
+ {
+ }
+
+ public Elements(List<Element> elements)
+ {
+ this.elements = elements;
+ }
+
+ @XmlTransient
+ public List<Element> getElements()
+ {
+ return elements;
+ }
+
+ public void setElements(List<Element> elements)
+ {
+ this.elements = elements;
+ }
+
+ @XmlTransient
+ public Map<QName, String> getAttributes()
+ {
+ return attributes;
+ }
+
+ public void setAttributes(Map<QName, String> attributes)
+ {
+ this.attributes = attributes;
+ }
+ }
+}
\ No newline at end of file
Modified: labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsarjtx/client/TerminationCoordinatorClient.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsarjtx/client/TerminationCoordinatorClient.java 2009-03-03 14:24:57 UTC (rev 25482)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsarjtx/client/TerminationCoordinatorClient.java 2009-03-03 17:21:24 UTC (rev 25483)
@@ -27,6 +27,8 @@
import com.arjuna.webservices11.wsarj.InstanceIdentifier;
import com.arjuna.webservices11.wsaddr.client.SoapFaultClient;
import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsaddr.NativeEndpointReference;
+import com.arjuna.webservices11.wsaddr.EndpointHelper;
import com.arjuna.webservices11.SoapFault11;
import com.arjuna.webservices11.ServiceRegistry;
import com.arjuna.webservices11.wsarjtx.ArjunaTX11Constants;
@@ -197,7 +199,8 @@
*/
EndpointReference getParticipant(W3CEndpointReference coordinator)
{
- String address = coordinator.getAddress();
+ NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, coordinator);
+ String address = nativeRef.getAddress();
if (address.startsWith("https")) {
return secureTerminationParticipant;
} else {
Modified: labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsarjtx/client/TerminationParticipantClient.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsarjtx/client/TerminationParticipantClient.java 2009-03-03 14:24:57 UTC (rev 25482)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsarjtx/client/TerminationParticipantClient.java 2009-03-03 17:21:24 UTC (rev 25483)
@@ -28,6 +28,8 @@
import com.arjuna.webservices11.wsarj.InstanceIdentifier;
import com.arjuna.webservices11.wsaddr.client.SoapFaultClient;
import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsaddr.NativeEndpointReference;
+import com.arjuna.webservices11.wsaddr.EndpointHelper;
import com.arjuna.webservices11.ServiceRegistry;
import com.arjuna.webservices11.wsarjtx.ArjunaTX11Constants;
@@ -250,7 +252,8 @@
*/
EndpointReference getCoordinator(W3CEndpointReference participant)
{
- String address = participant.getAddress();
+ NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, participant);
+ String address = nativeRef.getAddress();
if (address.startsWith("https")) {
return secureTerminationCoordinator;
} else {
Modified: labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsat/client/CompletionCoordinatorClient.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsat/client/CompletionCoordinatorClient.java 2009-03-03 14:24:57 UTC (rev 25482)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsat/client/CompletionCoordinatorClient.java 2009-03-03 17:21:24 UTC (rev 25483)
@@ -6,6 +6,8 @@
import com.arjuna.webservices11.wsat.client.WSATClient;
import com.arjuna.webservices11.ServiceRegistry;
import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsaddr.NativeEndpointReference;
+import com.arjuna.webservices11.wsaddr.EndpointHelper;
import org.oasis_open.docs.ws_tx.wsat._2006._06.CompletionCoordinatorPortType;
import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
@@ -128,7 +130,8 @@
*/
EndpointReference getCompletionInitiator(W3CEndpointReference participant)
{
- String address = participant.getAddress();
+ NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, participant);
+ String address = nativeRef.getAddress();
if (address.startsWith("https")) {
return secureCompletionInitiator;
} else {
Modified: labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsat/client/CompletionInitiatorClient.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsat/client/CompletionInitiatorClient.java 2009-03-03 14:24:57 UTC (rev 25482)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsat/client/CompletionInitiatorClient.java 2009-03-03 17:21:24 UTC (rev 25483)
@@ -8,6 +8,8 @@
import com.arjuna.webservices11.SoapFault11;
import com.arjuna.webservices11.wsaddr.client.SoapFaultClient;
import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsaddr.NativeEndpointReference;
+import com.arjuna.webservices11.wsaddr.EndpointHelper;
import org.oasis_open.docs.ws_tx.wsat._2006._06.CompletionInitiatorPortType;
import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
@@ -151,7 +153,8 @@
*/
EndpointReference getCompletionCoordinator(W3CEndpointReference participant)
{
- String address = participant.getAddress();
+ NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, participant);
+ String address = nativeRef.getAddress();
if (address.startsWith("https")) {
return secureCompletionCoordinator;
} else {
Modified: labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsat/client/CoordinatorClient.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsat/client/CoordinatorClient.java 2009-03-03 14:24:57 UTC (rev 25482)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsat/client/CoordinatorClient.java 2009-03-03 17:21:24 UTC (rev 25483)
@@ -8,6 +8,8 @@
import com.arjuna.webservices11.SoapFault11;
import com.arjuna.webservices11.wsaddr.client.SoapFaultClient;
import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsaddr.NativeEndpointReference;
+import com.arjuna.webservices11.wsaddr.EndpointHelper;
import org.oasis_open.docs.ws_tx.wsat._2006._06.CoordinatorPortType;
import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
@@ -199,7 +201,8 @@
{
String address;
if (endpoint != null) {
- address = endpoint.getAddress();
+ NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, endpoint);
+ address = nativeRef.getAddress();
} else {
address = addressingProperties.getTo().getURI().toString();
}
Modified: labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsat/client/ParticipantClient.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsat/client/ParticipantClient.java 2009-03-03 14:24:57 UTC (rev 25482)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsat/client/ParticipantClient.java 2009-03-03 17:21:24 UTC (rev 25483)
@@ -8,6 +8,8 @@
import com.arjuna.webservices11.SoapFault11;
import com.arjuna.webservices11.wsaddr.client.SoapFaultClient;
import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsaddr.NativeEndpointReference;
+import com.arjuna.webservices11.wsaddr.EndpointHelper;
import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
import org.oasis_open.docs.ws_tx.wsat._2006._06.ParticipantPortType;
@@ -174,7 +176,8 @@
{
String address;
if (endpoint != null) {
- address = endpoint.getAddress();
+ NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, endpoint);
+ address = nativeRef.getAddress();
} else {
address = addressingProperties.getTo().getURI().toString();
}
Modified: labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsba/client/CoordinatorCompletionCoordinatorClient.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsba/client/CoordinatorCompletionCoordinatorClient.java 2009-03-03 14:24:57 UTC (rev 25482)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsba/client/CoordinatorCompletionCoordinatorClient.java 2009-03-03 17:21:24 UTC (rev 25483)
@@ -26,6 +26,8 @@
import com.arjuna.webservices11.wsarj.InstanceIdentifier;
import com.arjuna.webservices11.ServiceRegistry;
import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsaddr.NativeEndpointReference;
+import com.arjuna.webservices11.wsaddr.EndpointHelper;
import org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithCoordinatorCompletionCoordinatorPortType;
import org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType;
import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
@@ -327,7 +329,8 @@
{
String address;
if (endpoint != null) {
- address = endpoint.getAddress();
+ NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, endpoint);
+ address = nativeRef.getAddress();
} else {
address = addressingProperties.getTo().getURI().toString();
}
Modified: labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsba/client/CoordinatorCompletionParticipantClient.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsba/client/CoordinatorCompletionParticipantClient.java 2009-03-03 14:24:57 UTC (rev 25482)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsba/client/CoordinatorCompletionParticipantClient.java 2009-03-03 17:21:24 UTC (rev 25483)
@@ -26,6 +26,8 @@
import com.arjuna.webservices11.wsarj.InstanceIdentifier;
import com.arjuna.webservices11.ServiceRegistry;
import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsaddr.NativeEndpointReference;
+import com.arjuna.webservices11.wsaddr.EndpointHelper;
import org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithCoordinatorCompletionParticipantPortType;
import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
@@ -324,7 +326,8 @@
{
String address;
if (endpoint != null) {
- address = endpoint.getAddress();
+ NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, endpoint);
+ address = nativeRef.getAddress();
} else {
address = addressingProperties.getTo().getURI().toString();
}
Modified: labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsba/client/ParticipantCompletionCoordinatorClient.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsba/client/ParticipantCompletionCoordinatorClient.java 2009-03-03 14:24:57 UTC (rev 25482)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsba/client/ParticipantCompletionCoordinatorClient.java 2009-03-03 17:21:24 UTC (rev 25483)
@@ -26,6 +26,8 @@
import com.arjuna.webservices11.wsarj.InstanceIdentifier;
import com.arjuna.webservices11.ServiceRegistry;
import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsaddr.NativeEndpointReference;
+import com.arjuna.webservices11.wsaddr.EndpointHelper;
import org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithParticipantCompletionCoordinatorPortType;
import org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType;
import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
@@ -327,7 +329,8 @@
{
String address;
if (endpoint != null) {
- address = endpoint.getAddress();
+ NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, endpoint);
+ address = nativeRef.getAddress();
} else {
address = addressingProperties.getTo().getURI().toString();
}
Modified: labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsba/client/ParticipantCompletionParticipantClient.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsba/client/ParticipantCompletionParticipantClient.java 2009-03-03 14:24:57 UTC (rev 25482)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/webservices11/wsba/client/ParticipantCompletionParticipantClient.java 2009-03-03 17:21:24 UTC (rev 25483)
@@ -26,6 +26,8 @@
import com.arjuna.webservices11.wsarj.InstanceIdentifier;
import com.arjuna.webservices11.ServiceRegistry;
import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsaddr.NativeEndpointReference;
+import com.arjuna.webservices11.wsaddr.EndpointHelper;
import org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithParticipantCompletionParticipantPortType;
import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
@@ -300,7 +302,8 @@
{
String address;
if (endpoint != null) {
- address = endpoint.getAddress();
+ NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, endpoint);
+ address = nativeRef.getAddress();
} else {
address = addressingProperties.getTo().getURI().toString();
}
Modified: labs/jbosstm/trunk/XTS/WSTX/classes11/com/arjuna/mwlabs/wst11/at/context/TxContextImple.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/classes11/com/arjuna/mwlabs/wst11/at/context/TxContextImple.java 2009-03-03 14:24:57 UTC (rev 25482)
+++ labs/jbosstm/trunk/XTS/WSTX/classes11/com/arjuna/mwlabs/wst11/at/context/TxContextImple.java 2009-03-03 17:21:24 UTC (rev 25483)
@@ -34,8 +34,12 @@
import com.arjuna.mw.wsc11.context.Context;
import com.arjuna.mw.wst.TxContext;
import com.arjuna.mwlabs.wst11.at.ContextImple;
+import com.arjuna.webservices11.wsaddr.NativeEndpointReference;
+import com.arjuna.webservices11.wsaddr.EndpointHelper;
import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: TxContextImple.java,v 1.8.4.1 2005/11/22 10:36:15 kconner Exp $
@@ -95,7 +99,9 @@
{
if (valid()) {
CoordinationContextType coordinationContextType = _context.getCoordinationContext();
- String address = coordinationContextType.getRegistrationService().getAddress();
+ W3CEndpointReference epref = coordinationContextType.getRegistrationService();
+ NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, epref);
+ String address = nativeRef.getAddress();
return address.startsWith("https");
}
return false;
Modified: labs/jbosstm/trunk/XTS/WSTX/classes11/com/arjuna/mwlabs/wst11/ba/context/TxContextImple.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/classes11/com/arjuna/mwlabs/wst11/ba/context/TxContextImple.java 2009-03-03 14:24:57 UTC (rev 25482)
+++ labs/jbosstm/trunk/XTS/WSTX/classes11/com/arjuna/mwlabs/wst11/ba/context/TxContextImple.java 2009-03-03 17:21:24 UTC (rev 25483)
@@ -34,8 +34,12 @@
import com.arjuna.mw.wst.TxContext;
import com.arjuna.mw.wsc11.context.Context;
import com.arjuna.mwlabs.wst11.ba.ContextImple;
+import com.arjuna.webservices11.wsaddr.NativeEndpointReference;
+import com.arjuna.webservices11.wsaddr.EndpointHelper;
import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: TxContextImple.java,v 1.2.20.1 2005/11/22 10:36:16 kconner Exp $
@@ -95,7 +99,9 @@
{
if (valid()) {
CoordinationContextType coordinationContextType = _context.getCoordinationContext();
- String address = coordinationContextType.getRegistrationService().getAddress();
+ W3CEndpointReference epref = coordinationContextType.getRegistrationService();
+ NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, epref);
+ String address = nativeRef.getAddress();
return address.startsWith("https");
}
return false;
More information about the jboss-svn-commits
mailing list