Author: pzf
Date: Mon Oct 23 07:15:04 2006
New Revision: 466998

URL: http://svn.apache.org/viewvc?view=rev&rev=466998
Log:
fixed usage of URL class in Endpoint

Modified:
    
incubator/synapse/branches/NIO/modules/core/src/org/apache/synapse/config/Endpoint.java
    
incubator/synapse/branches/NIO/modules/core/src/org/apache/synapse/core/axis2/ProxyServiceMessageReceiver.java
    
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/Endpoint.java
    
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/xml/EndpointFactory.java
    
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/xml/EndpointSerializer.java
    
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/xml/MediatorFactoryFinder.java
    
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/xml/SendMediatorFactory.java
    
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/core/axis2/ProxyServiceMessageReceiver.java

Modified: 
incubator/synapse/branches/NIO/modules/core/src/org/apache/synapse/config/Endpoint.java
URL: 
http://svn.apache.org/viewvc/incubator/synapse/branches/NIO/modules/core/src/org/apache/synapse/config/Endpoint.java?view=diff&rev=466998&r1=466997&r2=466998
==============================================================================
--- 
incubator/synapse/branches/NIO/modules/core/src/org/apache/synapse/config/Endpoint.java
 (original)
+++ 
incubator/synapse/branches/NIO/modules/core/src/org/apache/synapse/config/Endpoint.java
 Mon Oct 23 07:15:04 2006
@@ -30,7 +30,7 @@
     /** The name of this endpoint instance */
     private String name = null;
     /** The simple address this endpoint resolves to - if explicitly specified 
*/
-    private URL address = null;
+    private String address = null;
     /** The name of the actual endpoint to which this instance refers to */
     private String ref = null;
     /** Should messages be sent in an WS-RM Sequence ? */
@@ -64,7 +64,7 @@
      * This should return the absolute EPR address referenced by the named 
endpoint. This may be possibly computed.
      * @return an absolute address to be used to reference the named endpoint
      */
