You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ch...@apache.org on 2004/12/17 11:56:30 UTC

svn commit: r122634 - in webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing: . miheaders

Author: chinthaka
Date: Fri Dec 17 02:56:29 2004
New Revision: 122634

URL: http://svn.apache.org/viewcvs?view=rev&rev=122634
Log:
Adding basic functionality for addressing support for the engine
Added:
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/AddressingConstants.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/AnyContentType.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/EndpointReference.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/ServiceName.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/miheaders/
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/miheaders/RelatesTo.java

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/AddressingConstants.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/AddressingConstants.java?view=auto&rev=122634
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/AddressingConstants.java	Fri Dec 17 02:56:29 2004
@@ -0,0 +1,31 @@
+package org.apache.axis.addressing;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ *
+ * This will hold all the constants related WS-Addressing
+ */
+public class AddressingConstants {
+    public static final String WSA_MESSAGE_ID = "MessageID";
+    public static final String WSA_RELATES_TO = "RelatesTo";
+    public static final String WSA_RELATES_TO_RELATIONSHIP_TYPE = "RelationshipType";
+    public static final String WSA_TO = "To";
+    public static final String WSA_ACTION = "Action";
+    public static final String WSA_FROM = "From";
+    public static final String WSA_REPLY_TO = "ReplyTo";
+    public static final String WSA_FAULT_TO = "FaultTo";
+    
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/AnyContentType.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/AnyContentType.java?view=auto&rev=122634
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/AnyContentType.java	Fri Dec 17 02:56:29 2004
@@ -0,0 +1,42 @@
+package org.apache.axis.addressing;
+
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ * <p/>
+ * <p/>
+ * wsa:ReferenceProperties and wsa:ReferenceParameter will be extended from this.
+ * This will contain a collection of name value pairs.
+ */
+public class AnyContentType {
+
+    private String anyContentTypeName;
+    private HashMap valueHolder;
+
+    public AnyContentType() {
+        valueHolder = new HashMap(5);
+    }
+
+    public void addReferenceValue(QName name, String value){
+        valueHolder.put(name, value);
+    }
+
+    public String getReferenceValue(QName name){
+        return (String) valueHolder.get(name);
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/EndpointReference.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/EndpointReference.java?view=auto&rev=122634
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/EndpointReference.java	Fri Dec 17 02:56:29 2004
@@ -0,0 +1,100 @@
+package org.apache.axis.addressing;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ * <p/>
+ */
+public class EndpointReference {
+
+    /**
+     * this can be one of the followings
+     * AddressingConstants.WSA_FROM
+     * AddressingConstants.WSA_REPLY_TO
+     * AddressingConstants.WSA_FAULT_TO
+     */
+    private String messageInformationHeaderType;
+
+    private String address;
+    private QName portType;
+    private AnyContentType referenceProperties;
+    private AnyContentType referenceParameters;
+    private ServiceName serviceName;
+
+    /**
+     *
+     * @param messageInformationHeaderType
+     * this can be one of the followings
+     * AddressingConstants.WSA_FROM
+     * AddressingConstants.WSA_REPLY_TO
+     * AddressingConstants.WSA_FAULT_TO
+     * 
+     * @param address
+     */
+    public EndpointReference(String messageInformationHeaderType, String address) {
+        this.messageInformationHeaderType = messageInformationHeaderType;
+        this.address = address;
+    }
+
+    public String getMessageInformationHeaderType() {
+        return messageInformationHeaderType;
+    }
+
+    public void setMessageInformationHeaderType(String messageInformationHeaderType) {
+        this.messageInformationHeaderType = messageInformationHeaderType;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public QName getPortType() {
+        return portType;
+    }
+
+    public void setPortType(QName portType) {
+        this.portType = portType;
+    }
+
+    public AnyContentType getReferenceProperties() {
+        return referenceProperties;
+    }
+
+    public void setReferenceProperties(AnyContentType referenceProperties) {
+        this.referenceProperties = referenceProperties;
+    }
+
+    public AnyContentType getReferenceParameters() {
+        return referenceParameters;
+    }
+
+    public void setReferenceParameters(AnyContentType referenceParameters) {
+        this.referenceParameters = referenceParameters;
+    }
+
+    public ServiceName getServiceName() {
+        return serviceName;
+    }
+
+    public void setServiceName(ServiceName serviceName) {
+        this.serviceName = serviceName;
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/ServiceName.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/ServiceName.java?view=auto&rev=122634
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/ServiceName.java	Fri Dec 17 02:56:29 2004
@@ -0,0 +1,45 @@
+package org.apache.axis.addressing;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Dec 17, 2004
+ * Time: 3:42:18 PM
+ */
+public class ServiceName {
+    private QName name;
+    private String portName;
+
+    /**
+     *
+     * @param name
+     */
+    public ServiceName(QName name) {
+        this.name = name; 
+    }
+
+    /**
+     *
+     * @param name
+     * @param portName
+     */
+    public ServiceName(QName name, String portName) {
+        this.name = name;
+        this.portName = portName;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/miheaders/RelatesTo.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/miheaders/RelatesTo.java?view=auto&rev=122634
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/miheaders/RelatesTo.java	Fri Dec 17 02:56:29 2004
@@ -0,0 +1,32 @@
+package org.apache.axis.addressing.miheaders;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ *
+ * This will map to the was:relatsTo
+ */
+public class RelatesTo {
+    private String address;
+    private String relationshipType = "wsa:Reply";
+
+    public RelatesTo(String address) {
+        this.address = address;
+    }
+
+    public RelatesTo(String address, String relationshipType) {
+        this.address = address;
+        this.relationshipType = relationshipType;
+    }
+}