ws-scout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r796122 [6/8] - in /webservices/scout/branches/v1.1: ./ jaxr-api/ scout/ scout/src/main/java/org/apache/ws/scout/model/ scout/src/main/java/org/apache/ws/scout/model/uddi/ scout/src/main/java/org/apache/ws/scout/model/uddi/v2/ scout/src/mai...
Date Tue, 21 Jul 2009 02:29:26 GMT
Added: webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/model/uddi/v2/TModelList.java
URL: http://svn.apache.org/viewvc/webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/model/uddi/v2/TModelList.java?rev=796122&view=auto
==============================================================================
--- webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/model/uddi/v2/TModelList.java (added)
+++ webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/model/uddi/v2/TModelList.java Tue Jul 21 02:29:23 2009
@@ -0,0 +1,151 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2009.07.19 at 09:49:41 PM CDT 
+//
+
+
+package org.apache.ws.scout.model.uddi.v2;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for tModelList complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="tModelList">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{urn:uddi-org:api_v2}tModelInfos"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="generic" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="operator" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="truncated" type="{urn:uddi-org:api_v2}truncated" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "tModelList", propOrder = {
+    "tModelInfos"
+})
+public class TModelList {
+
+    @XmlElement(required = true)
+    protected TModelInfos tModelInfos;
+    @XmlAttribute(required = true)
+    protected String generic;
+    @XmlAttribute(required = true)
+    protected String operator;
+    @XmlAttribute
+    protected Truncated truncated;
+
+    /**
+     * Gets the value of the tModelInfos property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link TModelInfos }
+     *     
+     */
+    public TModelInfos getTModelInfos() {
+        return tModelInfos;
+    }
+
+    /**
+     * Sets the value of the tModelInfos property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link TModelInfos }
+     *     
+     */
+    public void setTModelInfos(TModelInfos value) {
+        this.tModelInfos = value;
+    }
+
+    /**
+     * Gets the value of the generic property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getGeneric() {
+        return generic;
+    }
+
+    /**
+     * Sets the value of the generic property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setGeneric(String value) {
+        this.generic = value;
+    }
+
+    /**
+     * Gets the value of the operator property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getOperator() {
+        return operator;
+    }
+
+    /**
+     * Sets the value of the operator property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setOperator(String value) {
+        this.operator = value;
+    }
+
+    /**
+     * Gets the value of the truncated property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Truncated }
+     *     
+     */
+    public Truncated getTruncated() {
+        return truncated;
+    }
+
+    /**
+     * Sets the value of the truncated property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Truncated }
+     *     
+     */
+    public void setTruncated(Truncated value) {
+        this.truncated = value;
+    }
+
+}

Added: webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/model/uddi/v2/Truncated.java
URL: http://svn.apache.org/viewvc/webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/model/uddi/v2/Truncated.java?rev=796122&view=auto
==============================================================================
--- webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/model/uddi/v2/Truncated.java (added)
+++ webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/model/uddi/v2/Truncated.java Tue Jul 21 02:29:23 2009
@@ -0,0 +1,58 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2009.07.19 at 09:49:41 PM CDT 
+//
+
+
+package org.apache.ws.scout.model.uddi.v2;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for truncated.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="truncated">
+ *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">
+ *     &lt;enumeration value="true"/>
+ *     &lt;enumeration value="false"/>
+ *   &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ * 
+ */
+@XmlType(name = "truncated")
+@XmlEnum
+public enum Truncated {
+
+    @XmlEnumValue("true")
+    TRUE("true"),
+    @XmlEnumValue("false")
+    FALSE("false");
+    private final String value;
+
+    Truncated(String v) {
+        value = v;
+    }
+
+    public String value() {
+        return value;
+    }
+
+    public static Truncated fromValue(String v) {
+        for (Truncated c: Truncated.values()) {
+            if (c.value.equals(v)) {
+                return c;
+            }
+        }
+        throw new IllegalArgumentException(v);
+    }
+
+}

Added: webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/model/uddi/v2/URLType.java
URL: http://svn.apache.org/viewvc/webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/model/uddi/v2/URLType.java?rev=796122&view=auto
==============================================================================
--- webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/model/uddi/v2/URLType.java (added)
+++ webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/model/uddi/v2/URLType.java Tue Jul 21 02:29:23 2009
@@ -0,0 +1,73 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2009.07.19 at 09:49:41 PM CDT 
+//
+
+
+package org.apache.ws.scout.model.uddi.v2;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for URLType.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="URLType">
+ *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">
+ *     &lt;enumeration value="mailto"/>
+ *     &lt;enumeration value="http"/>
+ *     &lt;enumeration value="https"/>
+ *     &lt;enumeration value="ftp"/>
+ *     &lt;enumeration value="fax"/>
+ *     &lt;enumeration value="phone"/>
+ *     &lt;enumeration value="other"/>
+ *   &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ * 
+ */
+@XmlType(name = "URLType")
+@XmlEnum
+public enum URLType {
+
+    @XmlEnumValue("mailto")
+    MAILTO("mailto"),
+    @XmlEnumValue("http")
+    HTTP("http"),
+    @XmlEnumValue("https")
+    HTTPS("https"),
+    @XmlEnumValue("ftp")
+    FTP("ftp"),
+    @XmlEnumValue("fax")
+    FAX("fax"),
+    @XmlEnumValue("phone")
+    PHONE("phone"),
+    @XmlEnumValue("other")
+    OTHER("other");
+    private final String value;
+
+    URLType(String v) {
+        value = v;
+    }
+
+    public String value() {
+        return value;
+    }
+
+    public static URLType fromValue(String v) {
+        for (URLType c: URLType.values()) {
+            if (c.value.equals(v)) {
+                return c;
+            }
+        }
+        throw new IllegalArgumentException(v);
+    }
+
+}

