You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by al...@apache.org on 2014/02/13 16:43:56 UTC
svn commit: r1567953 - in /juddi/trunk:
juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/
juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/
juddi-client/src/main/java/org/apache/juddi/v3/client/transport/
juddi-gui/src/...
Author: alexoree
Date: Thu Feb 13 15:43:55 2014
New Revision: 1567953
URL: http://svn.apache.org/r1567953
Log:
JUDDI-850 minor code updates to support UDDIv2 TCK test cases. filtering out case insensitive Match for uddiv3 to v2
JUDDI-821 fixing missed typo
Modified:
juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/MapUDDIv3to2.cs
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MapUDDIv3Tov2.java
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/JAXWSv2TranslationTransport.java
juddi/trunk/juddi-gui/src/main/resources/org/apache/juddi/webconsole/resources/web.properties
juddi/trunk/juddi-gui/src/main/resources/org/apache/juddi/webconsole/resources/web_es.properties
juddi/trunk/juddi-gui/src/main/webapp/js/businessEditor.js
juddi/trunk/juddi-gui/src/main/webapp/quickref_catbag.jsp
juddi/trunk/juddi-gui/src/main/webapp/quickref_krgrp.jsp
juddi/trunk/uddi-ws/src/main/java/org/uddi/api_v2/DispositionReport.java
juddi/trunk/uddi-ws/src/main/java/org/uddi/v2_service/DispositionReport.java
Modified: juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/MapUDDIv3to2.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/MapUDDIv3to2.cs?rev=1567953&r1=1567952&r2=1567953&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/MapUDDIv3to2.cs (original)
+++ juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/MapUDDIv3to2.cs Thu Feb 13 15:43:55 2014
@@ -31,7 +31,7 @@ namespace org.apache.juddi.v3.client.map
List<String> r = new List<string>();
for (int i = 0; i < findQualifiers.Length; i++)
{
- if (findQualifiers[i].Equals(UDDIConstants.TRANSPORT_HTTP, StringComparison.CurrentCultureIgnoreCase))
+ /*if (findQualifiers[i].Equals(UDDIConstants.TRANSPORT_HTTP, StringComparison.CurrentCultureIgnoreCase))
{
r.Add("uuid:68DE9E80-AD09-469D-8A37-088422BFBC36");
}
@@ -74,8 +74,8 @@ namespace org.apache.juddi.v3.client.map
else if (findQualifiers[i].Equals("uddi:uddi.org:categorization:types", StringComparison.CurrentCultureIgnoreCase))
{
r.Add("uuid:C1ACF26D-9672-4404-9D70-39B756E62AB4");
- }
- else if (findQualifiers[i].Equals(UDDIConstants.EXACT_MATCH, StringComparison.CurrentCultureIgnoreCase)
+ }*/
+ if (findQualifiers[i].Equals(UDDIConstants.EXACT_MATCH, StringComparison.CurrentCultureIgnoreCase)
|| findQualifiers[i].Equals(UDDIConstants.EXACT_MATCH_TMODEL, StringComparison.CurrentCultureIgnoreCase))
{
r.Add("exactNameMatch");
@@ -137,7 +137,7 @@ namespace org.apache.juddi.v3.client.map
}
else
{
- r.Add(findQualifiers[i]);
+ //r.Add(findQualifiers[i]);
}
}
return r.ToArray();
Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MapUDDIv3Tov2.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MapUDDIv3Tov2.java?rev=1567953&r1=1567952&r2=1567953&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MapUDDIv3Tov2.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MapUDDIv3Tov2.java Thu Feb 13 15:43:55 2014
@@ -376,7 +376,7 @@ public class MapUDDIv3Tov2 {
r.setIdentifierBag(MapIdentBag(body.getIdentifierBag()));
r.getName().addAll(MapName(body.getName()));
if (ContainsWildCard(r.getName())) {
- r.setFindQualifiers(AddApproximateMatch(r.getFindQualifiers()));
+ //r.setFindQualifiers(AddApproximateMatch(r.getFindQualifiers()));
}
return r;
}
@@ -572,7 +572,7 @@ public class MapUDDIv3Tov2 {
}
FindQualifiers r = new FindQualifiers();
for (int i = 0; i < findQualifiers.getFindQualifier().size(); i++) {
- if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.TRANSPORT_HTTP)) {
+ /*if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.TRANSPORT_HTTP)) {
r.getFindQualifier().add("uuid:68DE9E80-AD09-469D-8A37-088422BFBC36");
} else if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.TRANSPORT_EMAIL)) {
r.getFindQualifier().add("uuid:93335D49-3EFB-48A0-ACEA-EA102B60DDC6");
@@ -594,7 +594,8 @@ public class MapUDDIv3Tov2 {
r.getFindQualifier().add("uuid:A035A07C-F362-44dd-8F95-E2B134BF43B4");
} else if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase("uddi:uddi.org:categorization:types")) {
r.getFindQualifier().add("uuid:C1ACF26D-9672-4404-9D70-39B756E62AB4");
- } else if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.EXACT_MATCH)
+ }*/
+ if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.EXACT_MATCH)
|| findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.EXACT_MATCH_TMODEL)) {
r.getFindQualifier().add("exactNameMatch");
} else if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.CASE_SENSITIVE_MATCH)
@@ -608,7 +609,7 @@ public class MapUDDIv3Tov2 {
r.getFindQualifier().add("orLikeKeys");
} else if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.AND_ALL_KEYS)
|| findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.AND_ALL_KEYS_TMODEL)) {
- r.getFindQualifier().add("andAllKeys");
+ r.getFindQualifier().add(UDDIConstants.AND_ALL_KEYS);
} else if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.SORT_BY_DATE_ASC)
|| findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.SORT_BY_DATE_ASC_TMODEL)) {
r.getFindQualifier().add(UDDIConstants.SORT_BY_DATE_ASC);
@@ -630,8 +631,13 @@ public class MapUDDIv3Tov2 {
} else if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.APPROXIMATE_MATCH)
|| findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.APPROXIMATE_MATCH_TMODEL)) {
//ignore it, not supported by UDDI v2
+
+ } else if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.CASE_INSENSITIVE_MATCH)
+ || findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.CASE_INSENSITIVE_MATCH_TMODEL)) {
+ //ignore it, not supported by UDDI v2
} else {
- r.getFindQualifier().add(findQualifiers.getFindQualifier().get(i));
+ //ignore it
+ //r.getFindQualifier().add(findQualifiers.getFindQualifier().get(i));
}
}
return r;
@@ -1031,14 +1037,7 @@ public class MapUDDIv3Tov2 {
return r;
}
- private static FindQualifiers AddApproximateMatch(FindQualifiers findQualifiers) {
- if (findQualifiers == null) {
- findQualifiers = new FindQualifiers();
- }
- findQualifiers.getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
- return findQualifiers;
- }
-
+
private static boolean ContainsWildCard(List<Name> name) {
for (int i = 0; i < name.size(); i++) {
if (name.get(i).getValue() != null && name.get(i).getValue().contains(UDDIConstants.WILDCARD)) {
Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/JAXWSv2TranslationTransport.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/JAXWSv2TranslationTransport.java?rev=1567953&r1=1567952&r2=1567953&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/JAXWSv2TranslationTransport.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/JAXWSv2TranslationTransport.java Thu Feb 13 15:43:55 2014
@@ -188,7 +188,9 @@ public class JAXWSv2TranslationTransport
-
+ public Inquire getUDDIv2InquiryService() throws TransportException {
+ return getUDDIv2InquiryService(null);
+ }
public Inquire getUDDIv2InquiryService(String endpointURL) throws TransportException {
try {
if (inquiryv2 == null) {
@@ -230,4 +232,8 @@ public class JAXWSv2TranslationTransport
}
return publishv2.getUDDIv2PublishWebServiceClient();
}
+
+ public Publish getUDDIv2PublishService() throws TransportException {
+ return getUDDIv2PublishService(null);
+ }
}
Modified: juddi/trunk/juddi-gui/src/main/resources/org/apache/juddi/webconsole/resources/web.properties
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-gui/src/main/resources/org/apache/juddi/webconsole/resources/web.properties?rev=1567953&r1=1567952&r2=1567953&view=diff
==============================================================================
--- juddi/trunk/juddi-gui/src/main/resources/org/apache/juddi/webconsole/resources/web.properties (original)
+++ juddi/trunk/juddi-gui/src/main/resources/org/apache/juddi/webconsole/resources/web.properties Thu Feb 13 15:43:55 2014
@@ -434,3 +434,5 @@ diacriticSensitiveMatch=Signifies that t
items.service.nobinding=Please save the service first, then you can add bindings.
items.business.noservice=Please save the business first, then you can add services.
actions.popout=Popout
+items.categorizations=Categorizations
+items.categorizations.uddi=UDDI Categorizations
Modified: juddi/trunk/juddi-gui/src/main/resources/org/apache/juddi/webconsole/resources/web_es.properties
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-gui/src/main/resources/org/apache/juddi/webconsole/resources/web_es.properties?rev=1567953&r1=1567952&r2=1567953&view=diff
==============================================================================
--- juddi/trunk/juddi-gui/src/main/resources/org/apache/juddi/webconsole/resources/web_es.properties (original)
+++ juddi/trunk/juddi-gui/src/main/resources/org/apache/juddi/webconsole/resources/web_es.properties Thu Feb 13 15:43:55 2014
@@ -437,3 +437,5 @@ diacriticSensitiveMatch=Significa que el
items.service.nobinding=Por favor, guarde el servicio en primer lugar, a continuaci\u00f3n, usted puede a\u00f1adir enlaces.
items.business.noservice=Por favor, guarde el negocio en primer lugar, a continuaci\u00f3n, puede agregar servicios.
actions.popout=Salir
+items.categorizations=Categorizaciones
+items.categorizations.uddi=UDDI Categorizaciones
Modified: juddi/trunk/juddi-gui/src/main/webapp/js/businessEditor.js
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-gui/src/main/webapp/js/businessEditor.js?rev=1567953&r1=1567952&r2=1567953&view=diff
==============================================================================
--- juddi/trunk/juddi-gui/src/main/webapp/js/businessEditor.js (original)
+++ juddi/trunk/juddi-gui/src/main/webapp/js/businessEditor.js Thu Feb 13 15:43:55 2014
@@ -325,7 +325,7 @@ function AddCategoryKeyReferenceGroupPar
return "catbaggrpkeyref"+i;
}
-function AddWGS1894(){
+function AddWGS1984(){
var div=AddCategoryKeyReferenceGroupParam("uddi:uddi.org:ubr:categorizationGroup:wgs84");
AddCategoryKeyReferenceGroupKeyRef(div, "uddi:uddi.org:ubr:categorizationGroup:wgs84:latitude",
"WGS 84 Latitude", "0.0");
Modified: juddi/trunk/juddi-gui/src/main/webapp/quickref_catbag.jsp
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-gui/src/main/webapp/quickref_catbag.jsp?rev=1567953&r1=1567952&r2=1567953&view=diff
==============================================================================
--- juddi/trunk/juddi-gui/src/main/webapp/quickref_catbag.jsp (original)
+++ juddi/trunk/juddi-gui/src/main/webapp/quickref_catbag.jsp Thu Feb 13 15:43:55 2014
@@ -4,6 +4,7 @@
Author : Alex O'Ree
--%>
+<%@page import="org.apache.juddi.webconsole.resources.ResourceLoader"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<div class="btn-group">
<a class="btn dropdown-toggle btn-info" data-toggle="dropdown" href="#">WSDL/WADL/XML<span class="caret"></span></a>
@@ -21,51 +22,29 @@
</div>
<div class="btn-group">
- <a class="btn dropdown-toggle btn-info" data-toggle="dropdown" href="#">Categorizations<span class="caret"></span></a>
+ <a class="btn dropdown-toggle btn-info" data-toggle="dropdown" href="#"><%=ResourceLoader.GetResource(session, "items.categorizations.uddi")%><span class="caret"></span></a>
<ul class="dropdown-menu">
- <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:categorization:general_keywords','uddi-org:general_keywords','keyword');">Keywords</a></li>
- <li><a href="javascript:AddCategoryKeyReferenceParam('urn:uddi:uddi.org:version','uddi.org:version','1.0');">Version</a></li>
- <li><a href="javascript:AddCategoryKeyReferenceParam('urn:uddi:uddi.org:version','uddi.org:version','1.0');">Version</a></li>
- <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:ubr:categorization:iso3166','geoLocation:Baltimore,MD','US-MD');">ISO 3166 Location</a></li>
- <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:ubr:categorization:naics:1997','','123456789');">NAICS 1997</a></li>
- <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:ubr:categorization:naics:2002','','123456789');">NAICS 2002</a></li>
- <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:ubr:categorization:naics:2007','','123456789');">NAICS 2007</a></li>
- <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:ubr:categorization:naics:2012','','123456789');">NAICS 2012</a></li>
- <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:categorization:nodes','uddi.org:categorization:nodes','node');">UDDI Node</a></li>
- <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:categorization:owningbusiness','uddi.org:version','1.0');">Owning Business</a></li>
- <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:categorization:validatedby','uddi.org:version','1.0');">Validated By</a></li>
- <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:categorization:derivedfrom','uddi.org:version','1.0');">Derived From</a></li>
- <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:categorization:entitykeyvalues','uddi.org:version','1.0');">Entity Key Values</a></li>
- <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:ubr:categorizationgroup:wgs84','uddi.org:version','1.0');">World Geodetic System 1984</a></li>
-
+ <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:categorization:general_keywords','uddi-org:general_keywords','keyword');">Keywords</a></li>
<li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:ubr:taxonomy:naics','uddi.org:version','1.0');">Version</a></li>
- </ul>
+ <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:categorization:entitykeyvalues','entityKeyValues','');">Entity Key Values</a></li>
+ <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:categorization:nodes','uddi.org:categorization:nodes','node');">UDDI Node</a></li>
+ <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:ubr:identifier:owningbusiness','uddi.org:owningbusiness','businessKey');">Owning Business</a></li>
+ <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:categorization:validatedby','uddi.org:validatedBy','');">Validated By</a></li>
+ <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:categorization:derivedfrom','uddi-org:derivedFrom','');">Derived From</a></li>
+ <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:identifier:isreplacedby','uddi-org:isReplacedBy','');">Is Replaced By</a></li>
+ </ul>
</div>
+
<div class="btn-group">
- <a class="btn dropdown-toggle btn-info" data-toggle="dropdown" href="#">Categorizations<span class="caret"></span></a>
+ <a class="btn dropdown-toggle btn-info" data-toggle="dropdown" href="#"><%=ResourceLoader.GetResource(session, "items.categorizations")%><span class="caret"></span></a>
<ul class="dropdown-menu">
- <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:categorization:general_keywords','uddi-org:general_keywords','keyword');">Keywords</a></li>
- <li><a href="javascript:AddCategoryKeyReferenceParam('urn:uddi:uddi.org:version','uddi.org:version','1.0');">Version</a></li>
- <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:categorization:entitykeyvalues','entityKeyValues','');">Entity Key Values</a></li>
-
+ <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:ubr:categorization:iso3166','geoLocation:Baltimore,MD','US-MD');">ISO 3166 Location</a></li>
<li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:ubr:categorization:naics:1997','','123456789');">NAICS 1997</a></li>
<li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:ubr:categorization:naics:2002','','123456789');">NAICS 2002</a></li>
<li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:ubr:categorization:naics:2007','','123456789');">NAICS 2007</a></li>
<li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:ubr:categorization:naics:2012','','123456789');">NAICS 2012</a></li>
-
- <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:categorization:nodes','uddi.org:categorization:nodes','node');">UDDI Node</a></li>
- <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:ubr:identifier:owningbusiness','uddi.org:owningbusiness','1.0');">Owning Business</a></li>
- <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:categorization:validatedby','uddi.org:validatedBy','');">Validated By</a></li>
- <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:categorization:derivedfrom','uddi-org:derivedFrom','');">Derived From</a></li>
- <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:identifier:isreplacedby','uddi-org:isReplacedBy','');">Is Replaced By</a></li>
- <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:ubr:categorizationgroup:wgs84','wgs84','');">World Geodetic System 1984</a></li>
-
- <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:ubr:categorization:iso3166','geoLocation:Baltimore,MD','US-MD');">ISO 3166 Location</a></li>
-
-
-
-
- </ul>
+ <li><a href="javascript:AddCategoryKeyReferenceParam('uddi:uddi.org:ubr:categorizationgroup:wgs84','wgs84','');">World Geodetic System 1984</a></li>
+ </ul>
</div>
<br><br>
\ No newline at end of file
Modified: juddi/trunk/juddi-gui/src/main/webapp/quickref_krgrp.jsp
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-gui/src/main/webapp/quickref_krgrp.jsp?rev=1567953&r1=1567952&r2=1567953&view=diff
==============================================================================
--- juddi/trunk/juddi-gui/src/main/webapp/quickref_krgrp.jsp (original)
+++ juddi/trunk/juddi-gui/src/main/webapp/quickref_krgrp.jsp Thu Feb 13 15:43:55 2014
@@ -9,7 +9,7 @@
<div class="btn-group">
<a class="btn dropdown-toggle btn-info" data-toggle="dropdown" href="#">Identifiers<span class="caret"></span></a>
<ul class="dropdown-menu">
- <li><a href="javascript:AddWGS1894();">WGS 1982</a></li>
+ <li><a href="javascript:AddWGS1984();">World Geodetic System 1984</a></li>
<li><a href="javascript:AddISO3166UNSPSC();">UNSPSC & ISO3166</a></li>
</ul>
</div>
Modified: juddi/trunk/uddi-ws/src/main/java/org/uddi/api_v2/DispositionReport.java
URL: http://svn.apache.org/viewvc/juddi/trunk/uddi-ws/src/main/java/org/uddi/api_v2/DispositionReport.java?rev=1567953&r1=1567952&r2=1567953&view=diff
==============================================================================
--- juddi/trunk/uddi-ws/src/main/java/org/uddi/api_v2/DispositionReport.java (original)
+++ juddi/trunk/uddi-ws/src/main/java/org/uddi/api_v2/DispositionReport.java Thu Feb 13 15:43:55 2014
@@ -18,18 +18,25 @@ package org.uddi.api_v2;
import java.util.ArrayList;
import java.util.List;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
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;
-
+import org.uddi.JAXBContextUtil;
+import org.w3c.dom.Node;
/**
- * <p>Java class for dispositionReport complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
+ * <p>
+ * Java class for dispositionReport complex type.
+ *
+ * <p>
+ * The following schema fragment specifies the expected content contained within
+ * this class.
+ *
* <pre>
* <complexType name="dispositionReport">
* <complexContent>
@@ -44,123 +51,340 @@ import javax.xml.bind.annotation.XmlType
* </complexContent>
* </complexType>
* </pre>
- *
- *
+ *
+ *
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "dispositionReport", propOrder = {
- "result"
+ "result"
})
public class DispositionReport {
- @XmlElement(required = true)
- protected List<Result> result;
- @XmlAttribute(name = "generic", required = true)
- protected String generic;
- @XmlAttribute(name = "operator", required = true)
- protected String operator;
- @XmlAttribute(name = "truncated")
- protected Truncated truncated;
-
- /**
- * Gets the value of the result 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 result property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getResult().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link Result }
- *
- *
- */
- public List<Result> getResult() {
- if (result == null) {
- result = new ArrayList<Result>();
- }
- return this.result;
- }
-
- /**
- * 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.
+ @XmlElement(required = true)
+ protected List<Result> result;
+ @XmlAttribute(name = "generic", required = true)
+ protected String generic;
+ @XmlAttribute(name = "operator", required = true)
+ protected String operator;
+ @XmlAttribute(name = "truncated")
+ protected Truncated truncated;
+
+ /**
+ * (30000) Signifies that a particular publisher assertion (consisting of
+ * two businessKey values, and a keyed reference with three components)
+ * cannot be identified in a save or delete operation.
+ */
+ public final static transient String E_ASSERTION_NOT_FOUND = "E_assertionNotFound";
+ /**
+ * E_authTokenExpired: (10110) Signifies that the authentication token
+ * information has timed out.
+ */
+ public final static transient String E_AUTH_TOKEN_EXPIRED = "E_authTokenExpired";
+ /**
+ * E_authTokenRequired: (10120) Signifies that an invalid authentication
+ * token was passed to an API call that requires authentication.
+ */
+ public final static transient String E_AUTH_TOKEN_REQUIRED = "E_authTokenRequired";
+ /**
+ * E_accountLimitExceeded: (10160) Signifies that a save request exceeded
+ * the quantity limits for a given data type. See "Structure Limits" in
+ * Appendix D for details.
+ */
+ public final static transient String E_ACCOUNT_LIMIT_EXCEEDED = "E_accountLimitExceeded";
+ /**
+ * E_busy: (10400) Signifies that the request cannot be processed at the
+ * current time.
+ */
+ public final static transient String E_BUSY = "E_busy";
+ /**
+ * E_categorizationNotAllowed: (20100) RETIRED. Used for UDDI Version 1.0
+ * compatibility. Replaced by E_valueNotAllowed in 2 and higher.
+ * Restrictions have been placed on the types of information that can be
+ * categorized within a specific taxonomy. The data provided does not
+ * conform to the restrictions placed on the category used. Used with
+ * categorization only.
+ */
+ public final static transient String E_CATEGORIZATION_NOT_ALLOWED = "E_categorizationNotAllowed";
+ /**
+ * E_fatalError: (10500) Signifies that a serious technical error has
+ * occurred while processing the request.
+ */
+ public final static transient String E_FATAL_ERROR = "E_fatalError";
+ /**
+ * E_invalidCategory (20000): RETIRED. Used for UDDI Version 1.0
+ * compatibility only. Replaced by E_invalidValue in version 2 and higher.
+ * Signifies that the given keyValue did not correspond to a category
+ * within the taxonomy identified by the tModelKey. Used with
+ * categorization only.
+ */
+ @Deprecated
+ public final static transient String E_INVALID_CATEGORY = "E_invalidCategory";
+ /**
+ * E_invalidCompletionStatus: (30100) signifies that one of the assertion
+ * status values passed is unrecognized. The completion status that caused
+ * the problem will be clearly indicated in the error text.
+ */
+ public final static transient String E_INVALID_COMPLETION_STATUS = "E_invalidCompletionStatus";
+ /**
+ * E_invalidKeyPassed: (10210) Signifies that the uuid_key value passed did
+ * not match with any known key values. The details on the invalid key will
+ * be included in the dispositionReport element.
+ */
+ public final static transient String E_INVALID_KEY_PASSED = "E_invalidKeyPassed";
+ /**
+ * E_invalidProjection: (20230) Signifies that an attempt was made to save
+ * a businessEntity containing a service projection that does not match the
+ * businessService being projected. The serviceKey of at least one such
+ * businessService will be included in the dispositionReport.
+ */
+ public final static transient String E_INVALID_PROJECTION = "E_invalidProjection";
+ /**
+ * E_invalidURLPassed: (10220) DO NOT USE. Signifies that an error occurred
+ * during processing of a save function involving accessing data from a
+ * remote URL. The details of the HTTP Get report will be included in the
+ * dispositionReport element. Not used in V1 or V2.
+ */
+ public final static transient String E_INVALID_URL_PASSED = "E_invalidURLPassed";
+ /**
+ * E_invalidValue: (20200) A value that was passed in a keyValue attribute
+ * did not pass validation. This applies to checked categorizations,
+ * identifiers and other validated code lists. The error text will clearly
+ * indicate the key and value combination that failed validation.
+ */
+ public final static transient String E_INVALID_VALUE = "E_invalidValue";
+ /**
+ * E_keyRetired: (10310) DO NOT USE. Signifies that a uuid_key value passed
+ * has been removed from the registry. While the key was once valid as an
+ * accessor, and is still possibly valid, the publisher has removed the
+ * information referenced by the uuid_key passed. V1 errata â not used.
+ * Included here for historical code-set completion.
+ */
+ public final static transient String E_KEY_RETIRED = "E_keyRetired";
+ /**
+ * E_languageError: (10060) Signifies that an error was detected while
+ * processing elements that were annotated with xml:lang qualifiers.
+ * Presently, only the description and name elements support xml:lang
+ * qualifications.
+ */
+ public final static transient String E_LANGUAGE_ERROR = "E_languageError";
+ /**
+ * E_messageTooLarge: (30110) Signifies that the message is too large. The
+ * upper limit will be clearly indicated in the error text.
+ */
+ public final static transient String E_MESSAGE_TOO_LARGE = "E_messageTooLarge";
+ /**
+ * E_nameTooLong: (10020) RETIRED. Used for UDDI Version 1.0 compatibility
+ * only. Signifies that the partial name value passed exceeds the maximum
+ * name length designated by the policy of an implementation or Operator
+ * Site.
+ */
+ public final static transient String E_NAME_TOO_LONG = "E_nameTooLong";
+ /**
+ * E_operatorMismatch: (10130) DO NOT USE. Signifies that an attempt was
+ * made to use the publishing API to change data that is mastered at
+ * another Operator Site. This error is only relevant to the public
+ * Operator Sites and does not apply to other UDDI compatible registries.
+ * V1 defined this in error â caused precedence problems with
+ * E_unknownUser. Included here for historical code set completeness.
+ * Retired.
+ */
+ public final static transient String E_OPERATOR_MISMATCH = "E_operatorMismatch";
+ /**
+ * E_publisherCancelled: (30220) The target publisher cancelled the custody
+ * transfer operation.
+ */
+ public final static transient String E_PUBLISHER_CANCELLED = "E_publisherCancelled";
+ /**
+ * E_requestDenied: (30210) A custody transfer request has been refused.
+ */
+ public final static transient String E_REQUEST_DENIED = "E_requestDenied";
+ /**
+ * E_requestTimeout: (20240) Signifies that the request could not be
+ * carried out because a needed web service, such as validate_values, did
+ * not respond in a reasonable amount of time. Details identifying the
+ * failing service will be included in the dispositionReport element.
+ */
+ public final static transient String E_REQUEST_TIMEOUT = "E_requestTimeout";
+ /**
+ * E_secretUnknown: (30230) The target publisher was unable to match the
+ * shared secret and the five (5) attempt limit was exhausted. The target
+ * operator automatically cancelled the transfer operation.
+ */
+ public final static transient String E_SECRET_UNKNOWN = "E_secretUnknown";
+ /**
+ * E_success: (0) Signifies no failure occurred. This return code is used
+ * with the dispositionReport for reporting results from requests with no
+ * natural response document.
+ */
+ public final static transient String E_SUCCESS = "E_success";
+ /**
+ * E_tooManyOptions: (10030) Signifies that too many or incompatible
+ * arguments were passed. The error text will clearly indicate the nature
+ * of the problem.
+ */
+ public final static transient String E_TOO_MANY_OPTIONS = "E_tooManyOptions";
+ /**
+ * E_transferAborted: (30200) Signifies that a custody transfer request
+ * will not succeed.
+ */
+ public final static transient String E_TRANSFER_ABORTED = "E_transferAborted";
+ /**
+ * E_unknownUser: (10150) Signifies that the user ID and password pair
+ * passed in a get_authToken message is not known to the Operator Site or
+ * is not valid.
+ */
+ public final static transient String E_UNKNOWN_USER = "E_unknownUser";
+ /**
+ * E_unrecognizedVersion: (10040) Signifies that the value of the generic
+ * attribute passed is unsupported by the Operator Instance being queried.
+ */
+ public final static transient String E_UNRECOGNIZED_VERSION = "E_unrecognizedVersion";
+ /**
+ * E_unsupported: (10050) Signifies that the implementer does not support a
+ * feature or API.
+ */
+ public final static transient String E_UNSUPPORTED = "E_unsupported";
+ /**
+ * E_unvalidatable: (20220) Signifies that an attempt was made to reference
+ * a taxonomy or identifier system in a keyedReference whose tModel is
+ * categorized with the unvalidatable categorization.
+ */
+ public final static transient String E_UNVALIDATABLE = "E_unvalidatable";
+ /**
+ * E_userMismatch: (10140) Signifies that an attempt was made to use the
+ * publishing API to change data that is controlled by another party.
+ */
+ public final static transient String E_USER_MISMATCH = "E_userMismatch";
+ /**
+ * E_valueNotAllowed: (20210) Signifies that a value did not pass
+ * validation because of contextual issues. The value may be valid in some
+ * contexts, but not in the context used. The error text may contain
+ * information about the contextual problem.
+ */
+ public final static transient String E_VALUE_NOT_ALLOWED = "E_valueNotAllowed";
+
+ public DispositionReport(Node firstChild) throws JAXBException{
+ super();
+ JAXBContextUtil.getContext(this.getClass().getPackage().getName());
+ Unmarshaller u = JAXBContextUtil.getContext(
+ this.getClass().getPackage().getName()).createUnmarshaller();
+ JAXBElement<DispositionReport> element = u.unmarshal(firstChild, DispositionReport.class);
+ this.result = element.getValue().getResult();
+ this.truncated = element.getValue().truncated;
+ }
+
+ public DispositionReport() {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+ /**
+ * Gets the value of the result 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 result property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getResult().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list {@link Result }
+ *
+ *
+ */
+ public List<Result> getResult() {
+ if (result == null) {
+ result = new ArrayList<Result>();
+ }
+ return this.result;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Determines if one of the Results in the this DispositionReport has a Error Code
+ * that matches the errCodeKey passed in. The errCodeKey should be one
+ * of the
*
- * @param value
- * allowed object is
- * {@link String }
- *
+ * @param errCodeKey
+ * @return true if the errCodeKey matches with a code in the Results.
*/
- public void setGeneric(String value) {
- this.generic = value;
+ public boolean countainsErrorCode(final String errCodeKey) {
+ boolean isKeyMatch = false;
+ for (Result result : getResult()) {
+ String errCode = result.getErrInfo().getErrCode();
+ if (errCodeKey.equals(errCode)) {
+ isKeyMatch = true;
+ break;
+ }
+ }
+ return isKeyMatch;
}
-
- /**
- * 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;
- }
-
+
}
Modified: juddi/trunk/uddi-ws/src/main/java/org/uddi/v2_service/DispositionReport.java
URL: http://svn.apache.org/viewvc/juddi/trunk/uddi-ws/src/main/java/org/uddi/v2_service/DispositionReport.java?rev=1567953&r1=1567952&r2=1567953&view=diff
==============================================================================
--- juddi/trunk/uddi-ws/src/main/java/org/uddi/v2_service/DispositionReport.java (original)
+++ juddi/trunk/uddi-ws/src/main/java/org/uddi/v2_service/DispositionReport.java Thu Feb 13 15:43:55 2014
@@ -16,7 +16,14 @@
*/
package org.uddi.v2_service;
+import java.lang.reflect.UndeclaredThrowableException;
+import javax.xml.bind.JAXBException;
+import javax.xml.soap.Detail;
import javax.xml.ws.WebFault;
+import javax.xml.ws.soap.SOAPFaultException;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
/**
@@ -35,6 +42,7 @@ public class DispositionReport
*
*/
private org.uddi.api_v2.DispositionReport faultInfo;
+ private static transient Log log = LogFactory.getLog(DispositionReport.class);
/**
*
@@ -66,4 +74,40 @@ public class DispositionReport
return faultInfo;
}
+
+
+ /**
+ * Convenience method to figure out if the Exception at hand contains a
+ * DispositionReport. Disposition report will be null if none can be found.
+ *
+ * @param e the Exception at hang
+ * @return DispositionReport if one can be found, or null if it is not.
+ */
+ public static org.uddi.api_v2.DispositionReport getDispositionReport(Exception e) {
+ org.uddi.api_v2.DispositionReport report = null;
+ if (e instanceof DispositionReport) {
+ DispositionReport faultMsg = (DispositionReport) e;
+ report = faultMsg.faultInfo;
+ } else if (e instanceof SOAPFaultException) {
+ SOAPFaultException soapFault = (SOAPFaultException) e;
+ Detail detail = soapFault.getFault().getDetail();
+ if (detail != null && detail.getFirstChild()!=null) {
+ try {
+ report = new org.uddi.api_v2.DispositionReport(detail.getFirstChild());
+ } catch (JAXBException je) {
+ log.error("Could not unmarshall detail to a DispositionReport");
+ }
+ }
+ } else if (e instanceof UndeclaredThrowableException) {
+ UndeclaredThrowableException ute =(UndeclaredThrowableException) e;
+ if (ute.getUndeclaredThrowable()!=null && ute.getUndeclaredThrowable().getCause()!=null
+ && ute.getUndeclaredThrowable().getCause().getCause() instanceof DispositionReport) {
+ DispositionReport faultMsg = (DispositionReport) ute.getUndeclaredThrowable().getCause().getCause();
+ report = faultMsg.getFaultInfo();
+ }
+ } else {
+ log.error("Unsupported Exception: " + e.getClass());
+ }
+ return report;
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org