Author: ruwan
Date: Tue Jul 1 18:18:08 2008
New Revision: 673255
URL: http://svn.apache.org/viewvc?rev=673255&view=rev
Log:
Fixing the EPRs to reflect appending the portnames to the end of the service
name in the WSDL
Modified:
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/nhttp/HttpCoreNIOListener.java
Modified:
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/nhttp/HttpCoreNIOListener.java
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/nhttp/HttpCoreNIOListener.java?rev=673255&r1=673254&r2=673255&view=diff
==============================================================================
---
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/nhttp/HttpCoreNIOListener.java
(original)
+++
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/nhttp/HttpCoreNIOListener.java
Tue Jul 1 18:18:08 2008
@@ -416,19 +416,23 @@
*/
public EndpointReference getEPRForService(String serviceName, String ip)
throws AxisFault {
+ String trailler = "";
//Strip out the operation name
if (serviceName.indexOf('/') != -1) {
+ trailler += serviceName.substring(serviceName.indexOf("/"));
serviceName = serviceName.substring(0, serviceName.indexOf('/'));
}
// strip out the endpoint name if present
if (serviceName.indexOf('.') != -1) {
+ trailler += serviceName.substring(serviceName.indexOf("."));
serviceName = serviceName.substring(0, serviceName.indexOf('.'));
}
if (serviceNameToEPRMap.containsKey(serviceName)) {
- return new EndpointReference(customEPRPrefix +
serviceNameToEPRMap.get(serviceName));
+ return new EndpointReference(
+ customEPRPrefix + serviceNameToEPRMap.get(serviceName) +
trailler);
} else {
- return new EndpointReference(serviceEPRPrefix + serviceName);
+ return new EndpointReference(serviceEPRPrefix + serviceName +
trailler);
}
}
@@ -441,21 +445,25 @@
*/
public EndpointReference[] getEPRsForService(String serviceName, String
ip) throws AxisFault {
+ String trailler = "";
//Strip out the operation name
if (serviceName.indexOf('/') != -1) {
+ trailler += serviceName.substring(serviceName.indexOf("/"));
serviceName = serviceName.substring(0, serviceName.indexOf('/'));
}
// strip out the endpoint name if present
if (serviceName.indexOf('.') != -1) {
+ trailler += serviceName.substring(serviceName.indexOf("."));
serviceName = serviceName.substring(0, serviceName.indexOf('.'));
}
EndpointReference[] endpointReferences = new EndpointReference[1];
if (serviceNameToEPRMap.containsKey(serviceName)) {
endpointReferences[0] = new EndpointReference(
- customEPRPrefix + serviceNameToEPRMap.get(serviceName));
+ customEPRPrefix + serviceNameToEPRMap.get(serviceName) +
trailler);
} else {
- endpointReferences[0] = new EndpointReference(serviceEPRPrefix +
serviceName);
+ endpointReferences[0]
+ = new EndpointReference(serviceEPRPrefix + serviceName +
trailler);
}
return endpointReferences;
}