geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r1140929 - in /geronimo/bundles/trunk/scout: ./ src/main/java/org/apache/ws/scout/registry/ src/main/java/org/apache/ws/scout/util/
Date Wed, 29 Jun 2011 01:15:33 GMT
Author: genspring
Date: Wed Jun 29 01:15:33 2011
New Revision: 1140929

URL: http://svn.apache.org/viewvc?rev=1140929&view=rev
Log:
upgrade to scout 1.2.3-SNAPSHOT to pick up some regression fixes caused by uddi 3.1.0 release

Modified:
    geronimo/bundles/trunk/scout/pom.xml
    geronimo/bundles/trunk/scout/src/main/java/org/apache/ws/scout/registry/ConnectionFactoryImpl.java
    geronimo/bundles/trunk/scout/src/main/java/org/apache/ws/scout/registry/RegistryV3Impl.java
    geronimo/bundles/trunk/scout/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.java

Modified: geronimo/bundles/trunk/scout/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/bundles/trunk/scout/pom.xml?rev=1140929&r1=1140928&r2=1140929&view=diff
==============================================================================
--- geronimo/bundles/trunk/scout/pom.xml (original)
+++ geronimo/bundles/trunk/scout/pom.xml Wed Jun 29 01:15:33 2011
@@ -28,7 +28,7 @@
 
     <groupId>org.apache.geronimo.bundles</groupId>
     <artifactId>${pkgArtifactId}</artifactId>
-    <version>1.2.2_2-SNAPSHOT</version>
+    <version>1.2.3_1-SNAPSHOT</version>
     <packaging>bundle</packaging>
     <name>Apache Geronimo Bundles: ${pkgArtifactId}-${pkgVersion}</name>
     <description>
@@ -44,7 +44,7 @@
     <properties>
         <pkgGroupId>org.apache.ws.scout</pkgGroupId>
         <pkgArtifactId>scout</pkgArtifactId>
-        <pkgVersion>1.2.2</pkgVersion>
+        <pkgVersion>1.2.3-SNAPSHOT</pkgVersion>
     </properties>
 
     <dependencies>
@@ -83,11 +83,14 @@
                     <instructions>
                         <Export-Package>org.apache.ws.scout*;version="1.2"</Export-Package>
                         <Import-Package>javax.xml.registry*;version="1.0",org.apache.axis.*;resolution:=optional,*</Import-Package>
-                        <Include-Resource>
+                        <!--Include-Resource>
                            {maven-resources},                           org/apache/ws/scout/registry/ConnectionFactoryImpl.class=target/classes/org/apache/ws/scout/registry/ConnectionFactoryImpl.class,

                            org/apache/ws/scout/registry/RegistryV3Impl.class=target/classes/org/apache/ws/scout/registry/RegistryV3Impl.class,
                            org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.class=target/classes/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.class
                           
-                        </Include-Resource>                        
+                        </Include-Resource--> 
+                        <Include-Resource>
+                           {maven-resources},                           org/apache/ws/scout/registry/ConnectionFactoryImpl.class=target/classes/org/apache/ws/scout/registry/ConnectionFactoryImpl.class
                
+                        </Include-Resource>                           
                     </instructions>
                 </configuration>
             </plugin>

