Author: scamp
Date: Wed Feb 2 11:44:42 2005
New Revision: 149555
URL: http://svn.apache.org/viewcvs?view=rev&rev=149555
Log:
Added as a first cut at an EPR impl
Added:
incubator/hermes/trunk/src/java/org/apache/ws/addressing/EndpointReference.java
incubator/hermes/trunk/src/java/org/apache/ws/addressing/XmlBeansEndpointReference.java
Added:
incubator/hermes/trunk/src/java/org/apache/ws/addressing/EndpointReference.java
URL:
http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/addressing/EndpointReference.java?view=auto&rev=149555
==============================================================================
---
incubator/hermes/trunk/src/java/org/apache/ws/addressing/EndpointReference.java
(added)
+++
incubator/hermes/trunk/src/java/org/apache/ws/addressing/EndpointReference.java
Wed Feb 2 11:44:42 2005
@@ -0,0 +1,62 @@
+/*=============================================================================*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
*=============================================================================*/
+package org.apache.ws.addressing;
+
+import org.apache.xmlbeans.XmlObject;
+import javax.xml.namespace.QName;
+
+/**
+ * Interface for EndpointReferences
+ *
+ * @author Sal Campana
+ */
+public interface EndpointReference
+{
+ /**
+ * Returns the Address from the EPR as a String.
+ *
+ * @return Address
+ */
+ String getAddress( );
+
+ /**
+ * Returns the PortName associated with the Service in the EPR as a String
+ *
+ * @return Service's Port Name
+ */
+ String getPortName( );
+
+ /**
+ * Returns the PortType QName
+ *
+ * @return PortType QName
+ */
+ QName getPortType( );
+
+ /**
+ * Returns the ReferenceProperties Object.
+ *
+ * @return Object The ReferenceProperties
+ */
+ Object getReferenceProperties( );
+
+ /**
+ * Service QName
+ *
+ * @return Service QName
+ */
+ QName getServiceName( );
+}
\ No newline at end of file
Added:
incubator/hermes/trunk/src/java/org/apache/ws/addressing/XmlBeansEndpointReference.java
URL:
http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/addressing/XmlBeansEndpointReference.java?view=auto&rev=149555
==============================================================================
---
incubator/hermes/trunk/src/java/org/apache/ws/addressing/XmlBeansEndpointReference.java
(added)
+++
incubator/hermes/trunk/src/java/org/apache/ws/addressing/XmlBeansEndpointReference.java
Wed Feb 2 11:44:42 2005
@@ -0,0 +1,118 @@
+/*=============================================================================*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
*=============================================================================*/
+package org.apache.ws.addressing;
+
+import org.apache.ws.XmlObjectWrapper;
+import org.apache.xmlbeans.XmlObject;
+import javax.xml.namespace.QName;
+
+/**
+ * This class wraps XmlBean-generated XmlBeansEndpointReference types for use
throughout the system.
+ *
+ * As a new version of the schema is generated, a new constructor should be
added to encompass
+ * the new version.
+ *
+ * Note..Use fully qualified class name in constructors for different versions.
+ *
+ * @author Sal Campana
+ */
+public class XmlBeansEndpointReference
+ implements XmlObjectWrapper,
+ EndpointReference
+{
+ private XmlObject m_xmlObjectEPR;
+ private String m_address;
+ private QName m_portTypeQName;
+ private String m_servicePortName;
+ private QName m_serviceQName;
+ private Object m_referenceProps;
+
+ /**
+ * Creates a new [EMAIL PROTECTED] XmlBeansEndpointReference} object.
+ *
+ * @param epr
org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceType XMLBean
generated type
+ */
+ public XmlBeansEndpointReference(
org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceType epr )
+ {
+ m_xmlObjectEPR = epr;
+ m_address = epr.getAddress( ).getStringValue( );
+ m_portTypeQName = epr.getPortType( ).getQNameValue( );
+ m_servicePortName = epr.getServiceName( ).getPortName( );
+ m_serviceQName = epr.getServiceName( ).getQNameValue( );
+ m_referenceProps = epr.getReferenceProperties( );
+ }
+
+ /**
+ * Returns the Address from the EPR as a String.
+ *
+ * @return Address
+ */
+ public String getAddress( )
+ {
+ return m_address;
+ }
+
+ /**
+ * Returns the PortName associated with the Service in the EPR as a String
+ *
+ * @return Service's Port Name
+ */
+ public String getPortName( )
+ {
+ return m_servicePortName;
+ }
+
+ /**
+ * Returns the PortType QName
+ *
+ * @return PortType QName
+ */
+ public QName getPortType( )
+ {
+ return m_portTypeQName;
+ }
+
+ /**
+ * Returns the ReferenceProperties directly from the underlying
XmlBean-generated class.
+ * The signature returns Object to make it generic for other impls.
+ *
+ * @return ReferencePropertiesType
+ */
+ public Object getReferenceProperties( )
+ {
+ return m_referenceProps;
+ }
+
+ /**
+ * Service QName
+ *
+ * @return Service QName
+ */
+ public QName getServiceName( )
+ {
+ return m_serviceQName;
+ }
+
+ /**
+ * The underlying XmlBean-Generate EPR
+ *
+ * @return The generated EPR
+ */
+ public XmlObject getXmlObject( )
+ {
+ return m_xmlObjectEPR;
+ }
+}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]