-    public URL getAddress() {
+    public String getAddress() {
         return address;
     }
 
@@ -72,7 +72,7 @@
      * Set an absolute URL as the address for this named endpoint
      * @param address the absolute address to be used
      */
-    public void setAddress(URL address) {
+    public void setAddress(String address) {
         this.address = address;
     }
 

Modified: 
incubator/synapse/branches/NIO/modules/core/src/org/apache/synapse/core/axis2/ProxyServiceMessageReceiver.java
URL: 
http://svn.apache.org/viewvc/incubator/synapse/branches/NIO/modules/core/src/org/apache/synapse/core/axis2/ProxyServiceMessageReceiver.java?view=diff&rev=466998&r1=466997&r2=466998
==============================================================================
--- 
incubator/synapse/branches/NIO/modules/core/src/org/apache/synapse/core/axis2/ProxyServiceMessageReceiver.java
 (original)
+++ 
incubator/synapse/branches/NIO/modules/core/src/org/apache/synapse/core/axis2/ProxyServiceMessageReceiver.java
 Mon Oct 23 07:15:04 2006
@@ -66,7 +66,7 @@
                 // what else can/should we do instead of just logging the 
message as an error?
                 log.error("The endpoint named '" + targetEndpoint + "' is not 
defined. Dropping current message");
             } else {
-                synCtx.setTo(new 
EndpointReference(endpoint.getAddress().toString()));
+                synCtx.setTo(new EndpointReference(endpoint.getAddress()));
                 log.debug("Forwarding message directly to the endpoint named : 
" + targetEndpoint);
 
                 org.apache.axis2.context.MessageContext axisInMsgContext =
@@ -97,7 +97,7 @@
                     
axisOutMsgContext.setProperty(org.apache.synapse.Constants.ISRESPONSE_PROPERTY, 
Boolean.TRUE);
                     
mc.getOperationContext().setProperty(Constants.RESPONSE_WRITTEN, 
Constants.VALUE_TRUE);
                     // check for addressing is alredy engaged for this message.
-                    // if engage we should use the address enable Configuraion 
context.
+                    // if engage we sho        uld use the address enable 
Configuraion context.
                     ae.send(axisOutMsgContext);
 
                 } catch (AxisFault e) {

Modified: 
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/Endpoint.java
URL: 
http://svn.apache.org/viewvc/incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/Endpoint.java?view=diff&rev=466998&r1=466997&r2=466998
==============================================================================
--- 
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/Endpoint.java
 (original)
+++ 
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/Endpoint.java
 Mon Oct 23 07:15:04 2006
@@ -16,7 +16,6 @@
 package org.apache.synapse.config;
 
 
-import java.net.URL;
 
 /**
  * An endpoint can be used to give a logical name to an endpoint address, and 
possibly reused.
@@ -30,7 +29,7 @@
     /** The name of this endpoint instance */
     private String name = null;
     /** The simple address this endpoint resolves to - if explicitly specified 
*/
-    private URL address = null;
+    private String address = null;
     /** The name of the actual endpoint to which this instance refers to */
     private String ref = null;
     /** Should messages be sent in an WS-RM Sequence ? */
@@ -64,7 +63,7 @@
      * This should return the absolute EPR address referenced by the named 
endpoint. This may be possibly computed.
      * @return an absolute address to be used to reference the named endpoint
      */
-    public URL getAddress() {
+    public String getAddress() {
         return address;
     }
 
@@ -72,7 +71,7 @@
      * Set an absolute URL as the address for this named endpoint
      * @param address the absolute address to be used
      */
-    public void setAddress(URL address) {
+    public void setAddress(String address) {
         this.address = address;
     }
 

Modified: 
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/xml/EndpointFactory.java
URL: 
http://svn.apache.org/viewvc/incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/xml/EndpointFactory.java?view=diff&rev=466998&r1=466997&r2=466998
==============================================================================
--- 
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/xml/EndpointFactory.java
 (original)
+++ 
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/xml/EndpointFactory.java
 Mon Oct 23 07:15:04 2006
@@ -26,7 +26,7 @@
 
 import javax.xml.namespace.QName;
 import java.net.MalformedURLException;
-import java.net.URL;
+
 
 /**
  * Creates an Endpoint instance using the XML fragment specification
@@ -60,12 +60,7 @@
 
             OMAttribute address = elem.getAttribute(new 
QName(Constants.NULL_NAMESPACE, "address"));
             if (address != null) {
-                try {
-                    endpoint.setAddress(new URL(address.getAttributeValue()));
-                } catch (MalformedURLException e) {
-                    handleException("Invalid URL specified for 'address' : " +
-                        address.getAttributeValue(), e);
-                }
+                endpoint.setAddress(address.getAttributeValue());
             } else {
                 // right now an address is *required*
                 handleException("The 'address' attribute is required for an 
endpoint");

Modified: 
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/xml/EndpointSerializer.java
URL: 
http://svn.apache.org/viewvc/incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/xml/EndpointSerializer.java?view=diff&rev=466998&r1=466997&r2=466998
==============================================================================
--- 
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/xml/EndpointSerializer.java
 (original)
+++ 
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/xml/EndpointSerializer.java
 Mon Oct 23 07:15:04 2006
@@ -59,7 +59,7 @@
         OMElement endpoint = fac.createOMElement("endpoint", synNS);
         if (endpt.getAddress() != null) {
             endpoint.addAttribute(fac.createOMAttribute(
-                "address", nullNS, endpt.getAddress().toString()));
+                "address", nullNS, endpt.getAddress()));
         } else {
             handleException("Invalid Endpoint. Address is required");
         }

Modified: 
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/xml/MediatorFactoryFinder.java
URL: 
http://svn.apache.org/viewvc/incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/xml/MediatorFactoryFinder.java?view=diff&rev=466998&r1=466997&r2=466998
==============================================================================
--- 
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/xml/MediatorFactoryFinder.java
 (original)
+++ 
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/xml/MediatorFactoryFinder.java
 Mon Oct 23 07:15:04 2006
@@ -46,6 +46,7 @@
         SequenceMediatorFactory.class,
         LogMediatorFactory.class,
         SendMediatorFactory.class,
+        RestMediatorFactory.class,
         FilterMediatorFactory.class,
         SynapseMediatorFactory.class,
         DropMediatorFactory.class,

Modified: 
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/xml/SendMediatorFactory.java
URL: 
http://svn.apache.org/viewvc/incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/xml/SendMediatorFactory.java?view=diff&rev=466998&r1=466997&r2=466998
==============================================================================
--- 
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/xml/SendMediatorFactory.java
 (original)
+++ 
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/config/xml/SendMediatorFactory.java
 Mon Oct 23 07:15:04 2006
@@ -98,13 +98,9 @@
             if (ref != null) {
                 endpt.setRef(ref.getAttributeValue());
             } else if (address != null) {
-                try {
-                    endpt.setAddress(new URL(address.getAttributeValue()));
-                } catch (MalformedURLException e) {
-                    String msg = "Invalid endpoint address : " + 
address.getAttributeValue();
-                    log.error(msg, e);
-                    throw new SynapseException(msg, e);
-                }
+                
+                    endpt.setAddress(address.getAttributeValue());
+                
             } else {
                 String msg = "An endpoint used within a send mediator 
definition must contain a " +
                     "'ref' (reference) or 'address' (absolute URL) attribute";

Modified: 
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/core/axis2/ProxyServiceMessageReceiver.java
URL: 
http://svn.apache.org/viewvc/incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/core/axis2/ProxyServiceMessageReceiver.java?view=diff&rev=466998&r1=466997&r2=466998
==============================================================================
--- 
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/core/axis2/ProxyServiceMessageReceiver.java
 (original)
+++ 
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/core/axis2/ProxyServiceMessageReceiver.java
 Mon Oct 23 07:15:04 2006
@@ -66,7 +66,7 @@
                 // what else can/should we do instead of just logging the 
message as an error?
                 log.error("The endpoint named '" + targetEndpoint + "' is not 
defined. Dropping current message");
             } else {
-                synCtx.setTo(new 
EndpointReference(endpoint.getAddress().toString()));
+                synCtx.setTo(new EndpointReference(endpoint.getAddress()));
                 log.debug("Forwarding message directly to the endpoint named : 
" + targetEndpoint);
 
                 org.apache.axis2.context.MessageContext axisInMsgContext =



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to