Modified: geronimo/bundles/trunk/scout/src/main/java/org/apache/ws/scout/registry/ConnectionFactoryImpl.java
URL: http://svn.apache.org/viewvc/geronimo/bundles/trunk/scout/src/main/java/org/apache/ws/scout/registry/ConnectionFactoryImpl.java?rev=1140929&r1=1140928&r2=1140929&view=diff
==============================================================================
--- geronimo/bundles/trunk/scout/src/main/java/org/apache/ws/scout/registry/ConnectionFactoryImpl.java
(original)
+++ geronimo/bundles/trunk/scout/src/main/java/org/apache/ws/scout/registry/ConnectionFactoryImpl.java
Wed Jun 29 01:15:33 2011
@@ -42,13 +42,13 @@ import javax.xml.registry.UnsupportedCap
 public class ConnectionFactoryImpl extends ConnectionFactory implements Serializable
 {
 	private static final long serialVersionUID = -6902106826496922256L;
-	private static final String QUERYMANAGER_PROPERTY = "javax.xml.registry.queryManagerURL";
-    private static final String LIFECYCLEMANAGER_PROPERTY = "javax.xml.registry.lifeCycleManagerURL";
-    private static final String SECURITYMANAGER_PROPERTY = "javax.xml.registry.securityManagerURL";
-    private static final String SEMANTICEQUIVALENCES_PROPERTY = "javax.xml.registry.semanticEquivalences";
-    private static final String POSTALADDRESSSCHEME_PROPERTY = "javax.xml.registry.postalAddressScheme";
-    private static final String AUTHENTICATIONMETHOD_PROPERTY = "javax.xml.registry.security.authenticationMethod";
-    private static final String MAXROWS_PROPERTY = "javax.xml.registry.uddi.maxRows";
+	public static final String QUERYMANAGER_PROPERTY = "javax.xml.registry.queryManagerURL";
+	public static final String LIFECYCLEMANAGER_PROPERTY = "javax.xml.registry.lifeCycleManagerURL";
+	public static final String SECURITYMANAGER_PROPERTY = "javax.xml.registry.securityManagerURL";
+	public static final String SEMANTICEQUIVALENCES_PROPERTY = "javax.xml.registry.semanticEquivalences";
+	public static final String POSTALADDRESSSCHEME_PROPERTY = "javax.xml.registry.postalAddressScheme";
+	public static final String AUTHENTICATIONMETHOD_PROPERTY = "javax.xml.registry.security.authenticationMethod";
+	public static final String MAXROWS_PROPERTY = "javax.xml.registry.uddi.maxRows";
 
     private String queryManagerURL;
     private String lifeCycleManagerURL;

Modified: geronimo/bundles/trunk/scout/src/main/java/org/apache/ws/scout/registry/RegistryV3Impl.java
URL: http://svn.apache.org/viewvc/geronimo/bundles/trunk/scout/src/main/java/org/apache/ws/scout/registry/RegistryV3Impl.java?rev=1140929&r1=1140928&r2=1140929&view=diff
==============================================================================
--- geronimo/bundles/trunk/scout/src/main/java/org/apache/ws/scout/registry/RegistryV3Impl.java
(original)
+++ geronimo/bundles/trunk/scout/src/main/java/org/apache/ws/scout/registry/RegistryV3Impl.java
Wed Jun 29 01:15:33 2011
@@ -312,88 +312,90 @@ public class RegistryV3Impl implements I
 		    	response.removeAttribute(attr);
 		    }
 	    }*/
