Hi all,
I just tried to build synapse and wso2 esb but had no luck. Synapse build did
succeed (only a bunch of script mediator tests failed for me) but, wso2 esb
build stopped with the following error:
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
D:\repos\wso2esb\modules\core\src\main\java\org\wso2\esb\services\EndpointAdmin.
java:[28,46] cannot find symbol
symbol : class EndpointAbstractFactory
location: package org.apache.synapse.config.xml.endpoints
D:\repos\wso2esb\modules\core\src\main\java\org\wso2\esb\services\EndpointAdmin.
java:[340,30] cannot find symbol
symbol : variable EndpointAbstractFactory
location: class org.wso2.esb.services.EndpointAdmin
D:\repos\wso2esb\modules\core\src\main\java\org\wso2\esb\services\EndpointAdmin.
java:[342,35] createEndpoint(org.apache.axiom.om.OMElement,boolean) has protecte
d access in org.apache.synapse.config.xml.endpoints.EndpointFactory
D:\repos\wso2esb\modules\core\src\main\java\org\wso2\esb\services\EndpointAdmin.
java:[427,32] cannot find symbol
symbol : variable EndpointAbstractFactory
location: class org.wso2.esb.services.EndpointAdmin
Ruwan, it seems to me as you have refactored synapse but forgotten to reflect
that changes in the wso2 esb code base. Am I right?
Just to go ahead I had a quick look at EndpointAdmin and tried to make it
compilable. I just did what looked somehow logical to me. Though it may be
completely wrong, as I don't know you actual change and didn't like to take the
time for investigation. :-) Please find attached a diff!
This fixed the build issue and I could go ahead. I will see whether the changes
had been correct or not. ;-)
Regards,
Eric
Index: EndpointAdmin.java
===================================================================
--- EndpointAdmin.java (revision 16632)
+++ EndpointAdmin.java (working copy)
@@ -16,6 +16,16 @@
package org.wso2.esb.services;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
import org.apache.axiom.om.OMElement;
import org.apache.axis2.AxisFault;
import org.apache.commons.logging.Log;
@@ -25,22 +35,28 @@
import org.apache.synapse.config.SynapseConfiguration;
import org.apache.synapse.config.xml.SynapseXMLConfigurationFactory;
import org.apache.synapse.config.xml.XMLConfigConstants;
-import org.apache.synapse.config.xml.endpoints.EndpointAbstractFactory;
+import org.apache.synapse.config.xml.endpoints.DefaultEndpointFactory;
import org.apache.synapse.config.xml.endpoints.EndpointFactory;
-import org.apache.synapse.endpoints.*;
+import org.apache.synapse.endpoints.AddressEndpoint;
+import org.apache.synapse.endpoints.Endpoint;
+import org.apache.synapse.endpoints.FailoverEndpoint;
+import org.apache.synapse.endpoints.IndirectEndpoint;
+import org.apache.synapse.endpoints.LoadbalanceEndpoint;
+import org.apache.synapse.endpoints.SALoadbalanceEndpoint;
+import org.apache.synapse.endpoints.WSDLEndpoint;
import org.apache.synapse.endpoints.dispatch.Dispatcher;
import org.apache.synapse.endpoints.dispatch.HttpSessionDispatcher;
import org.apache.synapse.endpoints.dispatch.SimpleClientSessionDispatcher;
import org.apache.synapse.endpoints.dispatch.SoapSessionDispatcher;
import org.apache.synapse.endpoints.utils.EndpointDefinition;
-import org.wso2.esb.services.tos.*;
+import org.wso2.esb.services.tos.AddressEndpointData;
+import org.wso2.esb.services.tos.EndpointData;
+import org.wso2.esb.services.tos.EndpointMetaData;
+import org.wso2.esb.services.tos.FailOverEndpointData;
+import org.wso2.esb.services.tos.IndirectEndpointData;
+import org.wso2.esb.services.tos.LoadBalanceEndpointData;
+import org.wso2.esb.services.tos.WSDLEndpointData;
-import javax.xml.namespace.QName;
-import java.util.*;
-/*
- *
- */
-
public class EndpointAdmin extends AbstractESBAdmin {
private static final Log log = LogFactory.getLog(EndpointAdmin.class);
@@ -337,17 +353,14 @@
}
public EndpointData convertToEndpointData(OMElement epElement) throws
AxisFault {
- EndpointFactory fac =
EndpointAbstractFactory.getEndpointFactory(epElement);
- if (fac != null) {
- Endpoint endpoint = fac.createEndpoint(epElement, true);
- if (endpoint != null) {
- return getEndpointData(endpoint);
- } else {
- handleFault(log, "Unable to create an endpoint definition",
null);
- }
+
+ Endpoint endpoint =
DefaultEndpointFactory.getEndpointFromElement(epElement, true);
+ if (endpoint != null) {
+ return getEndpointData(endpoint);
} else {
- handleFault(log, "Unable to access the endpoint factory instance",
null);
+ handleFault(log, "Unable to create an endpoint definition", null);
}
+
return null;
}
@@ -424,8 +437,7 @@
.getStatisticsState();
}
- Endpoint endpoint = EndpointAbstractFactory.getEndpointFactory(
- endpointElement).createEndpoint(endpointElement, false);
+ Endpoint endpoint =
DefaultEndpointFactory.getEndpointFromElement(endpointElement, false);
if (endpoint == null) {
handleFault(log, "Newly created endpoint is null ", null);
}
_______________________________________________
Esb-java-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev