You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by js...@apache.org on 2006/10/10 13:51:56 UTC
svn commit: r454711 -
/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ResolvedEndpoint.java
Author: jstrachan
Date: Tue Oct 10 04:51:55 2006
New Revision: 454711
URL: http://svn.apache.org/viewvc?view=rev&rev=454711
Log:
added helper method for constructing resolved endpoints easier
Modified:
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ResolvedEndpoint.java
Modified: incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ResolvedEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ResolvedEndpoint.java?view=diff&rev=454711&r1=454710&r2=454711
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ResolvedEndpoint.java (original)
+++ incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/ResolvedEndpoint.java Tue Oct 10 04:51:55 2006
@@ -17,11 +17,12 @@
*/
package org.apache.servicemix.common;
+import org.apache.servicemix.jbi.resolver.URIResolver;
+import org.apache.servicemix.jbi.util.DOMUtil;
import org.w3c.dom.DocumentFragment;
-import org.w3c.dom.Node;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-import org.apache.servicemix.jbi.util.DOMUtil;
import javax.jbi.servicedesc.ServiceEndpoint;
import javax.xml.namespace.QName;
@@ -36,6 +37,9 @@
private QName serviceName;
private QName[] interfaces = null;
+ public ResolvedEndpoint(String uri, QName serviceName) {
+ this(URIResolver.createWSAEPR(uri), uri, serviceName);
+ }
public ResolvedEndpoint(DocumentFragment reference, String epName, QName serviceName) {
this.reference = reference;
@@ -77,8 +81,9 @@
// Check simple endpoints
if (eprUri.equals(nsUri) && eprName.equals(name)) {
return new ResolvedEndpoint(epr, DOMUtil.getElementText(elem), serviceName);
- // Check WSA endpoints
- } else {
+ // Check WSA endpoints
+ }
+ else {
NodeList nl = elem.getElementsByTagNameNS("http://www.w3.org/2005/08/addressing", "Address");
if (nl.getLength() == 1) {
Element address = (Element) nl.item(0);