-
-	    if (response.getNamespaceURI()==null) {
-            response.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns", this.getUddiNamespace());
-        }
-	    
-	    // If we are getting responses from a UDDI v3, remove the xmlns
-	    
-	    // First, let's make sure that a response
-	    // (any response) is found in the SOAP Body.
-
-	    String responseName = response.getLocalName();
-	    if (responseName == null) {
-	        throw new RegistryV3Exception("Unsupported response "
-	                + "from registry. A value was not present.");
-		} 
-	    
-        // Let's now try to determine which UDDI response
-        // we received and unmarshal it appropriately or
-        // throw a RegistryV3Exception if it's unknown.
-        // Well, we have now determined that something was
-        // returned and it is "a something" that we know
-        // about so let's unmarshal it into a RegistryObject
-        // Next, let's make sure we didn't recieve a SOAP
-        // Fault. If it is a SOAP Fault then throw it
-        // immediately.
-
-        JAXBElement<?> uddiResponse = null;
-	    try {
-	    	String xml = XMLUtils.convertNodeToXMLString(response);
-	        log.debug("Response is: " + xml);
-	    	
-		StringReader reader = new StringReader(xml);
-		uddiResponse = (JAXBElement<?>) unmarshaller.unmarshal(new StreamSource(reader));
-	    	//It is probably faster not to go to a String, but JAXB has issues with this
-	        //uddiResponse = (JAXBElement<?>) unmarshaller.unmarshal(response);
-
-	    } catch (JAXBException xmle) {
-	        throw (new RegistryV3Exception(xmle));
-	    }
-
-		if (responseName.toLowerCase().equals("fault")) {
-			NodeList nodeList = null;
-			
-			// Child Elements
-			String fCode = null;
-			nodeList = response.getElementsByTagName("faultcode");
-			if (nodeList.getLength() > 0)
-				fCode = nodeList.item(0).getNodeValue();
-
-			String fString = null;
-			nodeList = response.getElementsByTagName("faultstring");
-			if (nodeList.getLength() > 0)
-				fString = nodeList.item(0).getNodeValue();
-
-			String fActor = null;
-			nodeList = response.getElementsByTagName("faultactor");
-			if (nodeList.getLength() > 0)
-				fActor = nodeList.item(0).getNodeValue();
-
-			DispositionReport dispRpt = null;
-
-			nodeList = response.getElementsByTagName("detail");
-			if (nodeList.getLength() > 0) {
-				nodeList = ((Element) nodeList.item(0))
-						.getElementsByTagName("dispositionReport");
+	    JAXBElement<?> uddiResponse = null;
+	    if (response!=null) {
+		    if (response.getNamespaceURI()==null) {
+	            response.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns", this.getUddiNamespace());
+	        }
+		    
+		    // If we are getting responses from a UDDI v3, remove the xmlns
+		    
+		    // First, let's make sure that a response
+		    // (any response) is found in the SOAP Body.
+	
+		    String responseName = response.getLocalName();
+		    if (responseName == null) {
+		        throw new RegistryV3Exception("Unsupported response "
+		                + "from registry. A value was not present.");
+			} 
+		    
+	        // Let's now try to determine which UDDI response
+	        // we received and unmarshal it appropriately or
+	        // throw a RegistryV3Exception if it's unknown.
+	        // Well, we have now determined that something was
+	        // returned and it is "a something" that we know
+	        // about so let's unmarshal it into a RegistryObject
+	        // Next, let's make sure we didn't recieve a SOAP
+	        // Fault. If it is a SOAP Fault then throw it
+	        // immediately.
+	
+	        
+		    try {
+		    	String xml = XMLUtils.convertNodeToXMLString(response);
+		        log.debug("Response is: " + xml);
+		    	
+			StringReader reader = new StringReader(xml);
+			uddiResponse = (JAXBElement<?>) unmarshaller.unmarshal(new StreamSource(reader));
+		    	//It is probably faster not to go to a String, but JAXB has issues with this
+		        //uddiResponse = (JAXBElement<?>) unmarshaller.unmarshal(response);
+	
+		    } catch (JAXBException xmle) {
+		        throw (new RegistryV3Exception(xmle));
+		    }
+	
+			if (responseName.toLowerCase().equals("fault")) {
+				NodeList nodeList = null;
+				
+				// Child Elements
+				String fCode = null;
+				nodeList = response.getElementsByTagName("faultcode");
+				if (nodeList.getLength() > 0)
+					fCode = nodeList.item(0).getNodeValue();
+	
+				String fString = null;
+				nodeList = response.getElementsByTagName("faultstring");
+				if (nodeList.getLength() > 0)
+					fString = nodeList.item(0).getNodeValue();
+	
+				String fActor = null;
+				nodeList = response.getElementsByTagName("faultactor");
+				if (nodeList.getLength() > 0)
+					fActor = nodeList.item(0).getNodeValue();
+	
+				DispositionReport dispRpt = null;
+	
+				nodeList = response.getElementsByTagName("detail");
 				if (nodeList.getLength() > 0) {
-					JAXBElement<DispositionReport> dispRptObj = null;
-					try {
-						dispRptObj = (JAXBElement<DispositionReport>) unmarshaller.unmarshal((Element)
nodeList
-								.item(0));
-					} catch (JAXBException xmle) {
-						throw (new RegistryV3Exception(xmle));
-					}
-                    dispRpt = dispRptObj.getValue();
-                }
+					nodeList = ((Element) nodeList.item(0))
+							.getElementsByTagName("dispositionReport");
+					if (nodeList.getLength() > 0) {
+						JAXBElement<DispositionReport> dispRptObj = null;
+						try {
+							dispRptObj = (JAXBElement<DispositionReport>) unmarshaller.unmarshal((Element)
nodeList
+									.item(0));
+						} catch (JAXBException xmle) {
+							throw (new RegistryV3Exception(xmle));
+						}
+	                    dispRpt = dispRptObj.getValue();
+	                }
+				}
+	
+				RegistryV3Exception e = new RegistryV3Exception(fCode, fString, fActor, dispRpt);
+			
+				// Create RegistryV3Exception instance and return
+				throw e;
 			}
-
-			RegistryV3Exception e = new RegistryV3Exception(fCode, fString, fActor, dispRpt);
-		
-			// Create RegistryV3Exception instance and return
-			throw e;
-		}
+	    }
 
 		return uddiResponse;
 	}
