Return-Path: X-Original-To: apmail-geronimo-scm-archive@www.apache.org Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 559806323 for ; Wed, 29 Jun 2011 01:16:00 +0000 (UTC) Received: (qmail 79705 invoked by uid 500); 29 Jun 2011 01:16:00 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 79640 invoked by uid 500); 29 Jun 2011 01:15:59 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 79633 invoked by uid 99); 29 Jun 2011 01:15:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2011 01:15:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2011 01:15:55 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id A204C23889BB; Wed, 29 Jun 2011 01:15:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: scm@geronimo.apache.org From: genspring@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110629011533.A204C23889BB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 @@ org.apache.geronimo.bundles ${pkgArtifactId} - 1.2.2_2-SNAPSHOT + 1.2.3_1-SNAPSHOT bundle Apache Geronimo Bundles: ${pkgArtifactId}-${pkgVersion} @@ -44,7 +44,7 @@ org.apache.ws.scout scout - 1.2.2 + 1.2.3-SNAPSHOT @@ -83,11 +83,14 @@ org.apache.ws.scout*;version="1.2" javax.xml.registry*;version="1.0",org.apache.axis.*;resolution:=optional,* - + + + {maven-resources}, org/apache/ws/scout/registry/ConnectionFactoryImpl.class=target/classes/org/apache/ws/scout/registry/ConnectionFactoryImpl.class + 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 dispRptObj = null; - try { - dispRptObj = (JAXBElement) 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 dispRptObj = null; + try { + dispRptObj = (JAXBElement) 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()));