Added: webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/model/uddi/v2/ValidateValues.java
URL: http://svn.apache.org/viewvc/webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/model/uddi/v2/ValidateValues.java?rev=796122&view=auto
==============================================================================
--- webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/model/uddi/v2/ValidateValues.java (added)
+++ webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/model/uddi/v2/ValidateValues.java Tue Jul 21 02:29:23 2009
@@ -0,0 +1,166 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2009.07.19 at 09:49:41 PM CDT 
+//
+
+
+package org.apache.ws.scout.model.uddi.v2;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for validate_values complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="validate_values">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;choice>
+ *         &lt;element ref="{urn:uddi-org:api_v2}businessEntity" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element ref="{urn:uddi-org:api_v2}businessService" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element ref="{urn:uddi-org:api_v2}tModel" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/choice>
+ *       &lt;attribute name="generic" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "validate_values", propOrder = {
+    "businessEntity",
+    "businessService",
+    "tModel"
+})
+public class ValidateValues {
+
+    protected List<BusinessEntity> businessEntity;
+    protected List<BusinessService> businessService;
+    protected List<TModel> tModel;
+    @XmlAttribute(required = true)
+    protected String generic;
+
+    /**
+     * Gets the value of the businessEntity property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the businessEntity property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getBusinessEntity().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link BusinessEntity }
+     * 
+     * 
+     */
+    public List<BusinessEntity> getBusinessEntity() {
+        if (businessEntity == null) {
+            businessEntity = new ArrayList<BusinessEntity>();
+        }
+        return this.businessEntity;
+    }
+
+    /**
+     * Gets the value of the businessService property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the businessService property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getBusinessService().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link BusinessService }
+     * 
+     * 
+     */
+    public List<BusinessService> getBusinessService() {
+        if (businessService == null) {
+            businessService = new ArrayList<BusinessService>();
+        }
+        return this.businessService;
+    }
+
+    /**
+     * Gets the value of the tModel property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the tModel property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getTModel().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link TModel }
+     * 
+     * 
+     */
+    public List<TModel> getTModel() {
+        if (tModel == null) {
+            tModel = new ArrayList<TModel>();
+        }
+        return this.tModel;
+    }
+
+    /**
+     * Gets the value of the generic property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getGeneric() {
+        return generic;
+    }
+
+    /**
+     * Sets the value of the generic property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setGeneric(String value) {
+        this.generic = value;
+    }
+
+}

Added: webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/model/uddi/v2/package-info.java
URL: http://svn.apache.org/viewvc/webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/model/uddi/v2/package-info.java?rev=796122&view=auto
==============================================================================
--- webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/model/uddi/v2/package-info.java (added)
+++ webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/model/uddi/v2/package-info.java Tue Jul 21 02:29:23 2009
@@ -0,0 +1,9 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2009.07.19 at 09:49:41 PM CDT 
+//
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "urn:uddi-org:api_v2", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.apache.ws.scout.model.uddi.v2;

Modified: webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/registry/BusinessLifeCycleManagerImpl.java
URL: http://svn.apache.org/viewvc/webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/registry/BusinessLifeCycleManagerImpl.java?rev=796122&r1=796121&r2=796122&view=diff
==============================================================================
--- webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/registry/BusinessLifeCycleManagerImpl.java (original)
+++ webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/registry/BusinessLifeCycleManagerImpl.java Tue Jul 21 02:29:23 2009
@@ -23,6 +23,7 @@
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
+import java.util.List;
 import java.util.Set;
 import java.util.Vector;
 
@@ -47,28 +48,28 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.ws.scout.model.uddi.v2.AssertionStatusItem;
+import org.apache.ws.scout.model.uddi.v2.AssertionStatusReport;
+import org.apache.ws.scout.model.uddi.v2.AuthToken;
+import org.apache.ws.scout.model.uddi.v2.BindingDetail;
+import org.apache.ws.scout.model.uddi.v2.BindingTemplate;
+import org.apache.ws.scout.model.uddi.v2.BusinessDetail;
+import org.apache.ws.scout.model.uddi.v2.BusinessEntity;
+import org.apache.ws.scout.model.uddi.v2.BusinessService;
+import org.apache.ws.scout.model.uddi.v2.DispositionReport;
+import org.apache.ws.scout.model.uddi.v2.ErrInfo;
+import org.apache.ws.scout.model.uddi.v2.KeyedReference;
+import org.apache.ws.scout.model.uddi.v2.ObjectFactory;
+import org.apache.ws.scout.model.uddi.v2.PublisherAssertion;
+import org.apache.ws.scout.model.uddi.v2.PublisherAssertions;
+import org.apache.ws.scout.model.uddi.v2.Result;
+import org.apache.ws.scout.model.uddi.v2.ServiceDetail;
+import org.apache.ws.scout.model.uddi.v2.TModel;
+import org.apache.ws.scout.model.uddi.v2.TModelDetail;
 import org.apache.ws.scout.registry.infomodel.ConceptImpl;
 import org.apache.ws.scout.registry.infomodel.InternationalStringImpl;
 import org.apache.ws.scout.registry.infomodel.KeyImpl;
-import org.apache.ws.scout.uddi.AssertionStatusItem;
-import org.apache.ws.scout.uddi.AssertionStatusReport;
-import org.apache.ws.scout.uddi.AuthToken;
-import org.apache.ws.scout.uddi.BindingDetail;
-import org.apache.ws.scout.uddi.BindingTemplate;
-import org.apache.ws.scout.uddi.BusinessDetail;
-import org.apache.ws.scout.uddi.BusinessEntity;
-import org.apache.ws.scout.uddi.BusinessService;
-import org.apache.ws.scout.uddi.DispositionReport;
-import org.apache.ws.scout.uddi.ErrInfo;
-import org.apache.ws.scout.uddi.KeyedReference;
-import org.apache.ws.scout.uddi.PublisherAssertion;
-import org.apache.ws.scout.uddi.PublisherAssertions;
-import org.apache.ws.scout.uddi.Result;
-import org.apache.ws.scout.uddi.ServiceDetail;
-import org.apache.ws.scout.uddi.TModel;
-import org.apache.ws.scout.uddi.TModelDetail;
 import org.apache.ws.scout.util.ScoutJaxrUddiHelper;
-import org.apache.xmlbeans.XmlObject;
 
 /**
  * Implements JAXR BusinessLifeCycleManager Interface.
@@ -83,9 +84,13 @@
 	
     private static final long serialVersionUID = 1L;
     private Log log = LogFactory.getLog(this.getClass());
+    
+    private transient ObjectFactory objectFactory = new ObjectFactory();
 	
     public BusinessLifeCycleManagerImpl(RegistryService registry) {
         super(registry);
+        if(objectFactory == null)
+        	objectFactory = new ObjectFactory();
     }
 
     /**
@@ -260,7 +265,10 @@
                 }
                 if(bd != null)
                 {
-                	PublisherAssertion[] keyarr = bd.getPublisherAssertionArray();
+                	List<PublisherAssertion> publisherAssertionList = bd.getPublisherAssertion();
+                	PublisherAssertion[] keyarr = new PublisherAssertion[publisherAssertionList.size()];
+                	publisherAssertionList.toArray(keyarr);
+                	
                 	for (int i = 0; keyarr != null && i < keyarr.length; i++) {
                 		PublisherAssertion result = (PublisherAssertion) keyarr[i];
                         KeyedReference keyr = result.getKeyedReference();
@@ -312,7 +320,9 @@
             return bulk;
         }
 
-        entityarr = td.getTModelArray();
+        List<TModel> tmodelList = td.getTModel();
+        entityarr = new TModel[tmodelList.size()];
+        tmodelList.toArray(entityarr); 
         log.debug("After Saving TModel. Obtained vector size:" + entityarr != null ? entityarr.length : 0);
         for (int i = 0; entityarr != null && i < entityarr.length; i++) {
             TModel tm = (TModel) entityarr[i];
@@ -358,7 +368,10 @@
             return bulk;
         }
 
-        entityarr = td.getTModelArray();
+        List<TModel> tmodelList = td.getTModel();
+        entityarr = new TModel[tmodelList.size()];
+        tmodelList.toArray(entityarr);
+        
         log.debug("After Saving TModel. Obtained vector size:" + entityarr != null ? entityarr.length : 0);
         for (int i = 0; entityarr != null && i < entityarr.length; i++) {
             TModel tm = (TModel) entityarr[i];
@@ -404,7 +417,11 @@
             return bulk;
         }
 
-        entityarr = bd.getBusinessEntityArray();
+        List<BusinessEntity> bizEntityList = bd.getBusinessEntity();
+        
+        entityarr = new BusinessEntity[bizEntityList.size()];
+        bizEntityList.toArray(entityarr);
+        
         log.debug("After Saving Business. Obtained vector size:" + entityarr != null ? entityarr.length : 0);
         for (int i = 0; entityarr != null && i < entityarr.length; i++) {
             BusinessEntity entity = (BusinessEntity) entityarr[i];
@@ -447,7 +464,10 @@
             return bulk;
         }
 
-        sbarr = bd.getBindingTemplateArray();
+        List<BindingTemplate> bindingTemplateList = bd.getBindingTemplate();
+        sbarr = new BindingTemplate[bindingTemplateList.size()];
+        bindingTemplateList.toArray(sbarr);
+        
         for (int i = 0; sbarr != null && i < sbarr.length; i++) {
             BindingTemplate bt = (BindingTemplate) sbarr[i];
             coll.add(new KeyImpl(bt.getBindingKey()));
@@ -491,7 +511,10 @@
             return bulk;
         }
 
-        sarr = sd.getBusinessServiceArray();
+        List<BusinessService> bizServiceList = sd.getBusinessService();
+        sarr = new BusinessService[bizServiceList.size()];
+        bizServiceList.toArray(sarr);
+        
         for (int i = 0; sarr != null && i < sarr.length; i++) {
             BusinessService entity = (BusinessService) sarr[i];
             coll.add(new KeyImpl(entity.getServiceKey()));
@@ -522,7 +545,7 @@
     }
 
     //Protected Methods
-    protected XmlObject executeOperation(Object dataarray, String op)
+    protected Object executeOperation(Object dataarray, String op)
             throws RegistryException, JAXRException {
         if (registry == null) {
             throw new IllegalStateException("No registry");
@@ -536,7 +559,7 @@
             throw new IllegalStateException("No auth token returned");
         }
 
-        XmlObject regobj;
+        Object regobj;
         if(op.equalsIgnoreCase("SAVE_ASSOCIATION"))
         {
             regobj = ireg.setPublisherAssertions(token.getAuthInfo(), (PublisherAssertion[]) dataarray);
@@ -593,12 +616,14 @@
        try
        {
           AssertionStatusReport report = ireg.getAssertionStatusReport(authinfo,"status:complete");
-          AssertionStatusItem[] a = report.getAssertionStatusItemArray();
+          List<AssertionStatusItem> assertionStatusItemList = report.getAssertionStatusItem();
+          AssertionStatusItem[] assertionStatusItemArr = 
+        	  new AssertionStatusItem[assertionStatusItemList.size()];
 
-          int len = a != null? a.length : 0;
+          int len = assertionStatusItemArr != null? assertionStatusItemArr.length : 0;
           for (int i = 0; i < len; i++)
           {
-                AssertionStatusItem asi = a[i];
+                AssertionStatusItem asi = assertionStatusItemArr[i];
                /* String sourceKey = asi.getFromKey();
                 String targetKey = asi.getToKey();
                 PublisherAssertion pa = new PublisherAssertion();
@@ -615,23 +640,23 @@
                 pasvect.add(this.getPublisherAssertion(asi));
            }
           report = ireg.getAssertionStatusReport(authinfo,"status:toKey_incomplete");
-          a = report.getAssertionStatusItemArray();
+          assertionStatusItemArr = report.getAssertionStatusItem().toArray(assertionStatusItemArr);
 
-          len = a != null? a.length : 0;
+          len = assertionStatusItemArr != null? assertionStatusItemArr.length : 0;
           for (int i = 0; i < len; i++)
           {
-                AssertionStatusItem asi = (AssertionStatusItem) a[i];
+                AssertionStatusItem asi = (AssertionStatusItem) assertionStatusItemArr[i];
                 if(pasvect == null) pasvect = new Vector<PublisherAssertion>(len);
                 pasvect.add(this.getPublisherAssertion(asi));
           }
 
           report = ireg.getAssertionStatusReport(authinfo,"status:fromKey_incomplete");
-          a = report.getAssertionStatusItemArray();
+          assertionStatusItemArr = report.getAssertionStatusItem().toArray(assertionStatusItemArr);
 
-          len = a != null? a.length : 0;
+          len = assertionStatusItemArr != null? assertionStatusItemArr.length : 0;
           for (int i = 0; i < len; i++)
           {
-                AssertionStatusItem asi = (AssertionStatusItem) a[i];
+                AssertionStatusItem asi = (AssertionStatusItem) assertionStatusItemArr[i];
                 if(pasvect == null) pasvect = new Vector<PublisherAssertion>(len);
                 pasvect.add(this.getPublisherAssertion(asi));
           }
@@ -648,7 +673,7 @@
        }
        catch (RegistryException e)
        {
-          e.printStackTrace();
+          throw new RuntimeException(e);
        }
 
           if(pasarr != null && pasarr.length > 0)
@@ -657,8 +682,7 @@
                 ireg.deletePublisherAssertions(authinfo, pasarr);
              }
              catch (RegistryException e)
-             {
-                e.printStackTrace();
+             { 
                 //IGNORE
              }
        }
@@ -688,8 +712,10 @@
             }
             // Save business
             DispositionReport bd = (DispositionReport) executeOperation(keyarr, op);
-
-            keyResultArr = bd.getResultArray();
+            List<Result> resultList = bd.getResult();
+            keyResultArr = new Result[resultList.size()];
+            resultList.toArray(keyResultArr); 
+            
             log.debug("After deleting Business. Obtained vector size:" + keyResultArr != null ? keyResultArr.length : 0);
             for (int i = 0; keyResultArr != null && i < keyResultArr.length; i++) {
                 Result result = (Result) keyResultArr[i];
@@ -699,7 +725,7 @@
                 }
                 else {
                     ErrInfo errinfo = result.getErrInfo();
-                    DeleteException de = new DeleteException(errinfo.getErrCode() + ":" + errinfo.getStringValue());
+                    DeleteException de = new DeleteException(errinfo.getErrCode() + ":" + errinfo.getValue());
                     bulk.setStatus(JAXRResponse.STATUS_FAILURE);
                     exceptions.add(de);
                 }
@@ -744,11 +770,11 @@
         String username = "", pwd = "";
         if (creds != null) {
         	Iterator it = creds.iterator();
-        while (it.hasNext()) {
-            PasswordAuthentication pass = (PasswordAuthentication) it.next();
-            username = pass.getUserName();
-            pwd = new String(pass.getPassword());
-        }
+        	while (it.hasNext()) {
+        		PasswordAuthentication pass = (PasswordAuthentication) it.next();
+        		username = pass.getUserName();
+        		pwd = new String(pass.getPassword());
+        	}
         }
 
         AuthToken token = null;
@@ -756,8 +782,7 @@
             token = ireg.getAuthToken(username, pwd);
         }
         catch (Exception e)
-        {
-            e.printStackTrace();
+        { 
             throw new JAXRException(e);
         }
         return token;
@@ -765,27 +790,31 @@
 
     private PublisherAssertion getPublisherAssertion(AssertionStatusItem asi)
     {
-        String sourceKey = asi.getFromKey();
-        String targetKey = asi.getToKey();
-        PublisherAssertion pa = PublisherAssertion.Factory.newInstance();
+    	PublisherAssertion pa = this.objectFactory.createPublisherAssertion();
         
-        if (sourceKey != null) {
-        pa.setFromKey(sourceKey);
-        }
+    	if(asi != null)
+    	{
+            String sourceKey = asi.getFromKey();
+            String targetKey = asi.getToKey();
         
-        if (targetKey != null) {
-        pa.setToKey(targetKey);
-        }
-        
-        KeyedReference keyr = asi.getKeyedReference();
-        
-        if (keyr != null) {
-        pa.setKeyedReference(keyr);
-        }
-        //pa.setTModelKey(keyr.getTModelKey());
-        //pa.setKeyName(keyr.getKeyName());
-        //pa.setKeyValue(keyr.getKeyValue()); // -CBC- These are redundant?
-        return pa;
+            if (sourceKey != null) {
+            pa.setFromKey(sourceKey);
+            }
+            
+            if (targetKey != null) {
+            pa.setToKey(targetKey);
+            }
+            
+            KeyedReference keyr = asi.getKeyedReference();
+            
+            if (keyr != null) {
+            pa.setKeyedReference(keyr);
+            }
+            //pa.setTModelKey(keyr.getTModelKey());
+            //pa.setKeyName(keyr.getKeyName());
+            //pa.setKeyValue(keyr.getKeyValue()); // -CBC- These are redundant?
+    		
+    	}return pa;
     }
 
 }

Modified: webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/registry/BusinessQueryManagerImpl.java
URL: http://svn.apache.org/viewvc/webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/registry/BusinessQueryManagerImpl.java?rev=796122&r1=796121&r2=796122&view=diff
==============================================================================
--- webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/registry/BusinessQueryManagerImpl.java (original)
+++ webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/registry/BusinessQueryManagerImpl.java Tue Jul 21 02:29:23 2009
@@ -42,36 +42,39 @@
 import javax.xml.registry.infomodel.Service;
 import javax.xml.registry.infomodel.ServiceBinding;
 
+import org.apache.ws.scout.model.uddi.v2.AssertionStatusItem;
+import org.apache.ws.scout.model.uddi.v2.AssertionStatusReport;
+import org.apache.ws.scout.model.uddi.v2.AuthToken;
+import org.apache.ws.scout.model.uddi.v2.BindingDetail;
+import org.apache.ws.scout.model.uddi.v2.BindingTemplate;
+import org.apache.ws.scout.model.uddi.v2.BusinessDetail;
+import org.apache.ws.scout.model.uddi.v2.BusinessInfo;
+import org.apache.ws.scout.model.uddi.v2.BusinessInfos;
+import org.apache.ws.scout.model.uddi.v2.BusinessList;
+import org.apache.ws.scout.model.uddi.v2.BusinessService;
+import org.apache.ws.scout.model.uddi.v2.FindQualifiers;
+import org.apache.ws.scout.model.uddi.v2.KeyedReference;
+import org.apache.ws.scout.model.uddi.v2.Name;
+import org.apache.ws.scout.model.uddi.v2.ObjectFactory;
+import org.apache.ws.scout.model.uddi.v2.PublisherAssertion;
+import org.apache.ws.scout.model.uddi.v2.PublisherAssertions;
+import org.apache.ws.scout.model.uddi.v2.RegisteredInfo;
+import org.apache.ws.scout.model.uddi.v2.ServiceDetail;
+import org.apache.ws.scout.model.uddi.v2.ServiceInfo;
+import org.apache.ws.scout.model.uddi.v2.ServiceInfos;
+import org.apache.ws.scout.model.uddi.v2.ServiceList;
+import org.apache.ws.scout.model.uddi.v2.TModel;
+import org.apache.ws.scout.model.uddi.v2.TModelDetail;
+import org.apache.ws.scout.model.uddi.v2.TModelInfo;
+import org.apache.ws.scout.model.uddi.v2.TModelInfos;
+import org.apache.ws.scout.model.uddi.v2.TModelList;
 import org.apache.ws.scout.registry.infomodel.AssociationImpl;
 import org.apache.ws.scout.registry.infomodel.ClassificationSchemeImpl;
 import org.apache.ws.scout.registry.infomodel.ConceptImpl;
 import org.apache.ws.scout.registry.infomodel.InternationalStringImpl;
 import org.apache.ws.scout.registry.infomodel.KeyImpl;
 import org.apache.ws.scout.registry.infomodel.ServiceBindingImpl;
-import org.apache.ws.scout.uddi.AssertionStatusItem;
-import org.apache.ws.scout.uddi.AssertionStatusReport;
-import org.apache.ws.scout.uddi.AuthToken;
-import org.apache.ws.scout.uddi.BindingDetail;
-import org.apache.ws.scout.uddi.BindingTemplate;
-import org.apache.ws.scout.uddi.BusinessDetail;
-import org.apache.ws.scout.uddi.BusinessEntity;
-import org.apache.ws.scout.uddi.BusinessInfo;
-import org.apache.ws.scout.uddi.BusinessList;
-import org.apache.ws.scout.uddi.BusinessService;
-import org.apache.ws.scout.uddi.FindQualifiers;
-import org.apache.ws.scout.uddi.KeyedReference;
-import org.apache.ws.scout.uddi.Name;
-import org.apache.ws.scout.uddi.PublisherAssertion;
-import org.apache.ws.scout.uddi.PublisherAssertions;
-import org.apache.ws.scout.uddi.ServiceDetail;
-import org.apache.ws.scout.uddi.ServiceInfo;
-import org.apache.ws.scout.uddi.ServiceInfos;
-import org.apache.ws.scout.uddi.ServiceList;
-import org.apache.ws.scout.uddi.TModel;
-import org.apache.ws.scout.uddi.TModelDetail;
-import org.apache.ws.scout.uddi.TModelInfo;
-import org.apache.ws.scout.uddi.TModelInfos;
-import org.apache.ws.scout.uddi.TModelList;
+import org.apache.ws.scout.registry.infomodel.ServiceImpl;
 import org.apache.ws.scout.util.EnumerationHelper;
 import org.apache.ws.scout.util.ScoutJaxrUddiHelper;
 import org.apache.ws.scout.util.ScoutUddiJaxrHelper;
@@ -88,6 +91,7 @@
 {
     private final RegistryServiceImpl registryService;
 
+    private static ObjectFactory objectFactory = new ObjectFactory();
 
     public BusinessQueryManagerImpl(RegistryServiceImpl registry)
     {
@@ -130,18 +134,26 @@
                     null,
                     juddiFindQualifiers,
                     registryService.getMaxRows());
-            BusinessInfo[] a = result.getBusinessInfos() != null ? result.getBusinessInfos().getBusinessInfoArray() : null;
-
+            
+            BusinessInfo[] bizInfoArr =null;
+            BusinessInfos bizInfos = result.getBusinessInfos();
+            if(bizInfos != null)
+            {
+            	List<BusinessInfo> bizInfoList = bizInfos.getBusinessInfo();
+            	bizInfoArr = new BusinessInfo[bizInfoList.size()];
+            	bizInfoList.toArray(bizInfoArr);
+            }
+            
             LinkedHashSet<Organization> orgs = null;
             int len = 0;
-            if (a != null)
+            if (bizInfoArr != null)
             {
-                len = a.length;
+                len = bizInfoArr.length;
                 orgs = new LinkedHashSet<Organization>();
             }
             for (int i = 0; i < len; i++)
             {
-                BusinessInfo info = a[i];
+                BusinessInfo info = bizInfoArr[i];
                 //Now get the details on the individual biz
                 BusinessDetail detail = registry.getBusinessDetail(info.getBusinessKey());
 
@@ -167,18 +179,20 @@
             AuthToken auth = this.getAuthToken(con,registry);
             PublisherAssertions result =
                     registry.getPublisherAssertions(auth.getAuthInfo());
-            PublisherAssertion[] a = result.getPublisherAssertionArray();
-
+            List<PublisherAssertion> publisherAssertionList = result.getPublisherAssertion();
+            PublisherAssertion[] publisherAssertionArr = new PublisherAssertion[publisherAssertionList.size()];
+            publisherAssertionList.toArray(publisherAssertionArr);
+            
             LinkedHashSet<Association> col = null;
             int len = 0;
-            if (a != null)
+            if (publisherAssertionArr != null)
             {
-                len = a.length;
+                len = publisherAssertionArr.length;
                 col = new LinkedHashSet<Association>();
             }
             for (int i = 0; i < len; i++)
             {
-                PublisherAssertion pas = a[i];
+                PublisherAssertion pas = publisherAssertionArr[i];
                 String sourceKey = pas.getFromKey();
                 String targetKey = pas.getToKey();
                 Collection<Key> orgcol = new ArrayList<Key>();
@@ -229,17 +243,22 @@
                         confirm = Constants.COMPLETION_STATUS_TOKEY_INCOMPLETE;
 
             report = registry.getAssertionStatusReport(auth.getAuthInfo(),confirm);
-            AssertionStatusItem[] a = report.getAssertionStatusItemArray();
+            
+            
+            List<AssertionStatusItem> assertionStatusItemList = report.getAssertionStatusItem();
+            AssertionStatusItem[] assertionStatusItemArr = new AssertionStatusItem[assertionStatusItemList.size()];
+            assertionStatusItemList.toArray(assertionStatusItemArr);
+            
             LinkedHashSet<Association> col = null;
             int len = 0;
-            if (a != null)
+            if (assertionStatusItemArr != null)
             {
-                len = a.length;
+                len = assertionStatusItemArr.length;
                 col = new LinkedHashSet<Association>();
             }
             for (int i = 0; i < len; i++)
             {
-                AssertionStatusItem asi = a[i];
+                AssertionStatusItem asi = assertionStatusItemArr[i];
                 String sourceKey = asi.getFromKey();
                 String targetKey = asi.getToKey();
                 Collection<Key> orgcol = new ArrayList<Key>();
@@ -441,21 +460,27 @@
                     TModelInfos infos = null;
                     TModelInfo[] tmarr = null;
                     if (list != null) infos = list.getTModelInfos();
-                    if (infos != null) tmarr = infos.getTModelInfoArray();
+                    if (infos != null) 
+                    {
+                    	List<TModelInfo> tmodelInfoList = infos.getTModelInfo();
+                    	tmarr = new TModelInfo[tmodelInfoList.size()];
+                    	tmodelInfoList.toArray(tmarr);
+                    }
+                    	
+                    	
                     if (tmarr != null && tmarr.length > 0)
                     {
-                        if (tmarr.length > 1)
-                            throw new InvalidRequestException("Multiple matches found");
-
+                        /*if (tmarr.length > 1)
+                            throw new InvalidRequestException("Multiple matches found:" + tmarr.length);
+*/
                         TModelInfo info = tmarr[0];
                         scheme = new ClassificationSchemeImpl(registryService.getLifeCycleManagerImpl());
-                        scheme.setName(new InternationalStringImpl(info.getName().getStringValue()));
+                        scheme.setName(new InternationalStringImpl(info.getName().getValue()));
                         scheme.setKey(new KeyImpl(info.getTModelKey()));
                     }
 
                 } catch (RegistryException e)
-                {
-                    e.printStackTrace();
+                { 
                     throw new JAXRException(e.getLocalizedMessage());
                 }
             }
@@ -538,7 +563,13 @@
                 TModelInfos infos = null;
                 TModelInfo[] tmarr = null;
                 if (list != null) infos = list.getTModelInfos();
-                if (infos != null) tmarr = infos.getTModelInfoArray();
+                if (infos != null)
+                {
+                	List<TModelInfo> tmodelInfoList = infos.getTModelInfo();
+                	tmarr = new TModelInfo[tmodelInfoList.size()];
+                	tmodelInfoList.toArray(tmarr);
+                }
+                	
                 for (int i = 0; tmarr != null && i < tmarr.length; i++)
                 {
                     TModelInfo info = tmarr[i];
@@ -546,8 +577,7 @@
                 }
 
             } catch (RegistryException e)
-            {
-                e.printStackTrace();
+            { 
                 throw new JAXRException(e.getLocalizedMessage());
             }
         }
@@ -576,7 +606,7 @@
         try
         {
  
-            BindingDetail l = iRegistry.findBinding(serviceKey.getId(),
+            BindingDetail bindingDetail = iRegistry.findBinding(serviceKey.getId(),
                     ScoutJaxrUddiHelper.getCategoryBagFromClassifications(classifications), 
             		ScoutJaxrUddiHelper.getTModelBagFromSpecifications(specifications),
             		juddiFindQualifiers,registryService.getMaxRows());
@@ -584,9 +614,12 @@
             /*
              * now convert  from jUDDI ServiceInfo objects to JAXR Services
              */
-            if (l != null) {
+            if (bindingDetail != null) {
 
-                BindingTemplate[] bindarr= l.getBindingTemplateArray();
+            	List<BindingTemplate> bindingTemplateList = bindingDetail.getBindingTemplate();
+                BindingTemplate[] bindarr = new BindingTemplate[bindingTemplateList.size()];
+                bindingTemplateList.toArray(bindarr);
+                
                 LinkedHashSet<ServiceBinding> col = new LinkedHashSet<ServiceBinding>();
 
                 for (int i=0; bindarr != null && i < bindarr.length; i++) {
@@ -603,7 +636,6 @@
             }
         }
         catch (RegistryException e) {
-            e.printStackTrace();
             throw new JAXRException(e.getLocalizedMessage());
         }
 
@@ -649,7 +681,7 @@
                 id = orgKey.getId();
             }
 
-            ServiceList l = iRegistry.findService(id, 
+            ServiceList serviceList = iRegistry.findService(id, 
             		juddiNames,
                     ScoutJaxrUddiHelper.getCategoryBagFromClassifications(classifications), 
                     null, 
@@ -658,16 +690,22 @@
             /*
              * now convert  from jUDDI ServiceInfo objects to JAXR Services
              */
-            if (l != null) {
+            if (serviceList != null) {
 
-                ServiceInfos serviceInfos = l.getServiceInfos();
-
-                ServiceInfo[] a = (serviceInfos != null ? serviceInfos.getServiceInfoArray() : null);
+                ServiceInfos serviceInfos = serviceList.getServiceInfos();
+                ServiceInfo[] serviceInfoArr = null;
+                
+                if(serviceInfos != null)
+                {
+                	List<ServiceInfo> serviceInfoList = serviceInfos.getServiceInfo();
+                	serviceInfoArr = new ServiceInfo[serviceInfoList.size()];
+                	serviceInfoList.toArray(serviceInfoArr);
+                }
 
                 LinkedHashSet<Service> col = new LinkedHashSet<Service>();
 
-                for (int i=0; a != null && i < a.length; i++) {
-                    ServiceInfo si = (ServiceInfo) a[i];
+                for (int i=0; serviceInfoArr != null && i < serviceInfoArr.length; i++) {
+                    ServiceInfo si = (ServiceInfo) serviceInfoArr[i];
 					Service srv = (Service) getRegistryObject(si.getServiceKey(), LifeCycleManager.SERVICE);
                     col.add(srv);
                 }
@@ -676,7 +714,6 @@
             }
         }
         catch (RegistryException e) {
-            e.printStackTrace();
             throw new JAXRException(e.getLocalizedMessage());
         }
 
@@ -713,21 +750,19 @@
                 return scheme;
             }
             catch (RegistryException e) {
-                e.printStackTrace();
                 throw new JAXRException(e.getLocalizedMessage());
             }
         }
-        else if (LifeCycleManager.ORGANIZATION.equalsIgnoreCase(objectType)) {
-
+        else if (LifeCycleManager.ORGANIZATION.equalsIgnoreCase(objectType)) {        	
             try
             {
                 BusinessDetail orgdetail = registry.getBusinessDetail(id);
                 return ScoutUddiJaxrHelper.getOrganization(orgdetail, lcm);
             }
             catch (RegistryException e) {
-                e.printStackTrace();
                 throw new JAXRException(e.getLocalizedMessage());
             }
+
         }
         else if (LifeCycleManager.CONCEPT.equalsIgnoreCase(objectType)) {
 
@@ -736,8 +771,7 @@
                 TModelDetail tmodeldetail = registry.getTModelDetail(id);
                 return ScoutUddiJaxrHelper.getConcept(tmodeldetail, lcm);
             }
-            catch (RegistryException e) {
-                e.printStackTrace();
+            catch (RegistryException e) { 
                 throw new JAXRException(e.getLocalizedMessage());
             }
         }
@@ -750,17 +784,19 @@
 
                 if (sd != null) {
 
-                    BusinessService[] a = sd.getBusinessServiceArray();
+                	List<BusinessService> businessServiceList = sd.getBusinessService();
+                    BusinessService[] businessServiceArr = new BusinessService[businessServiceList.size()];
+                    businessServiceList.toArray(businessServiceArr);
 
-                    if (a != null && a.length != 0) {
-                        Service service = getServiceFromBusinessService(a[0], lcm);
+                    if (businessServiceArr != null && businessServiceArr.length != 0) {
+                        Service service = getServiceFromBusinessService(businessServiceArr[0], lcm);
 
                         return service;
                     }
                 }
             }
             catch (RegistryException e) {
-                e.printStackTrace();
+                throw new RuntimeException(e);
             }
         }
 
@@ -780,19 +816,8 @@
     protected Service getServiceFromBusinessService(BusinessService bs, LifeCycleManager lcm)
         throws JAXRException {
 
-        Service service  = ScoutUddiJaxrHelper.getService(bs, lcm);
-
-        /*
-         * now get the Organization if we can
-         */
-
-        String busKey = bs.getBusinessKey();
-
-        if (busKey != null) {
-            Organization o = (Organization) getRegistryObject(busKey,
-                    LifeCycleManager.ORGANIZATION);
-            service.setProvidingOrganization(o);
-        }
+        ServiceImpl service  = (ServiceImpl) ScoutUddiJaxrHelper.getService(bs, lcm);
+        service.setSubmittingOrganizationKey(bs.getBusinessKey());
 
         return service;
     }
@@ -857,7 +882,10 @@
             try
             {
                 TModelDetail tmodeldetail = registry.getTModelDetail(keys);
-                TModel[] tmarray = tmodeldetail.getTModelArray();
+                List<TModel> tmodelList = tmodeldetail.getTModel();
+                TModel[] tmarray = new TModel[tmodelList.size()];
+                tmodelList.toArray(tmarray);
+                
                 for (int i = 0; tmarray != null && i < tmarray.length; i++)
                 {
                     col.add(ScoutUddiJaxrHelper.getConcept(tmarray[i], lcm));
@@ -871,25 +899,40 @@
         }
         else if (LifeCycleManager.ORGANIZATION.equalsIgnoreCase(objectType))
         {
-            //Get the Organization from the uddi registry
+        	ConnectionImpl con = ((RegistryServiceImpl)getRegistryService()).getConnection();
+            AuthToken auth = this.getAuthToken(con,registry);
+        	
             try
             {
-                BusinessDetail orgdetail = registry.getBusinessDetail(keys);
-                BusinessEntity[] bizarr = orgdetail.getBusinessEntityArray();
-                for (int i = 0; bizarr != null && i < bizarr.length; i++)
+            	RegisteredInfo ri = registry.getRegisteredInfo(auth.getAuthInfo());
+            	BusinessInfos infos = null;
+            	BusinessInfo[] biarr = null;
+            	
+            	if (ri != null) infos = ri.getBusinessInfos();
+            	if (infos != null) 
                 {
-                    col.add(ScoutUddiJaxrHelper.getOrganization(bizarr[i], lcm));
-                }
-            } catch (RegistryException e)
-            {
-                throw new JAXRException(e.getLocalizedMessage());
+            		List<BusinessInfo> bizInfoList = infos.getBusinessInfo();
+            		biarr = new BusinessInfo[bizInfoList.size()];
+            		bizInfoList.toArray(biarr);
+            	}
+            	            	
+            	for (int i = 0; i < biarr.length; i++) {
+            		BusinessInfo info = biarr[i];
+            		BusinessDetail detail = registry.getBusinessDetail(info.getBusinessKey());
+
+                    col.add(registryService.getLifeCycleManagerImpl().createOrganization(detail));
+            	}
+            } catch (RegistryException e) { 
+                    throw new JAXRException(e.getLocalizedMessage());
             }
         }
         else if (LifeCycleManager.CONCEPT.equalsIgnoreCase(objectType))
         {
             try {
                 TModelDetail tmodeldetail = registry.getTModelDetail(keys);
-                TModel[] tmarr = tmodeldetail.getTModelArray();
+                List<TModel> tmodelList = tmodeldetail.getTModel();
+                TModel[] tmarr = new TModel[tmodelList.size()];
+                
                 for (int i = 0; tmarr != null && i < tmarr.length; i++)
                 {
                     col.add(ScoutUddiJaxrHelper.getConcept(tmarr[i], lcm));
@@ -897,8 +940,7 @@
 
             }
             catch (RegistryException e)
-            {
-                e.printStackTrace();
+            { 
                 throw new JAXRException(e.getLocalizedMessage());
             }
         }
@@ -908,13 +950,14 @@
                 ServiceDetail serviceDetail = registry.getServiceDetail(keys);
 
                 if (serviceDetail != null) {
+                    List<BusinessService> bizServiceList = serviceDetail.getBusinessService();
+                    BusinessService[] bizServiceArr = new BusinessService[bizServiceList.size()];
+                    bizServiceList.toArray(bizServiceArr);
 
-                    BusinessService[] a = serviceDetail.getBusinessServiceArray();
-
-                    for (int i=0; a != null && i < a.length; i++) {
-
-                        Service service = getServiceFromBusinessService(a[i], lcm);
+                    for (int i=0; bizServiceArr != null && i < bizServiceArr.length; i++) {
 
+                        Service service = getServiceFromBusinessService(bizServiceArr[i], lcm);
+                        
                         col.add(service);
                     }
                 }
@@ -935,12 +978,42 @@
     public BulkResponse getRegistryObjects(String id) throws JAXRException
     {
         if (LifeCycleManager.ORGANIZATION.equalsIgnoreCase(id)) {
-            List<String> a = new ArrayList<String>();
-            a.add("%");
+            IRegistry registry = registryService.getRegistry();
 
-            BulkResponse br = findOrganizations(null, a, null, null, null, null);
+        	ConnectionImpl con = ((RegistryServiceImpl)getRegistryService()).getConnection();
+            AuthToken auth = this.getAuthToken(con,registry);
 
-            return br;
+            BulkResponse br = null;
+    		LinkedHashSet<Organization> orgs = null;
+            
+            try
+            {
+            	RegisteredInfo ri = registry.getRegisteredInfo(auth.getAuthInfo());
+            	BusinessInfos infos = null;
+            	BusinessInfo[] biarr = null;
+            	
+            	if (ri != null) infos = ri.getBusinessInfos();
+            	if (infos != null)
+                {
+            		List<BusinessInfo> bizInfoList = infos.getBusinessInfo();
+            		biarr = new BusinessInfo[bizInfoList.size()];
+            		bizInfoList.toArray(biarr);
+            	}
+            	
+            	if (biarr != null) {
+                    orgs = new LinkedHashSet<Organization>();
+            	}
+            	
+            	for (int i = 0; i < biarr.length; i++) {
+            		BusinessInfo info = biarr[i];
+            		BusinessDetail detail = registry.getBusinessDetail(info.getBusinessKey());
+
+                    orgs.add(registryService.getLifeCycleManagerImpl().createOrganization(detail));
+            	}
+            } catch (RegistryException re) {
+            	throw new JAXRException(re);
+            }
+            return new BulkResponseImpl(orgs);
         }
         else if (LifeCycleManager.SERVICE.equalsIgnoreCase(id)) {
             List<String> a = new ArrayList<String>();
@@ -963,7 +1036,7 @@
         {
             return null;
         }
-        FindQualifiers result = FindQualifiers.Factory.newInstance();
+        FindQualifiers result = objectFactory.createFindQualifiers();
         for (Iterator i = jaxrQualifiers.iterator(); i.hasNext();)
         {
             String jaxrQualifier = (String) i.next();
@@ -972,7 +1045,7 @@
             {
                 throw new UnsupportedCapabilityException("jUDDI does not support FindQualifer: " + jaxrQualifier);
             }
-            result.addFindQualifier(juddiQualifier);
+            result.getFindQualifier().add(juddiQualifier);
         }
         return result;
     }
@@ -987,15 +1060,15 @@
         for (Iterator i = namePatterns.iterator(); i.hasNext();)
         {
             Object obj = i.next();
-            Name n = Name.Factory.newInstance();
+            Name name = objectFactory.createName();
             if (obj instanceof String) {
-                n.setStringValue((String)obj);
+                name.setValue((String)obj);
             } else if (obj instanceof LocalizedString) {
                 LocalizedString ls = (LocalizedString)obj;
-                n.setStringValue(ls.getValue());
-                n.setLang(ls.getLocale().getLanguage());
+                name.setValue(ls.getValue());
+                name.setLang(ls.getLocale().getLanguage());
             }
-            result[currLoc] = n;
+            result[currLoc] = name;
             currLoc++;
         }
         return result;

Modified: webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/registry/IRegistry.java
URL: http://svn.apache.org/viewvc/webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/registry/IRegistry.java?rev=796122&r1=796121&r2=796122&view=diff
==============================================================================
--- webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/registry/IRegistry.java (original)
+++ webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/registry/IRegistry.java Tue Jul 21 02:29:23 2009
@@ -17,29 +17,8 @@
 
 import java.net.URI;
 
-import org.apache.ws.scout.transport.Transport;
-import org.apache.ws.scout.uddi.AssertionStatusReport;
-import org.apache.ws.scout.uddi.AuthToken;
-import org.apache.ws.scout.uddi.BindingDetail;
-import org.apache.ws.scout.uddi.BindingTemplate;
-import org.apache.ws.scout.uddi.BusinessDetail;
-import org.apache.ws.scout.uddi.BusinessEntity;
-import org.apache.ws.scout.uddi.BusinessList;
-import org.apache.ws.scout.uddi.BusinessService;
-import org.apache.ws.scout.uddi.CategoryBag;
-import org.apache.ws.scout.uddi.DiscoveryURLs;
-import org.apache.ws.scout.uddi.DispositionReport;
-import org.apache.ws.scout.uddi.FindQualifiers;
-import org.apache.ws.scout.uddi.IdentifierBag;
-import org.apache.ws.scout.uddi.Name;
-import org.apache.ws.scout.uddi.PublisherAssertion;
-import org.apache.ws.scout.uddi.PublisherAssertions;
-import org.apache.ws.scout.uddi.ServiceDetail;
-import org.apache.ws.scout.uddi.ServiceList;
-import org.apache.ws.scout.uddi.TModel;
-import org.apache.ws.scout.uddi.TModelBag;
-import org.apache.ws.scout.uddi.TModelDetail;
-import org.apache.ws.scout.uddi.TModelList;
+import org.apache.ws.scout.model.uddi.v2.*;
+import org.apache.ws.scout.transport.Transport; 
 
 /**
  * 
@@ -68,7 +47,7 @@
 	/**
 	 * @return Returns the publishURL.
 	 */
-	URI getPublishURI();
+	URI getPublishURI();	
 	
 	/**
 	 * @param publishURL The publishURL to set.
@@ -223,6 +202,12 @@
 	    throws RegistryException;
 	  
 	  /**
+	   * @exception RegistryException;
+	   */
+	  RegisteredInfo getRegisteredInfo(String authInfo)
+	  	throws RegistryException;
+	  
+	  /**
 	   * "Used to locate one or more tModel information structures. Returns a
 	   *  tModelList structure."
 	   *

Modified: webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/registry/LifeCycleManagerImpl.java
URL: http://svn.apache.org/viewvc/webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/registry/LifeCycleManagerImpl.java?rev=796122&r1=796121&r2=796122&view=diff
==============================================================================
--- webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/registry/LifeCycleManagerImpl.java (original)
+++ webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/registry/LifeCycleManagerImpl.java Tue Jul 21 02:29:23 2009
@@ -51,6 +51,11 @@
 import javax.xml.registry.infomodel.TelephoneNumber;
 import javax.xml.registry.infomodel.User;
 
+import org.apache.ws.scout.model.uddi.v2.BusinessDetail;
+import org.apache.ws.scout.model.uddi.v2.BusinessInfo;
+import org.apache.ws.scout.model.uddi.v2.Description;
+import org.apache.ws.scout.model.uddi.v2.Name;
+import org.apache.ws.scout.model.uddi.v2.ServiceInfo;
 import org.apache.ws.scout.registry.infomodel.AssociationImpl;
 import org.apache.ws.scout.registry.infomodel.ClassificationImpl;
 import org.apache.ws.scout.registry.infomodel.ClassificationSchemeImpl;
@@ -70,11 +75,6 @@
 import org.apache.ws.scout.registry.infomodel.SpecificationLinkImpl;
 import org.apache.ws.scout.registry.infomodel.TelephoneNumberImpl;
 import org.apache.ws.scout.registry.infomodel.UserImpl;
-import org.apache.ws.scout.uddi.BusinessDetail;
-import org.apache.ws.scout.uddi.BusinessInfo;
-import org.apache.ws.scout.uddi.Description;
-import org.apache.ws.scout.uddi.Name;
-import org.apache.ws.scout.uddi.ServiceInfo;
 import org.apache.ws.scout.util.ScoutUddiJaxrHelper;
 
 /**
@@ -449,23 +449,25 @@
         throw new UnsupportedCapabilityException();
     }
 
-    Organization createOrganization(BusinessInfo info) throws JAXRException {
-        String key = info.getBusinessKey();
-        Name[] names = info.getNameArray();
-        Description[] descriptions = info.getDescriptionArray();
-        ServiceInfo[] serviceInfos = info.getServiceInfos().getServiceInfoArray();
+    Organization createOrganization(BusinessInfo bizInfo) throws JAXRException {
+        String key = bizInfo.getBusinessKey();
+        List<Name> names = bizInfo.getName(); 
+        
+        List<Description> descriptions = bizInfo.getDescription();
+        List<ServiceInfo> serviceInfos = bizInfo.getServiceInfos().getServiceInfo();
+        
         OrganizationImpl org = new OrganizationImpl(this);
         org.setKey(createKey(key));
-        if (names != null && names.length > 0) {
-            org.setName(createInternationalString(((Name) names[0]).getStringValue()));
+        if (names != null && names.size() > 0) {
+            org.setName(createInternationalString(names.get(0).getValue()));
         }
-        if (descriptions != null && descriptions.length > 0) {
-            org.setDescription(createInternationalString(((Description) descriptions[0]).getStringValue()));
+        if (descriptions != null && descriptions.size() > 0) {
+            org.setDescription(createInternationalString(descriptions.get(0).getValue()));
         }
-        if (serviceInfos != null && serviceInfos.length > 0) {
-            List<Service> services = new ArrayList<Service>(serviceInfos.length);
-            for (int i = 0; i < serviceInfos.length; i++) {
-                ServiceInfo serviceInfo = (ServiceInfo) serviceInfos[i];
+        if (serviceInfos != null && serviceInfos.size() > 0) {
+            List<Service> services = new ArrayList<Service>(serviceInfos.size());
+            for (int i = 0; i < serviceInfos.size(); i++) {
+                ServiceInfo serviceInfo = serviceInfos.get(i);
                 services.add(createService(serviceInfo));
             }
             org.addServices(services);
@@ -474,17 +476,17 @@
         return org;
     }
 
-    Organization createOrganization(BusinessDetail detail) throws JAXRException {
-        return ScoutUddiJaxrHelper.getOrganization(detail, this);
+    Organization createOrganization(BusinessDetail bizDetail) throws JAXRException {
+        return ScoutUddiJaxrHelper.getOrganization(bizDetail, this);
     }
 
-    Service createService(ServiceInfo info) throws JAXRException {
-        String key = info.getServiceKey();
-        Name[] names = info.getNameArray();
+    Service createService(ServiceInfo serviceInfo) throws JAXRException {
+        String key = serviceInfo.getServiceKey();
+        List<Name> names = serviceInfo.getName();
         ServiceImpl service = new ServiceImpl(this);
         service.setKey(createKey(key));
-        if (names != null && names.length > 0) {
-            service.setName(createInternationalString(names[0].getStringValue()));
+        if (names != null && names.size() > 0) {
+            service.setName(createInternationalString(names.get(0).getValue()));
         }
         return service;
     }

Modified: webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/registry/RegistryException.java
URL: http://svn.apache.org/viewvc/webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/registry/RegistryException.java?rev=796122&r1=796121&r2=796122&view=diff
==============================================================================
--- webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/registry/RegistryException.java (original)
+++ webservices/scout/branches/v1.1/scout/src/main/java/org/apache/ws/scout/registry/RegistryException.java Tue Jul 21 02:29:23 2009
@@ -15,10 +15,11 @@
  */
 package org.apache.ws.scout.registry;
 
-import org.apache.ws.scout.uddi.DispositionReport;
-import org.apache.ws.scout.uddi.DispositionReportDocument;
-import org.apache.ws.scout.uddi.ErrInfo;
-import org.apache.ws.scout.uddi.Result;
+import org.apache.ws.scout.model.uddi.v2.DispositionReport;
+import org.apache.ws.scout.model.uddi.v2.ErrInfo;
+import org.apache.ws.scout.model.uddi.v2.ObjectFactory;
+import org.apache.ws.scout.model.uddi.v2.Result;
+ 
 
 /**
  * Thrown to indicate that a UDDI Exception was encountered.
@@ -75,6 +76,8 @@
 
   // UDDI DispositionReport
   private DispositionReport dispReport;
+  
+  private ObjectFactory objectFactory = new ObjectFactory();
 
   /**
    * Constructs a RegistryException instance.
@@ -149,14 +152,14 @@
     
     setFaultString(getMessage());
     
-    Result r = Result.Factory.newInstance();
-    ErrInfo ei = ErrInfo.Factory.newInstance();
+    Result r = this.objectFactory.createResult();
+    ErrInfo ei = this.objectFactory.createErrInfo();
 
     if (errCode != null) {
     	ei.setErrCode(errCode);
     }
 
-    ei.setStringValue(getMessage());
+    ei.setValue(getMessage());
 
    	r.setErrno(errno);
 
@@ -250,15 +253,15 @@
   public void addResult(Result result)
   {
     if (this.dispReport==null) {
-  	  DispositionReportDocument doc = DispositionReportDocument.Factory.newInstance();
-      this.dispReport = doc.addNewDispositionReport();
+      this.dispReport = this.objectFactory.createDispositionReport();
     }
 
-    Result r = this.dispReport.addNewResult();
+    Result jaxbResult = this.objectFactory.createResult();
+    this.dispReport.getResult().add(jaxbResult);
     
-    if (result.getErrInfo() != null) r.setErrInfo(result.getErrInfo());
-    if (result.getKeyType() != null) r.setKeyType(result.getKeyType());
-    r.setErrno(result.getErrno());
+    if (result.getErrInfo() != null) jaxbResult.setErrInfo(result.getErrInfo());
+    if (result.getKeyType() != null) jaxbResult.setKeyType(result.getKeyType());
+    jaxbResult.setErrno(result.getErrno());
   }
 
   /**



---------------------------------------------------------------------
To unsubscribe, e-mail: scout-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: scout-dev-help@ws.apache.org


Mime
View raw message