@@ -551,9 +553,11 @@ public class RegistryV3Impl implements I
 			request.getBindingKey().addAll(Arrays.asList(bindingKeyArray));
 		}
 
-        DispositionReport dr;
+        DispositionReport dr = new DispositionReport();
         JAXBElement<?> o = execute(this.objectFactory.createDeleteBinding(request),
this.getPublishURI());
-        dr = (DispositionReport) o.getValue();
+        if (o!=null) {
+        	dr = (DispositionReport) o.getValue();
+        }
 
         return dr;
 	}
@@ -575,9 +579,11 @@ public class RegistryV3Impl implements I
 			request.getBusinessKey().addAll(Arrays.asList(businessKeyArray));
 		}
 
-        DispositionReport dr;
+        DispositionReport dr = new DispositionReport();
         JAXBElement<?> o = execute(this.objectFactory.createDeleteBusiness(request),
this.getPublishURI());
-        dr = (DispositionReport) o.getValue();
+        if (o!=null){
+        	dr = (DispositionReport) o.getValue();
+        }
 
         return dr;
 	}
@@ -597,10 +603,12 @@ public class RegistryV3Impl implements I
 			request.getPublisherAssertion().addAll(Arrays.asList(assertionArray));
 		}
 
-        DispositionReport dr;
+        DispositionReport dr = new DispositionReport();
         JAXBElement<?> o = execute(this.objectFactory.createDeletePublisherAssertions(request),

         		this.getPublishURI());
-        dr = (DispositionReport) o.getValue();
+        if (o!=null) {
+        	dr = (DispositionReport) o.getValue();
+        }
 
         return dr;
 	}
@@ -623,10 +631,12 @@ public class RegistryV3Impl implements I
 			request.getServiceKey().addAll(Arrays.asList(serviceKeyArray));
 		}
 
-        DispositionReport dr;
+        DispositionReport dr = new DispositionReport();
         JAXBElement<?> o = execute(this.objectFactory.createDeleteService(request),

         		this.getPublishURI());
-        dr = (DispositionReport) o.getValue();
+        if (o!=null) {
+        	dr = (DispositionReport) o.getValue();
+        }
 
         return dr;
 	}
@@ -650,10 +660,12 @@ public class RegistryV3Impl implements I
 			request.getTModelKey().addAll(Arrays.asList(tModelKeyArray));
 		}
 
-        DispositionReport dr;
+        DispositionReport dr = new DispositionReport();
         JAXBElement<?> o = execute(this.objectFactory.createDeleteTModel(request),

         		this.getPublishURI());
-        dr = (DispositionReport) o.getValue();
+        if (o!=null) {
+        	dr = (DispositionReport) o.getValue();
+        }
 
         return dr;
 	}

Modified: geronimo/bundles/trunk/scout/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.java
URL: http://svn.apache.org/viewvc/geronimo/bundles/trunk/scout/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.java?rev=1140929&r1=1140928&r2=1140929&view=diff
==============================================================================
--- geronimo/bundles/trunk/scout/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.java
(original)
+++ geronimo/bundles/trunk/scout/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.java
Wed Jun 29 01:15:33 2011
@@ -284,14 +284,14 @@ public class ScoutJaxrUddiV3Helper 
 			String key) throws JAXRException {
 		PublisherAssertion pa = objectFactory.createPublisherAssertion();
 		try {
-			StringTokenizer token = new StringTokenizer(key, ":");
+			StringTokenizer token = new StringTokenizer(key, "|");
 			if (token.hasMoreTokens()) {
                pa.setFromKey(getToken(token.nextToken()));
                pa.setToKey(getToken(token.nextToken()));
 				KeyedReference kr = objectFactory.createKeyedReference();
 				// Sometimes the Key is UUID:something
                String str = getToken(token.nextToken());
-				if ("UUID".equals(str))
+				if ("UUID".equalsIgnoreCase(str))
 					str += ":" + getToken(token.nextToken());
                kr.setTModelKey(str);
                kr.setKeyName(getToken(token.nextToken()));



Mime
View raw message