pax_global_header00006660000000000000000000000064117366713400014522gustar00rootroot0000000000000052 comment=8ef8a090d2870a1bc475baad81071b553a4433f9 uddi4j-2.0.5/000077500000000000000000000000001173667134000127115ustar00rootroot00000000000000uddi4j-2.0.5/BuildDate.txt000066400000000000000000000000511173667134000153030ustar00rootroot00000000000000UDDI4J OpenSource BuildDate : 27-Jun-2006uddi4j-2.0.5/LICENSE.html000066400000000000000000000344531173667134000146720ustar00rootroot00000000000000
IBM Public License Version 1.0

THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS IBM PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.

1. DEFINITIONS

"Contribution" means:

    a) in the case of International Business Machines Corporation ("IBM"), the Original Program, and
    b) in the case of each Contributor,
    i) changes to the Program, and
    ii) additions to the Program;
    where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.

"Contributor" means IBM and any other entity that distributes the Program.

"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.

"Original Program" means the original version of the software accompanying this Agreement as released by IBM, including source code, object code and documentation, if any.

"Program" means the Original Program and Contributions.

"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.

2. GRANT OF RIGHTS

    a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
    b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
    c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
    d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.

3. REQUIREMENTS

A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:

    a) it complies with the terms and conditions of this Agreement; and
    b) its license agreement:
    i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
    ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
    iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
    iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.

When the Program is made available in source code form:

    a) it must be made available under this Agreement; and
    b) a copy of this Agreement must be included with each copy of the Program.

Each Contributor must include the following in a conspicuous location in the Program:

    Copyright © {date here}, International Business Machines Corporation and others. All Rights Reserved.

In addition, each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.

4. COMMERCIAL DISTRIBUTION

Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.

For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.

5. NO WARRANTY

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.

6. DISCLAIMER OF LIABILITY

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. GENERAL

If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.

If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.

All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.

IBM may publish new versions (including revisions) of this Agreement from time to time. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. No one other than IBM has the right to modify this Agreement. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.

This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.

uddi4j-2.0.5/README000066400000000000000000000001671173667134000135750ustar00rootroot00000000000000This is the UDDI4J API. This is a Java API providing access to UDDI. Documentation is contained in docs/doc.htm uddi4j-2.0.5/ReleaseNotes.html000066400000000000000000000260311173667134000161720ustar00rootroot00000000000000 UDDI4J - Downloads / Releases

UDDI4J Releases

UDDI4J releases can be downloaded from SourceForge.

Release Log

Release name Date Notes
2.0.5 06/27/2006 UDDI4J minor update release containing minor bug fixes - see Change Log below.
2.0.4 10/31/2005 UDDI4J minor update release containing minor bug fixes - see Change Log below.
2.0.3 03/22/2005 UDDI4J minor update release containing minor bug fixes - see Change Log below.
The binary distribution for this release does not contain the compiled class file for HPSOAPTransport.
Users wishing to use HPSOAPTransport must download the source distribution and compile this class
themselves using the supplied build.xml file.
2.0.2 09/04/2003 UDDI4J minor update release containing minor bug fixes.
2.0.1 01/30/2003 UDDI4J minor update release, including updated Axis support, spec compliance fixes, and minor bug fixes.
2.0 5/15/2002 UDDI4J release with v2 support. Minor changes from 2.0 beta. Errata 3 support, bug fixes, collection class enhancements.
2.0 beta 11/09/2001 Major new release support UDDI v2 specification. Collaboration with HP.
1.0.3 06/26/2001 Important bug fix corrects problem with multiple 'name' attributes being misinterpreted
1.0.2 03/28/2001 bug fixes
1.0.1 02/16/2001 bug fixes
1.0 01/24/2001 UDDI4J contributed by IBM to open source community on Developerworks
1.0 beta 11/13/2000 Initial release as part of Web Services Toolkit v2.0 available on Alphaworks

Change log

2.0.5 release 06/27/2006

Changes from 2.0.4 release include:

2.0.4 release 10/31/2005

Changes from 2.0.3 release include:

2.0.3 release 03/22/2005

Changes from 2.0.2 release include:
Important information for release 2.0.3:

2.0.2 release 04/09/2003

Changes from 2.0.1 release include:

2.0.1 release 30/01/2003

Changes from 2.0 release include:

2.0 release 5/15/2002

Changes from 2.0 beta include:

2.0 beta released 11/09/2001

Major revision. New capabilities include:
Other major changes:
Major contribution by HP to the project as they join the development community.

1.0.3 released 06/26/2001

This release contains a significant bug fix. Users of previous releases are strongly encouraged to upgrade.
Corrected problem incorrecting interpreting 'name' attributes contained at multiple levels when invoking save requests.

1.0.2 released 03/28/2001

The getDescriptionStrings methods have been removed from all classes that had them. They have been replaced with getDefaultDesriptionString method.

The getDescriptionStrings method was misleading. Each string in the returned vector represented a different language, yet there was no way to figure out what language each string was for. getDefaultDescriptionString returns the default (english) string.

To obtain all the descriptions, use the getDescriptionVector method. This returns Description objects which contain a language attribute.

Some fixes have been checked in to required field constructs that accepted Vectors of Strings. This does not affect their signatures. Affected classes are: DeleteBinding, DeleteBusiness, DeleteService, DeleteTModel, GetBindingDetail, GetBusinessDetail, GetBusinessDetailExt, GetServiceDetail, GetTModelDetail, TModelBag.

1.0.1 released 02/16/01

Required fields constructors corrected for some objects.
Samples added to source distribution.

1.0 released 01/24/2001

Initial submission by IBM of UDDI4J to open source community on Developerworks.

1.0 beta release 11/13/2000

Included as part of IBM Web Services Toolkit version 2.0 available on Alphaworks.
uddi4j-2.0.5/build.xml000066400000000000000000000277521173667134000145470ustar00rootroot00000000000000 uddi4j-2.0.5/docs/000077500000000000000000000000001173667134000136415ustar00rootroot00000000000000uddi4j-2.0.5/docs/doc.html000066400000000000000000000330121173667134000152730ustar00rootroot00000000000000 UDDI4J - Documentation

Documentation

UDDI4J Overview

The UDDI (Universal Description, Discovery and Integration) Project is a comprehensive, open industry initiative enabling businesses to (I) discover each other, and (II) define how they interact over the internet and share information in a global registry architecture. UDDI is the building block which will enable businesses to quickly, easily and dynamically find and transact with one another via their preferred applications.

UDDI4J Structure

UDDI4J is a Java class library that provides an API that is can be used to interact with a UDDI registry. This class library generates and parses messages sent to and received from a UDDI server.

The central class in this set of APIs is org.uddi4j.client.UDDIProxy. It is a proxy for the UDDI server that is accessed from client code. Its methods map to the UDDI Version 2.0 API Specification.

The classes within org.uddi4j.datatype represent data objects used to send or receive UDDI information. and in the, business, service, tmodel subpackages represent data objects that are sent on calls or received from the server.

The subpackage org.uddi4j.request contains messages sent to the server. These classes are typically not used directly, rather the UDDIProxy class uses these classes.

Similarly, the subpackage org.uddi4j.response represents response messages from a UDDI server.

Pluggable transports are supported by the package org.uddi4j.transport.

Error Handling:

UDDIException is thrown when errors are received from the UDDI proxy when invoking UDDIProxy inquiry methods. UDDIException can contain a DispositionReport with information about the error.

APIs that do not return a data object return a disposition report directly.

TransportException is thrown if a communication error occurs or if the resulting data cannot be properly parsed as a valid SOAP message. This new exception class is required since the previous use of SOAPException created a dependency on Apache SOAP. TransportException wrappers any communications exception thrown by the underlying SOAP transport implementation (Axis, SOAP, HP-SOAP). The native exception is available, and a stack trace will indicate where the TransportException was thrown as well as the native exceptions stack trace.

Prerequisites

Configuration

UDDI4J uses a variety of properties to configure behavior. These properties may be set in a variety of ways.

The order of precedent for each method is as follows with the highest precedence first.

  1. java.util.Properties object passed to UDDIProxy(Properties) constructor
  2. System properties
  3. uddi4j.properties file (located on the classpath)
  4. Default properties (currently the org.uddi4j.TransportClassName property is the only property with a default)

The following properties affect UDDI4J behavior.
Property name Values Description
org.uddi4j.TransportClassName org.uddi4j.transport.ApacheSOAPTransport, org.uddi4j.transport.HPSOAPTransport, org.uddi4j.transport.ApacheAxisTransport.

If missing, it defaults to org.uddi4j.transport.ApacheSOAPTransport. The property will be read at startup time, and any change at run time (after the TransportFactory has been invoked) will not have any effect.
Selecting a SOAP transport
org.uddi4j.logEnabled true or false.

If missing, it defaults to false. The property can be changed at run time, and will be checked each time a UDDI message is sent out. Turning logging on or off.
Turning logging on or off.
http.proxyHost Valid host name. Hostname of http proxy
https.proxyHost Valid host name. Defaults to hostname of http proxy. Hostname of https proxy
http.proxyPort Valid port number. Defaults to 80. Port of http proxy.
https.proxyPort Valid port number. Defaults to http.proxyPort. Port of https proxy.
http.proxyUserName Valid user name. Username for proxy server
http.proxyPassword Valid password Password for proxy server
http.basicAuthUserName Valid user name. Username to use with HTTP Basic Authentication
http.basicAuthPassword Valid password Password to use with HTTP Basic Authentication

SOAP transport specific properties:
A SOAP transport can add to this list of properties. For example, the HP-SOAP transport adds the following:
Property name Allowed Values/Default behavior Description
hpsoap.logDirectory Valid directory path.

In case it is null/missing, or invalid or any error while accessing this directory, the log file will be created in the current directory.
The property will be read at startup time, and any change at run time (after the TransportFactory has been invoked) will not have any effect.
Directory path of log file
hpsoap.logFileName Valid file name.

In case it is missing, logging will be turned off. In case it is present, but null valued, all logging information will be sent to System.err
If file open/write fails, all log information is sent to System.err.
The property will be read at startup time, and any change at run time (after the
TransportFactory has been invoked) will not have any effect
File name of log file

Please note that the HP-SOAP transport will only read System properties and will ignore properties passed to the UDDIProxy(Properties) constructor or set in a uddi4j.properties file.


Usage


The user can set these properties at startup time

C:> java Dorg.uddi4j.TransportClassName=org.uddi4j.transport.HPSOAPTransport
        
-Dorg.uddi4j.logEnabled=true SomeUDDIClient


The user can set these properties at run time

System.setProperty (hpsoap.logDirectory,/tmp);
        
System.setProperty (hpsoap.logFileName,uddi4j.log);
System.setProperty (org.uddi4j.logEnabled,true);
UDDIProxy uddiProxy = new UDDIProxy ();

Using UDDI4J

To run a program referencing UDDI4J,

Building UDDI4J

Samples:

A set of samples is provided to illustrate the basics of using the inquiry api, publish api, and error handling.

How to run samples:

The samples require several pieces of information including the following:


A property file is used by the samples to read values that may need to be modified. This property file includes the values listed above, as well as a convenient way to set the system properties used by UDDI4J as described in Configuration.

To run the examples, set the classpath as described above, invoke java or jre with the desired sample program name. Example:

java FindBusinessExample

Reference:


IBM is a registered trademark of IBM, HP is a registered trademark of Hewlett-Packard Company

Copyright© IBM Corporation 2001, All rights reserved.

uddi4j-2.0.5/docs/style.css000066400000000000000000000017221173667134000155150ustar00rootroot00000000000000body { padding-top: 6.0em; padding-left: 1.4em; font-family: Arial, Helvetica, Geneva, SunSans-Regular, sans-serif color : black; background-color: white } img.uddi4jlogo { position: absolute; top: 2em; left: 2em; border: 0; } h1 { background-color: #ccddff; PADDING-BOTTOM: 1px; PADDING-LEFT: 4px; PADDING-RIGHT: 4px; PADDING-TOP: 1px; font-family: Arial, Helvetica, Geneva, SunSans-Regular, sans-serif } h2 { background-color: #ccddff; PADDING-BOTTOM: 1px; PADDING-LEFT: 4px; PADDING-RIGHT: 4px; PADDING-TOP: 1px; font-family: Arial, Helvetica, Geneva, SunSans-Regular, sans-serif; } h3 { background-color: #ccddff; PADDING-BOTTOM: 1px; PADDING-LEFT: 4px; PADDING-RIGHT: 4px; PADDING-TOP: 1px; font-family: Arial, Helvetica, Geneva, SunSans-Regular, sans-serif; } a:link { color: blue } a:visited { color: purple } address { margin-top: 1em; padding-top: 1em; border-top: thin dotted }uddi4j-2.0.5/docs/uddi4j.jpeg000066400000000000000000000044061173667134000156770ustar00rootroot00000000000000JFIFHHC   ",% )!&4&)-/111%69509,01/C  ///////////////////////////////////////////////////;! }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?먦EPEPEPEPzQ@Zm*i*QWF2ŐskF㪺"<1or c/_-cjM7)&nX( TaiwE+őSPI4 ܤպ:`}Qv^UGO;e@e.RmjuWU~H|1&U`8&8cj~?A;eG!*6~ѫE.~j(|'"݇r΁?OV}?S0΍?@+Sseje1Rr=z{]5ʑJvu.!elo=?:|?O5=JZb Tubsހ+Wd+MkDžu_@AxRIpėlg8xVwcOo$>o";}lW[MVX%`{S|OiMwc#ps@OLdߒ#E1!Mh^n`J湙<ui=ZL@vVy'UO 2R(n4UVUΐB{[GH\8_No {J;BW;:4TKTEPzu#xbP)N2zg}W2;o`_Ӽ-[R胐eU@9kNF,iյY-vVix^A/kk5gr8x[=iڶ\nVcZՏQH~lv3/'qm{-΃[ىNZ#(Au8 45u}j ˈ(<рGLyǧP((((J( ( ( ( (Ҋuddi4j-2.0.5/samples/000077500000000000000000000000001173667134000143555ustar00rootroot00000000000000uddi4j-2.0.5/samples/BindingTemplateExample.java000066400000000000000000000253571173667134000216160ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ import java.util.Properties; import java.util.Vector; import org.uddi4j.UDDIException; import org.uddi4j.client.UDDIProxy; import org.uddi4j.datatype.binding.AccessPoint; import org.uddi4j.datatype.binding.BindingTemplate; import org.uddi4j.datatype.binding.TModelInstanceDetails; import org.uddi4j.datatype.binding.TModelInstanceInfo; import org.uddi4j.datatype.business.BusinessEntity; import org.uddi4j.datatype.service.BusinessService; import org.uddi4j.datatype.service.BusinessServices; import org.uddi4j.datatype.tmodel.TModel; import org.uddi4j.response.AuthToken; import org.uddi4j.response.BindingDetail; import org.uddi4j.response.BusinessDetail; import org.uddi4j.response.DispositionReport; import org.uddi4j.response.Result; import org.uddi4j.response.TModelDetail; import org.uddi4j.util.TModelBag; /** * Sample code that exercises the publish API. Attempts * to save a bindingTemplate, finds the bindingTemplate and then * deletes the bindingTemplate. * *
    *
  1. Sets up an UDDIProxy object *
  2. Requests an authorization token *
  3. Saves a businessEntity containing a businessService. *
  4. Saves a tModel. *
  5. Saves bindingTemplate refering to the tModel just created *
  6. Finds bindingTemplate using the tModelBag. *
  7. Deletes bindingTemplate using the bindingKey. *
  8. Cleans up all the data structures created. *
* * @author Rajesh Sumra (rajesh_sumra@hp.com) */ public class BindingTemplateExample { Properties config = null; public static void main (String args[]) { BindingTemplateExample app = new BindingTemplateExample(); System.out.println("\n*********** Running BindingTemplateExample ***********"); app.run(); System.exit(0); } public void run() { // Load samples configuration config = Configurator.load(); // Construct a UDDIProxy object UDDIProxy proxy = new UDDIProxy(); try { // Select the desired UDDI server node proxy.setInquiryURL(config.getProperty("inquiryURL")); proxy.setPublishURL(config.getProperty("publishURL")); // Get an authorization token System.out.println("\nGet authtoken"); // Pass in userid and password registered at the UDDI site AuthToken token = proxy.get_authToken(config.getProperty("userid"), config.getProperty("password")); System.out.println("Returned authToken:" + token.getAuthInfoString()); System.out.println("\nSaving a BindingTemplate"); // Create minimum required data objects Vector entities = new Vector(); // For saving a Binding Template we need a Business Entity, // Business Service and TModel. Hence create a new business entity // , Business Service and TModel. // Name is the business name. BusinessKey must be "" to save a new // business BusinessEntity be = new BusinessEntity("", config.getProperty("businessName")); // Create a new business service using BindingTemplates // DefaultName is the service name. ServiceKey must be "" to save a new service BusinessService businessService = new BusinessService(""); businessService.setDefaultNameString(config.getProperty("serviceName"),null); businessService.setBusinessKey (""); Vector services = new Vector(); services.addElement(businessService); BusinessServices businessServices = new BusinessServices (); businessServices.setBusinessServiceVector (services); // Adding the BusinessServices to the BusinessEntity be.setBusinessServices (businessServices); entities.addElement(be); // Save business BusinessDetail bd = proxy.save_business(token.getAuthInfoString(), entities); // Process returned BusinessDetail object to get the // Business Key and Service Key. Vector businessEntities = bd.getBusinessEntityVector(); BusinessEntity returnedBusinessEntity = (BusinessEntity)(businessEntities.elementAt(0)); String businessKey = returnedBusinessEntity.getBusinessKey(); Vector businessServicesReturned = returnedBusinessEntity.getBusinessServices().getBusinessServiceVector(); BusinessService businessServiceReturned = (BusinessService)(businessServicesReturned.elementAt(0)); String serviceKey = businessServiceReturned.getServiceKey(); // Saving TModel Vector tModels = new Vector(); TModel tModel = new TModel("", config.getProperty("tmodelName")); tModels.add(tModel); TModelDetail tModelDetail = proxy.save_tModel(token.getAuthInfoString(), tModels); // Creating TModelInstanceDetails Vector tModelVector = tModelDetail.getTModelVector(); String tModelKey = ((TModel)(tModelVector.elementAt(0))).getTModelKey(); Vector tModelInstanceInfoVector = new Vector(); TModelInstanceInfo tModelInstanceInfo = new TModelInstanceInfo(tModelKey); tModelInstanceInfoVector.add(tModelInstanceInfo); TModelInstanceDetails tModelInstanceDetails = new TModelInstanceDetails(); tModelInstanceDetails.setTModelInstanceInfoVector(tModelInstanceInfoVector); Vector bindingTemplatesVector = new Vector(); // Create a new binding templates using required elements constructor // BindingKey must be "" to save a new binding BindingTemplate bindingTemplate = new BindingTemplate("", tModelInstanceDetails, new AccessPoint("www.uddi.org","http")); bindingTemplate.setServiceKey(serviceKey); bindingTemplatesVector.addElement(bindingTemplate); // **** Save the Binding Template BindingDetail bindingDetail = proxy.save_binding(token.getAuthInfoString(), bindingTemplatesVector); // Process returned BindingDetail object Vector bindingTemplateVector = bindingDetail.getBindingTemplateVector(); BindingTemplate bindingTemplateReturned = (BindingTemplate)(bindingTemplateVector.elementAt(0)); System.out.println("Returned BindingKey: " + bindingTemplateReturned.getBindingKey()); System.out.println("\nFinding the BindingTemplate saved "); // Creating the TModel Bag TModelBag tModelBag = new TModelBag(); Vector tModelKeyVector = new Vector(); tModelKeyVector.add(tModelKey); tModelBag.setTModelKeyStrings(tModelKeyVector); // **** Find the Binding Template . // And setting the maximum rows to be returned as 5. BindingDetail bindingDetailReturned = proxy.find_binding(null, serviceKey, tModelBag, 5); // Process returned BindingDetail object Vector bindingTemplatesFound = bindingDetailReturned.getBindingTemplateVector(); BindingTemplate bindingTemplateFound = (BindingTemplate)(bindingTemplatesFound.elementAt(0)); System.out.println("BindingKey Found: " + bindingTemplateFound.getBindingKey()); System.out.println("\nDeleting the saved BindingTemplate"); // **** Delete Binding Template using the Binding Key returned DispositionReport dispositionReport = proxy.delete_binding(token.getAuthInfoString(), bindingTemplateReturned.getBindingKey()); if( dispositionReport.success() ) { System.out.println("BindingKey : " + bindingTemplateReturned.getBindingKey()); System.out.println("Binding Template successfully deleted"); } else { System.out.println(" Error during deletion of BindingTemplate\n"+ "\n operator:" + dispositionReport.getOperator() + "\n generic:" + dispositionReport.getGeneric() ); Vector results = dispositionReport.getResultVector(); for( int i=0; i *
  • Sets up an UDDIProxy object *
  • Requests an authorization token *
  • Saves a businessEntity *
  • Finds businessEntity saved in first step. *
  • Deletes the businessEntity saved in first step. * * * @author David Melgar (dmelgar@us.ibm.com) * @author Rajesh Sumra (rajesh_sumra@hp.com) */ public class BusinessEntityExample { Properties config = null; public static void main (String args[]) { BusinessEntityExample app = new BusinessEntityExample(); System.out.println("\n*********** Running BusinessEntityExample ***********"); app.run(); System.exit(0); } public void run() { // Load samples configuration config = Configurator.load(); // Construct a UDDIProxy object UDDIProxy proxy = new UDDIProxy(); try { // Select the desired UDDI server node proxy.setInquiryURL(config.getProperty("inquiryURL")); proxy.setPublishURL(config.getProperty("publishURL")); // Get an authorization token System.out.println("\nGet authtoken"); // Pass in userid and password registered at the UDDI site AuthToken token = proxy.get_authToken(config.getProperty("userid"), config.getProperty("password")); System.out.println("Returned authToken:" + token.getAuthInfoString()); System.out.println("\nSave '" + config.getProperty("businessName") + "'"); // Create minimum required data objects Vector entities = new Vector(); // Create a new business entity using required elements constructor // Name is the business name. BusinessKey must be "" to save a new // business BusinessEntity be = new BusinessEntity("", config.getProperty("businessName")); entities.addElement(be); // **** First Save a business BusinessDetail bd = proxy.save_business(token.getAuthInfoString(),entities); // Process returned BusinessDetail object Vector businessEntities = bd.getBusinessEntityVector(); BusinessEntity returnedBusinessEntity = (BusinessEntity)(businessEntities.elementAt(0)); System.out.println("Business Name : " + returnedBusinessEntity.getDefaultNameString()); System.out.println("Business Key : " + returnedBusinessEntity.getBusinessKey()); System.out.println("\nFinding business saved"); //creating vector of Name Object Vector names = new Vector(); names.add(new Name(config.getProperty("businessName"))); // Setting FindQualifiers to 'exactNameMatch' FindQualifiers findQualifiers = new FindQualifiers(); Vector qualifier = new Vector(); qualifier.add(new FindQualifier("exactNameMatch")); findQualifiers.setFindQualifierVector(qualifier); // **** Find business saved. // And setting the maximum rows to be returned as 5. BusinessList businessList = proxy.find_business(names, null, null, null,null,findQualifiers,5); Vector businessInfoVector = businessList.getBusinessInfos().getBusinessInfoVector(); for( int i = 0; i < businessInfoVector.size(); i++ ) { BusinessInfo bi = (BusinessInfo)businessInfoVector.elementAt(i); System.out.println("Business Name : " + bi.getDefaultNameString()); System.out.println("Business Key : " + bi.getBusinessKey()); } System.out.println("\nDeleting the saved Business"); // Try to delete business saved in first step. // Delete will fail for businesses not created by this id // **** Having the business key, delete Business Entity using the authToken DispositionReport dr = proxy.delete_business ( token.getAuthInfoString(), returnedBusinessEntity. getBusinessKey()); if( dr.success() ) { System.out.println("Business successfully deleted"); } else { System.out.println(" Error during deletion of Business\n"+ "\n operator:" + dr.getOperator() + "\n generic:" + dr.getGeneric() ); Vector results = dr.getResultVector(); for( int i=0; i *
  • Sets up an UDDIProxy object *
  • Requests an authorization token *
  • Saves a businessEntity. *
  • Saves a businessService. *
  • Finds a saved businessService. *
  • Deletes the saved businessService. *
  • Cleans up the data structures created (businessEntity) * * * @author Rajesh Sumra (rajesh_sumra@hp.com) */ public class BusinessServiceExample { Properties config = null; public static void main (String args[]) { BusinessServiceExample app = new BusinessServiceExample(); System.out.println("\n*********** Running BusinessServiceExample ***********"); app.run(); System.exit(0); } public void run() { // Load samples configuration config = Configurator.load(); // Construct a UDDIProxy object UDDIProxy proxy = new UDDIProxy(); try { // Select the desired UDDI server node proxy.setInquiryURL(config.getProperty("inquiryURL")); proxy.setPublishURL(config.getProperty("publishURL")); // Get an authorization token System.out.println("\nGet authtoken"); // Pass in userid and password registered at the UDDI site AuthToken token = proxy.get_authToken(config.getProperty("userid"), config.getProperty("password")); System.out.println("Returned authToken:" + token.getAuthInfoString()); System.out.println("\nSave '" + config.getProperty("serviceName") + "'"); // Create minimum required data objects Vector entities = new Vector(); // For saving a Business Service we need a Business Entity . // Hence create a new business entity . Name is the business name. // BusinessKey must be "" and not null to save a new business. BusinessEntity be = new BusinessEntity("", config.getProperty("businessName")); entities.addElement(be); // Save business BusinessDetail bd = proxy.save_business(token.getAuthInfoString(),entities); // Process returned BusinessDetail object to get the // busines key. Vector businessEntities = bd.getBusinessEntityVector(); BusinessEntity returnedBusinessEntity = (BusinessEntity)(businessEntities.elementAt(0)); String businessKey = returnedBusinessEntity.getBusinessKey(); // Create a new business service using BindingTemplates default // constructor. // DefaultName is the service name. ServiceKey must be "" to save a new service BusinessService businessService = new BusinessService(""); businessService.setDefaultNameString(config.getProperty("serviceName"),null); businessService.setBusinessKey(businessKey); Vector services = new Vector(); services.addElement(businessService); // **** First save a Business Service ServiceDetail serviceDetail = proxy.save_service(token.getAuthInfoString(),services); // Process returned ServiceDetail object to list the // saved services. Vector businessServices = serviceDetail.getBusinessServiceVector(); BusinessService businessServiceReturned = (BusinessService)(businessServices.elementAt(0)); String serviceKey = businessServiceReturned.getServiceKey(); System.out.println("The saved Service : "+ businessServiceReturned.getDefaultNameString()); System.out.println("The ServiceKey : "+ serviceKey); System.out.println("\nFinding Service saved in first step"); //creating vector of Name Object Vector names = new Vector(); names.add(new Name(config.getProperty("serviceName"))); // Setting FindQualifiers to 'exactNameMatch' FindQualifiers findQualifiers = new FindQualifiers(); Vector qualifier = new Vector(); qualifier.add(new FindQualifier("exactNameMatch")); findQualifiers.setFindQualifierVector(qualifier); // **** Find the Business Service saved. // And setting the maximum rows to be returned as 5. ServiceList serviceList = proxy.find_service(businessKey, names, null,null,findQualifiers,5); // Process the returned ServiceList object Vector serviceInfoVector = serviceList.getServiceInfos().getServiceInfoVector(); for( int i = 0; i < serviceInfoVector.size(); i++ ) { ServiceInfo serviceInfo = (ServiceInfo)serviceInfoVector.elementAt(i); // Print name for each service System.out.println("Name of Service : " + serviceInfo.getDefaultNameString()); System.out.println("Service key : " + serviceInfo.getServiceKey()); } System.out.println("\nDeleting the saved service"); // Try to delete already saved Business Service. Delete will fail for services // not created by this id // Print name for each service System.out.println("Name of Service : " + businessServiceReturned.getDefaultNameString()); System.out.println("Service key : " + businessServiceReturned.getServiceKey()); // **** Having service key, delete using the authToken DispositionReport dr = proxy.delete_service ( token.getAuthInfoString(), businessServiceReturned.getServiceKey()); if( dr.success() ) { System.out.println("Service successfully deleted"); } else { System.out.println(" Error during deletion of Service\n"+ "\n operator:" + dr.getOperator() + "\n generic:" + dr.getGeneric() ); Vector results = dr.getResultVector(); for( int i=0; i *
  • Reads samples property file. *
  • Sets SOAP transport according to property file. *
  • Configures SSL/JSSE provider * * * @author David Melgar (dmelgar@us.ibm.com) */ public class Configurator { /** * Loads configuration file. File may require * modification before running samples. * * @return Loaded properties object */ public static Properties load() { Properties config = new Properties(); try { config.load(new java.io.FileInputStream("samples.prop")); } catch (Exception e) { System.out.println("Error loading samples property file\n" + e); } // Configure UDDI4J system properties. Normally set on commandline or elsewhere // SOAP transport being used if (System.getProperty(TransportFactory.PROPERTY_NAME)==null) { System.setProperty(TransportFactory.PROPERTY_NAME, config.getProperty("TransportClassName")); } // Logging if (System.getProperty("org.uddi4j.logEnabled")==null) { System.setProperty("org.uddi4j.logEnabled", config.getProperty("logEnabled")); } // Configure JSSE support try { System.setProperty("java.protocol.handler.pkgs", config.getProperty("handlerPackageName")); // Dynamically loads security provider based on properties. Typically configured in JRE java.security.Security.addProvider((java.security.Provider) Class.forName(config.getProperty("securityClassName")).newInstance()); } catch (Exception e) { System.out.println("Error configuring JSSE provider. Make sure JSSE is in classpath.\n" + e); } return config; } } uddi4j-2.0.5/samples/DeleteBusinessExample.java000066400000000000000000000117171173667134000214610ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ import java.util.Properties; import java.util.Vector; import org.uddi4j.UDDIException; import org.uddi4j.client.UDDIProxy; import org.uddi4j.datatype.Name; import org.uddi4j.response.AuthToken; import org.uddi4j.response.BusinessInfo; import org.uddi4j.response.BusinessList; import org.uddi4j.response.DispositionReport; import org.uddi4j.response.Result; import org.uddi4j.util.FindQualifier; import org.uddi4j.util.FindQualifiers; /** * Sample code that exercises the publish API. Attempts * to delete a businessEntity. *
      *
    1. Performs an inquiry to find this business *
    2. get_authToken to login to server *
    3. delete any businesses with key found in step 1. *
    * * @author David Melgar (dmelgar@us.ibm.com) * @author Rajesh Sumra (rajesh_sumra@hp.com) */ public class DeleteBusinessExample { Properties config = null; public static void main (String args[]) { DeleteBusinessExample app = new DeleteBusinessExample(); System.out.println("\n*********** Running DeleteBusinessExample ***********"); app.run(); System.exit(0); } public void run() { // Load samples configuration config = Configurator.load(); // Construct a UDDIProxy object UDDIProxy proxy = new UDDIProxy(); try { // Select the desired UDDI server node proxy.setInquiryURL(config.getProperty("inquiryURL")); proxy.setPublishURL(config.getProperty("publishURL")); // Get an authorization token System.out.println("\nGet authtoken"); // Pass in userid and password registered at the UDDI site AuthToken token = proxy.get_authToken(config.getProperty("userid"), config.getProperty("password")); System.out.println("Returned authToken:" + token.getAuthInfoString()); System.out.println("Search for '" + config.getProperty("businessName") + "' to delete"); //creating vector of Name Object Vector names = new Vector(); names.add(new Name(config.getProperty("businessName"))); // Setting FindQualifiers to 'caseSensitiveMatch' FindQualifiers findQualifiers = new FindQualifiers(); Vector qualifier = new Vector(); qualifier.add(new FindQualifier("caseSensitiveMatch")); findQualifiers.setFindQualifierVector(qualifier); // Find businesses by Business name // And setting the maximum rows to be returned as 5. BusinessList businessList = proxy.find_business(names, null, null, null,null,findQualifiers,5); Vector businessInfoVector = businessList.getBusinessInfos().getBusinessInfoVector(); // Try to delete any businesses with this name. Multiple businesses with the same // name may have been created by different userids. Delete will fail for businesses // not created by this id for( int i = 0; i < businessInfoVector.size(); i++ ) { BusinessInfo bi = (BusinessInfo)businessInfoVector.elementAt(i); System.out.println("Found business key:" + bi.getBusinessKey()); // Have found the matching business key, delete using the authToken DispositionReport dr = proxy.delete_business(token.getAuthInfoString(), bi.getBusinessKey()); if( dr.success() ) { System.out.println("Business successfully deleted"); } else { System.out.println(" Error during deletion of Business\n"+ "\n operator:" + dr.getOperator() + "\n generic:" + dr.getGeneric() ); Vector results = dr.getResultVector(); for( int j=0; j *
  • Sets up an UDDIProxy object *
  • Requests an authorization token *
  • Finds a TModel. *
  • Deletes a TModel. * * * @author Rajesh Sumra (rajesh_sumra@hp.com) * @author Vivek Chopra (vivek_chopra2@non.hp.com) */ public class DeleteTModelExample { Properties config = null; public static void main (String args[]) { DeleteTModelExample app = new DeleteTModelExample (); System.out.println("\n*********** Running DeleteTModelExample ***********"); app.run(); System.exit(0); } public void run() { // Load samples configuration config = Configurator.load(); // Construct a UDDIProxy object UDDIProxy proxy = new UDDIProxy(); try { // Select the desired UDDI server node proxy.setInquiryURL(config.getProperty("inquiryURL")); proxy.setPublishURL(config.getProperty("publishURL")); // Get an authorization token System.out.println("\nGet authtoken"); // Pass in userid and password registered at the UDDI site AuthToken token = proxy.get_authToken(config.getProperty("userid"), config.getProperty("password")); System.out.println("Returned authToken: " + token.getAuthInfoString()); // Setting FindQualifiers to 'exactNameMatch' FindQualifiers findQualifiers = new FindQualifiers(); Vector qualifier = new Vector(); qualifier.add(new FindQualifier("exactNameMatch")); findQualifiers.setFindQualifierVector(qualifier); // **** Find the TModel // And setting the maximum rows to be returned as 5. TModelList tModelList = proxy.find_tModel(config.getProperty("tmodelName"), null,null,findQualifiers,5); Vector tModelInfoVector = tModelList.getTModelInfos().getTModelInfoVector(); // Try to delete any tModel by this name. Multiple tModels // with the same name may have been created with different // UDDI userids. Deletes will fail for tModels not created // by this UDDI userid. for( int i = 0; i < tModelInfoVector.size(); i++ ) { TModelInfo tModelInfo = (TModelInfo)tModelInfoVector.elementAt(i); // Print name for each business System.out.println("Found:\nThe TModel Name: " + tModelInfo.getNameString()); System.out.println("The TModel Key : " + tModelInfo.getTModelKey()); // Having found the tModel key, delete the tModel. DispositionReport dr = proxy.delete_tModel(token.getAuthInfoString(), tModelInfo.getTModelKey()); if( dr.success() ) { System.out.println("TModel name: " + tModelInfo.getNameString()); System.out.println("TModel Key : " + tModelInfo.getTModelKey()); System.out.println("TModel successfully deleted"); } else { System.out.println(" Error during deletion of tModel\n"+ "\n operator:" + dr.getOperator() + "\n generic:" + dr.getGeneric() ); Vector results = dr.getResultVector(); for( int j=0; j *
  • Sets up a UDDIProxy object *
  • Finds businesses by name. * * * @author David Melgar (dmelgar@us.ibm.com) * @author Rajesh Sumra (rajesh_sumra@hp.com) */ public class FindBusinessExample { Properties config = null; public static void main (String args[]) { FindBusinessExample app = new FindBusinessExample(); System.out.println("\n*********** Running FindBusinessExample ***********"); app.run(); System.exit(0); } public void run() { // Load samples configuration config = Configurator.load(); // Construct a UDDIProxy object. UDDIProxy proxy = new UDDIProxy(); try { // Select the desired UDDI server node proxy.setInquiryURL(config.getProperty("inquiryURL")); proxy.setPublishURL(config.getProperty("publishURL")); //creating vector of Name Object Vector names = new Vector(); names.add(new Name("S")); // Setting FindQualifiers to 'caseSensitiveMatch' FindQualifiers findQualifiers = new FindQualifiers(); Vector qualifier = new Vector(); qualifier.add(new FindQualifier("caseSensitiveMatch")); findQualifiers.setFindQualifierVector(qualifier); // Find businesses by name // And setting the maximum rows to be returned as 5. BusinessList businessList = proxy.find_business(names, null, null, null,null,findQualifiers,5); Vector businessInfoVector = businessList.getBusinessInfos().getBusinessInfoVector(); for( int i = 0; i < businessInfoVector.size(); i++ ) { BusinessInfo businessInfo = (BusinessInfo)businessInfoVector.elementAt(i); // Print name for each business System.out.println(businessInfo.getDefaultNameString()); } } // Handle possible errors catch( UDDIException e ) { DispositionReport dr = e.getDispositionReport(); if( dr!=null ) { System.out.println("UDDIException faultCode:" + e.getFaultCode() + "\n operator:" + dr.getOperator() + "\n generic:" + dr.getGeneric() ); Vector results = dr.getResultVector(); for( int i=0; i *
  • Sets up a UDDIProxy object *
  • Requests an authorization token *
  • Save one business & find one business for asserting a relationship * with each other. *
  • Add a PublisherAssertion between two Business Entity *
  • Lists businesses Asserted by BusinessKey holder. *
  • Deletes the PublisherAssertion added. *
  • Cleans up the Data Structures created. * * * @author Rajesh Sumra (rajesh_sumra@hp.com) */ public class PublisherAssertionExample { Properties config = null; public static void main (String args[]) { PublisherAssertionExample app = new PublisherAssertionExample(); System.out.println("\n*********** Running PublisherAssertionExample ***********"); app.run(); System.exit(0); } public void run() { // Load samples configuration config = Configurator.load(); // Construct a UDDIProxy object UDDIProxy proxy = new UDDIProxy(); try { // Select the desired UDDI server node proxy.setInquiryURL(config.getProperty("inquiryURL")); proxy.setPublishURL(config.getProperty("publishURL")); // Get an authorization token System.out.println("\n Get authtoken"); // Pass in userid and password registered at the UDDI site AuthToken token = proxy.get_authToken(config.getProperty("userid"), config.getProperty("password")); System.out.println(" Returned authToken:" + token.getAuthInfoString()); // PublisherAssertion is created between two Business Entities. // Search for a business whose name is in the configuration file // and assert a relationship with the newly created business . // The relationship is picked up from the configuration file. System.out.println("\n Saving one Business Entity for PublisherAssertion"); // Create minimum required data objects System.out.println(" Finding One Business Entity for PublisherAssertion"); // Find one more Business Entity from registry, to be used for // asserting a relationship with former saved business entity. //creating vector of Name Object Vector names = new Vector(); names.add(new Name(config.getProperty("sampleEntityName"))); // Finds one more business . // And setting the maximum rows to be returned as 5. String toKey = ""; BusinessList businessList = proxy.find_business(names, null, null, null,null,null,5); Vector businessInfoVector = businessList.getBusinessInfos().getBusinessInfoVector(); if( businessInfoVector.size() > 0 ) { BusinessInfo bi = (BusinessInfo)businessInfoVector.elementAt(0); toKey = bi.getBusinessKey(); } else { System.out.println(" No businesses found...."); System.out.println(" Please change the Business Entity name to be searched !!"); System.exit(0); } Vector entities = new Vector(); // Create one new business entity using required elements constructor // These will be used for PublisherAssertion.Name is the business name. // BusinessKey must be "" to save a new business BusinessEntity be = new BusinessEntity("", config.getProperty("businessName")); entities.addElement(be); // Save business BusinessDetail bd = proxy.save_business(token.getAuthInfoString(),entities); // Process returned BusinessDetail object Vector businessEntities = bd.getBusinessEntityVector(); BusinessEntity returnedBusinessEntity = (BusinessEntity)(businessEntities.elementAt(0)); // Get FromKey And ToKey from Business Entities returned and found String fromKey = returnedBusinessEntity.getBusinessKey(); // Create KeyedReference with relationShip between // FromKey and Tokey . And set the TModelKey // so that it refers to uddi-org:relationships KeyedReference keyedReference = new KeyedReference("Holding Company", config.getProperty("assertionRelationship") ); keyedReference.setTModelKey(TModel.RELATIONSHIPS_TMODEL_KEY); // Create PublisherAssertion using KeyedReference, Fromkey // and Tokey. The Publisher Assertion is used to express the // relationship exist between BusinessEntities. PublisherAssertion publisherAssertion = new PublisherAssertion(fromKey,toKey,keyedReference); System.out.println("\n Adding PublisherAssertions"); System.out.println(" FromKey : " + fromKey); System.out.println(" ToKey : " + toKey); // **** Add the PublisherAssertion DispositionReport dispositionReport=proxy.add_publisherAssertions(token.getAuthInfoString(), publisherAssertion); System.out.println("\n Finding out the businesses which are related"); // Find related businesses using business key and keyedReference // maxRows set at 0 means to return as many results as possible RelatedBusinessesList relatedBusinessesList = proxy.find_relatedBusinesses( fromKey, keyedReference, null, 0); System.out.println(" The businesses which are related to '" + config.getProperty("businessName") + "': "); Vector relatedBusinessInfoVector = relatedBusinessesList.getRelatedBusinessInfos(). getRelatedBusinessInfoVector(); for( int i = 0; i < relatedBusinessInfoVector.size(); i++ ) { RelatedBusinessInfo relatedBusinessInfo = (RelatedBusinessInfo)relatedBusinessInfoVector.elementAt(i); // Print name for each businesses System.out.println(" " + relatedBusinessInfo.getDefaultNameString()); } // **** Deletes the PublisherAssertion System.out.println("\n Deleting the PublisherAssertion added in First step"); dispositionReport = proxy.delete_publisherAssertions (token.getAuthInfoString(),publisherAssertion); if( dispositionReport.success() ) { System.out.println(" PublisherAssertion successfully deleted"); } else { System.out.println(" Error during deletion of PublisherAssertion\n"+ "\n operator:" + dispositionReport.getOperator() + "\n generic:" + dispositionReport.getGeneric() ); Vector results = dispositionReport.getResultVector(); for( int i=0; i *
  • Sets up a UDDIProxy object *
  • Requests an authorization token *
  • Saves a businessEntity *
  • Lists businesses starting with the the first letter of the * business's name. The new business should be in the list. * * * @author David Melgar (dmelgar@us.ibm.com) * @author Rajesh Sumra (rajesh_sumra@hp.com) */ public class SaveBusinessExample { Properties config = null; public static void main (String args[]) { SaveBusinessExample app = new SaveBusinessExample(); System.out.println("\n*********** Running SaveBusinessExample ***********"); app.run(); System.exit(0); } public void run() { // Load samples configuration config = Configurator.load(); // Construct a UDDIProxy object UDDIProxy proxy = new UDDIProxy(); try { // Select the desired UDDI server node proxy.setInquiryURL(config.getProperty("inquiryURL")); proxy.setPublishURL(config.getProperty("publishURL")); // Get an authorization token System.out.println("\nGet authtoken"); // Pass in userid and password registered at the UDDI site AuthToken token = proxy.get_authToken(config.getProperty("userid"), config.getProperty("password")); System.out.println("Returned authToken:" + token.getAuthInfoString()); System.out.println("\nSave '" + config.getProperty("businessName") + "'"); // Create minimum required data objects Vector entities = new Vector(); // Create a new business entity using required elements constructor // Name is the business name. BusinessKey must be "" to save a new // business BusinessEntity be = new BusinessEntity("", config.getProperty("businessName")); entities.addElement(be); // Save business BusinessDetail bd = proxy.save_business(token.getAuthInfoString(),entities); // Process returned BusinessDetail object Vector businessEntities = bd.getBusinessEntityVector(); BusinessEntity returnedBusinessEntity = (BusinessEntity)(businessEntities.elementAt(0)); System.out.println("Returned businessKey:" + returnedBusinessEntity.getBusinessKey()); // Find all businesses that start with that particular letter e.g. 'S' for 'Sample Business'. String businessNameLeadingSubstring = (config.getProperty("businessName")).substring (0,1); System.out.println("\nListing businesses starting with " + businessNameLeadingSubstring + " after we publish"); //creating vector of Name Object Vector names = new Vector(); names.add(new Name(businessNameLeadingSubstring)); // Setting FindQualifiers to 'caseSensitiveMatch' FindQualifiers findQualifiers = new FindQualifiers(); Vector qualifier = new Vector(); qualifier.add(new FindQualifier("caseSensitiveMatch")); findQualifiers.setFindQualifierVector(qualifier); // Find businesses by name // And setting the maximum rows to be returned as 5. BusinessList businessList = proxy.find_business(names, null, null, null,null,findQualifiers,5); Vector businessInfoVector = businessList.getBusinessInfos().getBusinessInfoVector(); for( int i = 0; i < businessInfoVector.size(); i++ ) { BusinessInfo businessInfo = (BusinessInfo)businessInfoVector.elementAt(i); System.out.println(businessInfo.getDefaultNameString()); } } // Handle possible errors catch( UDDIException e ) { DispositionReport dr = e.getDispositionReport(); if( dr!=null ) { System.out.println("UDDIException faultCode:" + e.getFaultCode() + "\n operator:" + dr.getOperator() + "\n generic:" + dr.getGeneric() ); Vector results = dr.getResultVector(); for( int i=0; i *
  • Sets up an UDDIProxy object *
  • Requests an authorization token *
  • Saves a TModel. *
  • Finds a TModel. * * * @author Rajesh Sumra (rajesh_sumra@hp.com) * @author Vivek Chopra (vivek_chopra2@non.hp.com) */ public class SaveTModelExample { Properties config = null; public static void main (String args[]) { SaveTModelExample app = new SaveTModelExample (); System.out.println("\n*********** Running SaveTModelExample ***********"); app.run(); System.exit(0); } public void run() { // Load samples configuration config = Configurator.load(); // Construct a UDDIProxy object UDDIProxy proxy = new UDDIProxy(); try { // Select the desired UDDI server node proxy.setInquiryURL(config.getProperty("inquiryURL")); proxy.setPublishURL(config.getProperty("publishURL")); // Get an authorization token System.out.println("\nGet authtoken"); // Pass in userid and password registered at the UDDI site AuthToken token = proxy.get_authToken(config.getProperty("userid"), config.getProperty("password")); System.out.println("Returned authToken: " + token.getAuthInfoString()); System.out.println("\nSave '" + config.getProperty("tmodelName") + "'"); Vector tModels = new Vector(); TModel tModel = new TModel("", config.getProperty("tmodelName")); tModels.add(tModel); // **** Save a TModel TModelDetail tModelDetail = proxy.save_tModel(token.getAuthInfoString(), tModels); // Processing return type Vector tModelVector = tModelDetail.getTModelVector(); TModel tModelReturned = (TModel)(tModelVector.elementAt(0)); System.out.println("TModel Saved: " + tModelReturned.getNameString()); System.out.println("TModel Key : " + tModelReturned.getTModelKey()); System.out.println("\nFind '" + config.getProperty("tmodelName") + "'"); //creating vector of Name Object Vector names = new Vector(); names.add(new Name(config.getProperty("tmodelName"))); // Setting FindQualifiers to 'exactNameMatch' FindQualifiers findQualifiers = new FindQualifiers(); Vector qualifier = new Vector(); qualifier.add(new FindQualifier("exactNameMatch")); findQualifiers.setFindQualifierVector(qualifier); // **** Find the TModel // And setting the maximum rows to be returned as 5. TModelList tModelList = proxy.find_tModel(config.getProperty("tmodelName"), null,null,findQualifiers,5); Vector tModelInfoVector = tModelList.getTModelInfos().getTModelInfoVector(); for( int i = 0; i < tModelInfoVector.size(); i++ ) { TModelInfo tModelInfo = (TModelInfo)tModelInfoVector.elementAt(i); // Print name for each business System.out.println("The TModel Name: " + tModelInfo.getNameString()); System.out.println("The TModel Key : " + tModelInfo.getTModelKey()); } } // Handle possible errors catch( UDDIException e ) { DispositionReport dr = e.getDispositionReport(); if( dr!=null ) { System.out.println("UDDIException faultCode:" + e.getFaultCode() + "\n operator:" + dr.getOperator() + "\n generic:" + dr.getGeneric() ); Vector results = dr.getResultVector(); for( int i=0; i * * @author David Melgar (dmelgar@us.ibm.com) * @author Ravi Trivedi (ravi_trivedi@hp.com) */ public abstract class UDDIElement implements Serializable { public static String GENERIC = "2.0"; public static String XMLNS = "urn:uddi-org:api_v2"; public static String XMLNS_PREFIX = "uddiv2:"; public static String SOAPNS = "http://schemas.xmlsoap.org/soap/envelope/"; public UDDIElement() { } public UDDIElement(Element el) throws UDDIException { // Check that if an exception should be thrown if (UDDIException.isValidElement(el)) { // Looks like a fault, process and throw throw new UDDIException(el, true); } } abstract public void saveToXML(Element base); /** * Performs a utility function. * Returns text contained in child elements of the * passed in element. * * @param el Element * @return java.lang.String */ protected String getText(Node el) { NodeList nl = el.getChildNodes(); String result = ""; for (int i = 0; i < nl.getLength(); i++) { if (nl.item(i).getNodeType()==Node.TEXT_NODE) { result += nl.item(i).getNodeValue(); } } // Trim result, to remove whitespace. return result.trim(); } public NodeList getChildElementsByTagName(Element el, String tag) { // Do NOT traverse the tree. Only search within the immediate // child nodes. NodeList children = el.getChildNodes(); Vector result = new Vector(); for (int i = 0; i < children.getLength(); i++) { Node node = children.item(i); if (node.getNodeType() == Node.ELEMENT_NODE && node.getNamespaceURI().equals(UDDIElement.XMLNS) && node.getLocalName().equals(tag)) { // This is a valid node result.addElement(node); } } return new VectorNodeList(result); } protected Element base = null; }uddi4j-2.0.5/src/org/uddi4j/UDDIException.java000066400000000000000000000131651173667134000207270ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j; import org.uddi4j.response.DispositionReport; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * Represents a UDDI defined error. This exception is thrown in cases * where the return value on the UDDI API cannot indicate an error condition.

    * * UDDIException usually contains a disposition report that has detailed * information about the UDDI error, as defined by the UDDI specification. * If the response is a SOAP fault, but does not contain a disposition * report, this exception may still be thrown.

    * * The DispositionReport class contains definitions for the various error values * that can be returned.

    * * @author David Melgar (dmelgar@us.ibm.com) */ public class UDDIException extends Exception { static final String UDDI_TAG = "Fault"; String faultCode = null; String faultString = null; String faultActor = null; String detail = null; Element detailElement= null; DispositionReport dispositionReport = null; public UDDIException() { } /** * Constructer that parses the XML dom tree and extracts * useful attributes. * * @param el Root element of the tree within the SOAP body. */ public UDDIException(Element el, boolean createDispositionReport) { if (isValidElement(el)) { // Extract useful attributes NodeList nl; Element tmp; nl = el.getElementsByTagName("faultcode"); if (nl.getLength()==0) { // Handle possible DOM level 2 response nl = el.getElementsByTagNameNS(UDDIElement.SOAPNS, "faultcode"); } if (nl!=null && nl.getLength()>0) { tmp = (Element)nl.item(0); faultCode = getText(tmp); } nl = el.getElementsByTagName("faultstring"); if (nl.getLength()==0) { // Handle possible DOM level 2 response nl = el.getElementsByTagNameNS(UDDIElement.SOAPNS, "faultstring"); } if (nl!=null && nl.getLength()>0) { tmp = (Element)nl.item(0); faultString = getText(tmp); } nl = el.getElementsByTagName("faultactor"); if (nl.getLength()==0) { // Handle possible DOM level 2 response nl = el.getElementsByTagNameNS(UDDIElement.SOAPNS, "faultactor"); } if (nl!=null && nl.getLength()>0) { tmp = (Element)nl.item(0); faultActor = getText(tmp); } nl = el.getElementsByTagName("detail"); if (nl.getLength()==0) { // Handle possible DOM level 2 response nl = el.getElementsByTagNameNS(UDDIElement.SOAPNS, "detail"); } // Try to create a disposition report if (nl!=null && nl.getLength()>0) { tmp = (Element)nl.item(0); detailElement = tmp; if (createDispositionReport) { try { nl = el.getElementsByTagName(DispositionReport.UDDI_TAG); if (nl!=null && nl.getLength()>0) { tmp = (Element)nl.item(0); dispositionReport = new DispositionReport(tmp); } } catch (UDDIException e) { // Ignore exception, we're handling it already } } } } } /** * Tests the passed in element to determine if the * element is a serialized version of this object. * * @param el Root element for this object */ public static boolean isValidElement(Element el) { //Is this a SOAP Fault? return el.getNamespaceURI().equals(UDDIElement.SOAPNS) && el.getLocalName().equals(UDDI_TAG); } // Getters public String getFaultCode() { return faultCode; } public String getFaultString() { return faultString; } public String getFaultActor() { return faultActor; } public String getDetail() { return detail; } public Element getDetailElement() { return detailElement; } public DispositionReport getDispositionReport() { return dispositionReport; } /** * Utility function. * Returns text contained in child elements of the * passed in element * * @param el Element * @return java.lang.String */ protected String getText(Node el) { NodeList nl = el.getChildNodes(); String result = ""; for (int i = 0; i < nl.getLength(); i++) { if (nl.item(i).getNodeType()==Node.TEXT_NODE) { result += nl.item(i).getNodeValue(); } } // Trim result to remove whitespace return result.trim(); } /** * Provide simple text exception message * For full details, examine the dispositionReport object itself * @return java.lang.String */ public String toString() { if (dispositionReport != null && dispositionReport.getResultVector()!=null && dispositionReport.getResultVector().size()>0) { org.uddi4j.response.Result result = (org.uddi4j.response.Result)dispositionReport.getResultVector().elementAt(0); if(result!=null) return result.getErrInfo().getText(); } return getFaultString(); } } uddi4j-2.0.5/src/org/uddi4j/VectorNodeList.java000066400000000000000000000024101173667134000212160ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j; import java.util.Vector; import org.w3c.dom.Node; public class VectorNodeList implements org.w3c.dom.NodeList { private Vector v = null; public VectorNodeList(Vector v) { this.v = v; } public Vector getVector() { return v; } /** * Returns the indexth item in the collection. If * index is greater than or equal to the number of nodes in * the list, this returns null. * @param index Index item into the collection. * @return The node at the indexth position in the * NodeList, or null, if that index is not a * valid. */ public Node item(int index) { return (Node)v.elementAt(index); } /** * The number of nodes in the list. The range of valid child node indices is * 0 to length-1, inclusive. */ public int getLength() { return v.size(); } } uddi4j-2.0.5/src/org/uddi4j/client/000077500000000000000000000000001173667134000167305ustar00rootroot00000000000000uddi4j-2.0.5/src/org/uddi4j/client/UDDIProxy.java000066400000000000000000003036201173667134000213660ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.client; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; import java.util.Arrays; import java.util.Properties; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.Name; import org.uddi4j.datatype.assertion.PublisherAssertion; import org.uddi4j.request.AddPublisherAssertions; import org.uddi4j.request.DeleteBinding; import org.uddi4j.request.DeleteBusiness; import org.uddi4j.request.DeletePublisherAssertions; import org.uddi4j.request.DeleteService; import org.uddi4j.request.DeleteTModel; import org.uddi4j.request.DiscardAuthToken; import org.uddi4j.request.FindBinding; import org.uddi4j.request.FindBusiness; import org.uddi4j.request.FindRelatedBusinesses; import org.uddi4j.request.FindService; import org.uddi4j.request.FindTModel; import org.uddi4j.request.GetAssertionStatusReport; import org.uddi4j.request.GetAuthToken; import org.uddi4j.request.GetBindingDetail; import org.uddi4j.request.GetBusinessDetail; import org.uddi4j.request.GetBusinessDetailExt; import org.uddi4j.request.GetPublisherAssertions; import org.uddi4j.request.GetRegisteredInfo; import org.uddi4j.request.GetServiceDetail; import org.uddi4j.request.GetTModelDetail; import org.uddi4j.request.SaveBinding; import org.uddi4j.request.SaveBusiness; import org.uddi4j.request.SaveService; import org.uddi4j.request.SaveTModel; import org.uddi4j.request.SetPublisherAssertions; import org.uddi4j.request.ValidateValues; import org.uddi4j.response.AssertionStatusReport; import org.uddi4j.response.AuthToken; import org.uddi4j.response.BindingDetail; import org.uddi4j.response.BusinessDetail; import org.uddi4j.response.BusinessDetailExt; import org.uddi4j.response.BusinessList; import org.uddi4j.response.CompletionStatus; import org.uddi4j.response.DispositionReport; import org.uddi4j.response.PublisherAssertions; import org.uddi4j.response.RegisteredInfo; import org.uddi4j.response.RelatedBusinessesList; import org.uddi4j.response.ServiceDetail; import org.uddi4j.response.ServiceList; import org.uddi4j.response.TModelDetail; import org.uddi4j.response.TModelList; import org.uddi4j.transport.TransportException; import org.uddi4j.transport.TransportFactory; import org.uddi4j.util.AuthInfo; import org.uddi4j.util.CategoryBag; import org.uddi4j.util.DiscoveryURLs; import org.uddi4j.util.FindQualifiers; import org.uddi4j.util.IdentifierBag; import org.uddi4j.util.KeyedReference; import org.uddi4j.util.TModelBag; import org.uddi4j.util.UploadRegister; import org.w3c.dom.Element; /** * Represents a UDDI server and the actions that can be * invoked against it.

    * * The API is described in the UDDI API specification * available from * http://www.uddi.org . * * The UDDI API specification is required to understand * and utilize this API. This class attempts to closely * pattern the API document.

    * * @author David Melgar (dmelgar@us.ibm.com) * @author Ravi Trivedi (ravi_trivedi@hp.com) * @author Vivek Chopra (vivek@soaprpc.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class UDDIProxy { // Variables protected URL inquiryURL = null; protected URL publishURL = null; TransportFactory transportFactory = null; Properties config = null; private Properties cachedUddi4jPropertiesFile; public static final String INQUIRY_URL_PROPERTY = "org.uddi4j.inquiryURL"; public static final String PUBLISH_URL_PROPERTY = "org.uddi4j.publishURL"; public static final String LOGGING_PROPERTY = "org.uddi4j.logEnabled"; public static final String HTTP_BASIC_AUTH_USERNAME_PROPERTY = "http.basicAuthUserName"; public static final String HTTP_BASIC_AUTH_PASSWORD_PROPERTY = "http.basicAuthPassword"; public static final String HTTP_PROXY_HOST_PROPERTY = "http.proxyHost"; public static final String HTTP_PROXY_PORT_PROPERTY = "http.proxyPort"; public static final String HTTP_PROXY_USERNAME_PROPERTY = "http.proxyUserName"; public static final String HTTP_PROXY_PASSWORD_PROPERTY = "http.proxyPassword"; //The transport class name property is also a field of the TransportFactory but we include it here for completeness. public final static String TRANSPORT_CLASSNAME_PROPERTY = TransportFactory.PROPERTY_NAME; private static final String[] propertyNames = { INQUIRY_URL_PROPERTY, PUBLISH_URL_PROPERTY, LOGGING_PROPERTY, HTTP_BASIC_AUTH_USERNAME_PROPERTY, HTTP_BASIC_AUTH_PASSWORD_PROPERTY, HTTP_PROXY_HOST_PROPERTY, HTTP_PROXY_PORT_PROPERTY, HTTP_PROXY_USERNAME_PROPERTY, HTTP_PROXY_PASSWORD_PROPERTY, TRANSPORT_CLASSNAME_PROPERTY }; /** * Default constructor. */ public UDDIProxy() { try { //generate the complete set of properties to use. //We pass in an empty Properties object because the user did not specify //any properties. setConfiguration(new Properties()); } catch (MalformedURLException e) { //Do nothing. This will never happen because the properties object we passed in //does not contain values for the inqiury or publish URLs. } } /** * Construct a UDDIProxy object. * * @param inquiryURL URL to be used for inquiry requests. * @param publishURL URL to be used for publish requests. */ public UDDIProxy(URL inquiryURL, URL publishURL) { Properties props = new Properties(); if (inquiryURL != null) { props.setProperty(INQUIRY_URL_PROPERTY, inquiryURL.toString()); } if (publishURL != null) { props.setProperty(PUBLISH_URL_PROPERTY, publishURL.toString()); } try { //generate the complete set of properties to use setConfiguration(props); } catch (MalformedURLException e) { //Do nothing. This will never happen because the the url Strings must be well-formed //URLs because they were created from the URL objects. } } /** * Construct a UDDIProxy object * * @param p Properties object which contains configuration information for * UDDI4J. This properties object overrides settings normally retrieved * from system properties, which in turn override those in the * uddi4j.properties file. *

    * This object may also specify properties affecting UDDIProxy. * Current settings affected by this properties object include: *

    *
    org.uddi4j.TransportClassName *
    Specifies the name of the SOAP transport support class. * Options include, org.uddi4j.transport.ApacheSOAPTransport, * org.uddi4j.transport.ApacheAxisTransport, * org.uddi4j.transport.HPSOAPTransport. *
    org.uddi4j.inquiryURL *
    The URL to be used by UDDIProxy for inquiry requests. * setInquiryURL method overrides. *
    org.uddi4j.publishURL *
    The URL to be used by UDDIProxy for publish requests. * setPublishURL methods override. *
    org.uddi4j.logEnabled *
    Set this property to true to enable logging to System.err. *
    * @exception java.net.MalformedURLException In case the publish or * inquiry URLs are malformed. */ public UDDIProxy(Properties p) throws MalformedURLException { setConfiguration(p); } /** * Set the configuration properties * * @param props Properties object containing configuration information. See * {@link #UDDIProxy(Properties)} for configuration details. * @exception java.net.MalformedURLException In case the publish or * inquiry URLs are malformed. */ public void setConfiguration(Properties props) throws MalformedURLException { //For each uddi4j property individually, the order of precedence (highest first) of property values is: //1. Properties object passed to this method. //2. System properties //3. uddi4j.properties file //4. default properties (the only default property is the transport class which is ApacheSoapTransport) //We create the properties object to be used by starting with the default properties and //overriding these in increasing order of precedence to create the set of properties to be used. //Note that we are using a new properties object, not the one passed in, because //we don't want to modify the one passed in because, for example, it might //be the System properties object. this.config = new Properties(); config.setProperty(TransportFactory.PROPERTY_NAME, TransportFactory.DEFAULT_TRANSPORT_NAME); //the only required default property //Now load uddi4j.properties file (if not already cached) - this takes precendence over the defaults Exception exception = null; try { if (cachedUddi4jPropertiesFile == null) { //We have not loaded the uddi4j.properties file yet. Load it now. cachedUddi4jPropertiesFile = new Properties(); InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("uddi4j.properties"); if (inputStream != null) { //uddi4j.properties file found cachedUddi4jPropertiesFile.load(inputStream); } //else uddi4j.properties file could not be found. //Just leave the cachedUddi4jPropertiesFile object empty. } //override the default props with any contained in the uddi4j.properties file //The config Properties object is modified as a result. overrideProperties(config, cachedUddi4jPropertiesFile); } catch (IOException e) { //We found the uddi4j.properties file but couldn't read it for some reason. //Do not throw the exception but instead log it to System.err. //We will log it at the *end* of this method, when we will know if logging is enabled. exception = e; } catch (IllegalArgumentException e) { //The input stream contained a malformed unicode escape sequence. //Do not throw the exception but instead log it to System.err. //We will log it at the *end* of this method, when we will know if logging is enabled. exception = e; } //The next set of properties in increasing order of preference is the System properties. //System properties take precedence over the uddi4j.properties file, for //compatibility with earlier releases. E.g. if a user is using System properties to //specify uddi4j properties, the presence of a properties file when they upgrade to //UDDI4J 2.0.4 may cause the behaviour to change if this properties file took precedence //over the system properties. This is obviously is undesirable. //override the config properties with any uddi4j properties found in the System properties. overrideProperties(config, System.getProperties()); //finally override the properties with any uddi4j properties found in the Properties object passed to this method, //as these take precedence over all other sources of properties. overrideProperties(config, props); //Set the inquiry and publish URLs from the properties, if present. //don't pass null URL strings into the URL constructors or we will get a MalformedURLException if (config.getProperty(INQUIRY_URL_PROPERTY) != null) { setInquiryURL(config.getProperty(INQUIRY_URL_PROPERTY)); } else { //no inquiryURL config property was present. If the inquiryURL was previously set, //make sure we keep the config properties and the URLs consistent. if (inquiryURL != null) { config.setProperty(INQUIRY_URL_PROPERTY, inquiryURL.toString()); } } if (config.getProperty(PUBLISH_URL_PROPERTY) != null) { setPublishURL(config.getProperty(PUBLISH_URL_PROPERTY)); } else { //no publishURL config property was present. If the publishURL was previously set, //make sure we keep the config properties and the URLs consistent. if (publishURL != null) { config.setProperty(PUBLISH_URL_PROPERTY, publishURL.toString()); } } //Finally create the transport factory instance based on the config properties we have built up. transportFactory = TransportFactory.newInstance(config); if (logEnabled()) { if (exception != null) { System.err.println("Ignoring exception that occurred while reading the uddi4j.properties file: " + exception); } //We don't want to print out the passwords, so if logging is enabled then clone a copy of the config properties //to print, and overwrite the passwords with stars. If users really need to print the passwords in order //to debug then they can do that in their own client code. Properties configCopyToPrint = (Properties) config.clone(); String[] passwordProperties = { HTTP_BASIC_AUTH_PASSWORD_PROPERTY, HTTP_PROXY_PASSWORD_PROPERTY }; for (int i = 0; i < passwordProperties.length; i++) { if (configCopyToPrint.getProperty(passwordProperties[i]) != null) { configCopyToPrint.setProperty(passwordProperties[i], "********"); } } System.err.println("Configuration properties set: " + configCopyToPrint); } } /** * Urility method to override the basic properties with any uddi4j properties contained in the overriding properties. * overriding will remain unchanged. basic will be altered if overriding contains * any uddi4j properties. */ private void overrideProperties(Properties basic, Properties overriding) { if (basic != null && overriding != null) { for (int i = 0; i < propertyNames.length; i++) { if (overriding.getProperty(propertyNames[i]) != null) { basic.setProperty(propertyNames[i], overriding.getProperty(propertyNames[i])); } } } } public boolean logEnabled() { //config will never be null return Boolean.valueOf(config.getProperty(LOGGING_PROPERTY)).booleanValue(); } /** * Get the configuration properties currently in use * @return The configuration properties */ public Properties getConfiguration() { return config; } /** * Set the URL to be used for inquiry requests. * * @param url Inquiry URL string * @exception java.net.MalformedURLException In case the Inquiry URL is * malformed. */ public void setInquiryURL(String url) throws java.net.MalformedURLException { setInquiryURL(new URL(url)); } /** * Set the URL to be used for inquiry requests. * * @param url Inquiry URL */ public void setInquiryURL(URL url) { this.inquiryURL = url; //Keep the config up to date. if (inquiryURL != null) { config.setProperty(INQUIRY_URL_PROPERTY, url.toString()); } else { config.remove(INQUIRY_URL_PROPERTY); } //refresh the transport factory transportFactory = TransportFactory.newInstance(config); } /** * Set the URL to be used for publish requests. If * HTTPS is specified as the procotol, it must be added * as a supported protocol. For Sun's SSL support, this can be done * with the following code fragment: *
         *    System.setProperty("java.protocol.handler.pkgs",
         *                       "com.sun.net.ssl.internal.www.protocol");
         *    java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
         * 
    * * @param url * @exception java.net.MalformedURLException * Thrown if HTTPS is not registered as a valid URL protocol. */ public void setPublishURL(String url) throws java.net.MalformedURLException { setPublishURL(new URL(url)); } /** * Set the URL to be used for publish requests. * * @param url Publish URL */ public void setPublishURL(URL url) { this.publishURL = url; //Keep the config up to date. if (publishURL != null) { config.setProperty(PUBLISH_URL_PROPERTY, url.toString()); } else { config.remove(PUBLISH_URL_PROPERTY); } //refresh the transport factory transportFactory = TransportFactory.newInstance(config); } /** * The find_binding method returns a bindingDetail message that contains * a bindingTemplates structure with zero or more bindingTemplate structures * matching the criteria specified in the argument list. * * @param findQualifiers * This collection of findQualifier elements can be used to alter the default * behavior of search functionality. * @param serviceKey Used to specify a particular instance of a businessService element * in the registered data. Only bindings in the specific businessService * data identified by the serviceKey passed will be searched. * @param tModelBag This is a list of tModel uuid_key values that represent the technical * fingerprint to locate in a bindingTemplate structure contained within * the businessService instance specified by the serviceKey value. If more * than one tModel key is specified in this structure, only bindingTemplate * information that exactly matches all of the tModel keys specified will * be returned (logical AND). The order of the keys in the tModelBag is * not relevant. All tModelKey values begin with a uuid URN qualifier * (e.g. "uuid:" followed by a known tModel UUID value. * @param maxRows This optional integer value allows the requesting program to limit * the number of results returned. * @return This function returns a bindingDetail message on success. In the event that no matches were * located for the specified criteria, the bindingDetail structure returned in the response the will be * empty (e.g. contain no bindingTemplate data.) * In the even of a large number of matches, an Operator Site may truncate the result set. If * this occurs, the response message will contain the truncated attribute with the value of this attribute * set to true. * Searching using tModelBag will also return any bindingTemplate information that matches due to * hostingRedirector references. The resolved bindingTemplate structure will be returned, even if that * bindingTemplate is owned by a different businessService structure. * @exception UDDIException * @exception TransportException */ public BindingDetail find_binding(FindQualifiers findQualifiers, String serviceKey, TModelBag tModelBag, int maxRows) throws UDDIException, TransportException { FindBinding request = new FindBinding(); request.setFindQualifiers(findQualifiers); request.setServiceKey(serviceKey); request.setTModelBag(tModelBag); if (maxRows > 0) request.setMaxRows(maxRows); return new BindingDetail(send(request, true)); } /** * Find business matching specified criteria. * * @param name Partial business name to match. Leftmost match. * @param findQualifiers * Optional findQualifiers. null indicates no find * qualifiers. * @param maxRows Maximum number of results. 0 indicates no maximum. * @return This function returns a businessList on success. In the event that no * matches were located for the specified criteria, a businessList * structure with zero businessInfo structures is returned. * @exception UDDIException * Contains a DispositionReport that indicates the * error number. * @exception TransportException * Thrown if non-UDDI related communication errors occur. * @deprecated This method has been deprecated. Use * {@link #find_business(Vector, DiscoveryURLs, IdentifierBag, CategoryBag, TModelBag, * FindQualifiers, int)} instead * */ public BusinessList find_business(String name, FindQualifiers findQualifiers, int maxRows) throws UDDIException, TransportException { Vector names = new Vector(); names.addElement(new Name(name)); return find_business(names, null, null, null, null, findQualifiers, maxRows); } /** * The find_business message returns a businessList message that matches * the conditions specified in the arguments. * * @param identifierBag * This is a list of business identifier references. The returned businessList * contains businessInfo structures matching any of the identifiers passed * (logical OR). * @param findQualifiers * can be used to alter the default behavior of search functionality. * @param maxRows allows the requesting program to limit the number of results returned. * @return This function returns a businessList on success. In the event that no * matches were located for the specified criteria, a businessList * structure with zero businessInfo structures is returned. * @exception UDDIException * @exception TransportException * @deprecated This method has been deprecated. Use * {@link #find_business(Vector, DiscoveryURLs, IdentifierBag, CategoryBag, TModelBag, * FindQualifiers, int)} instead */ public BusinessList find_business(IdentifierBag identifierBag, FindQualifiers findQualifiers, int maxRows) throws UDDIException, TransportException { return find_business(new Vector(), null, identifierBag, null, null, findQualifiers, maxRows); } /** * The find_business message returns a businessList message that matches * the conditions specified in the arguments. * * @param categoryBag * This is a list of category references. The returned businessList * contains businessInfo structures matching all of the categories * passed (logical AND). * @param findQualifiers * can be used to alter the default behavior of search functionality. * @param maxRows allows the requesting program to limit the number of results returned. * @return This function returns a businessList on success. In the event that no * matches were located for the specified criteria, a businessList * structure with zero businessInfo structures is returned. * @exception UDDIException * @exception TransportException * @deprecated This method has been deprecated. Use * {@link #find_business(Vector, DiscoveryURLs, IdentifierBag, CategoryBag, TModelBag, * FindQualifiers, int)} instead */ public BusinessList find_business(CategoryBag categoryBag, FindQualifiers findQualifiers, int maxRows) throws UDDIException, TransportException { return find_business(new Vector(), null, null, categoryBag, null, findQualifiers, maxRows); } /** * The find_business message returns a businessList message that matches * the conditions specified in the arguments. * * @param tModelBag * The registered businessEntity data contains bindingTemplates that in turn * contain specific tModel references. The tModelBag argument lets you * search for businesses that have bindings that are compatible with a * specific tModel pattern. The returned businessList contains businessInfo * structures that match all of the tModel keys passed (logical AND). * tModelKey values must be formatted as URN qualified UUID values * (e.g. prefixed with "uuid:") * @param findQualifiers * can be used to alter the default behavior of search functionality. * @param maxRows allows the requesting program to limit the number of results returned. * @return This function returns a businessList on success. In the event that no * matches were located for the specified criteria, a businessList * structure with zero businessInfo structures is returned. * @exception UDDIException * @exception TransportException * @deprecated This method has been deprecated.Use * {@link #find_business(Vector, DiscoveryURLs, IdentifierBag, CategoryBag, TModelBag, * FindQualifiers, int)} instead */ public BusinessList find_business(TModelBag tModelBag, FindQualifiers findQualifiers, int maxRows) throws UDDIException, TransportException { return find_business(new Vector(), null, null, null, tModelBag, findQualifiers, maxRows); } /** * The find_business message returns a businessList message that matches * the conditions specified in the arguments. * * @param discoveryURLs * This is a list of URL's to be matched against the data associated * with the discoveryURL's contents of registered businessEntity information. * To search for URL without regard to useType attribute values, pass * the useType component of the discoveryURL elements as empty attributes. * If useType values are included, then the match will be made only on * registered information that match both the useType and URL value. * The returned businessList contains businessInfo structures matching * any of the URL's passed (logical OR). * @param findQualifiers * can be used to alter the default behavior of search functionality. * @param maxRows allows the requesting program to limit the number of results returned. * @return This function returns a businessList on success. In the event that no * matches were located for the specified criteria, a businessList * structure with zero businessInfo structures is returned. * @exception UDDIException * @exception TransportException * @deprecated This method has been deprecated. Use * {@link #find_business(Vector, DiscoveryURLs, IdentifierBag, CategoryBag, TModelBag, * FindQualifiers, int)} instead */ public BusinessList find_business(DiscoveryURLs discoveryURLs, FindQualifiers findQualifiers, int maxRows) throws UDDIException, TransportException { return find_business(new Vector(), discoveryURLs, null, null, null, findQualifiers, maxRows); } /** * The find_business message returns a businessList message that matches * the conditions specified in the arguments. * * @param names vector of Name objects . * @param discoveryURLs * This is a list of URL's to be matched against the data associated * with the discoveryURL's contents of registered businessEntity information. * To search for URL without regard to useType attribute values, pass * the useType component of the discoveryURL elements as empty attributes. * If useType values are included, then the match will be made only on * registered information that match both the useType and URL value. * The returned businessList contains businessInfo structures matching * any of the URL's passed (logical OR). * @param identifierBag * This is a list of business identifier references. The returned businessList * contains businessInfo structures matching any of the identifiers passed * (logical OR). * @param categoryBag * This is a list of category references. The returned businessList * contains businessInfo structures matching all of the categories * passed (logical AND). * @param tModelBag The registered businessEntity data contains bindingTemplates that in turn * contain specific tModel references. The tModelBag argument lets you * search for businesses that have bindings that are compatible with a * specific tModel pattern. The returned businessList contains businessInfo * structures that match all of the tModel keys passed (logical AND). * tModelKey values must be formatted as URN qualified UUID values * (e.g. prefixed with "uuid:") * @param findQualifiers * can be used to alter the default behavior of search functionality. * @param maxRows allows the requesting program to limit the number of results returned. * @return This function returns a businessList on success. In the event that no * matches were located for the specified criteria, a businessList * structure with zero businessInfo structures is returned. * @exception UDDIException * @exception TransportException */ public BusinessList find_business(Vector names, DiscoveryURLs discoveryURLs, IdentifierBag identifierBag, CategoryBag categoryBag, TModelBag tModelBag, FindQualifiers findQualifiers, int maxRows) throws UDDIException, TransportException { FindBusiness request = new FindBusiness(); request.setNameVector(names); request.setDiscoveryURLs(discoveryURLs); request.setIdentifierBag(identifierBag); request.setCategoryBag(categoryBag); request.setTModelBag(tModelBag); request.setFindQualifiers(findQualifiers); if (maxRows > 0) request.setMaxRows(maxRows); return new BusinessList(send(request, true)); } /** * The find_relatedBusinesses API call is used to locate information about businessEntity * registrations that are related to a specific business entity whose key is passed in the * inquiry. The Related Businesses feature is used to manage registration of business units and * subsequently relate them based on organizational hierarchies or business partner relationships. * * This returns zero or more relatedBusinessInfo structures .For the businessEntity specified in the * the response reports complete business relationships with other businessEntity * registrations. Business relationships are complete between two businessEntity registrations when the * publishers controlling each of the businessEntity structures involved in the relationship set * assertions affirming that relationship. * * @param businessKey * This is used to specify a particular BusinessEntity instance. * @param keyedReference * This is a single, optional keyedReference element that is used to * specify that only businesses that are related to the focal point * in a specific way should be included in the results. * @param findQualifiers * Can be used to alter the default behavior of search functionality. * @return This function returns a RelatedBusinessesList on success. * @exception UDDIException * @exception TransportException * @deprecated UDDI version 2, errata 2 added maxrows as a parameter * to this method. Use * {@link #find_relatedBusinesses(String, KeyedReference, FindQualifiers, int)} instead */ public RelatedBusinessesList find_relatedBusinesses(String businessKey, KeyedReference keyedReference, FindQualifiers findQualifiers) throws UDDIException, TransportException { FindRelatedBusinesses request = new FindRelatedBusinesses(); request.setBusinessKey(businessKey); request.setKeyedReference(keyedReference); request.setFindQualifiers(findQualifiers); return new RelatedBusinessesList(send(request, true)); } /** * The find_relatedBusinesses API call is used to locate information about businessEntity * registrations that are related to a specific business entity whose key is passed in the * inquiry. The Related Businesses feature is used to manage registration of business units and * subsequently relate them based on organizational hierarchies or business partner relationships. * * This returns zero or more relatedBusinessInfo structures .For the businessEntity specified in the * the response reports complete business relationships with other businessEntity * registrations. Business relationships are complete between two businessEntity registrations when the * publishers controlling each of the businessEntity structures involved in the relationship set * assertions affirming that relationship. * * @param businessKey This is used to specify a particular BusinessEntity instance. * * @param keyedReference This is a single, optional keyedReference element that is used to * specify that only businesses that are related to the focal point * in a specific way should be included in the results. * @param findQualifiers * Can be used to alter the default behavior of search functionality. * @param maxRows allows the requesting program to limit the number of results returned. * @return This function returns a RelatedBusinessesList on success. * @exception UDDIException * @exception TransportException */ public RelatedBusinessesList find_relatedBusinesses(String businessKey, KeyedReference keyedReference, FindQualifiers findQualifiers, int maxRows) throws UDDIException, TransportException { FindRelatedBusinesses request = new FindRelatedBusinesses(); request.setBusinessKey(businessKey); request.setKeyedReference(keyedReference); request.setFindQualifiers(findQualifiers); if (maxRows > 0) request.setMaxRows(maxRows); return new RelatedBusinessesList(send(request, true)); } /** * This function returns a serviceList on success. In the event that no * matches were located for the specified criteria, the serviceList * structure returned will contain an empty businessServices structure. * * @param businessKey * used to specify a particular BusinessEntity instance. * @param name Represents a partial name. Any businessService data contained in * the specified businessEntity with a matching partial name value gets returned. * @param findQualifiers * Used to alter the default behavior of search functionality. * @param maxRows Allows the requesting program to limit the number of results returned. * A value of 0 indicates no limit. * @return This function returns a serviceList on success. In the event that no * matches were located for the specified criteria, the serviceList * structure returned will contain an empty businessServices structure. * @exception UDDIException * @exception TransportException * @deprecated This method has been deprecated. Use * {@link #find_service(String, Vector, CategoryBag, TModelBag, FindQualifiers, int)} instead * */ public ServiceList find_service(String businessKey, String name, FindQualifiers findQualifiers, int maxRows) throws UDDIException, TransportException { Vector names = new Vector(); names.addElement(new Name(name)); return find_service(businessKey, names, null, null, findQualifiers, maxRows); } /** * This function returns a serviceList on success. In the event that no * matches were located for the specified criteria, the serviceList * structure returned will contain an empty businessServices structure. * * @param businessKey * used to specify a particular BusinessEntity instance. * @param categoryBag * This is a list of category references. The returned serviceList contains * businessInfo structures matching all of the categories passed (logical AND). * @param findQualifiers * used to alter the default behavior of search functionality. * @param maxRows allows the requesting program to limit the number of results returned. * @return This function returns a serviceList on success. In the event that no * matches were located for the specified criteria, the serviceList * structure returned will contain an empty businessServices structure. * @exception UDDIException * @exception TransportException * @deprecated This method has been deprecated. Use * {@link #find_service(String, Vector, CategoryBag, TModelBag, FindQualifiers, int)} instead */ public ServiceList find_service(String businessKey, CategoryBag categoryBag, FindQualifiers findQualifiers, int maxRows) throws UDDIException, TransportException { return find_service(businessKey, new Vector(), categoryBag, null, findQualifiers, maxRows); } /** * This function returns a serviceList on success. In the event that no * matches were located for the specified criteria, the serviceList * structure returned will contain an empty businessServices structure. * * @param businessKey * This uuid_key is used to specify a particular BusinessEntity instance. * @param tModelBag * @param findQualifiers * used to alter the default behavior of search functionality. * @param maxRows allows the requesting program to limit the number of results returned. * @return This function returns a serviceList on success. In the event that no * matches were located for the specified criteria, the serviceList * structure returned will contain an empty businessServices structure. * @exception UDDIException * @exception TransportException * @deprecated This method has been deprecated. Use * {@link #find_service(String, Vector, CategoryBag, TModelBag, FindQualifiers, int)} instead */ public ServiceList find_service(String businessKey, TModelBag tModelBag, FindQualifiers findQualifiers, int maxRows) throws UDDIException, TransportException { return find_service(businessKey, new Vector(), null, tModelBag, findQualifiers, maxRows); } /** * This function returns a serviceList on success. In the event that no * matches were located for the specified criteria, the serviceList * structure returned will contain an empty businessServices structure. * * @param businessKey * This optional uuid_key is used to specify a particular * BusinessEntity instance. This argument may be used to * specify an existing businessEntity in the registry or * may be specified as null or "" (empty string) to indicate * that all businessEntities are to be searched. * @param names This optional Vector of Name objects represents one or more partial names qualified * with xml:lang attributes. Any businessService data contained in the specified * businessEntity with a matching partial name value gets returned. A wildcard character % * may be used to signify any number of any characters. Up to 5 name values may be * specified. If multiple name values are passed, the match occurs on a logical OR basis * within any names supplied (e.g. any match on name/language pairs will cause a * registered service to be included in the final result set). * @param categoryBag * : This is a list of category references. The returned serviceList contains * businessInfo structures matching all of the categories passed (logical AND by * default). * @param tModelBag * This is a list of tModel uuid_key values that represent the technical fingerprint of * a bindingTemplate structure to find. Version 2.0 defines a way to associate * businessService structures with more than one businessEntity. All bindingTemplate * structures within any businessService associated with the businessEntity specified by * the businessKey argument will be searched. If more than one tModel key is specified * in this structure, only businessService structures that contain bindingTemplate * structures with fingerprint information that matches all of the tModel keys specified * will be returned (logical AND only). * @param findQualifiers * used to alter the default behavior of search functionality. * @param maxRows allows the requesting program to limit the number of results returned. * @return This function returns a serviceList on success. In the event that no * matches were located for the specified criteria, the serviceList * structure returned will contain an empty businessServices structure. * @exception UDDIException * @exception TransportException */ public ServiceList find_service(String businessKey, Vector names, CategoryBag categoryBag, TModelBag tModelBag, FindQualifiers findQualifiers, int maxRows) throws UDDIException, TransportException { FindService request = new FindService(); request.setBusinessKey(businessKey); request.setNameVector(names); request.setCategoryBag(categoryBag); request.setTModelBag(tModelBag); request.setFindQualifiers(findQualifiers); if (maxRows > 0) request.setMaxRows(maxRows); return new ServiceList(send(request, true)); } /** * This find_tModel message is for locating a list of tModel entries * that match a set of specific criteria. The response will be a list * of abbreviated information about tModels that match the criteria (tModelList). * * @param name This string value represents a partial name. The returned tModelList * contains tModelInfo structures for businesses whose name matches the * value passed (leftmost match). * @param findQualifiers * used to alter the default behavior of search functionality. * @param maxRows allows the requesting program to limit the number of results returned. * @return This function returns a tModelList on success. In the event that no * matches were located for the specified criteria, an empty tModelList * object will be returned (e.g. will contain zero tModelInfo objects). * This signifies zero matches * @exception UDDIException * @exception TransportException * @deprecated This method has been deprecated. Use * {@link #find_tModel(String, CategoryBag, IdentifierBag, FindQualifiers, int)} instead */ public TModelList find_tModel(String name, FindQualifiers findQualifiers, int maxRows) throws UDDIException, TransportException { return find_tModel(name, null, null, findQualifiers, maxRows); } /** * This find_tModel message is for locating a list of tModel entries * that match a set of specific criteria. The response will be a list * of abbreviated information about tModels that match the criteria (tModelList). * * @param categoryBag * This is a list of category references. The returned tModelList contains * tModelInfo structures matching all of the categories passed (logical AND). * @param findQualifiers * used to alter the default behavior of search functionality. * @param maxRows allows the requesting program to limit the number of results returned. * @return This function returns a tModelList on success. In the event that no * matches were located for the specified criteria, an empty tModelList * object will be returned (e.g. will contain zero tModelInfo objects). * This signifies zero matches * @exception UDDIException * @exception TransportException * @deprecated This method has been deprecated. Use * {@link #find_tModel(String, CategoryBag, IdentifierBag, FindQualifiers, int)} instead */ public TModelList find_tModel(CategoryBag categoryBag, FindQualifiers findQualifiers, int maxRows) throws UDDIException, TransportException { return find_tModel(null, categoryBag, null, findQualifiers, maxRows); } /** * This find_tModel message is for locating a list of tModel entries * that match a set of specific criteria. The response will be a list * of abbreviated information about tModels that match the criteria (tModelList). * * @param identifierBag * This is a list of business identifier references. The returned tModelList * contains tModelInfo structures matching any of the identifiers * passed (logical OR). * @param findQualifiers * used to alter the default behavior of search functionality. * @param maxRows allows the requesting program to limit the number of results returned. * @return This function returns a tModelList on success. In the event that no * matches were located for the specified criteria, an empty tModelList * object will be returned (e.g. will contain zero tModelInfo objects). * This signifies zero matches. * @exception UDDIException * @exception TransportException * @deprecated This method has been deprecated. Use * {@link #find_tModel(String, CategoryBag, IdentifierBag, FindQualifiers, int)} instead */ public TModelList find_tModel(IdentifierBag identifierBag, FindQualifiers findQualifiers, int maxRows) throws UDDIException, TransportException { return find_tModel(null, null, identifierBag, findQualifiers, maxRows); } /** * This find_tModel message is for locating a list of tModel entries * that match a set of specific criteria. The response will be a list * of abbreviated information about tModels that match the criteria (tModelList). * * @param name This string value represents a partial name. Since tModel data only has a single name, * only a single name may be passed. A wildcard character % may be used to signify any * number of any characters. The returned tModelList contains tModelInfo elements for * tModels whose name matches the value passed (via lexical-order - i.e., leftmost in * left-to-right languages - partial match or wild card treatment). * * @param categoryBag * This is a list of category references. The returned tModelList contains tModelInfo * elements matching all of the categories passed (logical AND by default). FindQualifier * can be used to alter this logical AND behavior. * @param identifierBag * This is a list of business identifier references. The returned tModelList * contains tModelInfo structures matching any of the identifiers * passed (logical OR). * @param findQualifiers * used to alter the default behavior of search functionality. * @param maxRows allows the requesting program to limit the number of results returned. * @return This function returns a tModelList on success. In the event that no * matches were located for the specified criteria, an empty tModelList * object will be returned (e.g. will contain zero tModelInfo objects). * This signifies zero matches. * @exception UDDIException * @exception TransportException */ public TModelList find_tModel(String name, CategoryBag categoryBag, IdentifierBag identifierBag, FindQualifiers findQualifiers, int maxRows) throws UDDIException, TransportException { FindTModel request = new FindTModel(); request.setName(name); request.setCategoryBag(categoryBag); request.setIdentifierBag(identifierBag); request.setFindQualifiers(findQualifiers); if (maxRows > 0) request.setMaxRows(maxRows); return new TModelList(send(request, true)); } /** * The get_bindingDetail message is for requesting the run-time * bindingTemplate information location information for the purpose of * invoking a registered business API. * * @param bindingKey uuid_key string that represent specific instance * of known bindingTemplate data. * @return This function returns a bindingDetail message on successful match * @exception UDDIException * @exception TransportException */ public BindingDetail get_bindingDetail(String bindingKey) throws UDDIException, TransportException { GetBindingDetail request = new GetBindingDetail(); Vector keys = new Vector(); keys.addElement(bindingKey); request.setBindingKeyStrings(keys); return new BindingDetail(send(request, true)); } /** * The get_bindingDetail message is for requesting the run-time * bindingTemplate information location information for the purpose of * invoking a registered business API. * * @param bindingKeyStrings Vector of uuid_key strings that represent specific instances * of known bindingTemplate data. * @return This function returns a bindingDetail message on successful match of one * or more bindingKey values. If multiple bindingKey values were passed, the * results will be returned in the same order as the keys passed. * @exception UDDIException * @exception TransportException */ public BindingDetail get_bindingDetail(Vector bindingKeyStrings) throws UDDIException, TransportException { GetBindingDetail request = new GetBindingDetail(); request.setBindingKeyStrings(bindingKeyStrings); return new BindingDetail(send(request, true)); } /** * The get_businessDetail message returns complete businessEntity information * for one or more specified businessEntitys * * @param businessKey * A uuid_key string that represents a specific instance of known * businessEntity data. * @return This function returns a businessDetail object on successful match * of one or more businessKey values. If multiple businessKey values * were passed, the results will be returned in the same order as the * keys passed. * @exception UDDIException * @exception TransportException */ public BusinessDetail get_businessDetail(String businessKey) throws UDDIException, TransportException { GetBusinessDetail request = new GetBusinessDetail(); Vector keys = new Vector(); keys.addElement(businessKey); request.setBusinessKeyStrings(keys); return new BusinessDetail(send(request, true)); } /** * The get_businessDetail message returns complete businessEntity information * for one or more specified businessEntitys * * @param businessKeyStrings * Vector of uuid_key strings that represent specific instances of known * businessEntity data. * @return This function returns a businessDetail message on successful match * of one or more businessKey values. If multiple businessKey values * were passed, the results will be returned in the same order as the * keys passed. * @exception UDDIException * @exception TransportException */ public BusinessDetail get_businessDetail(Vector businessKeyStrings) throws UDDIException, TransportException { GetBusinessDetail request = new GetBusinessDetail(); request.setBusinessKeyStrings(businessKeyStrings); return new BusinessDetail(send(request, true)); } /** * The get_businessDetailExt message returns extended businessEntity * information for one or more specified businessEntitys. This * message returns exactly the same information as the get_businessDetail * message, but may contain additional attributes if the source is * an external registry (not an Operator Site) that is compatible * with this API specification. * * @param businessKey * A uuid_key string that represents a specific instance of known * businessEntity data. * @return This function returns a businessDetailExt message on successful match * of one or more businessKey values. If multiple businessKey values * were passed, the results will be returned in the same order as the * keys passed. * @exception UDDIException * @exception TransportException */ public BusinessDetailExt get_businessDetailExt(String businessKey) throws UDDIException, TransportException { GetBusinessDetailExt request = new GetBusinessDetailExt(); Vector keys = new Vector(); keys.addElement(businessKey); request.setBusinessKeyStrings(keys); return new BusinessDetailExt(send(request, true)); } /** * The get_businessDetailExt message returns extended businessEntity * information for one or more specified businessEntitys. This * message returns exactly the same information as the get_businessDetail * message, but may contain additional attributes if the source is * an external registry (not an Operator Site) that is compatible * with this API specification. * * @param businessKeyStrings * Vector of uuid_key strings that represent specific instances of known * businessEntity data. * @return This function returns a businessDetailExt message on successful match * of one or more businessKey values. If multiple businessKey values * were passed, the results will be returned in the same order as the * keys passed. * @exception UDDIException * @exception TransportException */ public BusinessDetailExt get_businessDetailExt(Vector businessKeyStrings) throws UDDIException, TransportException { GetBusinessDetailExt request = new GetBusinessDetailExt(); request.setBusinessKeyStrings(businessKeyStrings); return new BusinessDetailExt(send(request, true)); } /** * The get_serviceDetail message is used to request full information * about a known businessService structure. * * @param serviceKey A uuid_key string that represents a specific instance of * known businessService data. * @return This function returns a serviceDetail message on successful match * of one or more serviceKey values. If multiple serviceKey values * were passed, the results will be returned in the same order as the * keys passed. * @exception UDDIException * @exception TransportException */ public ServiceDetail get_serviceDetail(String serviceKey) throws UDDIException, TransportException { GetServiceDetail request = new GetServiceDetail(); Vector keys = new Vector(); keys.addElement(serviceKey); request.setServiceKeyStrings(keys); return new ServiceDetail(send(request, true)); } /** * The get_serviceDetail message is used to request full information * about a known businessService structure. * * @param serviceKeyStrings * A vector of uuid_key strings that represent specific instances of * known businessService data. * @return This function returns a serviceDetail message on successful match * of one or more serviceKey values. If multiple serviceKey values * were passed, the results will be returned in the same order as the * keys passed. * @exception UDDIException * @exception TransportException */ public ServiceDetail get_serviceDetail(Vector serviceKeyStrings) throws UDDIException, TransportException { GetServiceDetail request = new GetServiceDetail(); request.setServiceKeyStrings(serviceKeyStrings); return new ServiceDetail(send(request, true)); } /** * The get_tModelDetail message is used to request full information * about a known tModel structure. * * @param tModelKey A URN qualified uuid_key string that represent a specific * instance of known tModel data. All tModelKey values begin with a * uuid URN qualifier (e.g. "uuid:" followed by a known tModel UUID value.) * @return This function returns a tModelDetail message on successful match * of one or more tModelKey values. If multiple tModelKey values * were passed, the results will be returned in the same order as * the keys passed. * @exception UDDIException * @exception TransportException */ public TModelDetail get_tModelDetail(String tModelKey) throws UDDIException, TransportException { GetTModelDetail request = new GetTModelDetail(); Vector keys = new Vector(); keys.addElement(tModelKey); request.setTModelKeyStrings(keys); return new TModelDetail(send(request, true)); } /** * The get_tModelDetail message is used to request full information * about a known tModel structure. * * @param tModelKeyStrings * A Vector of URN qualified uuid_key strings that represent specific * instances of known tModel data. All tModelKey values begin with a * uuid URN qualifier (e.g. "uuid:" followed by a known tModel UUID value.) * @return This function returns a tModelDetail message on successful match * of one or more tModelKey values. If multiple tModelKey values * were passed, the results will be returned in the same order as * the keys passed. * @exception UDDIException * @exception TransportException */ public TModelDetail get_tModelDetail(Vector tModelKeyStrings) throws UDDIException, TransportException { GetTModelDetail request = new GetTModelDetail(); request.setTModelKeyStrings(tModelKeyStrings); return new TModelDetail(send(request, true)); } /** * The add_publisherAssertions message is used to add relationship assertions to the * existing set of assertions. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @param publisherAssertion Contains a relationship assertion. * @return This function returns a DispositionReport with a single success indicator. * @exception UDDIException * @exception TransportException */ public DispositionReport add_publisherAssertions(String authInfo, PublisherAssertion publisherAssertion) throws UDDIException, TransportException { Vector pubVector = new Vector(); pubVector.addElement(publisherAssertion); return add_publisherAssertions(authInfo, pubVector); } /** * The add_publisherAssertions message is used to add relationship assertions to the * existing set of assertions. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @param publisherAssertion Vector of publisherAssertion object. Each publisherAssertion * contains a relationship assertion. * @return This function returns a DispositionReport with a single success indicator. * @exception UDDIException * @exception TransportException */ public DispositionReport add_publisherAssertions(String authInfo, Vector publisherAssertion) throws UDDIException, TransportException { AddPublisherAssertions request = new AddPublisherAssertions(); request.setAuthInfo(authInfo); request.setPublisherAssertionVector(publisherAssertion); return new DispositionReport(send(request, false)); } /** * The get_assertionStatusReport message is used to request a status * report containing publisher assertions and status information. This contains * all complete and incomplete assertions and serves an administrative use including * the determination if there are any outstanding, incomplete assertions about relationships * involving businesses the publisher account is associated with. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @param completionStatus This argument (String) lets the publisher restrict the result set * to only those relationships that have the status value specified. * @return Upon successful completion, an assertionStatusReport message is returned * containing assertion status information. * @exception UDDIException * @exception TransportException */ public AssertionStatusReport get_assertionStatusReport(String authInfo, String completionStatus) throws UDDIException, TransportException { return get_assertionStatusReport(authInfo, new CompletionStatus(completionStatus)); } /** * The get_assertionStatusReport message is used to request a status * report containing publisher assertions and status information. This contains * all complete and incomplete assertions and serves an administrative use including * the determination if there are any outstanding, incomplete assertions about relationships * involving businesses the publisher account is associated with. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @param completionStatus This argument lets the publisher restrict the result set to * only those relationships that have the status value specified. * @return Upon successful completion, an assertionStatusReport message is returned * containing assertion status information. * @exception UDDIException * @exception TransportException */ public AssertionStatusReport get_assertionStatusReport(String authInfo, CompletionStatus completionStatus) throws UDDIException, TransportException { GetAssertionStatusReport request = new GetAssertionStatusReport(); request.setAuthInfo(authInfo); request.setCompletionStatus(completionStatus); return new AssertionStatusReport(send(request, false)); } /** * The get_publisherAssertions message is used to get a list of active * publisher assertions that are controlled by an individual publisher account. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @return This function returns a PublisherAssertions message that contains a * publisherAssertion element for each publisher assertion registered by the * publisher account associated with the authentication information. * @exception UDDIException * @exception TransportException */ public PublisherAssertions get_publisherAssertions(String authInfo) throws UDDIException, TransportException { GetPublisherAssertions request = new GetPublisherAssertions(); request.setAuthInfo(authInfo); return new PublisherAssertions(send(request, false)); } /** * The delete_binding message causes one or more bindingTemplate to be deleted. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @param bindingKey A uuid_key value that represents a specific instance of * known bindingTemplate data. * @return Upon successful completion, a dispositionReport is returned with a * single success indicator. * @exception UDDIException * @exception TransportException */ public DispositionReport delete_binding(String authInfo, String bindingKey) throws UDDIException, TransportException { DeleteBinding request = new DeleteBinding(); request.setAuthInfo(authInfo); Vector keys = new Vector(); keys.addElement(bindingKey); request.setBindingKeyStrings(keys); return new DispositionReport(send(request, false)); } /** * The delete_binding message causes one or more bindingTemplate to be deleted. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @param bindingKeyStrings * A vector of uuid_key strings that represents specific instances of * known bindingTemplate data. * @return Upon successful completion, a dispositionReport is returned with a * single success indicator * @exception UDDIException * @exception TransportException */ public DispositionReport delete_binding(String authInfo, Vector bindingKeyStrings) throws UDDIException, TransportException { DeleteBinding request = new DeleteBinding(); request.setAuthInfo(authInfo); request.setBindingKeyStrings(bindingKeyStrings); return new DispositionReport(send(request, false)); } /** * The delete_business message is used to remove one or more * businessEntity structures. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @param businessKey * Uuid_key string that represents specific instance of known * businessEntity data. * @return Upon successful completion, a dispositionReport is returned with a * single success indicator * @exception UDDIException * @exception TransportException */ public DispositionReport delete_business(String authInfo, String businessKey) throws UDDIException, TransportException { DeleteBusiness request = new DeleteBusiness(); request.setAuthInfo(authInfo); Vector keys = new Vector(); keys.addElement(businessKey); request.setBusinessKeyStrings(keys); return new DispositionReport(send(request, false)); } /** * The delete_business message is used to remove one or more * businessEntity structures. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @param businessKeyStrings * Vector of uuid_key strings that represent specific instances of known * businessEntity data. * @return Upon successful completion, a dispositionReport is returned with a * single success indicator * @exception UDDIException * @exception TransportException */ public DispositionReport delete_business(String authInfo, Vector businessKeyStrings) throws UDDIException, TransportException { DeleteBusiness request = new DeleteBusiness(); request.setAuthInfo(authInfo); request.setBusinessKeyStrings(businessKeyStrings); return new DispositionReport(send(request, false)); } /** * The delete_service message is used to remove one or more * businessService structures. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @param serviceKey uuid_key string that represents specific instance of known * businessService data. * @return Upon successful completion, a dispositionReport is returned with a * single success indicator * @exception UDDIException * @exception TransportException */ public DispositionReport delete_service(String authInfo, String serviceKey) throws UDDIException, TransportException { DeleteService request = new DeleteService(); request.setAuthInfo(authInfo); Vector keys = new Vector(); keys.addElement(serviceKey); request.setServiceKeyStrings(keys); return new DispositionReport(send(request, false)); } /** * The delete_service message is used to remove one or more * businessService structures. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @param serviceKeyStrings * Vector of uuid_key strings that represent specific instances of known * businessService data. * @return Upon successful completion, a dispositionReport is returned with a * single success indicator * @exception UDDIException * @exception TransportException */ public DispositionReport delete_service(String authInfo, Vector serviceKeyStrings) throws UDDIException, TransportException { DeleteService request = new DeleteService(); request.setAuthInfo(authInfo); request.setServiceKeyStrings(serviceKeyStrings); return new DispositionReport(send(request, false)); } /** * The delete_tModel message is used to remove or retire one or more * tModel structures. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @param tModelKey uuid_key string that represents specific instance of known * tModel data. * @return Upon successful completion, a dispositionReport is returned with a * single success indicator * @exception UDDIException * @exception TransportException */ public DispositionReport delete_tModel(String authInfo, String tModelKey) throws UDDIException, TransportException { DeleteTModel request = new DeleteTModel(); request.setAuthInfo(authInfo); Vector keys = new Vector(); keys.addElement(tModelKey); request.setTModelKeyStrings(keys); return new DispositionReport(send(request, false)); } /** * The delete_tModel message is used to remove or retire one or more * tModel structures. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @param tModelKeyStrings * Vector of uuid_key strings that represent specific instances of known * tModel data. * @return Upon successful completion, a dispositionReport is returned with a * single success indicator * @exception UDDIException * @exception TransportException */ public DispositionReport delete_tModel(String authInfo, Vector tModelKeyStrings) throws UDDIException, TransportException { DeleteTModel request = new DeleteTModel(); request.setAuthInfo(authInfo); request.setTModelKeyStrings(tModelKeyStrings); return new DispositionReport(send(request, false)); } /** * The delete_publisherAssertions message is used to delete specific publisher assertions * from the assertion collection controlled by a particular publisher account. Deleting assertions from * the assertion collection will affect the visibility of business relationships. Deleting an assertion * will cause any relationships based on that assertion to be invalidated. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @param publisherAssertion Contains a relationship assertion. * * @return Upon successful completion, a dispositionReport is returned with a * single success indicator * @exception UDDIException * @exception TransportException */ public DispositionReport delete_publisherAssertions(String authInfo, PublisherAssertion publisherAssertion) throws UDDIException, TransportException { Vector pubVector = new Vector(); pubVector.addElement(publisherAssertion); return delete_publisherAssertions(authInfo, pubVector); } /** * The delete_publisherAssertions message is used to delete specific publisher assertions * from the assertion collection controlled by a particular publisher account. Deleting assertions from * the assertion collection will affect the visibility of business relationships. Deleting an assertion * will cause any relationships based on that assertion to be invalidated. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @param publisherAssertion Is a vector of publisherAssertion values. Each publisherAssertion * contains a relationship assertion. * @return Upon successful completion, a dispositionReport is returned with a * single success indicator * @exception UDDIException * @exception TransportException */ public DispositionReport delete_publisherAssertions(String authInfo, Vector publisherAssertion) throws UDDIException, TransportException { DeletePublisherAssertions request = new DeletePublisherAssertions(); request.setAuthInfo(authInfo); request.setPublisherAssertionVector(publisherAssertion); return new DispositionReport(send(request, false)); } /** * The discard_authToken message is used to inform an Operator Site that the * authentication token can be discarded. Subsequent calls that use the * same authToken may be rejected. This message is optional for Operator * Sites that do not manage session state or that do not support the * get_authToken message. * * @param authInfo Contains an String authentication token. Authentication tokens are obtained * using the get_authToken method. * @return Upon successful completion, a dispositionReport is returned with a * single success indicator. Discarding an expired authToken will be * processed and reported as a success condition. * @exception UDDIException * @exception TransportException */ public DispositionReport discard_authToken(String authInfo) throws UDDIException, TransportException { DiscardAuthToken request = new DiscardAuthToken(); request.setAuthInfo(authInfo); return new DispositionReport(send(request, false)); } /** * The discard_authToken message is used to inform an Operator Site that the * authentication token can be discarded. Subsequent calls that use the * same authToken may be rejected. This message is optional for Operator * Sites that do not manage session state or that do not support the * get_authToken message. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @return Upon successful completion, a dispositionReport is returned with a * single success indicator. Discarding an expired authToken will be * processed and reported as a success condition. * @exception UDDIException * @exception TransportException */ public DispositionReport discard_authToken(AuthInfo authInfo) throws UDDIException, TransportException { DiscardAuthToken request = new DiscardAuthToken(); request.setAuthInfo(authInfo); return new DispositionReport(send(request, false)); } /** * The get_authToken message is used to obtain an authentication token. * Authentication tokens are opaque values that are required for all * other publisher API calls. This message is not required for Operator * Sites that have an external mechanism defined for users to get an * authentication token. This API is provided for implementations that * do not have some other method of obtaining an authentication token or * certificate, or that choose to use userID and Password based authentication. * * @param userid user that an individual authorized user was assigned by an Operator Site. * Operator Sites will each provide a way for individuals to obtain a UserID * and password that will be valid only at the given Operator Site. * @param cred password or credential that is associated with the user. * @return This function returns an authToken object that contains a valid * authInfo object that can be used in subsequent calls to publisher * API calls that require an authInfo value. * @exception UDDIException * @exception TransportException */ public AuthToken get_authToken(String userid, String cred) throws UDDIException, TransportException { GetAuthToken request = new GetAuthToken(); request.setUserID(userid); request.setCred(cred); return new AuthToken(send(request, false)); } /** * The get_registeredInfo message is used to get an abbreviated list * of all businessEntity keys and tModel keys that are controlled by * the individual associated the credentials passed. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken API call. * @return Upon successful completion, a registeredInfo object will be returned, * listing abbreviated business information in one or more businessInfo * objects, and tModel information in one or more tModelInfo objects. * This API is useful for determining the full extent of registered * information controlled by a single user in a single call. * @exception UDDIException * @exception TransportException */ public RegisteredInfo get_registeredInfo(String authInfo) throws UDDIException, TransportException { GetRegisteredInfo request = new GetRegisteredInfo(); request.setAuthInfo(authInfo); return new RegisteredInfo(send(request, false)); } /** * The save_binding message is used to save or update a complete * bindingTemplate structure. This message can be used to add or * update one or more bindingTemplate structures to one or more existing * businessService structures. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @param bindingTemplates * Vector of bindingTemplate objects. The order in which these are * processed is not defined. To save a new bindingTemplate, pass a * bindingTemplate object with an empty bindingKey attribute value. * @return This API returns a bindingDetail object containing the final results * of the call that reflects the newly registered information for the * effected bindingTemplate objects. * @exception UDDIException * @exception TransportException */ public BindingDetail save_binding(String authInfo, Vector bindingTemplates) throws UDDIException, TransportException { SaveBinding request = new SaveBinding(); request.setAuthInfo(authInfo); request.setBindingTemplateVector(bindingTemplates); return new BindingDetail(send(request, false)); } /** * The save_business message is used to save or update information about a * complete businessEntity structure. This API has the broadest scope of * all of the save_x API calls in the publisher API, and can be used to make * sweeping changes to the published information for one or more * businessEntity structures controlled by an individual. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @param businessEntities * Vector of businessEntity objects. These objects can be obtained in advance * by using the get_businessDetail API call or by any other means. * @return This API returns a businessDetail message containing the final results * of the call that reflects the new registered information for the * businessEntity information provided. * @exception UDDIException * @exception TransportException */ public BusinessDetail save_business(String authInfo, Vector businessEntities) throws UDDIException, TransportException { SaveBusiness request = new SaveBusiness(); request.setAuthInfo(authInfo); request.setBusinessEntityVector(businessEntities); return new BusinessDetail(send(request, false)); } /** * The save_business message is used to save or update information about a * complete businessEntity structure. This API has the broadest scope of * all of the save_x API calls in the publisher API, and can be used to make * sweeping changes to the published information for one or more * businessEntity structures controlled by an individual. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @param uploadRegisters * Vector of UpLoadRegister objects which contain resolvable HTTP URL * addresses that each point to a single and valid businessEntity * or businessEntityExt structure. This allows a registry to be updated * to reflect the contents of an XML document that is URL addressable. * The URL must return a pure XML document that only contains a * businessEntity structure as its top-level element, and be accessible * using the standard HTTP-GET protocol. * @return This API returns a businessDetail message containing the final results * of the call that reflects the new registered information for the * businessEntity information provided. * @exception UDDIException * @exception TransportException * @deprecated This method has been deprecated. Use * {@link #save_business(String, Vector)} instead */ public BusinessDetail save_business(String authInfo, UploadRegister[] uploadRegisters) throws UDDIException, TransportException { SaveBusiness request = new SaveBusiness(); Vector keys = new Vector(Arrays.asList(uploadRegisters)); request.setAuthInfo(authInfo); request.setUploadRegisterVector(keys); return new BusinessDetail(send(request, false)); } /** * The save_service message adds or updates one or more businessService * structures. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @param businessServices * Vector of businessService objects. These objects can be obtained in * advance by using the get_serviceDetail API call or by any other means. * @return This API returns a serviceDetail object containing the final results * of the call that reflects the newly registered information for the * effected businessService structures. * @exception UDDIException * @exception TransportException */ public ServiceDetail save_service(String authInfo, Vector businessServices) throws UDDIException, TransportException { SaveService request = new SaveService(); request.setAuthInfo(authInfo); request.setBusinessServiceVector(businessServices); return new ServiceDetail(send(request, false)); } /** * The save_tModel message adds or updates one or more tModel structures. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @param tModels Vector of complete tModel structures. If adding a new tModel, * the tModelKey value should be passed as an empty element. * @return This API returns a tModelDetail message containing the final results * of the call that reflects the new registered information for the * effected tModel structures * @exception UDDIException * @exception TransportException */ public TModelDetail save_tModel(String authInfo, Vector tModels) throws UDDIException, TransportException { SaveTModel request = new SaveTModel(); request.setAuthInfo(authInfo); request.setTModelVector(tModels); return new TModelDetail(send(request, false)); } /** * The save_tModel message adds or updates one or more tModel structures. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @param uploadRegisters * Vector of UploadRegister objects that contain resolvable HTTP URL * addresses that each point to a single and valid tModel structure. * This allows a registry to be updated to reflect the contents of * an XML document that is URL addressable. The URL must return a * pure XML document that only contains a tModel structure as its * top-level element, and be accessible using the standard HTTP-GET protocol. * @return This API returns a tModelDetail message containing the final results * of the call that reflects the new registered information for the * effected tModel structures * @exception UDDIException * @exception TransportException * @deprecated This method has been deprecated. Use * {@link #save_tModel(String, Vector)} instead */ public TModelDetail save_tModel(String authInfo, UploadRegister[] uploadRegisters) throws UDDIException, TransportException { SaveTModel request = new SaveTModel(); request.setAuthInfo(authInfo); Vector keys = new Vector(Arrays.asList(uploadRegisters)); request.setUploadRegisterVector(keys); return new TModelDetail(send(request, false)); } /** * The set_publisherAssertions message is used to save the complete set of publisher * assertions for an individual publisher account. When this message is processed, the publisher * assertions that are active prior to this API call for a given publisher account are examined by the * UDDI registry. Any new assertions not present prior to the call are added to the assertions attributed * to the publisher. As a result, new relationships may be activated (e.g. determined to have a completed * status), and existing relationships may be deactivated. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @param pub Contains a relationship assertion. * @return Upon successful completion, a publisherAssertions message is returned containing * all of the relationship assertions currently attributed to the publisher account * that is associated with the authInfo data passed. * @exception UDDIException * @exception TransportException */ public PublisherAssertions set_publisherAssertions(String authInfo, PublisherAssertion pub) throws UDDIException, TransportException { Vector pubVector = new Vector(); pubVector.addElement(pub); return set_publisherAssertions(authInfo, pubVector); } /** * The set_publisherAssertions message is used to save the complete set of publisher * assertions for an individual publisher account. When this message is processed, the publisher * assertions that are active prior to this API call for a given publisher account are examined by the * UDDI registry. Any new assertions not present prior to the call are added to the assertions attributed * to the publisher. As a result, new relationships may be activated (e.g. determined to have a completed * status), and existing relationships may be deactivated. * * @param authInfo Contains an authentication token. Authentication tokens are obtained * using the get_authToken method. * @param publisherAssertion Is a vector of publisherAssertion object. Each publisherAssertion * contains a relationship assertion. * @return Upon successful completion, a publisherAssertions message is returned containing * all of the relationship assertions currently attributed to the publisher account * that is associated with the authInfo data passed. * @exception UDDIException * @exception TransportException */ public PublisherAssertions set_publisherAssertions(String authInfo, Vector publisherAssertion) throws UDDIException, TransportException { SetPublisherAssertions request = new SetPublisherAssertions(); request.setAuthInfo(authInfo); request.setPublisherAssertionVector(publisherAssertion); return new PublisherAssertions(send(request, false)); } /** * A UDDI operator sends the validate_values message to the appropriate external service, whenever a * publisher saves data that uses a categorization value or identifier whose use is regulated by the * external party who controls that service. The normal use is to verify that specific categories or * identifiers (checking the keyValue attribute values supplied) exist within the given taxonomy or * identifier system * * @param businessEntity * The vector of businessEntity structure being validated. * @return Upon successful completion, a dispositionReport is returned with a * single success indicator. * @exception UDDIException * @exception TransportException */ public DispositionReport validate_values_businessEntity(Vector businessEntity) throws UDDIException, TransportException { ValidateValues request = new ValidateValues(); request.setBusinessEntityVector(businessEntity); return new DispositionReport(send(request, true)); } /** * A UDDI operator sends the validate_values message to the appropriate external service, whenever a * publisher saves data that uses a categorization value or identifier whose use is regulated by the * external party who controls that service. The normal use is to verify that specific categories or * identifiers (checking the keyValue attribute values supplied) exist within the given taxonomy or * identifier system * * @param businessService * The vector of business service structure being validated. * @return Upon successful completion, a dispositionReport is returned with a * single success indicator. * @exception UDDIException * @exception TransportException */ public DispositionReport validate_values_businessService(Vector businessService) throws UDDIException, TransportException { ValidateValues request = new ValidateValues(); request.setBusinessServiceVector(businessService); return new DispositionReport(send(request, true)); } /** * A UDDI operator sends the validate_values message to the appropriate external service, whenever a * publisher saves data that uses a categorization value or identifier whose use is regulated by the * external party who controls that service. The normal use is to verify that specific categories or * identifiers (checking the keyValue attribute values supplied) exist within the given taxonomy or * identifier system * * @param tModel The vector of tModel structure being validated. * @return Upon successful completion, a dispositionReport is returned with a * single success indicator. * @exception UDDIException * @exception TransportException */ public DispositionReport validate_values_tModel(Vector tModel) throws UDDIException, TransportException { ValidateValues request = new ValidateValues(); request.setTModelVector(tModel); return new DispositionReport(send(request, true)); } /** * Sends a UDDIElement to either the inquiry or publish URL. * * @param el * @param inquiry * @return An element representing a XML DOM tree containing the UDDI response. * @exception TransportException */ public Element send(UDDIElement el, boolean inquiry) throws TransportException { Element result = null; if (inquiry) { result = transportFactory.getTransport().send(el, inquiryURL); } else { result = transportFactory.getTransport().send(el, publishURL); } return result; } /** * Sends an XML DOM tree indentified by the given element to either the * inquiry or publish URL. Can be used to send an manually constructed * message to the UDDI registry. * * @param el * @param inquiry * @return An element representing a XML DOM tree containing the UDDI response. * @exception TransportException */ public Element send(Element el, boolean inquiry) throws TransportException { Element result = null; if (inquiry) { result = transportFactory.getTransport().send(el, inquiryURL); } else { result = transportFactory.getTransport().send(el, publishURL); } return result; } }uddi4j-2.0.5/src/org/uddi4j/datatype/000077500000000000000000000000001173667134000172655ustar00rootroot00000000000000uddi4j-2.0.5/src/org/uddi4j/datatype/Description.java000066400000000000000000000104771173667134000224240ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.datatype; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the description element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *
      *
    • Constructor passing required fields. *
    • Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • SaveToXML method. Serializes this class within a passed in element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from methods in the UDDIProxy class. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ravi Trivedi (ravi_trivedi@hp.com) */ public class Description extends UDDIElement { public static final String UDDI_TAG = "description"; protected Element base = null; String text = null; String lang = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public Description() { } /** * Construct the object with required fields. * * @param value String value */ public Description(String value) { setText(value); } /** * Construct the object with required fields. * * @param value String value * @param lang String Language used for the name. Possible values defined * in ISO3166. */ public Description(String value, String lang) { setText(value); setLang(lang); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * @exception UDDIException Thrown if DOM tree contains a SOAP fault or * disposition report indicating a UDDI error. */ public Description(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); text = getText(base); lang = base.getAttribute("xml:lang"); } public void setText(String s) { text = s; } /** * Set the language identifier for this string element. * Possible values are defined in ISO3166. * * @param s Language string. */ public void setLang(String s) { lang = s; } public String getText() { return text; } public String getLang() { return lang; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (text != null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } if ((lang != null) && !(lang.equals(""))) { base.setAttribute("xml:lang", lang); } parent.appendChild(base); } public boolean equals(Object object) { boolean result = false; if (object != null && object instanceof Description) { Description otherDescription = (Description) object; if ((this.text == null && otherDescription.text == null) || (this.text != null && this.text.equals(otherDescription.text))) { //text matches if ((this.lang == null && otherDescription.lang == null) || (this.lang != null && this.lang.equals(otherDescription.lang))) { //lang matches as well - objects are equal result = true; } //else lang does not match - result is false. } //else text does not match - result is false. } return result; } } uddi4j-2.0.5/src/org/uddi4j/datatype/Name.java000066400000000000000000000104231173667134000210100ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.datatype; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the name element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *
      *
    • Constructor passing required fields. *
    • Constructor that will instantiate the object from an appropriate * XML DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided, for sets of attributes. *
    • SaveToXML method. Serializes this class within a passed in element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ravi Trivedi (ravi_trivedi@hp.com) */ public class Name extends UDDIElement { public static final String UDDI_TAG = "name"; protected Element base = null; String text = null; String lang = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public Name() { } /** * Construct the object with required fields. * * @param value String value */ public Name(String value) { setText(value); } /** * Construct the object with required fields. * @param lang String Language used for the name. Possible values defined * in ISO3166. * @param value String value */ public Name(String value, String lang){ setText(value); setLang(lang); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * @exception UDDIException Thrown if DOM tree contains a SOAP fault or * disposition report indicating a UDDI error. */ public Name(Element base) throws UDDIException { // Checks for a fault. Throws an exception if it is. super(base); text = getText(base); lang = getAttr(base,"xml:lang"); } private String getAttr(Element base, String attrname) { //XML:LANG is special cased in the serializer of this class // to not write itself if its value is an empty string. // //This allows this function in this class to avoid namespace issues //when checking if the xml:lang attribute is declared. //if(base.getAttributeNode(attrname)!=null && base.getAttributeNode(attrname).getSpecified() ) //{ return base.getAttribute(attrname); //} //return null; } public void setText(String s) { text = s; } /** * Set the language identifier for this string element. * Possible values defined in ISO3166. * * @param s Language string. */ public void setLang(String s) { lang = s; } public String getText() { return text; } public String getLang() { return lang; } /** * Save object to DOM tree. Used to serialize object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (text!=null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } if ((lang !=null) && !(lang.equals("")) ) { base.setAttribute("xml:lang", lang); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/datatype/OverviewDoc.java000066400000000000000000000133561173667134000223740ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.datatype; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the overviewDoc element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *
      *
    • Constructor passing the required fields. *
    • Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • For sets of attributes, a get/setVector method is provided. *
    • SaveToXML method. Serializes this class within a passed in element. *
    * * Typically this class is used to construct parameters for, or interpret * responses from methods in the UDDIProxy class. * *

    Element description: *

    Support element - used to contain an on-line description and a * URL pointer to additional in-depth or external documentation. * * * @author David Melgar (dmelgar@us.ibm.com) */ public class OverviewDoc extends UDDIElement { public static final String UDDI_TAG = "overviewDoc"; protected Element base = null; OverviewURL overviewURL = null; // Vector of Description objects Vector description = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public OverviewDoc() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault or * disposition report indicating a UDDI error. */ public OverviewDoc(Element base) throws UDDIException { // Check if it is a fault. Throw exception if it is a fault. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, OverviewURL.UDDI_TAG); if (nl.getLength() > 0) { overviewURL = new OverviewURL((Element)nl.item(0)); } nl = getChildElementsByTagName(base, Description.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { description.addElement(new Description((Element)nl.item(i))); } } public void setOverviewURL(OverviewURL s) { overviewURL = s; } public void setOverviewURL(String s) { overviewURL = new OverviewURL(); overviewURL.setText(s); } /** * Set a description vector. * * @param s Vector of Description objects. */ public void setDescriptionVector(Vector s) { description = s; } /** * Set default (english) description string. * * @param s String */ public void setDefaultDescriptionString(String s) { if (description.size() > 0) { description.setElementAt(new Description(s), 0); } else { description.addElement(new Description(s)); } } public OverviewURL getOverviewURL() { return overviewURL; } public String getOverviewURLString() { if (overviewURL != null) { return overviewURL.getText(); } else { return null; } } /** * Get description. * * @return s Vector of Description objects. */ public Vector getDescriptionVector() { return description; } /** * Get default description string. * * @return s String */ public String getDefaultDescriptionString() { if ((description).size() > 0) { Description t = (Description)description.elementAt(0); return t.getText(); } else { return null; } } /** * Save the object to a DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (description!=null) { for (int i=0; i < description.size(); i++) { ((Description)(description.elementAt(i))).saveToXML(base); } } if (overviewURL!=null) { overviewURL.saveToXML(base); } parent.appendChild(base); } public boolean equals(Object object) { boolean result = false; if (object != null && object instanceof OverviewDoc) { OverviewDoc otherOverviewDoc = (OverviewDoc)object; if ((this.description == null && otherOverviewDoc.description == null) || (this.description != null && this.description.equals(otherOverviewDoc.description))) { //description matches if ((this.overviewURL == null && otherOverviewDoc.overviewURL == null) || (this.overviewURL != null && this.overviewURL.equals(otherOverviewDoc.overviewURL))) { //overviewURL matches as well. result = true; } //else overviewURL does not match - result it false. } //else description does not match - result is false. } return result; } } uddi4j-2.0.5/src/org/uddi4j/datatype/OverviewURL.java000066400000000000000000000064421173667134000223270ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.datatype; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the overviewURL element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • Constructor passing the required fields. *
    • Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • For sets of attributes, a get/setVector method is provided. *
    • SaveToXML method. Serializes this class within a passed in element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * * * @author David Melgar (dmelgar@us.ibm.com) */ public class OverviewURL extends UDDIElement { public static final String UDDI_TAG = "overviewURL"; protected Element base = null; String text = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public OverviewURL() { } /** * Construct the object using required fields. * * @param value String value */ public OverviewURL(String value) { setText(value); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public OverviewURL(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); text = getText(base); } public void setText(String s) { text = s; } public String getText() { return text; } /** * Save object to DOM tree. Used to serialize object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. if (text != null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } parent.appendChild(base); } public boolean equals(Object object) { boolean result = false; if (object != null && object instanceof OverviewURL) { OverviewURL otherOverviewURL = (OverviewURL) object; if ((this.text == null && otherOverviewURL.text == null) || (this.text != null && this.text.equals(otherOverviewURL.text))) { //text matches - objects are equal. result = true; } //else text does not match - result is false. } return result; } } uddi4j-2.0.5/src/org/uddi4j/datatype/assertion/000077500000000000000000000000001173667134000212745ustar00rootroot00000000000000uddi4j-2.0.5/src/org/uddi4j/datatype/assertion/PublisherAssertion.java000066400000000000000000000124771173667134000257770ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.datatype.assertion; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.util.FromKey; import org.uddi4j.util.KeyedReference; import org.uddi4j.util.ToKey; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** *

    * Represents the publisherAssertion element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • Constructor passing the required fields. *
    • Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • For sets of attributes, a get/setVector method is provided. *
    • SaveToXML method. Serializes this class within a passed in element. *
    * * Typically this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: * *

    UDDI version 2.0 introduces an assertion feature based on "publisher * assertions". Publisher assertions are the basis for a mechanism to * that allows more than one registered businessEntity element to be * linked in a manner that conveys a specific type of relationship. * This is why the feature is sometimes called the relationship feature. * Publisher assertions are used to establish visible relationships between * registered data and a set of assertions. This relationship can be seen by * a general inquiry message (named "find_relatedBusinesses"). * * * @author Mahesh C S (csmahesh@india.hp.com) */ public class PublisherAssertion extends UDDIElement { public static final String UDDI_TAG = "publisherAssertion"; protected Element base = null; FromKey fromKey = null; ToKey toKey = null; KeyedReference keyedReference = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public PublisherAssertion() { } /** * Construct the object with required fields. * * @param fromKey String * @param toKey String * @param keyRef KeyedReference */ public PublisherAssertion(String fromKey, String toKey , KeyedReference keyRef) { this.fromKey = new FromKey(fromKey); this.toKey = new ToKey(toKey); this.keyedReference = keyRef; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public PublisherAssertion(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, FromKey.UDDI_TAG); if (nl.getLength() > 0) { fromKey = new FromKey((Element)nl.item(0)); } nl = getChildElementsByTagName(base, ToKey.UDDI_TAG); if (nl.getLength() > 0) { toKey = new ToKey((Element)nl.item(0)); } nl = getChildElementsByTagName(base, KeyedReference.UDDI_TAG); if (nl.getLength() > 0) { keyedReference = new KeyedReference((Element)nl.item(0)); } } public String getFromKeyString() { return fromKey.getText(); } public void setFromKeyString(String s) { fromKey = new FromKey(); fromKey.setText(s); } public String getToKeyString() { return toKey.getText(); } public void setToKeyString(String s) { toKey = new ToKey(); toKey.setText(s); } public FromKey getFromKey() { return fromKey; } public void setFromKey(FromKey key) { fromKey = key; } public ToKey getToKey() { return toKey; } public void setToKey(ToKey key) { toKey = key; } public KeyedReference getKeyedReference() { return keyedReference; } public void setKeyedReference(KeyedReference r ) { keyedReference = r; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); if (fromKey!=null) { fromKey.saveToXML(base); } if (toKey!=null) { toKey.saveToXML(base); } if (keyedReference!=null) { keyedReference.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/datatype/binding/000077500000000000000000000000001173667134000206775ustar00rootroot00000000000000uddi4j-2.0.5/src/org/uddi4j/datatype/binding/AccessPoint.java000066400000000000000000000067701173667134000237670ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.datatype.binding; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the accessPoint element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • Constructor passing required fields. *
    • Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • SaveToXML method. Serializes this class within a passed in element. * *
    * * Typically this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    Data: present when a service is directly accessible at a particular * address (e.g., URL, etc). Mutually exclusive with hostingRedirector. * * * @author David Melgar (dmelgar@us.ibm.com) */ public class AccessPoint extends UDDIElement { public static final String UDDI_TAG = "accessPoint"; protected Element base = null; String text = null; String URLType = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public AccessPoint() { } /** * Construct the object using the required fields. * * @param value String value * @param URLType String */ public AccessPoint(String value, String URLType) { setText(value); this.URLType = URLType; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault or * disposition report indicating a UDDI error. */ public AccessPoint(Element base) throws UDDIException { // Checks for a fault. Throws exception if it is a fault. super(base); text = getText(base); URLType = base.getAttribute("URLType"); } public void setText(String s) { text = s; } public void setURLType(String s) { URLType = s; } public String getText() { return text; } public String getURLType() { return URLType; } /** * Save object to DOM tree. Used to serialize object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (text!=null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } if (URLType!=null) { base.setAttribute("URLType", URLType); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/datatype/binding/BindingTemplate.java000066400000000000000000000212131173667134000246070ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.datatype.binding; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.Description; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the bindingTemplate element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • Constructors for passing required fields. *
    • Constructor that will instantiate the object from an XML DOM element * that is the appropriate element for this object. *
    • Get/set methods for each attribute that this element can contain. *
    • For sets of attributes, a get/setVector method is provided. *
    • SaveToXML method. Serialized this class within a passed in element. * *
    * * Typically, this class is used to construct parameters for, or interpret * responses from methods in the UDDIProxy class. * *

    Element description: * Primary Data type: Describes an instance of a web service in technical terms. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class BindingTemplate extends UDDIElement { public static final String UDDI_TAG = "bindingTemplate"; protected Element base = null; String bindingKey = null; String serviceKey = null; AccessPoint accessPoint = null; HostingRedirector hostingRedirector = null; TModelInstanceDetails tModelInstanceDetails = null; // Vector of Description objects Vector description = new Vector(); /** * Default constructor. * Use of this constructor should be avoided. Use the required fields * constructor to provide validation. No validation of required * fields is performed when using the default constructor. * */ public BindingTemplate() { } /** * Construct the object with required fields. * * @param bindingKey String * @param TModelInstanceDetails TModelInstanceDetails object * @deprecated This method has been deprecated. Use * {@link #BindingTemplate(String, TModelInstanceDetails, AccessPoint)} or * {@link #BindingTemplate(String, TModelInstanceDetails, HostingRedirector)} instead. */ public BindingTemplate(String bindingKey, TModelInstanceDetails tModelInstanceDetails) { this.bindingKey = bindingKey; this.tModelInstanceDetails = tModelInstanceDetails; } /** * Construct the object with required fields. * * @param bindingKey String * @param TModelInstanceDetails TModelInstanceDetails object * @param AccessPoint AccessPoint object */ public BindingTemplate(String bindingKey, TModelInstanceDetails tModelInstanceDetails, AccessPoint accessPoint) { this.bindingKey = bindingKey; this.tModelInstanceDetails = tModelInstanceDetails; this.accessPoint = accessPoint; } /** * Construct the object with required fields. * * @param bindingKey String * @param TModelInstanceDetails TModelInstanceDetails object * @param HostingRedirector Hosting Redirector object */ public BindingTemplate(String bindingKey, TModelInstanceDetails tModelInstanceDetails, HostingRedirector hostingRedirector) { this.bindingKey = bindingKey; this.tModelInstanceDetails = tModelInstanceDetails; this.hostingRedirector = hostingRedirector; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct object from received UDDI * message. * * @param base Element with name appropriate for this class. * @exception UDDIException * Thrown if DOM tree contains a SOAP fault or * disposition report indicating a UDDI error. */ public BindingTemplate(Element base) throws UDDIException { // Checks if it is a fault. Throw exception if it is a fault. super(base); bindingKey = base.getAttribute("bindingKey"); serviceKey = getAttr(base,"serviceKey"); NodeList nl = null; nl = getChildElementsByTagName(base, AccessPoint.UDDI_TAG); if (nl.getLength() > 0) { accessPoint = new AccessPoint((Element)nl.item(0)); } nl = getChildElementsByTagName(base, HostingRedirector.UDDI_TAG); if (nl.getLength() > 0) { hostingRedirector = new HostingRedirector((Element)nl.item(0)); } nl = getChildElementsByTagName(base, TModelInstanceDetails.UDDI_TAG); if (nl.getLength() > 0) { tModelInstanceDetails = new TModelInstanceDetails((Element)nl.item(0)); } nl = getChildElementsByTagName(base, Description.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { description.addElement(new Description((Element)nl.item(i))); } } private String getAttr(Element base, String attrname) { if(base.getAttributeNode(attrname)!=null && base.getAttributeNode(attrname).getSpecified() ) { return base.getAttribute(attrname); } return null; } public void setBindingKey(String s) { bindingKey = s; } public void setServiceKey(String s) { serviceKey = s; } public void setAccessPoint(AccessPoint s) { accessPoint = s; // if user has just set a real access point, then wipe the hostingRedirector if( accessPoint != null && hostingRedirector != null ) hostingRedirector = null; } public void setHostingRedirector(HostingRedirector s) { hostingRedirector = s; // if user has just set a real hostingRedirector, then wipe the accessPoint if( hostingRedirector != null && accessPoint != null ) accessPoint = null; } public void setTModelInstanceDetails(TModelInstanceDetails s) { tModelInstanceDetails = s; } /** * Set description vector. * * @param s Vector of Description objects. */ public void setDescriptionVector(Vector s) { description = s; } /** * Set default (english) description string. * * @param s String */ public void setDefaultDescriptionString(String s) { if (description.size() > 0) { description.setElementAt(new Description(s), 0); } else { description.addElement(new Description(s)); } } public String getBindingKey() { return bindingKey; } public String getServiceKey() { return serviceKey; } public AccessPoint getAccessPoint() { return accessPoint; } public HostingRedirector getHostingRedirector() { return hostingRedirector; } public TModelInstanceDetails getTModelInstanceDetails() { return tModelInstanceDetails; } /** * Get description. * * @return s Vector of Description objects. */ public Vector getDescriptionVector() { return description; } /** * Get default description string. * * @return s String */ public String getDefaultDescriptionString() { if ((description).size() > 0) { Description t = (Description)description.elementAt(0); return t.getText(); } else { return null; } } /** * Save object to DOM tree. Used to serialize object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (bindingKey!=null) { base.setAttribute("bindingKey", bindingKey); } if (serviceKey!=null) { base.setAttribute("serviceKey", serviceKey); } if (description!=null) { for (int i=0; i < description.size(); i++) { ((Description)(description.elementAt(i))).saveToXML(base); } } if (accessPoint!=null) { accessPoint.saveToXML(base); } if (hostingRedirector!=null) { hostingRedirector.saveToXML(base); } if (tModelInstanceDetails!=null) { tModelInstanceDetails.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/datatype/binding/BindingTemplates.java000066400000000000000000000106571173667134000250040ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.datatype.binding; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the bindingTemplates element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • Constructor passing required fields. *
    • Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • SaveToXML method. Serializes this class within a passed in element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: * Service element. Collection accessor for bindingTemplate information. * * @author David Melgar (dmelgar@us.ibm.com) * @author Vivek Chopra (vivek@soaprpc.com) */ public class BindingTemplates extends UDDIElement { public static final String UDDI_TAG = "bindingTemplates"; protected Element base = null; // Vector of BindingTemplate objects Vector bindingTemplate = new Vector(); /** * Default constructor. * */ public BindingTemplates() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault or * disposition report indicating a UDDI error. */ public BindingTemplates(Element base) throws UDDIException { // Checks for a fault. Throws exception if it is a fault. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, BindingTemplate.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { bindingTemplate.addElement(new BindingTemplate((Element)nl.item(i))); } } /** * Set bindingTemplate vector. * * @param s Vector of BindingTemplate objects. */ public void setBindingTemplateVector(Vector s) { bindingTemplate = s; } /** * Get bindingTemplate * * @return s Vector of BindingTemplate objects. */ public Vector getBindingTemplateVector() { return bindingTemplate; } /** * Add a BindingTemplate object to the collection * @param b BindingTemplate to be added */ public void add (BindingTemplate b) { bindingTemplate.add (b); } /** * Remove a BindingTemplate object from the collection * @param b BindingTemplate to be removed * @return True if object was removed, false if it * was not found in the collection. */ public boolean remove (BindingTemplate b) { return bindingTemplate.remove (b); } /** * Retrieve the BindingTemplate at the specified index within the collection. * @param index Index to retrieve from. * @return BindingTemplate at that index */ public BindingTemplate get (int index) { return (BindingTemplate) bindingTemplate.get (index); } /** * Return current size of the collection. * @return Number of BindingTemplates in the collection */ public int size () { return bindingTemplate.size (); } /** * Save object to DOM tree. Used to serialize object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (bindingTemplate!=null) { for (int i=0; i < bindingTemplate.size(); i++) { ((BindingTemplate)(bindingTemplate.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/datatype/binding/HostingRedirector.java000066400000000000000000000063071173667134000252060ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.datatype.binding; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the hostingRedirector element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • Constructor passing required fields. *
    • Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • SaveToXML method. Serializes this class within a passed in element. * *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: * *

    Data: present only when the service is provisioned via remote hosting, * load balancing, etc. Mutually exclusive with accessPoint. * * @author David Melgar (dmelgar@us.ibm.com) */ public class HostingRedirector extends UDDIElement { public static final String UDDI_TAG = "hostingRedirector"; protected Element base = null; String bindingKey = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public HostingRedirector() { } /** * Construct the object with required fields. * * @param bindingKey String */ public HostingRedirector(String bindingKey) { this.bindingKey = bindingKey; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault or * disposition report indicating a UDDI error. */ public HostingRedirector(Element base) throws UDDIException { // Checks for a fault. Throws exception if it is a fault. super(base); bindingKey = base.getAttribute("bindingKey"); } public void setBindingKey(String s) { bindingKey = s; } public String getBindingKey() { return bindingKey; } /** * Save object to DOM tree. Used to serialize object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (bindingKey!=null) { base.setAttribute("bindingKey", bindingKey); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/datatype/binding/InstanceDetails.java000066400000000000000000000124101173667134000246120ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.datatype.binding; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.Description; import org.uddi4j.datatype.OverviewDoc; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the instanceDetails element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • Constructor passing required fields. *
    • Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • SaveToXML method. Serializes this class within a passed in element. *
    * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    Support element used to contain optional information about the way an * instance of a web service is implemented, or varies from the general * specifications outlined in a specific tModel. * * @author David Melgar (dmelgar@us.ibm.com) */ public class InstanceDetails extends UDDIElement { public static final String UDDI_TAG = "instanceDetails"; protected Element base = null; OverviewDoc overviewDoc = null; InstanceParms instanceParms = null; // Vector of Description objects Vector description = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public InstanceDetails() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct object from received UDDI * message. * * @param base Element with name appropriate for this class. * @exception UDDIException * Thrown if DOM tree contains a SOAP fault or * disposition report indicating a UDDI error. */ public InstanceDetails(Element base) throws UDDIException { // Checks if it is a fault. Throw exception if it is a fault. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, OverviewDoc.UDDI_TAG); if (nl.getLength() > 0) { overviewDoc = new OverviewDoc((Element)nl.item(0)); } nl = getChildElementsByTagName(base, InstanceParms.UDDI_TAG); if (nl.getLength() > 0) { instanceParms = new InstanceParms((Element)nl.item(0)); } nl = getChildElementsByTagName(base, Description.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { description.addElement(new Description((Element)nl.item(i))); } } public void setOverviewDoc(OverviewDoc s) { overviewDoc = s; } public void setInstanceParms(InstanceParms s) { instanceParms = s; } /** * Set description vector. * * @param s Vector of Description objects. */ public void setDescriptionVector(Vector s) { description = s; } /** * Set default (english) description string. * * @param s String */ public void setDefaultDescriptionString(String s) { if (description.size() > 0) { description.setElementAt(new Description(s), 0); } else { description.addElement(new Description(s)); } } public OverviewDoc getOverviewDoc() { return overviewDoc; } public InstanceParms getInstanceParms() { return instanceParms; } /** * Get description. * * @return s Vector of Description objects. */ public Vector getDescriptionVector() { return description; } /** * Get default description string. * * @return s String */ public String getDefaultDescriptionString() { if ((description).size() > 0) { Description t = (Description)description.elementAt(0); return t.getText(); } else { return null; } } /** * Save object to DOM tree. Used to serialize object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (description!=null) { for (int i=0; i < description.size(); i++) { ((Description)(description.elementAt(i))).saveToXML(base); } } if (overviewDoc!=null) { overviewDoc.saveToXML(base); } if (instanceParms!=null) { instanceParms.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/datatype/binding/InstanceParms.java000066400000000000000000000062071173667134000243160ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.datatype.binding; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the instanceParms element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • Constructor passing required fields. *
    • Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • SaveToXML method. Serializes this class within a passed in element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from methods in the UDDIProxy class. * *

    Element description: *

    This is a URL pointing to the settings, or settings file, needed to invoke * a registered service (for getting fixed parm values prior to call). * * @author David Melgar (dmelgar@us.ibm.com) */ public class InstanceParms extends UDDIElement { public static final String UDDI_TAG = "instanceParms"; protected Element base = null; String text = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public InstanceParms() { } /** * Construct the object with required fields. * * @param value String value */ public InstanceParms(String value) { setText(value); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public InstanceParms(Element base) throws UDDIException { // Check if it is a fault. Throw exception if it is. super(base); text = getText(base); } public void setText(String s) { text = s; } public String getText() { return text; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (text!=null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/datatype/binding/TModelInstanceDetails.java000066400000000000000000000111401173667134000257160ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.datatype.binding; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the tModelInstanceDetails element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • Constructor passing required fields. *
    • Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • SaveToXML method. Serializes this class within a passed in element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from methods in the UDDIProxy class. * *

    Element description: *

    Support element used as a container for tModel references within a * web service bindingTemplate metadata set. * * @author David Melgar (dmelgar@us.ibm.com) * @author Vivek Chopra (vivek@soaprpc.com) */ public class TModelInstanceDetails extends UDDIElement { public static final String UDDI_TAG = "tModelInstanceDetails"; protected Element base = null; // Vector of TModelInstanceInfo objects Vector tModelInstanceInfo = new Vector(); /** * Default constructor. * */ public TModelInstanceDetails() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public TModelInstanceDetails(Element base) throws UDDIException { // Check if it is a fault. Throw exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, TModelInstanceInfo.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { tModelInstanceInfo.addElement(new TModelInstanceInfo((Element)nl.item(i))); } } /** * Set tModelInstanceInfo vector. * * @param s Vector of TModelInstanceInfo objects. */ public void setTModelInstanceInfoVector(Vector s) { tModelInstanceInfo = s; } /** * Get tModelInstanceInfo. * * @return s Vector of TModelInstanceInfo objects. */ public Vector getTModelInstanceInfoVector() { return tModelInstanceInfo; } /** * Add a TModelInstanceInfo object to the collection * @param t TModelInstanceInfo to be added */ public void add (TModelInstanceInfo t) { tModelInstanceInfo.add (t); } /** * Remove a TModelInstanceInfo object from the collection * @param t TModelInstanceInfo to be removed * @return True if object was removed, false if it * was not found in the collection. */ public boolean remove (TModelInstanceInfo t) { return tModelInstanceInfo.remove (t); } /** * Retrieve the TModelInstanceInfo at the specified index within the collection. * @param index Index to retrieve from. * @return TModelInstanceInfo at that index */ public TModelInstanceInfo get (int index) { return (TModelInstanceInfo) tModelInstanceInfo.get (index); } /** * Return current size of the collection. * @return Number of TModelInstanceInfos in the collection */ public int size () { return tModelInstanceInfo.size (); } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (tModelInstanceInfo!=null) { for (int i=0; i < tModelInstanceInfo.size(); i++) { ((TModelInstanceInfo)(tModelInstanceInfo.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/datatype/binding/TModelInstanceInfo.java000066400000000000000000000124411173667134000252310ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.datatype.binding; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.Description; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the tModelInstanceInfo element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • Constructor passing required fields. *
    • Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • SaveToXML method. Serializes this class within a passed in element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from methods in the UDDIProxy class. * *

    Element description: *

    Support element used to contain implementation instance specific information * about compatible specifications (via tModel reference) and optional setting's * details. * * @author David Melgar (dmelgar@us.ibm.com) */ public class TModelInstanceInfo extends UDDIElement { public static final String UDDI_TAG = "tModelInstanceInfo"; protected Element base = null; String tModelKey = null; InstanceDetails instanceDetails = null; // Vector of Description objects Vector description = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public TModelInstanceInfo() { } /** * Construct the object with required fields. * * @param tModelKey String */ public TModelInstanceInfo(String tModelKey) { this.tModelKey = tModelKey; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public TModelInstanceInfo(Element base) throws UDDIException { // Check if it is a fault. Throw exception if it is. super(base); tModelKey = base.getAttribute("tModelKey"); NodeList nl = null; nl = getChildElementsByTagName(base, InstanceDetails.UDDI_TAG); if (nl.getLength() > 0) { instanceDetails = new InstanceDetails((Element)nl.item(0)); } nl = getChildElementsByTagName(base, Description.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { description.addElement(new Description((Element)nl.item(i))); } } public void setTModelKey(String s) { tModelKey = s; } public void setInstanceDetails(InstanceDetails s) { instanceDetails = s; } /** * Set description vector. * * @param s Vector of Description objects. */ public void setDescriptionVector(Vector s) { description = s; } /** * Set default (english) description string. * * @param s String */ public void setDefaultDescriptionString(String s) { if (description.size() > 0) { description.setElementAt(new Description(s), 0); } else { description.addElement(new Description(s)); } } public String getTModelKey() { return tModelKey; } public InstanceDetails getInstanceDetails() { return instanceDetails; } /** * Get description. * * @return s Vector of Description objects. */ public Vector getDescriptionVector() { return description; } /** * Get default description string. * * @return s String */ public String getDefaultDescriptionString() { if ((description).size() > 0) { Description t = (Description)description.elementAt(0); return t.getText(); } else { return null; } } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (tModelKey!=null) { base.setAttribute("tModelKey", tModelKey); } if (description!=null) { for (int i=0; i < description.size(); i++) { ((Description)(description.elementAt(i))).saveToXML(base); } } if (instanceDetails!=null) { instanceDetails.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/datatype/business/000077500000000000000000000000001173667134000211205ustar00rootroot00000000000000uddi4j-2.0.5/src/org/uddi4j/datatype/business/Address.java000066400000000000000000000121011173667134000233430ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.datatype.business; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the address element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • Constructor passing required fields. *
    • Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • SaveToXML method. Serializes this class within a passed in element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from methods in the UDDIProxy class. * *

    Element description: * Data: a printable, free form address. Typed by convention. Sort not used. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ravi Trivedi (ravi_trivedi@hp.com) */ public class Address extends UDDIElement { public static final String UDDI_TAG = "address"; protected Element base = null; String useType = null; String sortCode = null; String tModelKey = null; // Vector of AddressLine objects Vector addressLine = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public Address() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public Address(Element base) throws UDDIException { // Check if its a fault. Throw exception if it is super(base); useType = getAttr(base,"useType"); sortCode = getAttr(base,"sortCode"); tModelKey = getAttr(base,"tModelKey"); NodeList nl = null; nl = getChildElementsByTagName(base, AddressLine.UDDI_TAG); for (int i = 0; i < nl.getLength(); i++) { addressLine.addElement(new AddressLine((Element) nl.item(i))); } } private String getAttr(Element base, String attrname) { if(base.getAttributeNode(attrname)!=null && base.getAttributeNode(attrname).getSpecified() ) { return base.getAttribute(attrname); } return null; } public void setUseType(String s) { useType = s; } public void setSortCode(String s) { sortCode = s; } /** * Set addressLine vector * * @param s Vector of AddressLine objects. */ public void setAddressLineVector(Vector s) { addressLine = s; } /** * Set addressLine * * @param s Vector of String objects. */ public void setAddressLineStrings(Vector s) { addressLine = new Vector(); for (int i = 0; i < s.size(); i++) { addressLine.addElement(new AddressLine((String) s.elementAt(i))); } } public void setTModelKey(String key) { tModelKey = key; } public String getUseType() { return useType; } public String getSortCode() { return sortCode; } /** * Get addressLine * * @return s Vector of AddressLine objects. */ public Vector getAddressLineVector() { return addressLine; } /** * Get addressLine * * @return s Vector of String objects. */ public Vector getAddressLineStrings() { Vector strings = new Vector(); for (int i = 0; i < addressLine.size(); i++) { strings.addElement(((AddressLine) addressLine.elementAt(i)).getText()); } return strings; } public String getTModelKey() { return tModelKey; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (useType != null) { base.setAttribute("useType", useType); } if (sortCode != null) { base.setAttribute("sortCode", sortCode); } if (tModelKey != null) { base.setAttribute("tModelKey", tModelKey); } if (addressLine != null) { for (int i = 0; i < addressLine.size(); i++) { ((AddressLine) (addressLine.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/datatype/business/AddressLine.java000066400000000000000000000077361173667134000241750ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.datatype.business; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the addressLine element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • Constructor passing required fields. *
    • Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • SaveToXML method. Serializes this class within a passed in element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from methods in the UDDIProxy class. * * @author David Melgar (dmelgar@us.ibm.com) * @author Vivek Chopra (vivek@soaprpc.com) */ public class AddressLine extends UDDIElement { public static final String UDDI_TAG = "addressLine"; protected Element base = null; String text = null; String keyName = null; String keyValue = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public AddressLine() { } /** * Construct the object with required fields. * * @param value String value */ public AddressLine(String value) { setText(value); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public AddressLine(Element base) throws UDDIException { // Check if its a fault. Throws an exception if it is. super(base); keyName = getAttr(base,"keyName"); keyValue = getAttr(base,"keyValue"); text = getText(base); } private String getAttr(Element base, String attrname) { if(base.getAttributeNode(attrname)!=null && base.getAttributeNode(attrname).getSpecified() ) { return base.getAttribute(attrname); } return null; } /** * Set the (optional) keyName attribute */ public void setKeyName (String keyName) { this.keyName = keyName; } /** * Set the (optional) keyValue attribute */ public void setKeyValue (String keyValue) { this.keyValue = keyValue; } public void setText(String s) { text = s; } public String getKeyName () { return keyName; } public String getKeyValue () { return keyValue; } public String getText() { return text; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (keyName != null) { base.setAttribute("keyName", keyName); } if (keyValue != null) { base.setAttribute("keyValue", keyValue); } if (text!=null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/datatype/business/BusinessEntity.java000066400000000000000000000277511173667134000247670ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.datatype.business; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.Description; import org.uddi4j.datatype.Name; import org.uddi4j.datatype.service.BusinessServices; import org.uddi4j.util.CategoryBag; import org.uddi4j.util.DiscoveryURLs; import org.uddi4j.util.IdentifierBag; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the businessEntity element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *
      *
    • Constructor passing required fields. *
    • Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • SaveToXML method. Serializes this class within a passed in element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from methods in the UDDIProxy class. * *

    Element description: * Primary Data type: Describes an instance of a business or business unit. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ravi Trivedi (ravi_trivedi@hp.com) * @author Vivek Chopra (vivek@soaprpc.com) */ public class BusinessEntity extends UDDIElement { public static final String UDDI_TAG = "businessEntity"; protected Element base = null; String businessKey = null; String operator = null; String authorizedName = null; DiscoveryURLs discoveryURLs = null; Contacts contacts = null; BusinessServices businessServices = null; IdentifierBag identifierBag = null; CategoryBag categoryBag = null; // Vector of Description objects Vector description = new Vector(); Vector nameVector = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public BusinessEntity() { } /** * Construct the object with required fields. * Publishing several names (e.g., for romanization purposes) is supported. * To indicate the language that the names are expressed in, a unique * xml:lang value is associated with each name. * Only one name (default language) can omit its unique language * identifier. Other names passed without an xml:lang value associated, * are assigned the default language code of the registering party. * The default language code is established at the time the publishing * credentials are established with an individual Operator Site. * If no default language is provisioned at the time a publisher signs up, * the operator can adopt an appropriate default language code. * * @param businessKey String * @param name String */ public BusinessEntity(String businessKey, String name) { this.businessKey = businessKey; nameVector.addElement(new Name(name)); } /** * Construct the object with required fields. * * @param businessKey String * @param name String * @param lang String */ public BusinessEntity(String businessKey, String name, String lang) { this.businessKey = businessKey; nameVector.addElement(new Name(name,lang)); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public BusinessEntity(Element base) throws UDDIException { // Check if its a fault. Throws an exception if it is. super(base); businessKey = base.getAttribute("businessKey"); operator = getAttr(base,"operator"); authorizedName = getAttr(base,"authorizedName"); NodeList nl = null; nl = getChildElementsByTagName(base, DiscoveryURLs.UDDI_TAG); if (nl.getLength() > 0) { discoveryURLs = new DiscoveryURLs((Element)nl.item(0)); } nl = getChildElementsByTagName(base, Name.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { nameVector.addElement(new Name((Element)nl.item(i))); } nl = getChildElementsByTagName(base, Contacts.UDDI_TAG); if (nl.getLength() > 0) { contacts = new Contacts((Element)nl.item(0)); } nl = getChildElementsByTagName(base, BusinessServices.UDDI_TAG); if (nl.getLength() > 0) { businessServices = new BusinessServices((Element)nl.item(0)); } nl = getChildElementsByTagName(base, IdentifierBag.UDDI_TAG); if (nl.getLength() > 0) { identifierBag = new IdentifierBag((Element)nl.item(0)); } nl = getChildElementsByTagName(base, CategoryBag.UDDI_TAG); if (nl.getLength() > 0) { categoryBag = new CategoryBag((Element)nl.item(0)); } nl = getChildElementsByTagName(base, Description.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { description.addElement(new Description((Element)nl.item(i))); } } private String getAttr(Element base, String attrname) { if(base.getAttributeNode(attrname)!=null && base.getAttributeNode(attrname).getSpecified() ) { return base.getAttribute(attrname); } return null; } public void setBusinessKey(String s) { businessKey = s; } public void setOperator(String s) { operator = s; } public void setAuthorizedName(String s) { authorizedName = s; } public void setDiscoveryURLs(DiscoveryURLs s) { discoveryURLs = s; } /** * @deprecated This method has been deprecated. Use * {@link #setNameVector (Vector)} or * {@link #setDefaultName (Name)} instead */ public void setName(Name s) { setDefaultName(s); } /** * @deprecated This method has been deprecated. Use * {@link #setNameVector (Vector)} or * {@link #setDefaultNameString (String, String)} instead */ public void setName(String s) { setDefaultNameString(s, null); } /** * This method stores this name as the Default Name (i.e., places it in the first * location in the Vector). */ public void setDefaultName(Name name) { if (nameVector.size() > 0) { nameVector.setElementAt(name,0); } else { nameVector.addElement(name); } } /** * This method stores this String, in the given language as the Default Name * (i.e., places it in the first location in the Vector). */ public void setDefaultNameString(String value, String lang) { Name name = new Name(value, lang); if (nameVector.size() > 0) { nameVector.setElementAt(name,0); } else { nameVector.addElement(name); } } /** * @param s Vector of Name objects */ public void setNameVector(Vector s) { nameVector = s; } public void setContacts(Contacts s) { contacts = s; } public void setBusinessServices(BusinessServices s) { businessServices = s; } public void setIdentifierBag(IdentifierBag s) { identifierBag = s; } public void setCategoryBag(CategoryBag s) { categoryBag = s; } /** * Set description vector. * * @param s Vector of Description objects. */ public void setDescriptionVector(Vector s) { description = s; } /** * Set default description string. * * @param s String */ public void setDefaultDescriptionString(String s) { if (description.size() > 0) { description.setElementAt(new Description(s), 0); } else { description.addElement(new Description(s)); } } public String getBusinessKey() { return businessKey; } public String getOperator() { return operator; } public String getAuthorizedName() { return authorizedName; } public DiscoveryURLs getDiscoveryURLs() { return discoveryURLs; } /** * @deprecated This method has been deprecated. Use * {@link #getNameVector ()} or * {@link #getDefaultName ()} instead */ public Name getName() { return getDefaultName(); } /** * @deprecated This method has been deprecated. Use * {@link #getNameVector ()} or * {@link #getDefaultNameString ()} instead */ public String getNameString() { return getDefaultNameString(); } public Name getDefaultName() { return (Name) nameVector.elementAt(0); } /** * Get default name string. * * @return String */ public String getDefaultNameString() { if ((nameVector).size() > 0) { return ((Name)nameVector.elementAt(0)).getText(); } else { return null; } } /** * Get all names. * * @return Vector of Name objects. */ public Vector getNameVector() { return nameVector ; } public Contacts getContacts() { return contacts; } public BusinessServices getBusinessServices() { return businessServices; } public IdentifierBag getIdentifierBag() { return identifierBag; } public CategoryBag getCategoryBag() { return categoryBag; } /** * Get description * * @return s Vector of Description objects. */ public Vector getDescriptionVector() { return description; } /** * Get default description string * * @return s String */ public String getDefaultDescriptionString() { if ((description).size() > 0) { Description t = (Description)description.elementAt(0); return t.getText(); } else { return null; } } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (businessKey!=null) { base.setAttribute("businessKey", businessKey); } if (operator!=null) { base.setAttribute("operator", operator); } if (authorizedName!=null) { base.setAttribute("authorizedName", authorizedName); } if (discoveryURLs!=null) { discoveryURLs.saveToXML(base); } if (nameVector!=null) { for (int i=0; i < nameVector.size(); i++) { ((Name)(nameVector.elementAt(i))).saveToXML(base); } } if (description!=null) { for (int i=0; i < description.size(); i++) { ((Description)(description.elementAt(i))).saveToXML(base); } } if (contacts!=null) { contacts.saveToXML(base); } if (businessServices!=null) { businessServices.saveToXML(base); } if (identifierBag!=null) { identifierBag.saveToXML(base); } if (categoryBag!=null) { categoryBag.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/datatype/business/Contact.java000066400000000000000000000172411173667134000233630ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.datatype.business; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.Description; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the contact element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • Constructor passing required fields. *
    • Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • SaveToXML method. Serializes this class within a passed in element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from methods in the UDDIProxy class. * *

    Element description: *

    Data: Can contain a contacts name, address, phone, e-mail, and a description * of the contact. * * @author David Melgar (dmelgar@us.ibm.com) */ public class Contact extends UDDIElement { public static final String UDDI_TAG = "contact"; protected Element base = null; String useType = null; PersonName personName = null; // Vector of Description objects Vector description = new Vector(); // Vector of Phone objects Vector phone = new Vector(); // Vector of Email objects Vector email = new Vector(); // Vector of Address objects Vector address = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public Contact() { } /** * Construct the object with required fields. * * @param personName String */ public Contact(String personName) { this.personName = new PersonName( personName ); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public Contact(Element base) throws UDDIException { // Check if its a fault. Throws an exception if it is. super(base); useType = getAttr(base,"useType"); NodeList nl = null; nl = getChildElementsByTagName(base, PersonName.UDDI_TAG); if (nl.getLength() > 0) { personName = new PersonName((Element)nl.item(0)); } nl = getChildElementsByTagName(base, Description.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { description.addElement(new Description((Element)nl.item(i))); } nl = getChildElementsByTagName(base, Phone.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { phone.addElement(new Phone((Element)nl.item(i))); } nl = getChildElementsByTagName(base, Email.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { email.addElement(new Email((Element)nl.item(i))); } nl = getChildElementsByTagName(base, Address.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { address.addElement(new Address((Element)nl.item(i))); } } private String getAttr(Element base, String attrname) { if(base.getAttributeNode(attrname)!=null && base.getAttributeNode(attrname).getSpecified() ) { return base.getAttribute(attrname); } return null; } public void setUseType(String s) { useType = s; } public void setPersonName(PersonName s) { personName = s; } public void setPersonName(String s) { personName = new PersonName(); personName.setText(s); } /** * Set description vector. * * @param s Vector of Description objects. */ public void setDescriptionVector(Vector s) { description = s; } /** * Set default (english) description string. * * @param s String */ public void setDefaultDescriptionString(String s) { if (description.size() > 0) { description.setElementAt(new Description(s), 0); } else { description.addElement(new Description(s)); } } /** * Set phone vector. * * @param s Vector of Phone objects. */ public void setPhoneVector(Vector s) { phone = s; } /** * Set email vector. * * @param s Vector of Email objects. */ public void setEmailVector(Vector s) { email = s; } /** * Set address vector. * * @param s Vector of Address objects. */ public void setAddressVector(Vector s) { address = s; } public String getUseType() { return useType; } public PersonName getPersonName() { return personName; } public String getPersonNameString() { return personName.getText(); } /** * Get description. * * @return s Vector of Description objects. */ public Vector getDescriptionVector() { return description; } /** * Get default description string. * * @return s String */ public String getDefaultDescriptionString() { if ((description).size() > 0) { Description t = (Description)description.elementAt(0); return t.getText(); } else { return null; } } /** * Get phone. * * @return s Vector of Phone objects. */ public Vector getPhoneVector() { return phone; } /** * Get email. * * @return s Vector of Email objects. */ public Vector getEmailVector() { return email; } /** * Get address. * * @return s Vector of Address objects. */ public Vector getAddressVector() { return address; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (useType!=null) { base.setAttribute("useType", useType); } if (description!=null) { for (int i=0; i < description.size(); i++) { ((Description)(description.elementAt(i))).saveToXML(base); } } if (personName!=null) { personName.saveToXML(base); } if (phone!=null) { for (int i=0; i < phone.size(); i++) { ((Phone)(phone.elementAt(i))).saveToXML(base); } } if (email!=null) { for (int i=0; i < email.size(); i++) { ((Email)(email.elementAt(i))).saveToXML(base); } } if (address!=null) { for (int i=0; i < address.size(); i++) { ((Address)(address.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/datatype/business/Contacts.java000066400000000000000000000104011173667134000235350ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.datatype.business; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the contacts element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • Constructor passing required fields. *
    • Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • SaveToXML method. Serializes this class within a passed in element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from methods in the UDDIProxy class. * *

    Element description: * Service element: accessor for one or more contacts. * * @author David Melgar (dmelgar@us.ibm.com) */ public class Contacts extends UDDIElement { public static final String UDDI_TAG = "contacts"; protected Element base = null; // Vector of Contact objects Vector contact = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public Contacts() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public Contacts(Element base) throws UDDIException { // Check if its a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, Contact.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { contact.addElement(new Contact((Element)nl.item(i))); } } /** * Set contact vector. * * @param s Vector of Contact objects. */ public void setContactVector(Vector s) { contact = s; } /** * Get contact. * * @return s Vector of Contact objects. */ public Vector getContactVector() { return contact; } /** * Add a Contact object to the collection * @param c Contact to be added */ public void add (Contact c) { contact.add (c); } /** * Remove a Contact object from the collection * @param c Contact to be removed * @return True if object was removed, false if it * was not found in the collection. */ public boolean remove (Contact c) { return contact.remove (c); } /** * Retrieve the Contact at the specified index within the collection. * @param index Index to retrieve from. * @return Contact at that index */ public Contact get (int index) { return (Contact) contact.get (index); } /** * Return current size of the collection. * @return Number of Contacts in the collection */ public int size () { return contact.size (); } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (contact!=null) { for (int i=0; i < contact.size(); i++) { ((Contact)(contact.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/datatype/business/Email.java000066400000000000000000000067571173667134000230310ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.datatype.business; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the email element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • Constructor passing required fields. *
    • Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • SaveToXML method. Serializes this class within a passed in element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from methods in the UDDIProxy class. * *

    Element description: * Data: an email address. * * @author David Melgar (dmelgar@us.ibm.com) */ public class Email extends UDDIElement { public static final String UDDI_TAG = "email"; protected Element base = null; String text = null; String useType = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public Email() { } /** * Construct the object with required fields. * * @param value String value */ public Email(String value) { setText(value); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public Email(Element base) throws UDDIException { // Check if its a fault. Throw exception if it is super(base); text = getText(base); useType = getAttr(base,"useType"); } private String getAttr(Element base, String attrname) { if(base.getAttributeNode(attrname)!=null && base.getAttributeNode(attrname).getSpecified() ) { return base.getAttribute(attrname); } return null; } public void setText(String s) { text = s; } public void setUseType(String s) { useType = s; } public String getText() { return text; } public String getUseType() { return useType; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (text!=null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } if (useType!=null) { base.setAttribute("useType", useType); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/datatype/business/PersonName.java000066400000000000000000000056701173667134000240420ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.datatype.business; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the personName element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • Constructor passing required fields. *
    • Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • SaveToXML method. Serializes this class within a passed in element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from methods in the UDDIProxy class. * * @author David Melgar (dmelgar@us.ibm.com) */ public class PersonName extends UDDIElement { public static final String UDDI_TAG = "personName"; protected Element base = null; String text = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public PersonName() { } /** * Construct the object with required fields. * * @param value String value */ public PersonName(String value) { setText(value); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public PersonName(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); text = getText(base); } public void setText(String s) { text = s; } public String getText() { return text; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. if (text!=null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/datatype/business/Phone.java000066400000000000000000000067741173667134000230520ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.datatype.business; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the phone element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *
      *
    • Constructor passing required fields. *
    • Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • SaveToXML method. Serializes this class within a passed in element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from methods in the UDDIProxy class. * *

    Element description: *

    Data: a telephone number. * * @author David Melgar (dmelgar@us.ibm.com) */ public class Phone extends UDDIElement { public static final String UDDI_TAG = "phone"; protected Element base = null; String text = null; String useType = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public Phone() { } /** * Construct the object with required fields. * * @param value String value */ public Phone(String value) { setText(value); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public Phone(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); text = getText(base); useType = getAttr(base,"useType"); } private String getAttr(Element base, String attrname) { if(base.getAttributeNode(attrname)!=null && base.getAttributeNode(attrname).getSpecified() ) { return base.getAttribute(attrname); } return null; } public void setText(String s) { text = s; } public void setUseType(String s) { useType = s; } public String getText() { return text; } public String getUseType() { return useType; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. if (text!=null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } if (useType!=null) { base.setAttribute("useType", useType); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/datatype/service/000077500000000000000000000000001173667134000207255ustar00rootroot00000000000000uddi4j-2.0.5/src/org/uddi4j/datatype/service/BusinessService.java000066400000000000000000000234211173667134000247060ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.datatype.service; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.Description; import org.uddi4j.datatype.Name; import org.uddi4j.datatype.binding.BindingTemplates; import org.uddi4j.util.CategoryBag; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the businessService element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • Constructor passing required fields. *
    • Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • SaveToXML method. Serializes this class within a passed in element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from methods in the UDDIProxy class. * *

    Element description: *

    Primary Data type: Describes a logical service type in business terms. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ravi Trivedi (ravi_trivedi@hp.com) * @author Vivek Chopra (vivek@soaprpc.com) */ public class BusinessService extends UDDIElement { public static final String UDDI_TAG = "businessService"; protected Element base = null; String serviceKey = null; String businessKey = null; BindingTemplates bindingTemplates = null; CategoryBag categoryBag = null; // Vector of Description objects Vector description = new Vector(); Vector nameVector = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public BusinessService() { } /** * Construct the object with required fields. * * @param serviceKey String * @param name String * @param bindingTemplates * @deprecated Name, and bindingTemplates are no longer required in UDDI * version 2 errata 3. * For the required fields constructor, use * {@link #BusinessService(String)} instead. */ public BusinessService(String serviceKey, String name, BindingTemplates bindingTemplates) { this.serviceKey = serviceKey; nameVector.addElement(new Name(name)); this.bindingTemplates = bindingTemplates; } /** * Construct the object with required fields. * * @param serviceKey String */ public BusinessService(String serviceKey) { this.serviceKey = serviceKey; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public BusinessService(Element base) throws UDDIException { // Check if its a fault. Throws an exception if it is. super(base); serviceKey = base.getAttribute("serviceKey"); businessKey = getAttr(base,"businessKey"); NodeList nl = null; nl = getChildElementsByTagName(base, Name.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { nameVector.addElement(new Name((Element)nl.item(i))); } nl = getChildElementsByTagName(base, BindingTemplates.UDDI_TAG); if (nl.getLength() > 0) { bindingTemplates = new BindingTemplates((Element)nl.item(0)); } nl = getChildElementsByTagName(base, CategoryBag.UDDI_TAG); if (nl.getLength() > 0) { categoryBag = new CategoryBag((Element)nl.item(0)); } nl = getChildElementsByTagName(base, Description.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { description.addElement(new Description((Element)nl.item(i))); } } private String getAttr(Element base, String attrname) { if(base.getAttributeNode(attrname)!=null && base.getAttributeNode(attrname).getSpecified() ) { return base.getAttribute(attrname); } return null; } public void setServiceKey(String s) { serviceKey = s; } public void setBusinessKey(String s) { businessKey = s; } /** * @deprecated This method has been deprecated. Use * {@link #setNameVector (Vector)} or * {@link #setDefaultName (Name)} instead */ public void setName(Name s) { setDefaultName(s); } /** * @deprecated This method has been deprecated. Use * {@link #setNameVector (Vector)} or * {@link #setDefaultNameString (String, String)} instead */ public void setName(String s) { setDefaultNameString(s, null); } /** * This method stores this name as the Default Name (i.e., places it in the first * location in the Vector) */ public void setDefaultName(Name name) { if (nameVector.size() > 0) { nameVector.setElementAt(name,0); } else { nameVector.addElement(name); } } /** * This method stores this String , in the given language, as the Default Name * (i.e., places it in the first location in the Vector.) */ public void setDefaultNameString(String value, String lang) { Name name = new Name(value, lang); if (nameVector.size() > 0) { nameVector.setElementAt(name,0); } else { nameVector.addElement(name); } } /** * @param s Vector of Name objects */ public void setNameVector(Vector s) { nameVector = s; } public void setBindingTemplates(BindingTemplates s) { bindingTemplates = s; } public void setCategoryBag(CategoryBag s) { categoryBag = s; } /** * Set description vector. * * @param s Vector of Description objects. */ public void setDescriptionVector(Vector s) { description = s; } /** * Set default description string. * * @param s String */ public void setDefaultDescriptionString(String s) { if (description.size() > 0) { description.setElementAt(new Description(s), 0); } else { description.addElement(new Description(s)); } } public String getServiceKey() { return serviceKey; } public String getBusinessKey() { return businessKey; } /** * @deprecated This method has been deprecated. Use * {@link #getNameVector ()} or * {@link #getDefaultName ()} instead */ public Name getName() { return getDefaultName(); } /** * @deprecated This method has been deprecated. Use * {@link #getNameVector ()} or * {@link #getDefaultNameString ()} instead */ public String getNameString() { return getDefaultNameString(); } public Name getDefaultName() { if (nameVector.size() > 0) { return (Name) nameVector.elementAt(0); } else { return null; } } public String getDefaultNameString() { if ((nameVector).size() > 0) { return ((Name)nameVector.elementAt(0)).getText(); } else { return null; } } /** * Get all names. * * @return Vector of Name objects. */ public Vector getNameVector() { return nameVector ; } public BindingTemplates getBindingTemplates() { return bindingTemplates; } public CategoryBag getCategoryBag() { return categoryBag; } /** * Get description. * * @return s Vector of Description objects. */ public Vector getDescriptionVector() { return description; } /** * Get default description string. * * @return s String */ public String getDefaultDescriptionString() { if ((description).size() > 0) { Description t = (Description)description.elementAt(0); return t.getText(); } else { return null; } } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (serviceKey!=null) { base.setAttribute("serviceKey", serviceKey); } if (businessKey!=null) { base.setAttribute("businessKey", businessKey); } if (nameVector!=null) { for (int i=0; i < nameVector.size(); i++) { ((Name)(nameVector.elementAt(i))).saveToXML(base); } } if (description!=null) { for (int i=0; i < description.size(); i++) { ((Description)(description.elementAt(i))).saveToXML(base); } } if (bindingTemplates!=null) { bindingTemplates.saveToXML(base); } if (categoryBag!=null) { categoryBag.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/datatype/service/BusinessServices.java000066400000000000000000000111501173667134000250650ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.datatype.service; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the businessServices element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • Constructor passing required fields. *
    • Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • SaveToXML method. Serializes this class within a passed in element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from methods in the UDDIProxy class. * *

    Element description: *

    Service element. Accessor collection point for businessService data. * * @author David Melgar (dmelgar@us.ibm.com) * @author Vivek Chopra (vivek@soaprpc.com) */ public class BusinessServices extends UDDIElement { public static final String UDDI_TAG = "businessServices"; protected Element base = null; // Vector of BusinessService objects Vector businessService = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public BusinessServices() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public BusinessServices(Element base) throws UDDIException { // Check if its a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, BusinessService.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { businessService.addElement(new BusinessService((Element)nl.item(i))); } } /** * Set businessService vector * * @param s Vector of BusinessService objects. */ public void setBusinessServiceVector(Vector s) { businessService = s; } /** * Get businessService * * @return s Vector of BusinessService objects. */ public Vector getBusinessServiceVector() { return businessService; } /** * Add a BusinessService object to the collection * @param b BusinessService to be added */ public void add (BusinessService b) { businessService.add (b); } /** * Remove a BusinessService object from the collection * @param b BusinessService to be removed * @return True if object was removed, false if it * was not found in the collection. */ public boolean remove (BusinessService b) { return businessService.remove (b); } /** * Retrieve the BusinessService at the specified index within the collection. * @param index Index to retrieve from. * @return BusinessService at that index */ public BusinessService get (int index) { return (BusinessService) businessService.get (index); } /** * Return current size of the collection. * @return Number of BusinessServices in the collection */ public int size () { return businessService.size (); } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (businessService!=null) { for (int i=0; i < businessService.size(); i++) { ((BusinessService)(businessService.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/datatype/tmodel/000077500000000000000000000000001173667134000205515ustar00rootroot00000000000000uddi4j-2.0.5/src/org/uddi4j/datatype/tmodel/TModel.java000066400000000000000000000334621173667134000226100ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.datatype.tmodel; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.Description; import org.uddi4j.datatype.Name; import org.uddi4j.datatype.OverviewDoc; import org.uddi4j.util.CategoryBag; import org.uddi4j.util.IdentifierBag; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the tModel element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • Constructor passing required fields. *
    • Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • SaveToXML method. Serializes this class within a passed in element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class.
    * In addition, this class contains the tModel keys for the UDDI core tModels. * See * http://www.uddi.org/taxonomies/Core_Taxonomy_OverviewDoc.htm for a * complete list of these core tModels. * *

    Element description:

    * This structure defines metadata about a technology, specification * or namespace qualified list (e.g., taxonomy, organizaton, etc.) * * @author David Melgar (dmelgar@us.ibm.com) * @author Ravi Trivedi (ravi_trivedi@hp.com) * @author Vivek Chopra (vivek_chopra2@non.hp.com) */ public class TModel extends UDDIElement { public static final String UDDI_TAG = "tModel"; //UDDI Core tModels - built-in taxonomies, identifier systems, and relationships /** * UDDI Type Taxonomy [uddi-org:types]
    * This taxonomy assists in general categorization of the tModels themselves. */ public static final String TYPES_TMODEL_KEY = "UUID:C1ACF26D-9672-4404-9D70-39B756E62AB4"; /** * Business Taxonomy: NAICS (1997 Release) [ntis-gov:naics:1997]
    * This tModel defines the NAICS (North American Industry Classification * System) 1997 Release industry taxonomy. * */ public static final String NAICS_TMODEL_KEY = "UUID:C0B9FE13-179F-413D-8A5B-5004DB8E5BB2"; /** * Product Taxonomy: UNSPSC (Version 3.1) [unspsc-org:unspsc:3-1]
    * This tModel defines the UNSPSC (United Nations Standard Products and * Services Code System) version 3.1 product taxonomy. *

    This taxonomy has been superceeded by the Universal Standard Products * and Services Classification (see {@link #UNSPSC_73_TMODEL_KEY}) taxonomy. */ public static final String UNSPSC_TMODEL_KEY = "UUID:DB77450D-9FA8-45D4-A7BC-04411D14E384"; /** * Product and Services Taxonomy:UNSPSC (Version 7.3) [unspsc-org:unspsc]
    * This tModel defines the UNSPSC (Universal Standard Products and Services * Classification) version 7.3 product and services taxonomy. */ public static final String UNSPSC_73_TMODEL_KEY = "UUID:CD153257-086A-4237-B336-6BDCBDCC6634"; /** * ISO 3166 Geographic Taxonomy [uddi-org:iso-ch:3166-1999]
    * This tModel defines the ISO 3166 geographic classification taxonomy. */ public static final String ISO_CH_TMODEL_KEY = "UUID:4E49A8D6-D5A2-4FC2-93A0-0411D8D19E88"; /** * UDDI Other Taxonomy [uddi-org:misc-taxomony]
    * This tModel defines an unidentified taxonomy. */ public static final String GENERAL_KEYWORDS_TMODEL_KEY = "UUID:A035A07C-F362-44dd-8F95-E2B134BF43B4"; /** * UDDI Owning Business [uddi-org:owningBusiness]
    * This tModel identifies the businessEntity that published or owns the * tagged information. Used with tModels to establish an 'owned' * relationship with a registered businessEntity. */ public static final String OWNING_BUSINESS_TMODEL_KEY = "UUID:4064C064-6D14-4F35-8953-9652106476A9"; /** * UDDI businessEntity relationship [uddi-org:relationships]
    * This tModel is used to describe business relationships. Used in the * publisher assertion messages. */ public static final String RELATIONSHIPS_TMODEL_KEY = "UUID:807A2C6A-EE22-470D-ADC7-E0424A337C03"; /** * UDDI Operators [uddi-org:operators]
    * This checked value set is used to identify UDDI operators. */ public static final String OPERATORS_TMODEL_KEY = "UUID:327A56F0-3299-4461-BC23-5CD513E95C55"; /** * D-U-N-S Number Identifier System [dnb-com:D-U-N-S]
    * This tModel is used for the Dun & Bradstreet D-U-N-S Number identifier. */ public static final String D_U_N_S_TMODEL_KEY = "UUID:8609C81E-EE1F-4D5A-B202-3EB13AD01823"; /** * Thomas Register Supplier Identifier Code System * [thomasregister-com:supplierID]
    * This tModel is used for the Thomas Register supplier identifier codes. */ public static final String THOMAS_REGISTER_TMODEL_KEY = "UUID:B1B1BAF5-2329-43E6-AE13-BA8E97195039"; /** * UDDI IsReplacedBy [uddi-org:isReplacedBy]
    * An identifier system used to point (using UDDI keys) to the tModel * (or businessEntity) that is the logical replacement for the one in * which isReplacedBy is used. */ public static final String IS_REPLACED_BY_TMODEL_KEY = "UUID:E59AE320-77A5-11D5-B898-0004AC49CC1E"; /** * Email based web service [uddi-org:smtp]
    * This tModel is used to describe a web service that is invoked through * SMTP email transmissions. These transmissions may be between people or * applications. */ public static final String SMTP_TMODEL_KEY = "UUID:93335D49-3EFB-48A0-ACEA-EA102B60DDC6"; /** * Fax based web service [uddi-org:fax]
    * This tModel is used to describe a web service that is invoked through * fax transmissions. These transmissions may be between people or * applications. */ public static final String FAX_TMODEL_KEY = "UUID:1A2B00BE-6E2C-42F5-875B-56F32686E0E7"; /** * FTP based web service [uddi-org:ftp]
    * This tModel is used to describe a web service that is invoked through * file transfers via the ftp protocol. */ public static final String FTP_TMODEL_KEY = "UUID:5FCF5CD0-629A-4C50-8B16-F94E9CF2A674"; /** * Telephone based web service [uddi-org:telephone]
    * This tModel is used to describe a web service that is invoked through a * telephone call and interaction by voice and/or touch-tone. */ public static final String TELEPHONE_TMODEL_KEY = "UUID:38E12427-5536-4260-A6F9-B5B530E63A07"; /** * Web browser or HTTP based web service [uddi-org:http]
    * This tModel is used to describe a web service that is invoked through a * web browser and/or the HTTP protocol. */ public static final String HTTP_TMODEL_KEY = "UUID:68DE9E80-AD09-469D-8A37-088422BFBC36"; /** * HTTP Web Home Page URL [uddi-org:homepage]
    * This tModel is used as the bindingTemplate fingerprint for a web home * page reference. */ public static final String HOMEPAGE_TMODEL_KEY = "UUID:4CEC1CEF-1F68-4B23-8CB7-8BAA763AEB89"; protected Element base = null; String tModelKey = null; String operator = null; String authorizedName = null; Name name = null; OverviewDoc overviewDoc = null; IdentifierBag identifierBag = null; CategoryBag categoryBag = null; // Vector of Description objects Vector description = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public TModel() { } /** * Construct the object with required fields. * * @param tModelKey String * @param name String */ public TModel(String tModelKey, String name) { this.tModelKey = tModelKey; this.name = new Name(name); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public TModel(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); tModelKey = base.getAttribute("tModelKey"); operator = getAttr(base,"operator"); authorizedName = getAttr(base,"authorizedName"); NodeList nl = null; nl = getChildElementsByTagName(base, Name.UDDI_TAG); if (nl.getLength() > 0) { name = new Name((Element)nl.item(0)); // xml:lang for Name should not be present in TModel if( null != name ) name.setLang(null); } nl = getChildElementsByTagName(base, OverviewDoc.UDDI_TAG); if (nl.getLength() > 0) { overviewDoc = new OverviewDoc((Element)nl.item(0)); } nl = getChildElementsByTagName(base, IdentifierBag.UDDI_TAG); if (nl.getLength() > 0) { identifierBag = new IdentifierBag((Element)nl.item(0)); } nl = getChildElementsByTagName(base, CategoryBag.UDDI_TAG); if (nl.getLength() > 0) { categoryBag = new CategoryBag((Element)nl.item(0)); } nl = getChildElementsByTagName(base, Description.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { description.addElement(new Description((Element)nl.item(i))); } } private String getAttr(Element base, String attrname) { if(base.getAttributeNode(attrname)!=null && base.getAttributeNode(attrname).getSpecified() ) { return base.getAttribute(attrname); } return null; } public void setTModelKey(String s) { tModelKey = s; } public void setOperator(String s) { operator = s; } public void setAuthorizedName(String s) { authorizedName = s; } public void setName(Name s) { name = s; } public void setName(String s) { name = new Name(); name.setText(s); } public void setOverviewDoc(OverviewDoc s) { overviewDoc = s; } public void setIdentifierBag(IdentifierBag s) { identifierBag = s; } public void setCategoryBag(CategoryBag s) { categoryBag = s; } /** * Set description vector. * * @param s Vector of Description objects. */ public void setDescriptionVector(Vector s) { description = s; } /** * Set default (english) description string. * * @param s String */ public void setDefaultDescriptionString(String s) { if (description.size() > 0) { description.setElementAt(new Description(s), 0); } else { description.addElement(new Description(s)); } } public String getTModelKey() { return tModelKey; } public String getOperator() { return operator; } public String getAuthorizedName() { return authorizedName; } public Name getName() { return name; } public String getNameString() { return name.getText(); } public OverviewDoc getOverviewDoc() { return overviewDoc; } public IdentifierBag getIdentifierBag() { return identifierBag; } public CategoryBag getCategoryBag() { return categoryBag; } /** * Get description. * * @return s Vector of Description objects. */ public Vector getDescriptionVector() { return description; } /** * Get default description string. * * @return s String */ public String getDefaultDescriptionString() { if ((description).size() > 0) { Description t = (Description)description.elementAt(0); return t.getText(); } else { return null; } } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. if (tModelKey!=null) { base.setAttribute("tModelKey", tModelKey); } if (operator!=null) { base.setAttribute("operator", operator); } if (authorizedName!=null) { base.setAttribute("authorizedName", authorizedName); } if (name!=null) { // xml:lang for Name should not be present in TModel name.setLang(null); name.saveToXML(base); } if (description!=null) { for (int i=0; i < description.size(); i++) { ((Description)(description.elementAt(i))).saveToXML(base); } } if (overviewDoc!=null) { overviewDoc.saveToXML(base); } if (identifierBag!=null) { identifierBag.saveToXML(base); } if (categoryBag!=null) { categoryBag.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/000077500000000000000000000000001173667134000171425ustar00rootroot00000000000000uddi4j-2.0.5/src/org/uddi4j/request/AddPublisherAssertions.java000066400000000000000000000114441173667134000244320ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.request; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.assertion.PublisherAssertion; import org.uddi4j.util.AuthInfo; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the add_publisherAssertions element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: * *

    This message is used to add relationship assertions to the existing * set of assertions. Relationship assertions consist of a reference to two businessEntity key values. * These values are designated by the fromKey and toKey elements, as well as, a required * expression of directional relationship within the contained keyedReference element. * * @author Ravi Trivedi (ravi_trivedi@hp.com) */ public class AddPublisherAssertions extends UDDIElement { public static final String UDDI_TAG = "add_publisherAssertions"; protected Element base = null; AuthInfo authInfo = null; Vector pubAssertion = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public AddPublisherAssertions() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public AddPublisherAssertions(Element base) throws UDDIException { super(base); NodeList nl = null; nl = getChildElementsByTagName(base, AuthInfo.UDDI_TAG); if (nl.getLength() > 0) { authInfo = new AuthInfo((Element)nl.item(0)); } nl = getChildElementsByTagName(base, PublisherAssertion.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { pubAssertion.addElement(new PublisherAssertion((Element)nl.item(i))); } } /** * Construct the object with required fields. * * @param authInfo String * @param pubAssertVector Vector */ public AddPublisherAssertions(String authInfo, Vector pubAssertVector) { this.authInfo = new AuthInfo(); this.authInfo.setText(authInfo); this.pubAssertion = pubAssertVector; } public void setPublisherAssertionVector(Vector pubAssertVector ) { this.pubAssertion = pubAssertVector; } public Vector getPublisherAssertionVector() { return this.pubAssertion; } public AuthInfo getAuthInfo() { return this.authInfo; } public void setAuthInfo(AuthInfo s) { this.authInfo = s; } public String getAuthInfoString() { return this.authInfo.getText(); } public void setAuthInfo(String s) { authInfo = new AuthInfo(); authInfo.setText(s); } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes base.setAttribute("generic", UDDIElement.GENERIC); if (authInfo!=null) { authInfo.saveToXML(base); } if (pubAssertion!=null) { for (int i=0; i < pubAssertion.size(); i++) { ((PublisherAssertion)(pubAssertion.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/DeleteBinding.java000066400000000000000000000130201173667134000224760ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.request; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.util.AuthInfo; import org.uddi4j.util.BindingKey; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the delete_binding element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This message is used to delete information about a previously * registered bindingTemplate structure. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class DeleteBinding extends UDDIElement { public static final String UDDI_TAG = "delete_binding"; protected Element base = null; AuthInfo authInfo = null; // Vector of BindingKey objects Vector bindingKey = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public DeleteBinding() { } /** * Construct the object with required fields. * * @param authInfo String * @param bindingKeyStrings Vector of BindingKey Strings. */ public DeleteBinding(String authInfo, Vector bindingKeyStrings) { this.authInfo = new AuthInfo( authInfo ); Vector objects; objects = new Vector(); for (int i = 0; i < bindingKeyStrings.size(); i++) { objects.addElement( new BindingKey((String)bindingKeyStrings.elementAt(i)) ); } this.bindingKey = objects; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public DeleteBinding(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, AuthInfo.UDDI_TAG); if (nl.getLength() > 0) { authInfo = new AuthInfo((Element)nl.item(0)); } nl = getChildElementsByTagName(base, BindingKey.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { bindingKey.addElement(new BindingKey((Element)nl.item(i))); } } public void setAuthInfo(AuthInfo s) { authInfo = s; } public void setAuthInfo(String s) { authInfo = new AuthInfo(); authInfo.setText(s); } /** * Set bindingKey vector * * @param s Vector of BindingKey objects. */ public void setBindingKeyVector(Vector s) { bindingKey = s; } /** * Set bindingKey * * @param s Vector of String objects. */ public void setBindingKeyStrings(Vector s) { bindingKey = new Vector(); for (int i = 0; i < s.size(); i++) { bindingKey.addElement( new BindingKey((String)s.elementAt(i)) ); } } public AuthInfo getAuthInfo() { return authInfo; } public String getAuthInfoString() { if(authInfo!=null) return authInfo.getText(); else return null; } /** * Get bindingKey * * @return s Vector of BindingKey objects. */ public Vector getBindingKeyVector() { return bindingKey; } /** * Get bindingKey * * @return s Vector of String objects. */ public Vector getBindingKeyStrings() { Vector strings = new Vector(); for (int i = 0; i < bindingKey.size(); i++) { strings.addElement( ((BindingKey)bindingKey.elementAt(i)).getText()); } return strings; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. base.setAttribute("generic", UDDIElement.GENERIC); if (authInfo!=null) { authInfo.saveToXML(base); } if (bindingKey!=null) { for (int i=0; i < bindingKey.size(); i++) { ((BindingKey)(bindingKey.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/DeleteBusiness.java000066400000000000000000000131001173667134000227160ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.request; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.util.AuthInfo; import org.uddi4j.util.BusinessKey; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the delete_business element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This message is used to delete information about a previously * registered businessEntity. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class DeleteBusiness extends UDDIElement { public static final String UDDI_TAG = "delete_business"; protected Element base = null; AuthInfo authInfo = null; // Vector of BusinessKey objects Vector businessKey = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public DeleteBusiness() { } /** * Construct the object with required fields. * * @param authInfo String * @param businessKeyStrings Vector of BusinessKey Strings. */ public DeleteBusiness(String authInfo, Vector businessKeyStrings) { this.authInfo = new AuthInfo( authInfo ); Vector objects; objects = new Vector(); for (int i = 0; i < businessKeyStrings.size(); i++) { objects.addElement( new BusinessKey((String)businessKeyStrings.elementAt(i)) ); } this.businessKey = objects; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public DeleteBusiness(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, AuthInfo.UDDI_TAG); if (nl.getLength() > 0) { authInfo = new AuthInfo((Element)nl.item(0)); } nl = getChildElementsByTagName(base, BusinessKey.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { businessKey.addElement(new BusinessKey((Element)nl.item(i))); } } public void setAuthInfo(AuthInfo s) { authInfo = s; } public void setAuthInfo(String s) { authInfo = new AuthInfo(); authInfo.setText(s); } /** * Set businessKey vector * * @param s Vector of BusinessKey objects. */ public void setBusinessKeyVector(Vector s) { businessKey = s; } /** * Set businessKey * * @param s Vector of String objects. */ public void setBusinessKeyStrings(Vector s) { businessKey = new Vector(); for (int i = 0; i < s.size(); i++) { businessKey.addElement( new BusinessKey((String)s.elementAt(i)) ); } } public AuthInfo getAuthInfo() { return authInfo; } public String getAuthInfoString() { if(authInfo!=null) return authInfo.getText(); else return null; } /** * Get businessKey * * @return s Vector of BusinessKey objects. */ public Vector getBusinessKeyVector() { return businessKey; } /** * Get businessKey * * @return s Vector of String objects. */ public Vector getBusinessKeyStrings() { Vector strings = new Vector(); for (int i = 0; i < businessKey.size(); i++) { strings.addElement( ((BusinessKey)businessKey.elementAt(i)).getText()); } return strings; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. base.setAttribute("generic", UDDIElement.GENERIC); if (authInfo!=null) { authInfo.saveToXML(base); } if (businessKey!=null) { for (int i=0; i < businessKey.size(); i++) { ((BusinessKey)(businessKey.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/DeletePublisherAssertions.java000066400000000000000000000127041173667134000251440ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.request; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.assertion.PublisherAssertion; import org.uddi4j.util.AuthInfo; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the delete_publisherAssertions element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    Used to delete specific publisher assertions from the assertion collection controlled by a particular * publisher account. Deleting the assertion collection will affect the visibility of assertions from the * business relationships. Deleting an assertion will cause any relationships based on that assertion to be * invalidated. * * @author Mahesh C S (csmahesh@india.hp.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class DeletePublisherAssertions extends UDDIElement { public static final String UDDI_TAG = "delete_publisherAssertions"; protected Element base = null; AuthInfo authInfo = null; Vector publisherAssertionVector = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public DeletePublisherAssertions() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public DeletePublisherAssertions(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, AuthInfo.UDDI_TAG); if (nl.getLength() > 0) { authInfo = new AuthInfo((Element)nl.item(0)); } nl = getChildElementsByTagName(base, PublisherAssertion.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { publisherAssertionVector.addElement(new PublisherAssertion((Element)nl.item(i))); } } /** * Construct the object with required fields. * * @param authInfo String * @param pubAssertVector Vector */ public DeletePublisherAssertions(String authInfo, Vector pubAssertVector) throws UDDIException { this.authInfo = new AuthInfo( authInfo ); Vector objects; objects = new Vector(); for (int i = 0; i < pubAssertVector.size(); i++) { objects.addElement( new PublisherAssertion((Element)pubAssertVector.elementAt(i))); } this.publisherAssertionVector = objects; } /** * Set PublisherAssertion vector * * @param pubAssertVector Vector of PublisherAssertion objects. */ public void setPublisherAssertionVector(Vector pubAssertVector ) { publisherAssertionVector = pubAssertVector; } /** * Get PublisherAssertion vector * * @return Vector of PublisherAssertion objects. */ public Vector getPublisherAssertionVector() { return publisherAssertionVector; } public AuthInfo getAuthInfo() { return authInfo; } public void setAuthInfo(AuthInfo s) { authInfo = s; } public String getAuthInfoString() { if(authInfo!=null) return authInfo.getText(); else return null; } public void setAuthInfo(String s) { authInfo = new AuthInfo(); authInfo.setText(s); } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. base.setAttribute("generic", UDDIElement.GENERIC); if (authInfo!=null) { authInfo.saveToXML(base); } if (publisherAssertionVector!=null) { for (int i=0; i < publisherAssertionVector.size(); i++) { ((PublisherAssertion)(publisherAssertionVector.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/DeleteService.java000066400000000000000000000130311173667134000225260ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.request; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.util.AuthInfo; import org.uddi4j.util.ServiceKey; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the delete_service element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This message is used to delete information about a previously * registered businessService structure. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class DeleteService extends UDDIElement { public static final String UDDI_TAG = "delete_service"; protected Element base = null; AuthInfo authInfo = null; // Vector of ServiceKey objects Vector serviceKey = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public DeleteService() { } /** * Construct the object with required fields. * * @param authInfo String * @param serviceKeyStrings Vector of ServiceKey Strings. */ public DeleteService(String authInfo, Vector serviceKeyStrings) { this.authInfo = new AuthInfo( authInfo ); Vector objects; objects = new Vector(); for (int i = 0; i < serviceKeyStrings.size(); i++) { objects.addElement( new ServiceKey((String)serviceKeyStrings.elementAt(i)) ); } this.serviceKey = objects; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public DeleteService(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, AuthInfo.UDDI_TAG); if (nl.getLength() > 0) { authInfo = new AuthInfo((Element)nl.item(0)); } nl = getChildElementsByTagName(base, ServiceKey.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { serviceKey.addElement(new ServiceKey((Element)nl.item(i))); } } public void setAuthInfo(AuthInfo s) { authInfo = s; } public void setAuthInfo(String s) { authInfo = new AuthInfo(); authInfo.setText(s); } /** * Set serviceKey vector. * * @param s Vector of ServiceKey objects. */ public void setServiceKeyVector(Vector s) { serviceKey = s; } /** * Set serviceKey. * * @param s Vector of String objects. */ public void setServiceKeyStrings(Vector s) { serviceKey = new Vector(); for (int i = 0; i < s.size(); i++) { serviceKey.addElement( new ServiceKey((String)s.elementAt(i)) ); } } public AuthInfo getAuthInfo() { return authInfo; } public String getAuthInfoString() { if(authInfo!=null) return authInfo.getText(); else return null; } /** * Get serviceKey vector. * * @return s Vector of ServiceKey objects. */ public Vector getServiceKeyVector() { return serviceKey; } /** * Get serviceKey. * * @return s Vector of String objects. */ public Vector getServiceKeyStrings() { Vector strings = new Vector(); for (int i = 0; i < serviceKey.size(); i++) { strings.addElement( ((ServiceKey)serviceKey.elementAt(i)).getText()); } return strings; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes base.setAttribute("generic", UDDIElement.GENERIC); if (authInfo!=null) { authInfo.saveToXML(base); } if (serviceKey!=null) { for (int i=0; i < serviceKey.size(); i++) { ((ServiceKey)(serviceKey.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/DeleteTModel.java000066400000000000000000000127401173667134000223200ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.request; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.util.AuthInfo; import org.uddi4j.util.TModelKey; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the delete_tModel element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This message is used to delete information about a previously * registered tModel. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class DeleteTModel extends UDDIElement { public static final String UDDI_TAG = "delete_tModel"; protected Element base = null; AuthInfo authInfo = null; // Vector of TModelKey objects Vector tModelKey = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public DeleteTModel() { } /** * Construct the object with required fields. * * @param authInfo String * @param tModelKeyStrings Vector of TModelKey Strings. */ public DeleteTModel(String authInfo, Vector tModelKeyStrings) { this.authInfo = new AuthInfo( authInfo ); Vector objects; objects = new Vector(); for (int i = 0; i < tModelKeyStrings.size(); i++) { objects.addElement( new TModelKey((String)tModelKeyStrings.elementAt(i)) ); } this.tModelKey = objects; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public DeleteTModel(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, AuthInfo.UDDI_TAG); if (nl.getLength() > 0) { authInfo = new AuthInfo((Element)nl.item(0)); } nl = getChildElementsByTagName(base, TModelKey.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { tModelKey.addElement(new TModelKey((Element)nl.item(i))); } } public void setAuthInfo(AuthInfo s) { authInfo = s; } public void setAuthInfo(String s) { authInfo = new AuthInfo(); authInfo.setText(s); } /** * Set tModelKey vector. * * @param s Vector of TModelKey objects. */ public void setTModelKeyVector(Vector s) { tModelKey = s; } /** * Set tModelKey. * * @param s Vector of String objects. */ public void setTModelKeyStrings(Vector s) { tModelKey = new Vector(); for (int i = 0; i < s.size(); i++) { tModelKey.addElement( new TModelKey((String)s.elementAt(i)) ); } } public AuthInfo getAuthInfo() { return authInfo; } public String getAuthInfoString() { if(authInfo!=null) return authInfo.getText(); else return null; } /** * Get tModelKey vector. * * @return s Vector of TModelKey objects. */ public Vector getTModelKeyVector() { return tModelKey; } /** * Get tModelKey. * * @return s Vector of String objects. */ public Vector getTModelKeyStrings() { Vector strings = new Vector(); for (int i = 0; i < tModelKey.size(); i++) { strings.addElement( ((TModelKey)tModelKey.elementAt(i)).getText()); } return strings; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. base.setAttribute("generic", UDDIElement.GENERIC); if (authInfo!=null) { authInfo.saveToXML(base); } if (tModelKey!=null) { for (int i=0; i < tModelKey.size(); i++) { ((TModelKey)(tModelKey.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/DiscardAuthToken.java000066400000000000000000000071751173667134000232130ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.request; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.util.AuthInfo; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the discard_authToken element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This optional message is used to deactivate an authentication token * that was obtained by a call to get_authToken. * * @author David Melgar (dmelgar@us.ibm.com) */ public class DiscardAuthToken extends UDDIElement { public static final String UDDI_TAG = "discard_authToken"; protected Element base = null; AuthInfo authInfo = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public DiscardAuthToken() { } /** * Construct the object with required fields. * * @param authInfo String */ public DiscardAuthToken(String authInfo) { this.authInfo = new AuthInfo( authInfo ); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public DiscardAuthToken(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, AuthInfo.UDDI_TAG); if (nl.getLength() > 0) { authInfo = new AuthInfo((Element)nl.item(0)); } } public void setAuthInfo(AuthInfo s) { authInfo = s; } public void setAuthInfo(String s) { authInfo = new AuthInfo(); authInfo.setText(s); } public AuthInfo getAuthInfo() { return authInfo; } public String getAuthInfoString() { return authInfo.getText(); } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. base.setAttribute("generic", UDDIElement.GENERIC); if (authInfo!=null) { authInfo.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/FindBinding.java000066400000000000000000000115121173667134000221600ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.request; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.util.FindQualifiers; import org.uddi4j.util.TModelBag; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the find_binding element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: * *

    This message is used to search for summary results listing registered * bindingTemplate data within a businessService matching specific criteria. * * @author David Melgar (dmelgar@us.ibm.com) */ public class FindBinding extends UDDIElement { public static final String UDDI_TAG = "find_binding"; protected Element base = null; String maxRows = null; String serviceKey = null; FindQualifiers findQualifiers = null; TModelBag tModelBag = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public FindBinding() { } /** * Construct the object with required fields. * * @param serviceKey String * @param TModelBag TModelBag object */ public FindBinding(String serviceKey, TModelBag tModelBag) { this.serviceKey = serviceKey; this.tModelBag = tModelBag; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public FindBinding(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); maxRows = base.getAttribute("maxRows"); serviceKey = base.getAttribute("serviceKey"); NodeList nl = null; nl = getChildElementsByTagName(base, FindQualifiers.UDDI_TAG); if (nl.getLength() > 0) { findQualifiers = new FindQualifiers((Element)nl.item(0)); } nl = getChildElementsByTagName(base, TModelBag.UDDI_TAG); if (nl.getLength() > 0) { tModelBag = new TModelBag((Element)nl.item(0)); } } public void setMaxRows(String s) { maxRows = s; } public void setMaxRows(int s) { maxRows = Integer.toString(s); } public void setServiceKey(String s) { serviceKey = s; } public void setFindQualifiers(FindQualifiers s) { findQualifiers = s; } public void setTModelBag(TModelBag s) { tModelBag = s; } public String getMaxRows() { return maxRows; } public int getMaxRowsInt() { return Integer.parseInt(maxRows); } public String getServiceKey() { return serviceKey; } public FindQualifiers getFindQualifiers() { return findQualifiers; } public TModelBag getTModelBag() { return tModelBag; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. base.setAttribute("generic", UDDIElement.GENERIC); if (maxRows!=null) { base.setAttribute("maxRows", maxRows); } if (serviceKey!=null) { base.setAttribute("serviceKey", serviceKey); } if (findQualifiers!=null) { findQualifiers.saveToXML(base); } if (tModelBag!=null) { tModelBag.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/FindBusiness.java000066400000000000000000000210261173667134000224020ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.request; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.Name; import org.uddi4j.util.CategoryBag; import org.uddi4j.util.DiscoveryURLs; import org.uddi4j.util.FindQualifiers; import org.uddi4j.util.IdentifierBag; import org.uddi4j.util.TModelBag; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the find_business element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This message is used to search for summary results listing registered * businessEntity data matching specific criteria. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ravi Trivedi (ravi_trivedi@hp.com) * @author Vivek Chopra (vivek@soaprpc.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class FindBusiness extends UDDIElement { public static final String UDDI_TAG = "find_business"; protected Element base = null; String maxRows = null; FindQualifiers findQualifiers = null; IdentifierBag identifierBag = null; CategoryBag categoryBag = null; TModelBag tModelBag = null; DiscoveryURLs discoveryURLs = null; Vector nameVector = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public FindBusiness() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public FindBusiness(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); maxRows = base.getAttribute("maxRows"); NodeList nl = null; nl = getChildElementsByTagName(base, FindQualifiers.UDDI_TAG); if (nl.getLength() > 0) { findQualifiers = new FindQualifiers((Element)nl.item(0)); } nl = getChildElementsByTagName(base, Name.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { nameVector.addElement(new Name((Element)nl.item(i))); } nl = getChildElementsByTagName(base, IdentifierBag.UDDI_TAG); if (nl.getLength() > 0) { identifierBag = new IdentifierBag((Element)nl.item(0)); } nl = getChildElementsByTagName(base, CategoryBag.UDDI_TAG); if (nl.getLength() > 0) { categoryBag = new CategoryBag((Element)nl.item(0)); } nl = getChildElementsByTagName(base, TModelBag.UDDI_TAG); if (nl.getLength() > 0) { tModelBag = new TModelBag((Element)nl.item(0)); } nl = getChildElementsByTagName(base, DiscoveryURLs.UDDI_TAG); if (nl.getLength() > 0) { discoveryURLs = new DiscoveryURLs((Element)nl.item(0)); } } public void setMaxRows(String s) { maxRows = s; } public void setMaxRows(int s) { maxRows = Integer.toString(s); } public void setFindQualifiers(FindQualifiers s) { findQualifiers = s; } /** * @deprecated This method has been deprecated. Use * {@link #setNameVector(Vector)} or * {@link #setDefaultName(Name)} */ public void setName(Name s) { setDefaultName(s); } /** * @deprecated This method has been deprecated. Use * {@link #setNameVector(Vector)} or * {@link #setDefaultNameString(String, String)} */ public void setName(String s) { setDefaultNameString(s,null); } /** * This method stores this name as the Default Name * (i.e., places it in the first location in the Vector) */ public void setDefaultName(Name name) { if (nameVector.size() > 0) { nameVector.setElementAt(name,0); } else { nameVector.addElement(name); } } /** * This stores this String, in the given language, as the Default Name * (i.e., places it in the first location in the Vector.) */ public void setDefaultNameString(String value, String lang) { Name name = new Name(value, lang); if (nameVector.size() > 0) { nameVector.setElementAt(name,0); } else { nameVector.addElement(name); } } /** * @param s Vector of Name objects */ public void setNameVector(Vector s) { nameVector = s; } public void setIdentifierBag(IdentifierBag s) { identifierBag = s; } public void setCategoryBag(CategoryBag s) { categoryBag = s; } public void setTModelBag(TModelBag s) { tModelBag = s; } public void setDiscoveryURLs(DiscoveryURLs s) { discoveryURLs = s; } public String getMaxRows() { return maxRows; } public int getMaxRowsInt() { return Integer.parseInt(maxRows); } public FindQualifiers getFindQualifiers() { return findQualifiers; } /** * @deprecated This method has been deprecated. Use * {@link #getNameVector()} or * {@link #getDefaultName()} */ public Name getName() { return getDefaultName(); } /** * @deprecated This method has been deprecated. Use * {@link #getNameVector()} or * {@link #getDefaultNameString()} */ public String getNameString() { return getDefaultNameString(); } public Name getDefaultName() { if(nameVector.size() > 0) return (Name) nameVector.elementAt(0); else return null; } public String getDefaultNameString() { if ((nameVector).size() > 0) { return ((Name)nameVector.elementAt(0)).getText(); } else { return null; } } /** * Get all names. * * @return Vector of Name objects. */ public Vector getNameVector() { return nameVector ; } public IdentifierBag getIdentifierBag() { return identifierBag; } public CategoryBag getCategoryBag() { return categoryBag; } public TModelBag getTModelBag() { return tModelBag; } public DiscoveryURLs getDiscoveryURLs() { return discoveryURLs; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. base.setAttribute("generic", UDDIElement.GENERIC); if (maxRows!=null) { base.setAttribute("maxRows", maxRows); } if (findQualifiers!=null) { findQualifiers.saveToXML(base); } if (nameVector!=null) { for (int i=0; i < nameVector.size(); i++) { ((Name)(nameVector.elementAt(i))).saveToXML(base); } } if (identifierBag!=null) { identifierBag.saveToXML(base); } if (categoryBag!=null) { categoryBag.saveToXML(base); } if (tModelBag!=null) { tModelBag.saveToXML(base); } if (discoveryURLs!=null) { discoveryURLs.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/FindRelatedBusinesses.java000066400000000000000000000127171173667134000242420ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.request; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.util.BusinessKey; import org.uddi4j.util.FindQualifiers; import org.uddi4j.util.KeyedReference; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the find_relatedBusinesses element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: * *

    This message returns zero or more relatedBusinessInfo structures. For the * businessEntity specified in the find_relatedBusinesses class, the response * reports that business relationships with other businessEntity registrations * are complete. Business relationships are complete between two businessEntity * registrations when the publishers controlling each of the businessEntity * structures involved in the relationship set assertions affirming that * relationship. * * @author Ravi Trivedi (ravi_trivedi@hp.com) */ public class FindRelatedBusinesses extends UDDIElement { public static final String UDDI_TAG = "find_relatedBusinesses"; protected Element base = null; String maxRows = null; FindQualifiers findQualifiers = null; KeyedReference keyRef = null; String businessKey = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public FindRelatedBusinesses() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public FindRelatedBusinesses(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); maxRows = base.getAttribute("maxRows"); NodeList nl = null; nl = getChildElementsByTagName(base, BusinessKey.UDDI_TAG); if (nl.getLength() > 0) { businessKey = new BusinessKey((Element)nl.item(0)).getText(); } nl = getChildElementsByTagName(base, FindQualifiers.UDDI_TAG); if (nl.getLength() > 0) { findQualifiers = new FindQualifiers((Element)nl.item(0)); } nl = getChildElementsByTagName(base, KeyedReference.UDDI_TAG); if (nl.getLength() > 0) { keyRef = new KeyedReference((Element)nl.item(0)); } } /** * Construct the object with required fields. * * @param businessKey String */ public FindRelatedBusinesses(String businessKey) { this.businessKey = businessKey; } public void setBusinessKey(String newBusinessKey) { this.businessKey = newBusinessKey; } public String getBusinessKey() { return this.businessKey; } public void setFindQualifiers(FindQualifiers fqs) { this.findQualifiers = fqs; } public FindQualifiers getFindQualifiers() { return this.findQualifiers; } public void setKeyedReference (KeyedReference newKeyedReference) { this.keyRef = newKeyedReference; } public KeyedReference getKeyedReference() { return this.keyRef; } public String getMaxRows() { return this.maxRows; } public void setMaxRows(String rows) { this.maxRows = rows; } public int getMaxRowsInt() { return Integer.parseInt(this.maxRows); } public void setMaxRows(int s) { maxRows = Integer.toString(s); } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. base.setAttribute("generic", UDDIElement.GENERIC); if (maxRows!=null) { base.setAttribute("maxRows", maxRows); } if (findQualifiers!=null) { findQualifiers.saveToXML(base); } if (businessKey!=null) { (new BusinessKey(businessKey)).saveToXML(base); } if(keyRef != null ) { keyRef.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/FindService.java000066400000000000000000000200731173667134000222100ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.request; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.Name; import org.uddi4j.util.CategoryBag; import org.uddi4j.util.FindQualifiers; import org.uddi4j.util.TModelBag; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the find_service element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This message is used to search for summary results that list registered * businessService data that matches specific criteria. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ravi Trivedi (ravi_trivedi@hp.com) * @author Vivek Chopra (vivek@soaprpc.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class FindService extends UDDIElement { public static final String UDDI_TAG = "find_service"; protected Element base = null; String maxRows = null; String businessKey = null; FindQualifiers findQualifiers = null; CategoryBag categoryBag = null; TModelBag tModelBag = null; Vector nameVector = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public FindService() { } /** * Construct the object with required fields. * * @param businessKey String */ public FindService(String businessKey) { this.businessKey = businessKey; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public FindService(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); maxRows = base.getAttribute("maxRows"); businessKey = base.getAttribute("businessKey"); NodeList nl = null; nl = getChildElementsByTagName(base, FindQualifiers.UDDI_TAG); if (nl.getLength() > 0) { findQualifiers = new FindQualifiers((Element)nl.item(0)); } nl = getChildElementsByTagName(base, Name.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { nameVector.addElement(new Name((Element)nl.item(i))); } nl = getChildElementsByTagName(base, CategoryBag.UDDI_TAG); if (nl.getLength() > 0) { categoryBag = new CategoryBag((Element)nl.item(0)); } nl = getChildElementsByTagName(base, TModelBag.UDDI_TAG); if (nl.getLength() > 0) { tModelBag = new TModelBag((Element)nl.item(0)); } } public void setMaxRows(String s) { maxRows = s; } public void setMaxRows(int s) { maxRows = Integer.toString(s); } public void setBusinessKey(String s) { businessKey = s; } public void setFindQualifiers(FindQualifiers s) { findQualifiers = s; } /** * @deprecated This method has been deprecated. Use * {@link #setNameVector(Vector)} or * {@link #setDefaultName(Name)} */ public void setName(Name s) { setDefaultName(s); } /** * @deprecated This method has been deprecated. Use * {@link #setNameVector(Vector)} or * {@link #setDefaultNameString(String, String)} */ public void setName(String s) { setDefaultNameString(s,null); } /** * This method stores this name as the Default Name * (i.e., places it in the first location in the Vector) */ public void setDefaultName(Name name) { if (nameVector.size() > 0) { nameVector.setElementAt(name,0); } else { nameVector.addElement(name); } } /** * This method stores this String, in the given language, as the * Default Name (i.e., places it in the first location in the Vector). */ public void setDefaultNameString(String value, String lang) { Name name = new Name(value, lang); if (nameVector.size() > 0) { nameVector.setElementAt(name,0); } else { nameVector.addElement(name); } } /** * @param s Vector of Name objects */ public void setNameVector(Vector s) { nameVector = s; } public void setCategoryBag(CategoryBag s) { categoryBag = s; } public void setTModelBag(TModelBag s) { tModelBag = s; } public String getMaxRows() { return maxRows; } public int getMaxRowsInt() { return Integer.parseInt(maxRows); } public String getBusinessKey() { return businessKey; } public FindQualifiers getFindQualifiers() { return findQualifiers; } /** * @deprecated This method has been deprecated. Use * {@link #getNameVector()} or * {@link #getDefaultName()} */ public Name getName() { return getDefaultName(); } /** * @deprecated This method has been deprecated. Use * {@link #getNameVector()} or * {@link #getDefaultNameString()} */ public String getNameString() { return getDefaultNameString(); } public Name getDefaultName() { if(nameVector.size() > 0) return (Name) nameVector.elementAt(0); else return null; } public String getDefaultNameString() { if ((nameVector).size() > 0) { return ((Name)nameVector.elementAt(0)).getText(); } else { return null; } } /** * Get all names. * * @return Vector of Name objects. */ public Vector getNameVector() { return nameVector ; } public CategoryBag getCategoryBag() { return categoryBag; } public TModelBag getTModelBag() { return tModelBag; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. base.setAttribute("generic", UDDIElement.GENERIC); if (maxRows!=null) { base.setAttribute("maxRows", maxRows); } if (businessKey!=null) { base.setAttribute("businessKey", businessKey); } if (findQualifiers!=null) { findQualifiers.saveToXML(base); } if (nameVector!=null) { for (int i=0; i < nameVector.size(); i++) { ((Name)(nameVector.elementAt(i))).saveToXML(base); } } if (categoryBag!=null) { categoryBag.saveToXML(base); } if (tModelBag!=null) { tModelBag.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/FindTModel.java000066400000000000000000000126221173667134000217750ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.request; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.Name; import org.uddi4j.util.CategoryBag; import org.uddi4j.util.FindQualifiers; import org.uddi4j.util.IdentifierBag; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the find_tModel element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This message is used to search for summary results that lists registered * tModel data that matches specific criteria. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class FindTModel extends UDDIElement { public static final String UDDI_TAG = "find_tModel"; protected Element base = null; String maxRows = null; FindQualifiers findQualifiers = null; Name name = null; IdentifierBag identifierBag = null; CategoryBag categoryBag = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public FindTModel() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public FindTModel(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); maxRows = base.getAttribute("maxRows"); NodeList nl = null; nl = getChildElementsByTagName(base, FindQualifiers.UDDI_TAG); if (nl.getLength() > 0) { findQualifiers = new FindQualifiers((Element)nl.item(0)); } nl = getChildElementsByTagName(base, Name.UDDI_TAG); if (nl.getLength() > 0) { name = new Name((Element)nl.item(0)); } nl = getChildElementsByTagName(base, IdentifierBag.UDDI_TAG); if (nl.getLength() > 0) { identifierBag = new IdentifierBag((Element)nl.item(0)); } nl = getChildElementsByTagName(base, CategoryBag.UDDI_TAG); if (nl.getLength() > 0) { categoryBag = new CategoryBag((Element)nl.item(0)); } } public void setMaxRows(String s) { maxRows = s; } public void setMaxRows(int s) { maxRows = Integer.toString(s); } public void setFindQualifiers(FindQualifiers s) { findQualifiers = s; } public void setName(Name s) { name = s; } public void setName(String s) { if (s !=null && !s.equals ("")) { name = new Name(); name.setText(s); } } public void setIdentifierBag(IdentifierBag s) { identifierBag = s; } public void setCategoryBag(CategoryBag s) { categoryBag = s; } public String getMaxRows() { return maxRows; } public int getMaxRowsInt() { return Integer.parseInt(maxRows); } public FindQualifiers getFindQualifiers() { return findQualifiers; } public Name getName() { return name; } public String getNameString() { if(name!=null) return name.getText(); else return null; } public IdentifierBag getIdentifierBag() { return identifierBag; } public CategoryBag getCategoryBag() { return categoryBag; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. base.setAttribute("generic", UDDIElement.GENERIC); if (maxRows!=null) { base.setAttribute("maxRows", maxRows); } if (findQualifiers!=null) { findQualifiers.saveToXML(base); } if (name!=null) { name.saveToXML(base); } if (identifierBag!=null) { identifierBag.saveToXML(base); } if (categoryBag!=null) { categoryBag.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/GetAssertionStatusReport.java000066400000000000000000000127651173667134000250270ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.request; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.response.CompletionStatus; import org.uddi4j.util.AuthInfo; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the get_assertionStatusReport element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This class returns all complete and incomplete assertions. It also provides * some administrative functions, such as, determining if there are * outstanding, or incomplete assertions about relationships between * the publisher account and associated businesses. * * @author Mahesh C S (csmahesh@india.hp.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class GetAssertionStatusReport extends UDDIElement { public static final String UDDI_TAG = "get_assertionStatusReport"; protected Element base = null; AuthInfo authInfo = null; CompletionStatus completionStatus = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public GetAssertionStatusReport() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public GetAssertionStatusReport(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, AuthInfo.UDDI_TAG); if (nl.getLength() > 0) { authInfo = new AuthInfo((Element)nl.item(0)); } if (nl.getLength() > 0) { completionStatus = new CompletionStatus((Element)nl.item(0)); } } /** * Construct the object with required fields. * * @param authInfo String */ public GetAssertionStatusReport(String authInfo) { this.authInfo = new AuthInfo(authInfo); } /** * Construct the object with required fields. * * @param authInfo String * @param completion String */ public GetAssertionStatusReport(String authInfo, String completion) { this.authInfo = new AuthInfo(authInfo); this.completionStatus = new CompletionStatus(); this.completionStatus.setText(completion); } /** * Construct the object with required fields. * * @param authInfo String * @param completion CompletionStatus */ public GetAssertionStatusReport(String authInfo, CompletionStatus completion) { this.authInfo = new AuthInfo(authInfo); this.completionStatus = completion; } public CompletionStatus getCompletionStatus() { return completionStatus; } public void setCompletionStatus(CompletionStatus status) { completionStatus = status; } public String getCompletionStatusString() { if(completionStatus!=null) return completionStatus.getText(); else return null; } public void setCompletionStatusString(String s) { completionStatus = new CompletionStatus(); completionStatus.setText(s); } public AuthInfo getAuthInfo() { return authInfo; } public void setAuthInfo(AuthInfo s) { authInfo = s; } public String getAuthInfoString() { if(authInfo != null) return authInfo.getText(); else return null; } public void setAuthInfo(String s) { authInfo = new AuthInfo(); authInfo.setText(s); } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. base.setAttribute("generic", UDDIElement.GENERIC); if (authInfo!=null) { authInfo.saveToXML(base); } if (completionStatus!=null) { completionStatus.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/GetAuthToken.java000066400000000000000000000067761173667134000223670ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.request; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the get_authToken element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This optional message is used to request an authentication token. The * response is an authToken message. * * @author David Melgar (dmelgar@us.ibm.com) */ public class GetAuthToken extends UDDIElement { public static final String UDDI_TAG = "get_authToken"; protected Element base = null; String userID = null; String cred = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public GetAuthToken() { } /** * Construct the object with required fields. * * @param userID String * @param cred String */ public GetAuthToken(String userID, String cred) { this.userID = userID; this.cred = cred; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public GetAuthToken(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); userID = base.getAttribute("userID"); cred = base.getAttribute("cred"); } public void setUserID(String s) { userID = s; } public void setCred(String s) { cred = s; } public String getUserID() { return userID; } public String getCred() { return cred; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. base.setAttribute("generic", UDDIElement.GENERIC); if (userID!=null) { base.setAttribute("userID", userID); } if (cred!=null) { base.setAttribute("cred", cred); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/GetBindingDetail.java000066400000000000000000000114161173667134000231450ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.request; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.util.BindingKey; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the get_bindingDetail element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This message is used to get the detailed information that is registered * about bindingTemplate data that matches specific key value(s). * * @author David Melgar (dmelgar@us.ibm.com) */ public class GetBindingDetail extends UDDIElement { public static final String UDDI_TAG = "get_bindingDetail"; protected Element base = null; // Vector of BindingKey objects Vector bindingKey = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public GetBindingDetail() { } /** * Construct the object with required fields. * * @param bindingKeyStrings Vector of BindingKey Strings. */ public GetBindingDetail(Vector bindingKeyStrings) { Vector objects; objects = new Vector(); for (int i = 0; i < bindingKeyStrings.size(); i++) { objects.addElement( new BindingKey((String)bindingKeyStrings.elementAt(i)) ); } this.bindingKey = objects; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public GetBindingDetail(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, BindingKey.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { bindingKey.addElement(new BindingKey((Element)nl.item(i))); } } /** * Set bindingKey vector. * * @param s Vector of BindingKey objects. */ public void setBindingKeyVector(Vector s) { bindingKey = s; } /** * Set bindingKey. * * @param s Vector of String objects. */ public void setBindingKeyStrings(Vector s) { bindingKey = new Vector(); for (int i = 0; i < s.size(); i++) { bindingKey.addElement( new BindingKey((String)s.elementAt(i)) ); } } /** * Get bindingKey vector. * * @return s Vector of BindingKey objects. */ public Vector getBindingKeyVector() { return bindingKey; } /** * Get bindingKey. * * @return s Vector of String objects. */ public Vector getBindingKeyStrings() { Vector strings = new Vector(); for (int i = 0; i < bindingKey.size(); i++) { strings.addElement( ((BindingKey)bindingKey.elementAt(i)).getText()); } return strings; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. base.setAttribute("generic", UDDIElement.GENERIC); if (bindingKey!=null) { for (int i=0; i < bindingKey.size(); i++) { ((BindingKey)(bindingKey.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/GetBusinessDetail.java000066400000000000000000000114661173667134000233730ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.request; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.util.BusinessKey; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the get_businessDetail element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This message is used to get the detailed information that is registered * about businessEntity data that matches specific key value(s). * * @author David Melgar (dmelgar@us.ibm.com) */ public class GetBusinessDetail extends UDDIElement { public static final String UDDI_TAG = "get_businessDetail"; protected Element base = null; // Vector of BusinessKey objects Vector businessKey = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public GetBusinessDetail() { } /** * Construct the object with required fields. * * @param businessKeyStrings Vector of BusinessKey Strings. */ public GetBusinessDetail(Vector businessKeyStrings) { Vector objects; objects = new Vector(); for (int i = 0; i < businessKeyStrings.size(); i++) { objects.addElement( new BusinessKey((String)businessKeyStrings.elementAt(i)) ); } this.businessKey = objects; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public GetBusinessDetail(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, BusinessKey.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { businessKey.addElement(new BusinessKey((Element)nl.item(i))); } } /** * Set businessKey vector. * * @param s Vector of BusinessKey objects. */ public void setBusinessKeyVector(Vector s) { businessKey = s; } /** * Set businessKey. * * @param s Vector of String objects. */ public void setBusinessKeyStrings(Vector s) { businessKey = new Vector(); for (int i = 0; i < s.size(); i++) { businessKey.addElement( new BusinessKey((String)s.elementAt(i)) ); } } /** * Get businessKey vector. * * @return s Vector of BusinessKey objects. */ public Vector getBusinessKeyVector() { return businessKey; } /** * Get businessKey. * * @return s Vector of String objects. */ public Vector getBusinessKeyStrings() { Vector strings = new Vector(); for (int i = 0; i < businessKey.size(); i++) { strings.addElement( ((BusinessKey)businessKey.elementAt(i)).getText()); } return strings; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. base.setAttribute("generic", UDDIElement.GENERIC); if (businessKey!=null) { for (int i=0; i < businessKey.size(); i++) { ((BusinessKey)(businessKey.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/GetBusinessDetailExt.java000066400000000000000000000116461173667134000240540ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.request; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.util.BusinessKey; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the get_businessDetailExt element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    The extended businessDetail message defines an API that allows non-operator * nodes to provide extended information via a consistent API. This message * is the request that will cause a businessDetailExt message to be returned. * * @author David Melgar (dmelgar@us.ibm.com) */ public class GetBusinessDetailExt extends UDDIElement { public static final String UDDI_TAG = "get_businessDetailExt"; protected Element base = null; // Vector of BusinessKey objects Vector businessKey = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public GetBusinessDetailExt() { } /** * Construct the object with required fields. * * @param businessKeyStrings Vector of BusinessKey Strings. */ public GetBusinessDetailExt(Vector businessKeyStrings) { Vector objects; objects = new Vector(); for (int i = 0; i < businessKeyStrings.size(); i++) { objects.addElement( new BusinessKey((String)businessKeyStrings.elementAt(i)) ); } this.businessKey = objects; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public GetBusinessDetailExt(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, BusinessKey.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { businessKey.addElement(new BusinessKey((Element)nl.item(i))); } } /** * Set businessKey vector. * * @param s Vector of BusinessKey objects. */ public void setBusinessKeyVector(Vector s) { businessKey = s; } /** * Set businessKey. * * @param s Vector of String objects. */ public void setBusinessKeyStrings(Vector s) { businessKey = new Vector(); for (int i = 0; i < s.size(); i++) { businessKey.addElement( new BusinessKey((String)s.elementAt(i)) ); } } /** * Get businessKey vector. * * @return s Vector of BusinessKey objects. */ public Vector getBusinessKeyVector() { return businessKey; } /** * Get businessKey. * * @return s Vector of String objects. */ public Vector getBusinessKeyStrings() { Vector strings = new Vector(); for (int i = 0; i < businessKey.size(); i++) { strings.addElement( ((BusinessKey)businessKey.elementAt(i)).getText()); } return strings; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes base.setAttribute("generic", UDDIElement.GENERIC); if (businessKey!=null) { for (int i=0; i < businessKey.size(); i++) { ((BusinessKey)(businessKey.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/GetPublisherAssertions.java000066400000000000000000000074341173667134000244650ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.request; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.util.AuthInfo; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the get_publisherAssertions element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This API call is used to obtain the full set of publisher assertions that is * associated with an individual publisher account. * * @author Mahesh C S (csmahesh@india.hp.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class GetPublisherAssertions extends UDDIElement { public static final String UDDI_TAG = "get_publisherAssertions"; protected Element base = null; AuthInfo authInfo = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public GetPublisherAssertions() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public GetPublisherAssertions(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, AuthInfo.UDDI_TAG); if (nl.getLength() > 0) { authInfo = new AuthInfo((Element)nl.item(0)); } } /** * Construct the object with required fields. * * @param authInfo String */ public GetPublisherAssertions(String authInfo) { this.authInfo = new AuthInfo(authInfo); } public AuthInfo getAuthInfo() { return authInfo; } public void setAuthInfo(AuthInfo s) { authInfo = s; } public String getAuthInfoString() { if(authInfo!=null) return authInfo.getText(); else return null; } public void setAuthInfo(String s) { authInfo = new AuthInfo(); authInfo.setText(s); } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. base.setAttribute("generic", UDDIElement.GENERIC); if (authInfo!=null) { authInfo.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/GetRegisteredInfo.java000066400000000000000000000077071173667134000233710ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.request; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.util.AuthInfo; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the get_registeredInfo element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This message is used to support tool resynch by allowing a * query to acquire summarized information about registered businessEntity * and tModels for a given userID. This API is intended to let * publishers describe what they have published. Authentication * is required for publishers. The response is a registeredInfo message. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class GetRegisteredInfo extends UDDIElement { public static final String UDDI_TAG = "get_registeredInfo"; protected Element base = null; AuthInfo authInfo = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public GetRegisteredInfo() { } /** * Construct the object with required fields. * * @param authInfo String */ public GetRegisteredInfo(String authInfo) { this.authInfo = new AuthInfo( authInfo ); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public GetRegisteredInfo(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, AuthInfo.UDDI_TAG); if (nl.getLength() > 0) { authInfo = new AuthInfo((Element)nl.item(0)); } } public void setAuthInfo(AuthInfo s) { authInfo = s; } public void setAuthInfo(String s) { authInfo = new AuthInfo(); authInfo.setText(s); } public AuthInfo getAuthInfo() { return authInfo; } public String getAuthInfoString() { if(authInfo!=null) return authInfo.getText(); else return null; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. base.setAttribute("generic", UDDIElement.GENERIC); if (authInfo!=null) { authInfo.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/GetServiceDetail.java000066400000000000000000000114051173667134000231710ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.request; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.util.ServiceKey; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the get_serviceDetail element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This message is used to get the detailed information, registered * about businessService data that matches specific key value(s). * * @author David Melgar (dmelgar@us.ibm.com) */ public class GetServiceDetail extends UDDIElement { public static final String UDDI_TAG = "get_serviceDetail"; protected Element base = null; // Vector of ServiceKey objects Vector serviceKey = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public GetServiceDetail() { } /** * Construct the object with required fields. * * @param serviceKeyStrings Vector of ServiceKey Strings. */ public GetServiceDetail(Vector serviceKeyStrings) { Vector objects; objects = new Vector(); for (int i = 0; i < serviceKeyStrings.size(); i++) { objects.addElement( new ServiceKey((String)serviceKeyStrings.elementAt(i)) ); } this.serviceKey = objects; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public GetServiceDetail(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, ServiceKey.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { serviceKey.addElement(new ServiceKey((Element)nl.item(i))); } } /** * Set serviceKey vector. * * @param s Vector of ServiceKey objects. */ public void setServiceKeyVector(Vector s) { serviceKey = s; } /** * Set serviceKey. * * @param s Vector of String objects. */ public void setServiceKeyStrings(Vector s) { serviceKey = new Vector(); for (int i = 0; i < s.size(); i++) { serviceKey.addElement( new ServiceKey((String)s.elementAt(i)) ); } } /** * Get serviceKey vector. * * @return s Vector of ServiceKey objects. */ public Vector getServiceKeyVector() { return serviceKey; } /** * Get serviceKey. * * @return s Vector of String objects. */ public Vector getServiceKeyStrings() { Vector strings = new Vector(); for (int i = 0; i < serviceKey.size(); i++) { strings.addElement( ((ServiceKey)serviceKey.elementAt(i)).getText()); } return strings; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes base.setAttribute("generic", UDDIElement.GENERIC); if (serviceKey!=null) { for (int i=0; i < serviceKey.size(); i++) { ((ServiceKey)(serviceKey.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/GetTModelDetail.java000066400000000000000000000113261173667134000227570ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.request; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.util.TModelKey; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the get_tModelDetail element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This message is used to request the details about a specific tModel. * The results are returned in a tModelDetail message. * * @author David Melgar (dmelgar@us.ibm.com) */ public class GetTModelDetail extends UDDIElement { public static final String UDDI_TAG = "get_tModelDetail"; protected Element base = null; // Vector of TModelKey objects Vector tModelKey = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public GetTModelDetail() { } /** * Construct the object with required fields. * * @param tModelKeyStrings Vector of TModelKey Strings. */ public GetTModelDetail(Vector tModelKeyStrings) { Vector objects; objects = new Vector(); for (int i = 0; i < tModelKeyStrings.size(); i++) { objects.addElement( new TModelKey((String)tModelKeyStrings.elementAt(i)) ); } this.tModelKey = objects; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public GetTModelDetail(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, TModelKey.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { tModelKey.addElement(new TModelKey((Element)nl.item(i))); } } /** * Set tModelKey vector. * * @param s Vector of TModelKey objects. */ public void setTModelKeyVector(Vector s) { tModelKey = s; } /** * Set tModelKey. * * @param s Vector of String objects. */ public void setTModelKeyStrings(Vector s) { tModelKey = new Vector(); for (int i = 0; i < s.size(); i++) { tModelKey.addElement( new TModelKey((String)s.elementAt(i)) ); } } /** * Get tModelKey vector. * * @return s Vector of TModelKey objects. */ public Vector getTModelKeyVector() { return tModelKey; } /** * Get tModelKey. * * @return s Vector of String objects. */ public Vector getTModelKeyStrings() { Vector strings = new Vector(); for (int i = 0; i < tModelKey.size(); i++) { strings.addElement( ((TModelKey)tModelKey.elementAt(i)).getText()); } return strings; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes base.setAttribute("generic", UDDIElement.GENERIC); if (tModelKey!=null) { for (int i=0; i < tModelKey.size(); i++) { ((TModelKey)(tModelKey.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/SaveBinding.java000066400000000000000000000120211173667134000221720ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.request; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.binding.BindingTemplate; import org.uddi4j.util.AuthInfo; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the save_binding element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This message is used to save added/updated information about * one or more bindingTemplate structures. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class SaveBinding extends UDDIElement { public static final String UDDI_TAG = "save_binding"; protected Element base = null; AuthInfo authInfo = null; // Vector of BindingTemplate objects Vector bindingTemplate = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public SaveBinding() { } /** * Construct the object with required fields. * * @param authInfo String * @param bindingTemplate Vector of BindingTemplate objects. */ public SaveBinding(String authInfo, Vector bindingTemplate) { this.authInfo = new AuthInfo(authInfo); this.bindingTemplate = bindingTemplate; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public SaveBinding(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, AuthInfo.UDDI_TAG); if (nl.getLength() > 0) { authInfo = new AuthInfo((Element)nl.item(0)); } nl = getChildElementsByTagName(base, BindingTemplate.UDDI_TAG); for (int i = 0; i < nl.getLength(); i++) { bindingTemplate.addElement(new BindingTemplate((Element)nl.item(i))); } } public void setAuthInfo(AuthInfo s) { authInfo = s; } public void setAuthInfo(String s) { authInfo = new AuthInfo(); authInfo.setText(s); } /** * Set bindingTemplate vector. * * @param s Vector of BindingTemplate objects. */ public void setBindingTemplateVector(Vector s) { bindingTemplate = s; } public AuthInfo getAuthInfo() { return authInfo; } public String getAuthInfoString() { if (authInfo != null) return authInfo.getText(); else return null; } /** * Get bindingTemplate vector. * * @return s Vector of BindingTemplate objects. */ public Vector getBindingTemplateVector() { return bindingTemplate; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. base.setAttribute("generic", UDDIElement.GENERIC); if (authInfo != null) { authInfo.saveToXML(base); } if (bindingTemplate != null) { for (int i = 0; i < bindingTemplate.size(); i++) { ((BindingTemplate) (bindingTemplate.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/SaveBusiness.java000066400000000000000000000146531173667134000224300ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.request; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.business.BusinessEntity; import org.uddi4j.util.AuthInfo; import org.uddi4j.util.UploadRegister; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the save_business element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This message is used to save added/updated information describing * one or more businessEntity structures. Either a businessEntity or an * uploadRegister object is required. A message is invalid if contains both * types or neither type. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class SaveBusiness extends UDDIElement { public static final String UDDI_TAG = "save_business"; protected Element base = null; AuthInfo authInfo = null; // Vector of BusinessEntity objects Vector businessEntity = new Vector(); // Vector of UploadRegister objects Vector uploadRegister = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public SaveBusiness() { } /** * Construct the object with required fields. * * @param authInfo String */ public SaveBusiness(String authInfo) { this.authInfo = new AuthInfo( authInfo ); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public SaveBusiness(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, AuthInfo.UDDI_TAG); if (nl.getLength() > 0) { authInfo = new AuthInfo((Element)nl.item(0)); } nl = getChildElementsByTagName(base, BusinessEntity.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { businessEntity.addElement(new BusinessEntity((Element)nl.item(i))); } nl = getChildElementsByTagName(base, UploadRegister.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { uploadRegister.addElement(new UploadRegister((Element)nl.item(i))); } } public void setAuthInfo(AuthInfo s) { authInfo = s; } public void setAuthInfo(String s) { authInfo = new AuthInfo(); authInfo.setText(s); } /** * Set businessEntity vector. * * @param s Vector of BusinessEntity objects. */ public void setBusinessEntityVector(Vector s) { businessEntity = s; } /** * Set uploadRegister vector. * * @param s Vector of UploadRegister objects. * @deprecated */ public void setUploadRegisterVector(Vector s) { uploadRegister = s; } /** * Set uploadRegister. * * @param s Vector of String objects. * @deprecated */ public void setUploadRegisterStrings(Vector s) { uploadRegister = new Vector(); for (int i = 0; i < s.size(); i++) { uploadRegister.addElement( new UploadRegister((String)s.elementAt(i)) ); } } public AuthInfo getAuthInfo() { return authInfo; } public String getAuthInfoString() { if(authInfo!=null) return authInfo.getText(); else return null; } /** * Get businessEntity vector. * * @return s Vector of BusinessEntity objects. */ public Vector getBusinessEntityVector() { return businessEntity; } /** * Get uploadRegister vector. * * @return s Vector of UploadRegister objects. * @deprecated */ public Vector getUploadRegisterVector() { return uploadRegister; } /** * Get uploadRegister. * * @return s Vector of String objects. * @deprecated */ public Vector getUploadRegisterStrings() { Vector strings = new Vector(); for (int i = 0; i < uploadRegister.size(); i++) { strings.addElement( ((UploadRegister)uploadRegister.elementAt(i)).getText()); } return strings; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. base.setAttribute("generic", UDDIElement.GENERIC); if (authInfo!=null) { authInfo.saveToXML(base); } if (businessEntity!=null) { for (int i=0; i < businessEntity.size(); i++) { ((BusinessEntity)(businessEntity.elementAt(i))).saveToXML(base); } } if (uploadRegister!=null) { for (int i=0; i < uploadRegister.size(); i++) { ((UploadRegister)(uploadRegister.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/SaveService.java000066400000000000000000000120211173667134000222200ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.request; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.service.BusinessService; import org.uddi4j.util.AuthInfo; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the save_service element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This message is used to save added/updated information * about one or more businessService structures. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class SaveService extends UDDIElement { public static final String UDDI_TAG = "save_service"; protected Element base = null; AuthInfo authInfo = null; // Vector of BusinessService objects Vector businessService = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public SaveService() { } /** * Construct the object with required fields. * * @param authInfo String * @param businessService Vector of BusinessService objects. */ public SaveService(String authInfo, Vector businessService) { this.authInfo = new AuthInfo(authInfo); this.businessService = businessService; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public SaveService(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, AuthInfo.UDDI_TAG); if (nl.getLength() > 0) { authInfo = new AuthInfo((Element)nl.item(0)); } nl = getChildElementsByTagName(base, BusinessService.UDDI_TAG); for (int i = 0; i < nl.getLength(); i++) { businessService.addElement(new BusinessService((Element)nl.item(i))); } } public void setAuthInfo(AuthInfo s) { authInfo = s; } public void setAuthInfo(String s) { authInfo = new AuthInfo(); authInfo.setText(s); } /** * Set businessService vector. * * @param s Vector of BusinessService objects. */ public void setBusinessServiceVector(Vector s) { businessService = s; } public AuthInfo getAuthInfo() { return authInfo; } public String getAuthInfoString() { if (authInfo != null) return authInfo.getText(); else return null; } /** * Get businessService vector. * * @return s Vector of BusinessService objects. */ public Vector getBusinessServiceVector() { return businessService; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. base.setAttribute("generic", UDDIElement.GENERIC); if (authInfo != null) { authInfo.saveToXML(base); } if (businessService != null) { for (int i = 0; i < businessService.size(); i++) { ((BusinessService) (businessService.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/SaveTModel.java000066400000000000000000000140031173667134000220060ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.request; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.tmodel.TModel; import org.uddi4j.util.AuthInfo; import org.uddi4j.util.UploadRegister; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the save_tModel element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This message is used to register or update a tModel. Either a tModel or * uploadRegister object is required. Invalid if contains both types or neither type. * * @author David Melgar (dmelgar@us.ibm.com) */ public class SaveTModel extends UDDIElement { public static final String UDDI_TAG = "save_tModel"; protected Element base = null; AuthInfo authInfo = null; // Vector of TModel objects Vector tModel = new Vector(); // Vector of UploadRegister objects Vector uploadRegister = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public SaveTModel() { } /** * Construct the object with required fields. * * @param authInfo String */ public SaveTModel(String authInfo) { this.authInfo = new AuthInfo( authInfo ); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public SaveTModel(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, AuthInfo.UDDI_TAG); if (nl.getLength() > 0) { authInfo = new AuthInfo((Element)nl.item(0)); } nl = getChildElementsByTagName(base, TModel.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { tModel.addElement(new TModel((Element)nl.item(i))); } nl = getChildElementsByTagName(base, UploadRegister.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { uploadRegister.addElement(new UploadRegister((Element)nl.item(i))); } } public void setAuthInfo(AuthInfo s) { authInfo = s; } public void setAuthInfo(String s) { authInfo = new AuthInfo(); authInfo.setText(s); } /** * Set tModel vector. * * @param s Vector of TModel objects. */ public void setTModelVector(Vector s) { tModel = s; } /** * Set uploadRegister vector. * * @param s Vector of UploadRegister objects. */ public void setUploadRegisterVector(Vector s) { uploadRegister = s; } /** * Set uploadRegister. * * @param s Vector of String objects. */ public void setUploadRegisterStrings(Vector s) { uploadRegister = new Vector(); for (int i = 0; i < s.size(); i++) { uploadRegister.addElement( new UploadRegister((String)s.elementAt(i)) ); } } public AuthInfo getAuthInfo() { return authInfo; } public String getAuthInfoString() { return authInfo.getText(); } /** * Get tModel vector. * * @return s Vector of TModel objects. */ public Vector getTModelVector() { return tModel; } /** * Get uploadRegister vector. * * @return s Vector of UploadRegister objects. */ public Vector getUploadRegisterVector() { return uploadRegister; } /** * Get uploadRegister. * * @return s Vector of String objects. */ public Vector getUploadRegisterStrings() { Vector strings = new Vector(); for (int i = 0; i < uploadRegister.size(); i++) { strings.addElement( ((UploadRegister)uploadRegister.elementAt(i)).getText()); } return strings; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes base.setAttribute("generic", UDDIElement.GENERIC); if (authInfo!=null) { authInfo.saveToXML(base); } if (tModel!=null) { for (int i=0; i < tModel.size(); i++) { ((TModel)(tModel.elementAt(i))).saveToXML(base); } } if (uploadRegister!=null) { for (int i=0; i < uploadRegister.size(); i++) { ((UploadRegister)(uploadRegister.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/SetPublisherAssertions.java000066400000000000000000000123031173667134000244700ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.request; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.assertion.PublisherAssertion; import org.uddi4j.util.AuthInfo; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the set_publisherAssertions element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This message is used to manage all of the tracked relationship assertions * associated with an individual publisher account. The full set of assertions * associated with a publisher is effectively replaced whenever this message is used. * When this message is processed, the UDDI registry examines the publisher assertions * for a given publisher account. It examines the assertions that were active prior to * this API call and adds any new assertions that were not present to the assertions * of the publisher account. Consequently, new relationships may be activated * (e.g., status changed to complete), and existing relationships may be deactivated. * * @author Ravi Trivedi (ravi_trivedi@hp.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class SetPublisherAssertions extends UDDIElement { public static final String UDDI_TAG = "set_publisherAssertions"; protected Element base = null; AuthInfo authInfo = null; Vector pubAssertion = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public SetPublisherAssertions() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public SetPublisherAssertions(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, AuthInfo.UDDI_TAG); if (nl.getLength() > 0) { authInfo = new AuthInfo((Element)nl.item(0)); } nl = getChildElementsByTagName(base, PublisherAssertion.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { pubAssertion.addElement(new PublisherAssertion((Element)nl.item(i))); } } /** * Construct the object with required fields. * * @param authInfo String * @param pubAssertVector Vector */ public SetPublisherAssertions(String authInfo, Vector pubAssertVector) { this.authInfo = new AuthInfo(); this.authInfo.setText(authInfo); this.pubAssertion = pubAssertVector; } public void setPublisherAssertionVector(Vector pubAssertVector ) { this.pubAssertion = pubAssertVector; } public Vector getPublisherAssertionVector() { return this.pubAssertion; } public AuthInfo getAuthInfo() { return this.authInfo; } public void setAuthInfo(AuthInfo s) { this.authInfo = s; } public String getAuthInfoString() { if(authInfo!=null) return this.authInfo.getText(); else return null; } public void setAuthInfo(String s) { authInfo = new AuthInfo(); authInfo.setText(s); } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. base.setAttribute("generic", UDDIElement.GENERIC); if (authInfo!=null) { authInfo.saveToXML(base); } if (pubAssertion!=null) { for (int i=0; i < pubAssertion.size(); i++) { ((PublisherAssertion)(pubAssertion.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/request/ValidateValues.java000066400000000000000000000120021173667134000227110ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.request; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.business.BusinessEntity; import org.uddi4j.datatype.service.BusinessService; import org.uddi4j.datatype.tmodel.TModel; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the validate_values element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    validate_values is used is to verify that specific categories or identifiers * (checking the keyValue attribute values supplied) exist within the given * taxonomy or identifier system. * * @author Rajesh Sumra (rajesh_sumra@hp.com) * @author Arulazi D (arulazi_d@hp.com) */ public class ValidateValues extends UDDIElement { public static final String UDDI_TAG = "validate_values"; protected Element base = null; Vector businessServiceVector = new Vector(); Vector businessEntityVector = new Vector(); Vector tModelVector = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public ValidateValues() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public ValidateValues(Element base) throws UDDIException { // Check if its a fault. Throw exception if it is super(base); NodeList nl = null; nl = getChildElementsByTagName(base, BusinessEntity.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { businessEntityVector.addElement(new BusinessEntity((Element)nl.item(i))); } nl = getChildElementsByTagName(base, BusinessService.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { businessServiceVector.addElement(new BusinessService((Element)nl.item(i))); } nl = getChildElementsByTagName(base, TModel.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { tModelVector.addElement(new TModel((Element)nl.item(i))); } } public Vector getBusinessServiceVector() { return this.businessServiceVector; } public void setBusinessServiceVector(Vector businessService) { this.businessServiceVector = businessService; } public Vector getBusinessEntityVector() { return this.businessEntityVector; } public void setBusinessEntityVector(Vector businessEntity) { this.businessEntityVector = businessEntity; } public Vector getTModelVector() { return this.tModelVector; } public void setTModelVector(Vector tModel) { this.tModelVector = tModel; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. base.setAttribute("generic", UDDIElement.GENERIC); if (businessEntityVector!=null) { for (int i=0; i < businessEntityVector.size(); i++) { ((BusinessEntity)(businessEntityVector.elementAt(i))).saveToXML(base); } } if (businessServiceVector!=null) { for (int i=0; i < businessServiceVector.size(); i++) { ((BusinessService)(businessServiceVector.elementAt(i))).saveToXML(base); } } if (tModelVector!=null) { for (int i=0; i < tModelVector.size(); i++) { ((TModel)(tModelVector.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/000077500000000000000000000000001173667134000173105ustar00rootroot00000000000000uddi4j-2.0.5/src/org/uddi4j/response/AssertionStatusItem.java000066400000000000000000000142371173667134000241540ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.response; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.util.FromKey; import org.uddi4j.util.KeyedReference; import org.uddi4j.util.ToKey; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the assertionStatusItem element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: * *

    Zero or more assertionStatusItem structures form an AssertionStatus Report. * This report is obtained in response to a get_assertionStatusReport inquiry * message. This report contains the elements fromKey, toKey and keyedReference. * These combined elements identify the assertion that is the subject of the report. * The keysOwned element designates those businessKeys the publisher manages. * * @author Mahesh C S (csmahesh@india.hp.com) */ public class AssertionStatusItem extends UDDIElement { public static final String UDDI_TAG = "assertionStatusItem"; protected Element base = null; FromKey fromKey = null; ToKey toKey = null; KeyedReference keyedReference = null; KeysOwned keysOwned = null; CompletionStatus completionStatus = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public AssertionStatusItem() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public AssertionStatusItem(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); completionStatus = new CompletionStatus(); completionStatus.setText(base.getAttribute("completionStatus")); NodeList nl = null; nl = getChildElementsByTagName(base, FromKey.UDDI_TAG); if (nl.getLength() > 0) { fromKey = new FromKey((Element)nl.item(0)); } nl = getChildElementsByTagName(base, ToKey.UDDI_TAG); if (nl.getLength() > 0) { toKey = new ToKey((Element)nl.item(0)); } nl = getChildElementsByTagName(base, KeyedReference.UDDI_TAG); if (nl.getLength() > 0) { keyedReference = new KeyedReference((Element)nl.item(0)); } nl = getChildElementsByTagName(base, KeysOwned.UDDI_TAG); if (nl.getLength() > 0) { keysOwned = new KeysOwned((Element)nl.item(0)); } } /** * Construct the object with required fields. * * @param fromKey String * @param toKey String * @param ref KeyedReference * @param keys KeysOwned */ public AssertionStatusItem(String fromKey, String toKey, KeyedReference ref, KeysOwned keys) { this.fromKey = new FromKey(fromKey); this.toKey = new ToKey(toKey); this.keyedReference = ref; this.keysOwned = keys; } public String getFromKeyString() { return fromKey.getText(); } public void setFromKeyString(String s) { fromKey = new FromKey(); fromKey.setText(s); } public String getToKeyString() { return toKey.getText(); } public void setToKeyString(String s) { toKey = new ToKey(); toKey.setText(s); } public FromKey getFromKey() { return fromKey; } public void setFromKey(FromKey key) { fromKey = key; } public ToKey getToKey() { return toKey; } public void setToKey(ToKey key) { toKey = key; } public KeyedReference getKeyedReference() { return keyedReference; } public void setKeyedReference(KeyedReference r) { keyedReference = r; } public KeysOwned getKeysOwned() { return keysOwned; } public void setKeysOwned(KeysOwned k) { keysOwned = k; } public CompletionStatus getCompletionStatus() { return completionStatus; } public void setCompletionStatus(CompletionStatus status) { completionStatus = status; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (completionStatus!=null) { base.setAttribute("completionStatus", completionStatus.getText()); } if (fromKey!=null) { fromKey.saveToXML(base); } if (toKey!=null) { toKey.saveToXML(base); } if (keyedReference!=null) { keyedReference.saveToXML(base); } if (keysOwned!=null) { keysOwned.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/AssertionStatusReport.java000066400000000000000000000104001173667134000245150ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.response; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the assertionStatusReport element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This class returns all complete and incomplete assertions. It also provides * some administrative functions, such as, determining if there are outstanding * or incomplete assertions about relationships between the publisher account * and associated businesses. * * @author Mahesh C S (csmahesh@india.hp.com) */ public class AssertionStatusReport extends UDDIElement { public static final String UDDI_TAG = "assertionStatusReport"; protected Element base = null; String operator = null; // Vector of AssertionStatusItem objects Vector assertionStatusItem = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public AssertionStatusReport() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public AssertionStatusReport(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); operator = base.getAttribute("operator"); NodeList nl = null; nl = getChildElementsByTagName(base, AssertionStatusItem.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { assertionStatusItem.addElement(new AssertionStatusItem((Element)nl.item(i))); } } public String getOperator() { return operator; } public void setOperator(String s) { operator = s; } /** * Get assertionStatusItem vector * * @return Vector of AssertionStatusItem objects. */ public Vector getAssertionStatusItemVector() { return assertionStatusItem; } /** * Set assertionStatusItem vector * * @param v Vector of AssertionStatusItem objects. */ public void setAssertionStatusItemVector(Vector v) { assertionStatusItem = v; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes base.setAttribute("generic", UDDIElement.GENERIC); if (operator!=null) { base.setAttribute("operator", operator); } if (assertionStatusItem!=null) { for (int i=0; i < assertionStatusItem.size(); i++) { ((AssertionStatusItem)(assertionStatusItem.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/AuthToken.java000066400000000000000000000100611173667134000220530ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.response; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.util.AuthInfo; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the authToken element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This message is used to return an authentication token in response * to a "get_authToken" message. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class AuthToken extends UDDIElement { public static final String UDDI_TAG = "authToken"; protected Element base = null; String operator = null; AuthInfo authInfo = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public AuthToken() { } /** * Construct the object with required fields. * * @param operator String * @param authInfo String */ public AuthToken(String operator, String authInfo) { this.operator = operator; this.authInfo = new AuthInfo( authInfo ); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public AuthToken(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); operator = base.getAttribute("operator"); NodeList nl = null; nl = getChildElementsByTagName(base, AuthInfo.UDDI_TAG); if (nl.getLength() > 0) { authInfo = new AuthInfo((Element)nl.item(0)); } } public void setOperator(String s) { operator = s; } public void setAuthInfo(AuthInfo s) { authInfo = s; } public void setAuthInfo(String s) { authInfo = new AuthInfo(); authInfo.setText(s); } public String getOperator() { return operator; } public AuthInfo getAuthInfo() { return authInfo; } public String getAuthInfoString() { if(authInfo!=null) return authInfo.getText(); else return null; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes base.setAttribute("generic", UDDIElement.GENERIC); if (operator!=null) { base.setAttribute("operator", operator); } if (authInfo!=null) { authInfo.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/BindingDetail.java000066400000000000000000000114271173667134000226550ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.response; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.binding.BindingTemplate; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the bindingDetail element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This message is used to return a BindingDetail in response * to a "get_bindingDetail" message. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class BindingDetail extends UDDIElement { public static final String UDDI_TAG = "bindingDetail"; protected Element base = null; String operator = null; String truncated = null; // Vector of BindingTemplate objects Vector bindingTemplate = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public BindingDetail() { } /** * Construct the object with required fields. * * @param operator String */ public BindingDetail(String operator) { this.operator = operator; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public BindingDetail(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); operator = base.getAttribute("operator"); truncated = base.getAttribute("truncated"); NodeList nl = null; nl = getChildElementsByTagName(base, BindingTemplate.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { bindingTemplate.addElement(new BindingTemplate((Element)nl.item(i))); } } public void setOperator(String s) { operator = s; } public void setTruncated(String s) { truncated = s; } public void setTruncated(boolean s) { if (s) { truncated = "true"; } else { truncated = "false"; } } /** * Set bindingTemplate vector * * @param s Vector of BindingTemplate objects. */ public void setBindingTemplateVector(Vector s) { bindingTemplate = s; } public String getOperator() { return operator; } public String getTruncated() { return truncated; } public boolean getTruncatedBoolean() { return "true".equals(truncated); } /** * Get bindingTemplate * * @return s Vector of BindingTemplate objects. */ public Vector getBindingTemplateVector() { return bindingTemplate; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes base.setAttribute("generic", UDDIElement.GENERIC); if (operator!=null) { base.setAttribute("operator", operator); } if (truncated!=null) { base.setAttribute("truncated", truncated); } if (bindingTemplate!=null) { for (int i=0; i < bindingTemplate.size(); i++) { ((BindingTemplate)(bindingTemplate.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/BusinessDetail.java000066400000000000000000000113461173667134000230760ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.response; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.business.BusinessEntity; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the businessDetail element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This structure is used to return businessEntity structures. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class BusinessDetail extends UDDIElement { public static final String UDDI_TAG = "businessDetail"; protected Element base = null; String operator = null; String truncated = null; // Vector of BusinessEntity objects Vector businessEntity = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public BusinessDetail() { } /** * Construct the object with required fields. * * @param operator String */ public BusinessDetail(String operator) { this.operator = operator; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public BusinessDetail(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); operator = base.getAttribute("operator"); truncated = base.getAttribute("truncated"); NodeList nl = null; nl = getChildElementsByTagName(base, BusinessEntity.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { businessEntity.addElement(new BusinessEntity((Element)nl.item(i))); } } public void setOperator(String s) { operator = s; } public void setTruncated(String s) { truncated = s; } public void setTruncated(boolean s) { if (s) { truncated = "true"; } else { truncated = "false"; } } /** * Set businessEntity vector * * @param s Vector of BusinessEntity objects. */ public void setBusinessEntityVector(Vector s) { businessEntity = s; } public String getOperator() { return operator; } public String getTruncated() { return truncated; } public boolean getTruncatedBoolean() { return "true".equals(truncated); } /** * Get businessEntity * * @return s Vector of BusinessEntity objects. */ public Vector getBusinessEntityVector() { return businessEntity; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes base.setAttribute("generic", UDDIElement.GENERIC); if (operator!=null) { base.setAttribute("operator", operator); } if (truncated!=null) { base.setAttribute("truncated", truncated); } if (businessEntity!=null) { for (int i=0; i < businessEntity.size(); i++) { ((BusinessEntity)(businessEntity.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/BusinessDetailExt.java000066400000000000000000000125071173667134000235570ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.response; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the businessDetailExt element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    The extended businessDetail messages define an API that allows non-operator * nodes to provide extended information via a consistent API. This message * is the response to get_businessDetailExt. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class BusinessDetailExt extends UDDIElement { public static final String UDDI_TAG = "businessDetailExt"; protected Element base = null; String operator = null; String truncated = null; // Vector of BusinessEntityExt objects Vector businessEntityExt = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public BusinessDetailExt() { } /** * Construct the object with required fields. * * @param operator String * @param businessEntityExt Vector of BusinessEntityExt objects. */ public BusinessDetailExt(String operator, Vector businessEntityExt) { this.operator = operator; this.businessEntityExt = businessEntityExt; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public BusinessDetailExt(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); operator = base.getAttribute("operator"); truncated = base.getAttribute("truncated"); NodeList nl = null; nl = getChildElementsByTagName(base, BusinessEntityExt.UDDI_TAG); for (int i = 0; i < nl.getLength(); i++) { businessEntityExt.addElement(new BusinessEntityExt((Element)nl.item(i))); } } public void setOperator(String s) { operator = s; } public void setTruncated(String s) { truncated = s; } public void setTruncated(boolean s) { if (s) { truncated = "true"; } else { truncated = "false"; } } /** * Set businessEntityExt vector * * @param s Vector of BusinessEntityExt objects. */ public void setBusinessEntityExtVector(Vector s) { businessEntityExt = s; } public String getOperator() { return operator; } public String getTruncated() { return truncated; } public boolean getTruncatedBoolean() { return "true".equals(truncated); } /** * Get businessEntityExt * * @return s Vector of BusinessEntityExt objects. */ public Vector getBusinessEntityExtVector() { return businessEntityExt; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes base.setAttribute("generic", UDDIElement.GENERIC); if (operator != null) { base.setAttribute("operator", operator); } if (truncated != null) { base.setAttribute("truncated", truncated); } if (businessEntityExt != null) { for (int i = 0; i < businessEntityExt.size(); i++) { ((BusinessEntityExt) (businessEntityExt.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/BusinessEntityExt.java000066400000000000000000000073671173667134000236410ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.response; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.business.BusinessEntity; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the businessEntityExt element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This structure is the container for safely extending the businessEntity * information in private implementations of UDDI compatible registries. * Official operator nodes may not provide extended data but must return * a properly populated businessEntity structure within this container, when * responding to a get_businessDetailExt message. * * @author David Melgar (dmelgar@us.ibm.com) */ public class BusinessEntityExt extends UDDIElement { public static final String UDDI_TAG = "businessEntityExt"; protected Element base = null; BusinessEntity businessEntity = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public BusinessEntityExt() { } /** * Construct the object with required fields. * * @param BusinessEntity BusinessEntity object */ public BusinessEntityExt(BusinessEntity businessEntity) { this.businessEntity = businessEntity; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public BusinessEntityExt(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, BusinessEntity.UDDI_TAG); if (nl.getLength() > 0) { businessEntity = new BusinessEntity((Element)nl.item(0)); } } public void setBusinessEntity(BusinessEntity s) { businessEntity = s; } public BusinessEntity getBusinessEntity() { return businessEntity; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (businessEntity!=null) { businessEntity.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/BusinessInfo.java000066400000000000000000000203541173667134000225660ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.response; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.Description; import org.uddi4j.datatype.Name; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the businessInfo element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This element is used as a short form of the BusinessEntity * element. It is used as a first pass result set for "find businesses" queries. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class BusinessInfo extends UDDIElement { public static final String UDDI_TAG = "businessInfo"; protected Element base = null; String businessKey = null; ServiceInfos serviceInfos = null; // Vector of Name objects Vector name = new Vector(); // Vector of Description objects Vector description = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public BusinessInfo() { } /** * Construct the object with required fields. * * @param businessKey String * @param name String * @param ServiceInfos ServiceInfos object */ public BusinessInfo(String businessKey, String name, ServiceInfos serviceInfos) { this.businessKey = businessKey; this.name.addElement(new Name(name)); this.serviceInfos = serviceInfos; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public BusinessInfo(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); businessKey = base.getAttribute("businessKey"); NodeList nl = null; nl = getChildElementsByTagName(base, Name.UDDI_TAG); for(int i=0; i 0) { serviceInfos = new ServiceInfos((Element)nl.item(0)); } nl = getChildElementsByTagName(base, Description.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { description.addElement(new Description((Element)nl.item(i))); } } public void setBusinessKey(String s) { businessKey = s; } /** * @deprecated This method has been deprecated. Use * {@link #setNameVector( Vector )} or * {@link #setDefaultName( Name )} instead */ public void setName(Name s) { setDefaultName(s); } /** * @deprecated This method has been deprecated. Use * {@link #setNameVector( Vector )} or * {@link #setDefaultNameString(String, String)} instead. */ public void setName(String s) { setDefaultNameString(s,null); } /** * This method stores this name as the Default Name (i.e., places it in the * first location in the Vector). */ public void setDefaultName(Name name) { if (this.name.size() > 0) { this.name.setElementAt(name,0); }else{ this.name.addElement(name); } } /** * This method stores this String, in the given language as the Default Name * (i.e., places it in the first location in the Vector). */ public void setDefaultNameString(String value, String lang) { Name n = new Name(value, lang); if(this.name.size() > 0) { name.setElementAt(n,0); }else{ name.addElement(n); } } /** * @param s Vector of Name objects */ public void setNameVector(Vector s) { name = s; } public void setServiceInfos(ServiceInfos s) { serviceInfos = s; } /** * Set description vector * * @param s Vector of Description objects. */ public void setDescriptionVector(Vector s) { description = s; } /** * Set default (english) description string * * @param s String */ public void setDefaultDescriptionString(String s) { if (description.size() > 0) { description.setElementAt(new Description(s), 0); } else { description.addElement(new Description(s)); } } public String getBusinessKey() { return businessKey; } /** * @deprecated This method has been deprecated. Use * {@link #getNameVector ()} or * {@link #getDefaultName ()} instead. */ public Name getName() { return getDefaultName(); } /** * @deprecated This method has been deprecated. Use * {@link #getNameVector ()} or * {@link #getDefaultNameString ()} instead. */ public String getNameString() { return getDefaultNameString(); } /** * Get default name * @return Name */ public Name getDefaultName() { if(name.size() > 0) { return (Name) name.elementAt(0); }else{ return null; } } /** * Get default name string * @return String */ public String getDefaultNameString() { if( name.size() > 0) { return ((Name)name.elementAt(0)).getText(); }else{ return null; } } /** * Get all Names. * @return Vector of Name objects. */ public Vector getNameVector() { return name; } public ServiceInfos getServiceInfos() { return serviceInfos; } /** * Get description * * @return s Vector of Description objects. */ public Vector getDescriptionVector() { return description; } /** * Get default description string * * @return s String */ public String getDefaultDescriptionString() { if ((description).size() > 0) { Description t = (Description)description.elementAt(0); return t.getText(); } else { return null; } } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (businessKey!=null) { base.setAttribute("businessKey", businessKey); } if (name!=null) { for (int i=0; i < name.size(); i++) { ((Name)(name.elementAt(i))).saveToXML(base); } } if (description!=null) { for (int i=0; i < description.size(); i++) { ((Description)(description.elementAt(i))).saveToXML(base); } } if (serviceInfos!=null) { serviceInfos.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/BusinessInfos.java000066400000000000000000000105361173667134000227520ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.response; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the businessInfos element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    An accessor container for one or more businessInfo structures. * * @author David Melgar (dmelgar@us.ibm.com) * @author Vivek Chopra (vivek@soaprpc.com) */ public class BusinessInfos extends UDDIElement { public static final String UDDI_TAG = "businessInfos"; protected Element base = null; // Vector of BusinessInfo objects Vector businessInfo = new Vector(); /** * Default constructor. * */ public BusinessInfos() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public BusinessInfos(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, BusinessInfo.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { businessInfo.addElement(new BusinessInfo((Element)nl.item(i))); } } /** * Set businessInfo vector * * @param s Vector of BusinessInfo objects. */ public void setBusinessInfoVector(Vector s) { businessInfo = s; } /** * Get businessInfo * * @return s Vector of BusinessInfo objects. */ public Vector getBusinessInfoVector() { return businessInfo; } /** * Add a BusinessInfo object to the collection * @param b BusinessInfo to be added */ public void add (BusinessInfo b) { businessInfo.add (b); } /** * Remove a BusinessInfo object from the collection * @param b BusinessInfo to be removed * @return True if object was removed, false if it * was not found in the collection. */ public boolean remove (BusinessInfo b) { return businessInfo.remove (b); } /** * Retrieve the BusinessInfo at the specified index within the collection. * @param index Index to retrieve from. * @return BusinessInfo at that index */ public BusinessInfo get (int index) { return (BusinessInfo) businessInfo.get (index); } /** * Return current size of the collection. * @return Number of BusinessInfos in the collection */ public int size () { return businessInfo.size (); } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (businessInfo!=null) { for (int i=0; i < businessInfo.size(); i++) { ((BusinessInfo)(businessInfo.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/BusinessList.java000066400000000000000000000107221173667134000226040ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.response; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the businessList element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This is a report - a list of businesses in short form. * This message is the response to a find_businessEntity query. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class BusinessList extends UDDIElement { public static final String UDDI_TAG = "businessList"; protected Element base = null; String operator = null; String truncated = null; //optional attribute BusinessInfos businessInfos = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public BusinessList() { } /** * Construct the object with required fields. * * @param operator String * @param BusinessInfos BusinessInfos object */ public BusinessList(String operator, BusinessInfos businessInfos) { this.operator = operator; this.businessInfos = businessInfos; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public BusinessList(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); operator = base.getAttribute("operator"); truncated = base.getAttribute("truncated"); NodeList nl = null; nl = getChildElementsByTagName(base, BusinessInfos.UDDI_TAG); if (nl.getLength() > 0) { businessInfos = new BusinessInfos((Element)nl.item(0)); } } public void setOperator(String s) { operator = s; } public void setTruncated(String s) { truncated = s; } public void setTruncated(boolean s) { if (s) { truncated = "true"; } else { truncated = "false"; } } public void setBusinessInfos(BusinessInfos s) { businessInfos = s; } public String getOperator() { return operator; } public String getTruncated() { return truncated; } public boolean getTruncatedBoolean() { return "true".equals(truncated); } public BusinessInfos getBusinessInfos() { return businessInfos; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes base.setAttribute("generic", UDDIElement.GENERIC); if (operator!=null) { base.setAttribute("operator", operator); } if (truncated!=null) { base.setAttribute("truncated", truncated); } if (businessInfos!=null) { businessInfos.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/CompletionStatus.java000066400000000000000000000065011173667134000234720ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.response; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the completionStatus element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This class is used to express the status of publisher assertions. * For example status:complete: means the publisher assertions are complete. * * @author Mahesh C S (csmahesh@india.hp.com) */ public class CompletionStatus extends UDDIElement { public static final String UDDI_TAG = "completionStatus"; public static final String COMPLETE = "status:complete"; public static final String TOKEY_INCOMPLETE= "status:toKey_incomplete"; public static final String FROMKEY_INCOMPLETE = "status:fromKey_incomplete"; protected Element base = null; String text = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public CompletionStatus() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public CompletionStatus(Element base) throws UDDIException { super(base); text = getText(base); } /** * Construct the object with required fields. * * @param status String */ public CompletionStatus(String status) { setText(status); } public String getText() { return text; } public void setText(String status) { text = status; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); if (text!=null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/DispositionReport.java000066400000000000000000000432461173667134000236640ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.response; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents an UDDI defined error. This object is returned from certain * UDDI API calls. Other UDDI APIs return a data object if success and * generate a fault message if failure. The API returns the fault * by throwing a UDDIException. * *

    UDDIException usually contains a Disposition report that has detailed * information about the UDDI error as defined by the UDDI specification. * If the response is a SOAP fault, but does not contains a disposition * report, a UDDIException may be thrown without containing a * DispositionReport. * * This class contains defines for the various error values * that can be returned.

    * * @author David Melgar (dmelgar@us.ibm.com) * @author Ravi Trivedi (ravi_trivedi@hp.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class DispositionReport extends UDDIElement { public static String UDDI_TAG = "dispositionReport"; // XML attributes. Looks common to all message responses String genericAttrib = null; String operatorAttrib = null; String truncated = null; Vector results = new Vector(); /* Defines of possible error codes that can be returned */ /** * 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 static final String E_assertionNotFound = "E_assertionNotFound"; /** * Signifies that the authentication token value passed in the authInfo argument * is no longer valid because the token has expired. */ public static final String E_authTokenExpired = "E_authTokenExpired"; /** * Signifies that the authentication token value passed in the authInfo argument * is either missing or is not valid. */ public static final String E_authTokenRequired = "E_authTokenRequired"; /** * Signifies that user account limits have been exceeded. */ public static final String E_accountLimitExceeded = "E_accountLimitExceeded"; /** * Signifies that the request cannot be processed at the current time. */ public static final String E_busy = "E_busy"; /** * Restrictions have been placed by the taxonomy provider on the types of * information that should be included at that location within a specific * taxonomy. The validation routine chosen by the Operator Site has * rejected this tModel for at least one specified category. */ public static final String E_categorizationNotAllowed = "E_categorizationNotAllowed"; /** * Signifies that a serious technical error has occurred while processing * the request. */ public static final String E_fatalError= "E_fatalError"; /** * Signifies that the request cannot be satisfied because one or more uuid_key * values specified is not a valid key value. This will occur if a uuid_key * value is passed in a tModel that does not match with any known tModel key. */ public static final String E_invalidKeyPassed = "E_invalidKeyPassed"; /** * 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 static final String E_invalidProjection = "E_invalidProjection"; /** * Signifies that the given keyValue did not correspond to a category within * the taxonomy identified by a tModelKey value within one of the categoryBag elements provided. */ public static final String E_invalidCategory = "E_invalidCategory"; /** * Signifies that one of assertion status values passed is unrecognized. The completion status * that caused the problem will be clearly indicated in the error text. */ public static final String E_invalidCompletionStatus = "E_invalidCompletionStatus"; /** * An error occurred with one of the uploadRegister URL values. */ public static final String E_invalidURLPassed = "E_invalidURLPassed"; /** * 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 static final String E_invalidValue = "E_invalidValue"; /** * Signifies that the request cannot be satisfied because one or more uuid_key * values specified has previously been hidden or removed by the requester. * This specifically applies to the tModelKey values passed. */ public static final String E_keyRetired = "E_keyRetired"; /** * 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 static final String E_languageError = "E_languageError"; /** * Signifies that the message it too large. The upper limit will be clearly indicated in the * error text. */ public static final String E_messageTooLarge = "E_messageTooLarge"; /** * Signifies that the partial name value passed exceeds the maximum name length designated by * the policy of an implementation or Operator Site. */ public static final String E_nameTooLong = "E_nameTooLong"; /** * Signifies that one or more of the uuid_key values passed refers to data * that is not controlled by the Operator Site that received the request for processing. */ public static final String E_operatorMismatch = "E_operatorMismatch"; /** * Signifies that the target publisher cancelled the custody transfer operation. */ public static final String E_publisherCancelled = "E_publisherCancelled"; /** * Signifies that a custody transfer request has been refused. */ public static final String E_requestDenied = "E_requestDenied"; /** * Signifies that the request could not be carried out because a needed validate_values service did not * respond in a reasonable amount of time. */ public static final String E_requestTimeout = "E_requestTimeout"; /** * Signifies that 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 static final String E_secretUnknown = "E_secretUnknown"; /** * Signifies no failure occurred. This return code is used with the dispositionReport for * reporting results from requests with no natural response document. */ public static final String E_success = "E_success"; /** * Signifies that too many or incompatible arguments were passed. The error text will clearly * indicate the nature of the problem. */ public static final String E_tooManyOptions = "E_tooManyOptions"; /** * Signifies that a custody transfer request will not succeed. */ public static final String E_transferAborted = "E_transferAborted"; /** * Signifies that the value of the generic attribute passed is unsupported by the Operator * Instance being queried. */ public static final String E_unrecognizedVersion = "E_unrecognizedVersion"; /** * 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 static final String E_unknownUser = "E_unknownUser"; /** * Signifies that the implementer does not support a feature or API. */ public static final String E_unsupported = "E_unsupported"; /** * 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 static final String E_unvalidatable = "E_unvalidatable"; /** * Signifies that one or more of the uuid_key values passed refers to data * that is not controlled by the individual who is represented by the authentication token. */ public static final String E_userMismatch = "E_userMismatch"; /** * 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 static final String E_valueNotAllowed = "E_valueNotAllowed"; /** Default constructor */ public DispositionReport() { } /** * Constructer that parses the XML dom tree and extracts * useful attributes. * * @param el Root element of the tree within the SOAP body. */ public DispositionReport(Element el) throws UDDIException { boolean fault = false ; UDDIException exception = null; if( UDDIException.isValidElement(el) ) { //If it is a Fault, then there most likely is a Disposition report. //If it is not present then the UDDIException constructor will //handle it. fault = true; exception = new UDDIException(el, true); NodeList nl = exception.getDetailElement().getElementsByTagName(UDDI_TAG); if( nl.getLength()>0 ) { base = (Element)nl.item(0); } else { // Not a disposition report, some other error, throw it throw exception; } } else { base = el; } if( isValidElement(base) ) { // Extract useful attributes NodeList nl; // Extract attribute values genericAttrib = el.getAttribute("generic"); operatorAttrib = el.getAttribute("operator"); truncated = el.getAttribute("truncated"); // Process embedded elements nl = el.getElementsByTagName("result"); for( int i = 0; i 0 ) return new Integer(((Result)results.elementAt(0)).getErrno()).intValue(); else return -1; } /** * @deprecated This method has been deprecated. Use * {@link #getResultVector()} instead. */ public int getErrno(int index) { if( results.size() > index ) return new Integer(((Result)results.elementAt(index)).getErrno()).intValue(); else return -1; } /** * @deprecated This method has been deprecated. Use * {@link #getResultVector()} instead. */ public String getErrCode() { if( results.size() > 0 ) { Result r = (Result)results.elementAt(0); if( r.getErrInfo() != null ) return r.getErrInfo().getErrCode(); else return null; } else return null; } /** * @deprecated This method has been deprecated. Use * {@link #getResultVector()} instead. */ public String getErrCode(int index) { if( results.size() > index ) { Result r = (Result)results.elementAt(index); if( r.getErrInfo() != null ) return r.getErrInfo().getErrCode(); else return null; } else return null; } /** * @deprecated This method has been deprecated. Use * {@link #getResultVector()} instead. */ public String getErrInfoText() { if( results.size() > 0 ) { Result r = (Result)results.elementAt(0); if( r.getErrInfo() != null ) return r.getErrInfo().getText(); else return null; } else return null; } /** * @deprecated This method has been deprecated. Use * {@link #getResultVector()} instead. */ public String getErrInfoText(int index) { if( results.size() > index ) { Result r = (Result)results.elementAt(index); if( r.getErrInfo() != null ) return r.getErrInfo().getText(); else return null; } else return null; } /** * @deprecated This method has been deprecated. Use * {@link #getResultVector()} instead. */ public String getKeyType() { if( results.size() > 0 ) return((Result)results.elementAt(0)).getKeyType(); else return null; } /** * @deprecated This method has been deprecated. Use * {@link #getResultVector()} instead. */ public String getKeyType(int index) { if( results.size() > index ) return((Result)results.elementAt(index)).getKeyType(); else return null; } /** * Retrieves the Vector containing the Result objects that were * present in this DispositionReport. * @return s Vector the Vector of Result objects. */ public Vector getResultVector() { return results; } public int getNumResults() { return results.size(); } // Setters public void setGeneric(String gen) { genericAttrib = gen; } public void setOperator(String oper) { operatorAttrib = oper; } public void setTruncated(boolean t) { if( t ) this.truncated="true"; else this.truncated="false"; } /** * @deprecated This method has been deprecated. Use * {@link #setResultVector( Vector )} instead. */ public void setErrno(int errno) { setErrno(0, errno); } /** * @deprecated This method has been deprecated. Use * {@link #setResultVector( Vector )} instead. */ public void setErrno(int errno, int index) { if( index >= 0 ) { if( index > this.results.size() ) { this.results.setSize(index+1); Result r = new Result(); this.results.setElementAt( r , index); } Result r = ((Result)results.elementAt(index)); r.setErrno( new Integer(errno).toString() ); } } /** * @deprecated This method has been deprecated. Use * {@link #setResultVector( Vector )} instead. */ public void setErrCode(String errCode) { setErrCode(errCode, 0); } /** * @deprecated This method has been deprecated. Use * {@link #setResultVector( Vector )} instead. */ public void setErrCode(String errCode, int index) { if( index >= 0 ) { if( index > this.results.size() ) { this.results.setSize(index+1); Result r = new Result(); ErrInfo ei = new ErrInfo(); r.setErrInfo(ei); this.results.setElementAt( r , index); } Result r = ((Result)results.elementAt(index)); ErrInfo ei = r.getErrInfo(); if( ei==null ) ei = new ErrInfo(); ei.setErrCode(errCode); r.setErrInfo(ei); } } /** * @deprecated This method has been deprecated. Use * {@link #setResultVector( Vector )} instead. */ public void setErrInfoText(String errInfoText) { setErrInfoText(errInfoText, 0); } /** * @deprecated This method has been deprecated. Use * {@link #setResultVector( Vector )} instead. */ public void setErrInfoText(String errInfoText, int index) { if( index >= 0 ) { if( index > this.results.size() ) { this.results.setSize(index+1); Result r = new Result(); ErrInfo ei = new ErrInfo(); r.setErrInfo(ei); this.results.setElementAt( r , index); } Result r = ((Result)results.elementAt(index)); ErrInfo ei = r.getErrInfo(); if( ei==null ) ei = new ErrInfo(); ei.setText(errInfoText); r.setErrInfo(ei); } } /** * @deprecated This method has been deprecated. Use * {@link #setResultVector( Vector )} instead. */ public void setKeyType(String keyType) { setKeyType(keyType, 0); } /** * @deprecated This method has been deprecated. Use * {@link #setResultVector( Vector )} instead. */ public void setKeyType(String keyType, int index) { if( index >= 0 ) { if( index > this.results.size() ) { this.results.setSize(index+1); Result r = new Result(); this.results.setElementAt( r , index); } Result r = ((Result)results.elementAt(index)); r.setKeyType( keyType ); } } /** * Set the Vector of result objects for this DispositionReport * @param rv Vector of Result objects. */ public void setResultVector( Vector rv ) { if( rv != null ) results = rv; else results = new Vector(); } /** * Tests the passed in element to determine if the * element is a serialized version of this object. * * @param el Root element for this object */ public boolean isValidElement(Element el) { return el.getNodeName().equals(UDDI_TAG); } public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if( genericAttrib!=null ) { base.setAttribute("generic", genericAttrib); } if( operatorAttrib!=null ) { base.setAttribute("operator", operatorAttrib); } if( truncated!=null ) { base.setAttribute("truncated", truncated); } for( int i = 0; i < results.size(); i++ ) { Result r = ((Result)results.elementAt(i)); if( r!=null ) r.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/ErrInfo.java000066400000000000000000000070621173667134000215240ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.response; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the errInfo element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    Supports the DispositionReport structure. * This structure is provided for conveying text and structured * error code (alphanumeric) information. Error message text * is contained by this element. * * @author David Melgar (dmelgar@us.ibm.com) */ public class ErrInfo extends UDDIElement { public static final String UDDI_TAG = "errInfo"; protected Element base = null; String text = null; String errCode = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public ErrInfo() { } /** * Construct the object with required fields. * * @param value String value * @param errCode String */ public ErrInfo(String value, String errCode) { setText(value); this.errCode = errCode; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public ErrInfo(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); text = getText(base); errCode = base.getAttribute("errCode"); } public void setText(String s) { text = s; } public void setErrCode(String s) { errCode = s; } public String getText() { return text; } public String getErrCode() { return errCode; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (text!=null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } if (errCode!=null) { base.setAttribute("errCode", errCode); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/KeysOwned.java000066400000000000000000000100171173667134000220620ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.response; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.util.FromKey; import org.uddi4j.util.ToKey; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the keysOwned element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This element designates the businessKeys (fromKey, toKey) that the publisher * manages. * * @author Mahesh C S (csmahesh@india.hp.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class KeysOwned extends UDDIElement { public static final String UDDI_TAG = "keysOwned"; protected Element base = null; FromKey fromKey = null; ToKey toKey = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public KeysOwned() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public KeysOwned(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, FromKey.UDDI_TAG); if (nl.getLength() > 0) { fromKey = new FromKey((Element)nl.item(0)); } nl = getChildElementsByTagName(base, ToKey.UDDI_TAG); if (nl.getLength() > 0) { toKey = new ToKey((Element)nl.item(0)); } } public void setFromKeyString(String s) { fromKey = new FromKey(); fromKey.setText(s); } public String getFromKeyString() { if(fromKey!=null) return fromKey.getText(); else return null; } public void setFromKey(FromKey key) { fromKey = key; } public FromKey getFromKey() { return fromKey; } public void setToKey(ToKey key) { toKey = key; } public ToKey getToKey() { return toKey; } public void setToKeyString(String s) { toKey = new ToKey(); toKey.setText(s); } public String getToKeyString() { if(toKey!=null) return toKey.getText(); else return null; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); if (fromKey!=null) { fromKey.saveToXML(base); } if (toKey!=null) { toKey.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/PublisherAssertions.java000066400000000000000000000141611173667134000241660ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.response; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.assertion.PublisherAssertion; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the publisherAssertions element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This response message contains a set of one or more PublisherAssertion * structures. It returns all publisherAssertion structures that were authenticated * in the preceding set_publisherAssertions or get_publisherAssertions messages. * * @author Mahesh C S (csmahesh@india.hp.com) */ public class PublisherAssertions extends UDDIElement { public static final String UDDI_TAG = "publisherAssertions"; protected Element base = null; String operator = null; String authorizedName = null; // Vector of PublisherAssertion objects Vector publisherAssertion = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public PublisherAssertions() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public PublisherAssertions(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); operator = base.getAttribute("operator"); authorizedName = base.getAttribute("authorizedName"); NodeList nl = null; nl = getChildElementsByTagName(base, PublisherAssertion.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { publisherAssertion.addElement(new PublisherAssertion((Element)nl.item(i))); } } /** * Construct the object with required fields. * * @param operator String * @param name String * @param publishAssertion Vector of publisherAssertion objects. */ public PublisherAssertions(String operator, String name, Vector publishAssertion) throws UDDIException { this.operator = operator; this.authorizedName = name; this.publisherAssertion = publishAssertion; } public String getAuthorizedName() { return authorizedName; } public void setAuthorizedName(String name) { authorizedName = name; } public String getOperator() { return operator; } public void setOperator(String s) { operator = s; } /** * Set PublisherAssertion vector * * @param s Vector of PublisherAssertion objects. */ public void setPublisherAssertionVector(Vector s) { publisherAssertion = s; } /** * Get PublisherAssertion vector * * @return Vector of PublisherAssertion objects. */ public Vector getPublisherAssertionVector() { return publisherAssertion; } /** * Add a PublisherAssertion object to the collection * @param p PublisherAssertion to be added */ public void add (PublisherAssertion p) { publisherAssertion.add (p); } /** * Remove a PublisherAssertion object from the collection * @param p PublisherAssertion to be removed * @return True if object was removed, false if it * was not found in the collection. */ public boolean remove (PublisherAssertion p) { return publisherAssertion.remove (p); } /** * Retrieve the PublisherAssertion at the specified index within the collection. * @param index Index to retrieve from. * @return PublisherAssertion at that index */ public PublisherAssertion get (int index) { return (PublisherAssertion) publisherAssertion.get (index); } /** * Return current size of the collection. * @return Number of PublisherAssertions in the collection */ public int size () { return publisherAssertion.size (); } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes base.setAttribute("generic", UDDIElement.GENERIC); if (operator!=null) { base.setAttribute("operator", operator); } if (authorizedName!=null) { base.setAttribute("authorizedName", authorizedName); } if (publisherAssertion!=null) { for (int i=0; i < publisherAssertion.size(); i++) { ((PublisherAssertion)(publisherAssertion.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/RegisteredInfo.java000066400000000000000000000117511173667134000230710ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.response; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the registeredInfo element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This structure is used in the resynch process and is a response * to a get_registeredInfo message. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class RegisteredInfo extends UDDIElement { public static final String UDDI_TAG = "registeredInfo"; protected Element base = null; String operator = null; String truncated = null; BusinessInfos businessInfos = null; TModelInfos tModelInfos = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public RegisteredInfo() { } /** * Construct the object with required fields. * * @param operator String * @param BusinessInfos BusinessInfos object * @param TModelInfos TModelInfos object */ public RegisteredInfo(String operator, BusinessInfos businessInfos, TModelInfos tModelInfos) { this.operator = operator; this.businessInfos = businessInfos; this.tModelInfos = tModelInfos; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public RegisteredInfo(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); operator = base.getAttribute("operator"); truncated = base.getAttribute("truncated"); NodeList nl = null; nl = getChildElementsByTagName(base, BusinessInfos.UDDI_TAG); if (nl.getLength() > 0) { businessInfos = new BusinessInfos((Element)nl.item(0)); } nl = getChildElementsByTagName(base, TModelInfos.UDDI_TAG); if (nl.getLength() > 0) { tModelInfos = new TModelInfos((Element)nl.item(0)); } } public void setOperator(String s) { operator = s; } public void setTruncated(String s) { truncated = s; } public void setTruncated(boolean s) { if (s) { truncated = "true"; } else { truncated = "false"; } } public void setBusinessInfos(BusinessInfos s) { businessInfos = s; } public void setTModelInfos(TModelInfos s) { tModelInfos = s; } public String getOperator() { return operator; } public String getTruncated() { return truncated; } public boolean getTruncatedBoolean() { return "true".equals(truncated); } public BusinessInfos getBusinessInfos() { return businessInfos; } public TModelInfos getTModelInfos() { return tModelInfos; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes base.setAttribute("generic", UDDIElement.GENERIC); if (operator!=null) { base.setAttribute("operator", operator); } if (truncated!=null) { base.setAttribute("truncated", truncated); } if (businessInfos!=null) { businessInfos.saveToXML(base); } if (tModelInfos!=null) { tModelInfos.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/RelatedBusinessInfo.java000066400000000000000000000340221173667134000240640ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.response; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.Description; import org.uddi4j.datatype.Name; import org.uddi4j.util.BusinessKey; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the relatedBusinessInfo element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This structure contains information about one or more relationships between * two businessEntitys. The information can be a businessKey, name and optional * description data, and a collection element named sharedRelationships. * The sharedRelationships element can contain zero or more keyedReference * elements. The information in the keyedReference and businessKey elements, * for a specific businessEntity, represent complete relationships when they * match publisher assertions made by the publisher for each businessEntity. * * @author Ravi Trivedi (ravi_trivedi@hp.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class RelatedBusinessInfo extends UDDIElement { public static final String UDDI_TAG = "relatedBusinessInfo"; protected Element base = null; BusinessKey businessKey = null; //vector of name/description/sharedRelationships Vector nameVector = new Vector(); Vector description = new Vector(); Vector sharedRelationships = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public RelatedBusinessInfo() { } /** * Required fields constructor. * This constructor initialises the object with the fields * required by the uddi specification. * @param businessKey BusinessKey * @param names Vector of Name objects * @param sharedRelationShips Vector of SharedRelationship objects */ public RelatedBusinessInfo( BusinessKey businessKey, Vector names, Vector sharedRelationships) { this.businessKey=businessKey; this.nameVector=names; this.sharedRelationships=sharedRelationships; } /** * Required fields constructor. * This constructor initialises the object with the fields * required by the uddi specification. * @param businessKey String * @param names Vector of Name objects * @param sharedRelationships Vector of SharedRelationship objects */ public RelatedBusinessInfo( String businessKey, Vector names, Vector sharedRelationships) { this.businessKey=new BusinessKey(businessKey); this.nameVector=names; this.sharedRelationships=sharedRelationships; } /** * Required fields constructor. * This constructor initialises the object with the fields * required by the uddi specification. * @param businessKey String * @param name String The default name for this RelatedBusinessInfo * @param sharedRelationships Vector of SharedRelationship objects */ public RelatedBusinessInfo( String businessKey, String name, Vector sharedRelationships) { this.businessKey=new BusinessKey(businessKey); setDefaultNameString(name,null); this.sharedRelationships=sharedRelationships; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public RelatedBusinessInfo(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, BusinessKey.UDDI_TAG); if (nl.getLength() > 0) { businessKey = new BusinessKey((Element)nl.item(0)); } nl = getChildElementsByTagName(base, Name.UDDI_TAG); for (int i = 0 ; i < nl.getLength(); i++ ) { nameVector.addElement(new Name((Element)nl.item(i))); } nl = getChildElementsByTagName(base, Description.UDDI_TAG); for (int i = 0 ; i < nl.getLength(); i++) { description.addElement(new Description((Element)nl.item(i))); } nl = getChildElementsByTagName(base, SharedRelationships.UDDI_TAG); for (int i = 0 ; i < nl.getLength(); i++) { sharedRelationships.addElement(new SharedRelationships((Element)nl.item(i))); } } /** * @deprecated This method has been deprecated. Use * {@link #setSharedRelationshipsVector(Vector)} or * {@link #setDefaultSharedRelationships(SharedRelationships)} instead */ public void setSharedRelationships(SharedRelationships s) { setDefaultSharedRelationships(s); } /** * This method stores this name as the Default SharedRelationship * (i.e., places it in the first location in the Vector). */ public void setDefaultSharedRelationships(SharedRelationships s) { if (this.sharedRelationships.size() > 0) { this.sharedRelationships.setElementAt(s,0); } else { this.sharedRelationships.addElement(s); } } /** * @param s Vector of SharedRelationships objects */ public void setSharedRelationshipsVector(Vector s) { sharedRelationships = s; } /** * @deprecated This method has been deprecated. Use * {@link #setNameVector(Vector)} or * {@link #setDefaultName(Name)} instead */ public void setName(Name s) { setDefaultName(s); } /** * @deprecated This method has been deprecated. Use * {@link #setNameVector(Vector)} or * {@link #setDefaultNameString(String, String)} instead */ public void setName(String s) { setDefaultNameString(s, null); } /** * This method stores this name as the Default Name (i.e., places it in the first * location in the Vector). */ public void setDefaultName(Name name) { if (nameVector.size() > 0) { nameVector.setElementAt(name,0); } else { nameVector.addElement(name); } } /** * This method stores this String, in the given language as the Default Name * (i.e., places it in the first location in the Vector). */ public void setDefaultNameString(String value, String lang) { Name name = new Name(value, lang); if (nameVector.size() > 0) { nameVector.setElementAt(name,0); } else { nameVector.addElement(name); } } /** * @param s Vector of Name objects */ public void setNameVector(Vector s) { nameVector = s; } /** * @deprecated This method has been deprecated. Use * {@link #setDescriptionVector(Vector)} or * {@link #setDefaultDescription(Description)} instead */ public void setDescription(Description s) { setDefaultDescription(s); } /** * @deprecated This method has been deprecated. Use * {@link #setDescriptionVector(Vector)} or * {@link #setDefaultDescriptionString(String, String)} instead */ public void setDescriptionString(String s) { setDefaultDescriptionString(s,null); } /** * This method stores this Description as the Default Description * (i.e., places it in the first location in the Vector). * * @param s Description */ public void setDefaultDescription(Description s) { if (description.size() > 0) { description.setElementAt(s,0); } else { description.addElement(s); } } /** * This method stores this String as the Default Description * (i.e., places it in the first location in the Vector). * * @param s String */ public void setDefaultDescriptionString(String s, String lang) { if (description.size() > 0) { description.setElementAt(new Description(s,lang), 0); } else { description.addElement(new Description(s,lang)); } } /** * Set description vector. * * @param s Vector of Description objects. */ public void setDescriptionVector(Vector s) { description = s; } public void setBusinessKey(String s) { businessKey = new BusinessKey(s); } /** * @deprecated This method has been deprecated. Use * {@link #getSharedRelationshipsVector()} or * {@link #getDefaultSharedRelationships()} instead */ public SharedRelationships getSharedRelationships() { return getDefaultSharedRelationships(); } /** * Get the default SharedRelationships. * (i.e., the one in the first position in the vector) * @return SharedRelationships */ public SharedRelationships getDefaultSharedRelationships() { if(sharedRelationships.size() > 0) return (SharedRelationships) sharedRelationships.elementAt(0); else return null; } /** * Get all SharedRelationships. * * @return Vector of SharedRelationships objects. */ public Vector getSharedRelationshipsVector() { return sharedRelationships; } /** * @deprecated This method has been deprecated. Use * {@link #getNameVector()} or * {@link #getDefaultName()} instead */ public Name getName() { return getDefaultName(); } /** * @deprecated This method has been deprecated. Use * {@link #getNameVector()} or * {@link #getDefaultNameString()} instead */ public String getNameString() { return getDefaultNameString(); } /** * Get the default name. * (i.e., the one in the first position in the vector) * @return Name */ public Name getDefaultName() { if(nameVector.size() > 0) return (Name) nameVector.elementAt(0); else return null; } /** * Get default name string. * (i.e., the one in the first position in the vector) * @return String */ public String getDefaultNameString() { if ((nameVector).size() > 0) { return ((Name)nameVector.elementAt(0)).getText(); } else { return null; } } /** * Get all names. * * @return Vector of Name objects. */ public Vector getNameVector() { return nameVector ; } /** * @deprecated This method has been deprecated. Use * {@link #getDescriptionVector()} or * {@link #getDefaultDescription()} instead */ public Description getDescription() { return getDefaultDescription(); } /** * @deprecated This method has been deprecated. Use * {@link #getDescriptionVector()} or * {@link #getDefaultDescriptionString()} instead */ public String getDescriptionString() { return getDefaultDescriptionString(); } /** * Get the default Description. * (i.e., the one in the first position in the vector) * @return Description */ public Description getDefaultDescription() { if(description.size() > 0) return ((Description) description.elementAt(0)); else return null; } /** * Get the default Description as a String. * (i.e., the first string representing the first Description in the vector) * @return String */ public String getDefaultDescriptionString() { if(description.size() > 0) return ((Description) description.elementAt(0)).getText(); else return null; } /** * Get all deascriptions. * * @return Vector of Description objects. */ public Vector getDescriptionVector() { return description; } public String getBusinessKey() { return this.businessKey.getText(); } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (businessKey!=null) { businessKey.saveToXML(base); } if (nameVector!=null && nameVector.size()>0) { for(int i=0; i0) { for(int i=0; i0) { for(int i=0; i *

  • A constructor that passes the required fields. *
  • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
  • Get/set methods for each attribute that this element can contain. *
  • A get/setVector method is provided for sets of attributes. *
  • A SaveToXML method that serializes this class within a passed in * element. * * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This is a response message that contains a set of one or more RelatedBusinessInfo * structures. * * @author Ravi Trivedi (ravi_trivedi@hp.com) * @author Vivek Chopra (vivek@soaprpc.com) */ public class RelatedBusinessInfos extends UDDIElement { public static final String UDDI_TAG = "relatedBusinessInfos"; protected Element base = null; // Vector of RelatedBusinessInfo objects Vector relatedBusinessInfo = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public RelatedBusinessInfos() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public RelatedBusinessInfos(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, RelatedBusinessInfo.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { relatedBusinessInfo.addElement(new RelatedBusinessInfo((Element)nl.item(i))); } } /** * Construct the object with required fields. * * @param relatedBusinessInfo Vector */ public RelatedBusinessInfos(Vector relatedBusinessInfo) { this.relatedBusinessInfo = relatedBusinessInfo; } public Vector getRelatedBusinessInfoVector() { return this.relatedBusinessInfo; } public void setRelatedBusinessInfoVector(Vector relatedBusinessInfo) { this.relatedBusinessInfo = relatedBusinessInfo; } /** * Add a RelatedBusinessInfo object to the collection * @param r RelatedBusinessInfo to be added */ public void add (RelatedBusinessInfo r) { relatedBusinessInfo.add (r); } /** * Remove a RelatedBusinessInfo object from the collection * @param r RelatedBusinessInfo to be removed * @return True if object was removed, false if it * was not found in the collection. */ public boolean remove (RelatedBusinessInfo r) { return relatedBusinessInfo.remove (r); } /** * Retrieve the RelatedBusinessInfo at the specified index within the collection. * @param index Index to retrieve from. * @return RelatedBusinessInfo at that index */ public RelatedBusinessInfo get (int index) { return (RelatedBusinessInfo) relatedBusinessInfo.get (index); } /** * Return current size of the collection. * @return Number of RelatedBusinessInfos in the collection */ public int size () { return relatedBusinessInfo.size (); } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (relatedBusinessInfo!=null) { for (int i=0; i < relatedBusinessInfo.size(); i++) { ((RelatedBusinessInfo)(relatedBusinessInfo.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/RelatedBusinessesList.java000066400000000000000000000133211173667134000244330ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.response; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.util.BusinessKey; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the relatedBusinessesList element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This structure reports the business relationships that are complete between * the businessEntity, specified in the find_relatedBusinesses message, and * other businessEntity registrations. Business relationships are considered complete, * between two businessEntity registrations, when the publishers controlling each of * the businessEntity structures set assertions affirming the relationship. * * @author Ravi Trivedi (ravi_trivedi@hp.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class RelatedBusinessesList extends UDDIElement { public static final String UDDI_TAG = "relatedBusinessesList"; protected Element base = null; String operator = null; String truncated = null; BusinessKey businessKey = null; RelatedBusinessInfos relBusInfos = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public RelatedBusinessesList() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public RelatedBusinessesList(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); operator = base.getAttribute("operator"); truncated = base.getAttribute("truncated"); NodeList nl = null; nl = getChildElementsByTagName(base, RelatedBusinessInfos.UDDI_TAG); if (nl.getLength() > 0) { relBusInfos = new RelatedBusinessInfos((Element)nl.item(0)); } nl = getChildElementsByTagName(base, BusinessKey.UDDI_TAG); if (nl.getLength() > 0) { businessKey = new BusinessKey((Element)nl.item(0)); } } /** * Construct the object with required fields. * * @param operator String * @param businessKey String * @param bi RelatedBusinessInfos */ public RelatedBusinessesList(String operator, String businessKey, RelatedBusinessInfos bi) { this.operator = operator; this.businessKey = new BusinessKey(businessKey); this.relBusInfos = bi; } public String getOperator() { return this.operator; } public void setOperator(String s) { this.operator = s; } public boolean getTruncatedBoolean() { return "true".equals(truncated); } public void setTruncated(boolean s) { if (s) { truncated = "true"; } else { truncated = "false"; } } public String getTruncated() { return truncated; } public void setTruncated(String s) { truncated = s; } public String getBusinessKey() { return businessKey.getText(); } public void setBusinessKey(String businessKey) { this.businessKey = new BusinessKey(businessKey); } public RelatedBusinessInfos getRelatedBusinessInfos() { return this.relBusInfos; } public void setRelatedBusinessInfos(RelatedBusinessInfos r) { this.relBusInfos = r; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes base.setAttribute("generic", UDDIElement.GENERIC); if (operator != null) { base.setAttribute("operator", operator); } if (truncated != null) { base.setAttribute("truncated", truncated); } if (businessKey != null) { businessKey.saveToXML(base); } if (relBusInfos != null) { relBusInfos.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/Result.java000066400000000000000000000073601173667134000214370ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.response; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the result element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This structure supports the dispositionReport structure. * * @author David Melgar (dmelgar@us.ibm.com) */ public class Result extends UDDIElement { public static final String UDDI_TAG = "result"; protected Element base = null; String keyType = null; String errno = null; ErrInfo errInfo = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public Result() { } /** * Construct the object with required fields. * * @param errno String */ public Result(String errno) { this.errno = errno; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public Result(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); keyType = base.getAttribute("keyType"); errno = base.getAttribute("errno"); NodeList nl = null; nl = getChildElementsByTagName(base, ErrInfo.UDDI_TAG); if( nl.getLength() > 0 ) { errInfo = new ErrInfo((Element)nl.item(0)); } } public void setKeyType(String s) { keyType = s; } public void setErrno(String s) { errno = s; } public void setErrInfo(ErrInfo s) { errInfo = s; } public String getKeyType() { return keyType; } public String getErrno() { return errno; } public ErrInfo getErrInfo() { return errInfo; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (keyType!=null) { base.setAttribute("keyType", keyType); } if (errno!=null) { base.setAttribute("errno", errno); } if (errInfo!=null) { errInfo.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/ServiceDetail.java000066400000000000000000000113641173667134000227030ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.response; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.service.BusinessService; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the serviceDetail element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This structure is used to return all businessService details. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class ServiceDetail extends UDDIElement { public static final String UDDI_TAG = "serviceDetail"; protected Element base = null; String operator = null; String truncated = null; // Vector of BusinessService objects Vector businessService = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public ServiceDetail() { } /** * Construct the object with required fields. * * @param operator String */ public ServiceDetail(String operator) { this.operator = operator; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public ServiceDetail(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); operator = base.getAttribute("operator"); truncated = base.getAttribute("truncated"); NodeList nl = null; nl = getChildElementsByTagName(base, BusinessService.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { businessService.addElement(new BusinessService((Element)nl.item(i))); } } public void setOperator(String s) { operator = s; } public void setTruncated(String s) { truncated = s; } public void setTruncated(boolean s) { if (s) { truncated = "true"; } else { truncated = "false"; } } /** * Set businessService vector * * @param s Vector of BusinessService objects. */ public void setBusinessServiceVector(Vector s) { businessService = s; } public String getOperator() { return operator; } public String getTruncated() { return truncated; } public boolean getTruncatedBoolean() { return "true".equals(truncated); } /** * Get businessService * * @return s Vector of BusinessService objects. */ public Vector getBusinessServiceVector() { return businessService; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes base.setAttribute("generic", UDDIElement.GENERIC); if (operator!=null) { base.setAttribute("operator", operator); } if (truncated!=null) { base.setAttribute("truncated", truncated); } if (businessService!=null) { for (int i=0; i < businessService.size(); i++) { ((BusinessService)(businessService.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/ServiceInfo.java000066400000000000000000000147031173667134000223740ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.response; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.Name; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the serviceInfo element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This structure contains the abbreviated information about registered * businessService information. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class ServiceInfo extends UDDIElement { public static final String UDDI_TAG = "serviceInfo"; protected Element base = null; String serviceKey = null; String businessKey = null; // Vector of name Vector nameVector = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public ServiceInfo() { } /** * Construct the object with required fields. * * @param serviceKey String * @param name String */ public ServiceInfo(String serviceKey, String name) { this.serviceKey = serviceKey; this.nameVector.addElement(new Name(name)); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public ServiceInfo(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); serviceKey = base.getAttribute("serviceKey"); businessKey = base.getAttribute("businessKey"); NodeList nl = null; nl = getChildElementsByTagName(base, Name.UDDI_TAG); for (int i=0; i 0) { nameVector.setElementAt(name,0); } else { nameVector.addElement(name); } } /** * This method stores this String, in the given language as the Default Name * (i.e., places it in the first location in the Vector). */ public void setDefaultNameString(String value, String lang) { Name name = new Name(value, lang); if (nameVector.size() > 0) { nameVector.setElementAt(name,0); } else { nameVector.addElement(name); } } /** * @param s Vector of Name objects */ public void setNameVector(Vector s) { nameVector = s; } public String getServiceKey() { return serviceKey; } public String getBusinessKey() { return businessKey; } /** * @deprecated This method has been deprecated. Use * {@link #getNameVector ()} or * {@link #getDefaultName ()} instead */ public Name getName() { return getDefaultName(); } /** * @deprecated This method has been deprecated. Use * {@link #getNameVector ()} or * {@link #getDefaultNameString ()} instead */ public String getNameString() { return getDefaultNameString(); } public Name getDefaultName() { return (Name) nameVector.elementAt(0); } /** * Get default name string. * * @return String */ public String getDefaultNameString() { if ((nameVector).size() > 0) { return ((Name)nameVector.elementAt(0)).getText(); } else { return null; } } /** * Get all names. * * @return Vector of Name objects. */ public Vector getNameVector() { return nameVector ; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (serviceKey!=null) { base.setAttribute("serviceKey", serviceKey); } if (businessKey!=null) { base.setAttribute("businessKey", businessKey); } if (nameVector!=null && nameVector.size()>0) { for(int i=0;i *

  • A constructor that passes the required fields. *
  • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
  • Get/set methods for each attribute that this element can contain. *
  • A get/setVector method is provided for sets of attributes. *
  • A SaveToXML method that serializes this class within a passed in * element. * * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    An accessor container for one or more serviceInfo structures. * * @author David Melgar (dmelgar@us.ibm.com) */ public class ServiceInfos extends UDDIElement { public static final String UDDI_TAG = "serviceInfos"; protected Element base = null; // Vector of ServiceInfo objects Vector serviceInfo = new Vector(); /** * Default constructor. * */ public ServiceInfos() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public ServiceInfos(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, ServiceInfo.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { serviceInfo.addElement(new ServiceInfo((Element)nl.item(i))); } } /** * Set serviceInfo vector * * @param s Vector of ServiceInfo objects. */ public void setServiceInfoVector(Vector s) { serviceInfo = s; } /** * Get serviceInfo * * @return s Vector of ServiceInfo objects. */ public Vector getServiceInfoVector() { return serviceInfo; } /** * Add a ServiceInfo object to the collection * @param s ServiceInfo to be added */ public void add (ServiceInfo s) { serviceInfo.add (s); } /** * Remove a ServiceInfo object from the collection * @param s ServiceInfo to be removed * @return True if object was removed, false if it * was not found in the collection. */ public boolean remove (ServiceInfo s) { return serviceInfo.remove (s); } /** * Retrieve the ServiceInfo at the specified index within the collection. * @param index Index to retrieve from. * @return ServiceInfo at that index */ public ServiceInfo get (int index) { return (ServiceInfo) serviceInfo.get (index); } /** * Return current size of the collection. * @return Number of ServiceInfos in the collection */ public int size () { return serviceInfo.size (); } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (serviceInfo!=null) { for (int i=0; i < serviceInfo.size(); i++) { ((ServiceInfo)(serviceInfo.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/ServiceList.java000066400000000000000000000105561173667134000224160ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.response; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the serviceList element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This message is used to return results of a find_service request. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class ServiceList extends UDDIElement { public static final String UDDI_TAG = "serviceList"; protected Element base = null; String operator = null; String truncated = null; ServiceInfos serviceInfos = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public ServiceList() { } /** * Construct the object with required fields. * * @param operator String * @param ServiceInfos ServiceInfos object */ public ServiceList(String operator, ServiceInfos serviceInfos) { this.operator = operator; this.serviceInfos = serviceInfos; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public ServiceList(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); operator = base.getAttribute("operator"); truncated = base.getAttribute("truncated"); NodeList nl = null; nl = getChildElementsByTagName(base, ServiceInfos.UDDI_TAG); if (nl.getLength() > 0) { serviceInfos = new ServiceInfos((Element)nl.item(0)); } } public void setOperator(String s) { operator = s; } public void setTruncated(String s) { truncated = s; } public void setTruncated(boolean s) { if (s) { truncated = "true"; } else { truncated = "false"; } } public void setServiceInfos(ServiceInfos s) { serviceInfos = s; } public String getOperator() { return operator; } public String getTruncated() { return truncated; } public boolean getTruncatedBoolean() { return "true".equals(truncated); } public ServiceInfos getServiceInfos() { return serviceInfos; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes base.setAttribute("generic", UDDIElement.GENERIC); if (operator!=null) { base.setAttribute("operator", operator); } if (truncated!=null) { base.setAttribute("truncated", truncated); } if (serviceInfos!=null) { serviceInfos.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/SharedRelationships.java000066400000000000000000000104771173667134000241370ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.response; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.util.KeyedReference; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the sharedRelationships element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This is a collection element that contains zero or more keyedReference elements. * These elements form part of the RelatedBusinessInfo structure. * The RelatedBusinessInfo structure is a response message to the * find_relatedBusinesses inquiry message. * The information in the keyedReference and businessKey elements, for a specific * businessEntity (present in relatedBusinessInfo structure), represent complete * relationships when they match publisher assertions made by the publisher for each * businessEntity. * * @author Ravi Trivedi (ravi_trivedi@hp.com) */ public class SharedRelationships extends UDDIElement { public static final String UDDI_TAG = "sharedRelationships"; public static final String DIRECTION_TOKEY = "toKey"; public static final String DIRECTION_FROMKEY = "fromKey"; protected Element base = null; Vector keyedReference = new Vector(); String direction = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public SharedRelationships() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public SharedRelationships(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); direction = base.getAttribute("direction"); NodeList nl = null; nl = getChildElementsByTagName(base, KeyedReference.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { keyedReference.addElement(new KeyedReference((Element)nl.item(i))); } } public Vector getKeyedReferenceVector() { return this.keyedReference; } public void setKeyedReferenceVector(Vector keyedReference) { this.keyedReference = keyedReference; } public String getDirection() { return direction; } public void setDirection(String d) { direction = d ; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); if(direction !=null ) { base.setAttribute("direction", direction); } // Save attributes if (keyedReference!=null) { for (int i=0; i < keyedReference.size(); i++) { ((KeyedReference)(keyedReference.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/TModelDetail.java000066400000000000000000000117461173667134000224730ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.response; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.tmodel.TModel; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the tModelDetail element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This is a response message that returns all exposed details about a tModel. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class TModelDetail extends UDDIElement { public static final String UDDI_TAG = "tModelDetail"; protected Element base = null; String operator = null; String truncated = null; // Vector of TModel objects Vector tModel = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public TModelDetail() { } /** * Construct the object with required fields. * * @param operator String * @param tModel Vector of TModel objects. */ public TModelDetail(String operator, Vector tModel) { this.operator = operator; this.tModel = tModel; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public TModelDetail(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); operator = base.getAttribute("operator"); truncated = base.getAttribute("truncated"); NodeList nl = null; nl = getChildElementsByTagName(base, TModel.UDDI_TAG); for (int i = 0; i < nl.getLength(); i++) { tModel.addElement(new TModel((Element)nl.item(i))); } } public void setOperator(String s) { operator = s; } public void setTruncated(String s) { truncated = s; } public void setTruncated(boolean s) { if (s) { truncated = "true"; } else { truncated = "false"; } } /** * Set tModel vector * * @param s Vector of TModel objects. */ public void setTModelVector(Vector s) { tModel = s; } public String getOperator() { return operator; } public String getTruncated() { return truncated; } public boolean getTruncatedBoolean() { return "true".equals(truncated); } /** * Get tModel * * @return s Vector of TModel objects. */ public Vector getTModelVector() { return tModel; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes base.setAttribute("generic", UDDIElement.GENERIC); if (operator != null) { base.setAttribute("operator", operator); } if (truncated != null) { base.setAttribute("truncated", truncated); } if (tModel != null) { for (int i = 0; i < tModel.size(); i++) { ((TModel) (tModel.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/TModelInfo.java000066400000000000000000000076151173667134000221640ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.response; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.uddi4j.datatype.Name; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the tModelInfo element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This structure is used to enumerate short form tModel information. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class TModelInfo extends UDDIElement { public static final String UDDI_TAG = "tModelInfo"; protected Element base = null; String tModelKey = null; Name name = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public TModelInfo() { } /** * Construct the object with required fields. * * @param tModelKey String * @param name String */ public TModelInfo(String tModelKey, String name) { this.tModelKey = tModelKey; this.name = new Name(name); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public TModelInfo(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); tModelKey = base.getAttribute("tModelKey"); NodeList nl = null; nl = getChildElementsByTagName(base, Name.UDDI_TAG); if (nl.getLength() > 0) { name = new Name((Element)nl.item(0)); } } public void setTModelKey(String s) { tModelKey = s; } public void setName(Name s) { name = s; } public void setName(String s) { name = new Name(); name.setText(s); } public String getTModelKey() { return tModelKey; } public Name getName() { return name; } public String getNameString() { if(name!=null) return name.getText(); else return null; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (tModelKey!=null) { base.setAttribute("tModelKey", tModelKey); } if (name!=null) { name.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/TModelInfos.java000066400000000000000000000104131173667134000223350ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.response; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the tModelInfos element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    Support element - accessor container for tModelInfo. * * @author David Melgar (dmelgar@us.ibm.com) * @author Vivek Chopra (vivek@soaprpc.com) */ public class TModelInfos extends UDDIElement { public static final String UDDI_TAG = "tModelInfos"; protected Element base = null; // Vector of TModelInfo objects Vector tModelInfo = new Vector(); /** * Default constructor. * */ public TModelInfos() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public TModelInfos(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, TModelInfo.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { tModelInfo.addElement(new TModelInfo((Element)nl.item(i))); } } /** * Set tModelInfo vector * * @param s Vector of TModelInfo objects. */ public void setTModelInfoVector(Vector s) { tModelInfo = s; } /** * Get tModelInfo * * @return s Vector of TModelInfo objects. */ public Vector getTModelInfoVector() { return tModelInfo; } /** * Add a TModelInfo object to the collection * @param t TModelInfo to be added */ public void add (TModelInfo t) { tModelInfo.add (t); } /** * Remove a TModelInfo object from the collection * @param t TModelInfo to be removed * @return True if object was removed, false if it * was not found in the collection. */ public boolean remove (TModelInfo t) { return tModelInfo.remove (t); } /** * Retrieve the TModelInfo at the specified index within the collection. * @param index Index to retrieve from. * @return TModelInfo at that index */ public TModelInfo get (int index) { return (TModelInfo) tModelInfo.get (index); } /** * Return current size of the collection. * @return Number of TModelInfos in the collection */ public int size () { return tModelInfo.size (); } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (tModelInfo!=null) { for (int i=0; i < tModelInfo.size(); i++) { ((TModelInfo)(tModelInfo.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/response/TModelList.java000066400000000000000000000106021173667134000221720ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.response; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the tModelList element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This report provides a list of tModels in short form. * This message is the response to a find_tModel query. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class TModelList extends UDDIElement { public static final String UDDI_TAG = "tModelList"; protected Element base = null; String operator = null; String truncated = null; TModelInfos tModelInfos = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public TModelList() { } /** * Construct the object with required fields. * * @param operator String * @param TModelInfos TModelInfos object */ public TModelList(String operator, TModelInfos tModelInfos) { this.operator = operator; this.tModelInfos = tModelInfos; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public TModelList(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); operator = base.getAttribute("operator"); truncated = base.getAttribute("truncated"); NodeList nl = null; nl = getChildElementsByTagName(base, TModelInfos.UDDI_TAG); if (nl.getLength() > 0) { tModelInfos = new TModelInfos((Element)nl.item(0)); } } public void setOperator(String s) { operator = s; } public void setTruncated(String s) { truncated = s; } public void setTruncated(boolean s) { if (s) { truncated = "true"; } else { truncated = "false"; } } public void setTModelInfos(TModelInfos s) { tModelInfos = s; } public String getOperator() { return operator; } public String getTruncated() { return truncated; } public boolean getTruncatedBoolean() { return "true".equals(truncated); } public TModelInfos getTModelInfos() { return tModelInfos; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes base.setAttribute("generic", UDDIElement.GENERIC); if (operator!=null) { base.setAttribute("operator", operator); } if (truncated!=null) { base.setAttribute("truncated", truncated); } if (tModelInfos!=null) { tModelInfos.saveToXML(base); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/transport/000077500000000000000000000000001173667134000175065ustar00rootroot00000000000000uddi4j-2.0.5/src/org/uddi4j/transport/ApacheAxisTransport.java000066400000000000000000000107071173667134000243010ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.transport; import java.io.ByteArrayInputStream; import java.io.IOException; import java.net.URL; import java.util.Properties; import java.util.Vector; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.apache.axis.AxisFault; import org.apache.axis.Message; import org.apache.axis.client.Call; import org.apache.axis.client.Service; import org.apache.axis.message.SOAPBodyElement; import org.uddi4j.client.UDDIProxy; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.xml.sax.SAXException; /** * Transport implementation for Apache AXIS SOAP stack. *

    * * Note: Axis does not support proxies on a per connection basis *

    * Axis uses the JVM property support. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class ApacheAxisTransport extends TransportBase { /** * Sends a UDDIElement to URL. * * @param el UDDIElement to send * @param url Destination URL * @return An element representing a XML DOM tree containing the UDDI response. * @exception TransportException * Thrown if a problem occurs during transmission */ public Element send(Element el, URL url) throws TransportException { Element base = null; boolean debug = logEnabled(); Call call = null; try { Service service = new Service(); call = (Call) service.createCall(); Properties config = getConfiguration(); String username = config.getProperty(UDDIProxy.HTTP_BASIC_AUTH_USERNAME_PROPERTY); String password = config.getProperty(UDDIProxy.HTTP_BASIC_AUTH_PASSWORD_PROPERTY); if (username != null) { call.setUsername(username); } if (password != null) { call.setPassword(password); } call.setTargetEndpointAddress(url); //call.setProperty(HTTPConstants.MC_HTTP_SOAPACTION, ""); Vector result = null; // Rebuild the body. This convoluted process lets Axis handle the level 1 DOM tree // from UDDI4J. When UDDI4J moves to a level 2 DOM tree, the more obvious method // can be tried. String str = null; str = org.apache.axis.utils.XMLUtils.ElementToString(el); SOAPBodyElement body = new SOAPBodyElement( new java.io.ByteArrayInputStream(str.getBytes("UTF8"))); // if DOM level 2 use this more obvious approach // SOAPBodyElement body = new SOAPBodyElement(el); Object[] params = new Object[] { body }; if (debug) { System.err.println("\nRequest message:\n" + params[0]); } result = (Vector) call.invoke(params); base = stringToElement(((SOAPBodyElement) result.elementAt(0)).toString()); } catch (AxisFault fault) { try { Message m = call.getResponseMessage(); base = stringToElement(m.getSOAPEnvelope().getFirstBody().toString()); } catch (Exception e) { throw new TransportException(e); } } catch (Exception e) { throw new TransportException(e); } if (debug && base != null) { System.err.println( "\nResponse message:\n" + org.apache.axis.utils.XMLUtils.ElementToString(base)); } return base; } public Element stringToElement(String s) throws ParserConfigurationException, IOException, SAXException { DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance(); docBuilderFactory.setNamespaceAware(true); DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder(); Document doc = docBuilder.parse(new ByteArrayInputStream(s.getBytes("UTF8"))); return doc.getDocumentElement(); } } uddi4j-2.0.5/src/org/uddi4j/transport/ApacheSOAPTransport.java000066400000000000000000000106521173667134000241360ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.transport; import java.net.URL; import java.util.Properties; import java.util.Vector; import org.apache.soap.Body; import org.apache.soap.Envelope; import org.apache.soap.messaging.Message; import org.apache.soap.transport.http.SOAPHTTPConnection; import org.apache.soap.util.xml.DOMWriter; import org.uddi4j.client.UDDIProxy; import org.w3c.dom.Element; /** * Transport implementation for Apache SOAP stack. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class ApacheSOAPTransport extends TransportBase { private boolean debug = false; private SOAPHTTPConnection connection; /** * Default constructor */ public ApacheSOAPTransport() throws TransportException { } /** * Sends a Element to URL. * * @param el Element to send * @param url Destination URL * @return An element representing a XML DOM tree containing the UDDI response. * @exception TransportException * Thrown if a problem occurs during transmission */ public Element send(Element el, URL url) throws TransportException { debug = logEnabled(); if (connection == null) { setConnection(); } Envelope sendEnv = new Envelope(); Body sendBody = new Body(); Vector bodyEntry = new Vector(); bodyEntry.add(el); sendBody.setBodyEntries(bodyEntry); sendEnv.setBody(sendBody); Message soapMessage = new Message(); soapMessage.setSOAPTransport(connection); Element base = null; try { if (debug) { System.err.println( "\nRequest body:\n" + DOMWriter.nodeToString(el)); } soapMessage.send(url, "", sendEnv); Envelope responseEnv = soapMessage.receiveEnvelope(); Body responseBody = responseEnv.getBody(); base = (Element) responseBody.getBodyEntries().firstElement(); if (debug) { System.err.println( "\nResponse body:\n" + DOMWriter.nodeToString(base)); } } catch (Exception e) { throw new TransportException(e); } return base; } /* * Sets the cconnection. * * @exception TransportException * Thrown if a problem occurs during setup of connection */ private void setConnection() { connection = new SOAPHTTPConnection(); // Initialize variables based on config properties Properties config = getConfiguration(); connection = new SOAPHTTPConnection(); connection.setUserName(config.getProperty(UDDIProxy.HTTP_BASIC_AUTH_USERNAME_PROPERTY)); connection.setPassword(config.getProperty(UDDIProxy.HTTP_BASIC_AUTH_PASSWORD_PROPERTY)); connection.setProxyHost(config.getProperty(UDDIProxy.HTTP_PROXY_HOST_PROPERTY)); connection.setProxyUserName(config.getProperty(UDDIProxy.HTTP_BASIC_AUTH_USERNAME_PROPERTY)); connection.setProxyPassword(config.getProperty(UDDIProxy.HTTP_PROXY_PASSWORD_PROPERTY)); try { int proxyPort = Integer.parseInt(config.getProperty(UDDIProxy.HTTP_PROXY_PORT_PROPERTY)); connection.setProxyPort(proxyPort); } catch (NumberFormatException e) { //prop is null, empty or not an int. //don't do anything, just don't set the value } } } uddi4j-2.0.5/src/org/uddi4j/transport/HPSOAPTransport.java000066400000000000000000000205211173667134000232600ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.transport; import org.uddi4j.UDDIElement; import java.net.URL; import java.net.MalformedURLException; import java.util.Vector; import java.io.PrintStream; import java.io.FileOutputStream; import java.io.File; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Date; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.uddi4j.UDDIException; import com.hp.soap.client.SoapClient; import com.hp.soap.client.ClientMessage; import com.hp.soap.client.SoapBody; import com.hp.soap.client.SoapException; import com.hp.soap.xml.XMLUtil; /** * Implementation for a SOAP transport to be used by UDDI4J. * This uses HP SOAP as the underlying transport. * The following system properties are used: *

      *
    • org.uddi4j.TransportClassName = full class name of Transport * implementation class. In this case, it is * org.uddi4j.transport.HPSOAPTransport
    • *
    • http.proxyHost = Hostname of http proxy
    • *
    • https.proxyHost = Hostname of https proxy
    • *
    • http.proxyPort = Portname of http proxy
    • *
    • https.proxyPort = Portname of https proxy
    • *
    • org.uddi4j.logEnabled = (true/false) Turns logging of messages on or * off. This can be changed at the runtime, and will be reloaded.
    • *
    • hpsoap.logFileName = name of the log file. In case this property is * missing or there isnt write permission in the directory, log messages are sent * to System.out. The file is created in case the file does not exist.
    • *
    • hpsoap.logDirectory = directory containing the log file. * In case this property is missing or a wrong directory is specified, the file * is assumed to be in the current working directory. The directory is *NOT* * created if it is not present.
    • *
    * * @author Ravi Trivedi (ravi_trivedi@hp.com) */ public class HPSOAPTransport implements Transport { boolean debug = true; boolean useProxy = false; URL httpProxy = null; URL httpsProxy = null; PrintStream print = System.out; public SimpleDateFormat LOG_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); public HPSOAPTransport() { File file = null; String proxyHostString = System.getProperty("http.proxyHost"); String proxyPortString = System.getProperty("http.proxyPort"); String secureProxyHostString = System.getProperty("https.proxyHost"); String secureProxyPortString = System.getProperty("https.proxyPort"); try { if ((proxyPortString != null) && (proxyHostString != null)) { httpProxy = new URL("http", proxyHostString, Integer.parseInt(proxyPortString), ""); useProxy = true; } else if ((secureProxyPortString != null) && (secureProxyHostString != null)) { httpsProxy = new URL("https", secureProxyHostString, Integer.parseInt(secureProxyPortString), ""); useProxy = true; } } catch(MalformedURLException mue) { System.out.println("Invalid URL for proxy"); mue.printStackTrace(); useProxy = false; } try { String isDebug = System.getProperty("org.uddi4j.logEnabled"); if ((isDebug != null) && (isDebug.equalsIgnoreCase("true"))) { debug = true; } else { debug = false; } // Open the file even if logEnabled is false. This enables users // to turn on debug mid-program. String fileName = System.getProperty("hpsoap.logFileName"); String dirName = System.getProperty("hpsoap.logDirectory"); if ((fileName != null) && !(fileName.trim().equals (""))) { if ((dirName != null) && !(dirName.trim().equals (""))) { File dir = new File(dirName); if (dir.exists()) { fileName = dirName + File.separator + fileName; } } print = new PrintStream(new FileOutputStream(fileName, true), true); System.out.println ("Log file set to " + fileName + "\n"); } else { // fileName is null or empty System.out.println ("Logging set to command window\n"); } } catch (Exception e) { e.printStackTrace(); print = System.out; } } /** * Sends a UDDIElement to either the inquiry or publish URL. * * @param el Element to send. * @param inquiry Destination URL * @return An element representing a XML DOM tree containing the UDDI * response. * @exception SOAPException */ public Element send(UDDIElement el, URL url) throws TransportException { Element base = null; try { DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); base = docBuilder.newDocument().createElement("SOAP:Body"); } catch (Exception e) { e.printStackTrace(); print.println("FATAL error : bailing out"); System.exit(-1); } el.saveToXML(base); return send((Element)base, url); } /** * Sends an XML DOM tree, identified by the given element, to either the * inquiry or publish URL. * * @param el Element to send. * @param inquiry Destination URL * @return An element representing a XML DOM tree containing the UDDI * response. * @exception SOAPException */ public Element send(Element el, URL url) throws TransportException { Element base = null; Node node = null; SoapClient client = null; ClientMessage response = null; String trace = System.getProperty("org.uddi4j.logEnabled"); try { if (useProxy) { if (url.getProtocol().equalsIgnoreCase("HTTP")) { client = new SoapClient(url, httpProxy); } else { client = new SoapClient(url, httpsProxy); } } else { client = new SoapClient(url); } if ((trace != null) && (trace.equalsIgnoreCase("true"))) { print.println("[" + LOG_DATE_FORMAT.format(new Date()) + "]\n"); client.setLogStream(print); } else { client.setLogStream(null); } ClientMessage request = new ClientMessage(); // Fix to remove the SOAP:encodingStyle namespace from the envelope. // UDDI API Spec Version 2 Appendix B, section 6.3, specifies // that UDDI does not support SOAP Encoding. request.getEnvelope().removeAttribute("SOAP:encodingStyle"); SoapBody body = new SoapBody(el); request.setBody(body); response = client.sendRequest(request); if (response != null) { if (response.getBody() != null) { node = ((Node)(response.getBody().getElement()).getFirstChild()); } else { print.println("INFO:The SOAP Body of the response obtained from Server is null"); } base = (Element)node; } else { print.println("INFO:The SOAP Response from Server is null"); } } catch (SoapException e) { String faultString = e.getMessage(); Element ele = null; try { ele = XMLUtil.stringToElement(faultString); } catch (Exception exe) { throw new TransportException(exe); } return ele; } catch (IOException ioe) { throw new TransportException(ioe); } return base; } } uddi4j-2.0.5/src/org/uddi4j/transport/Transport.java000066400000000000000000000027111173667134000223460ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.transport; import java.net.URL; import org.uddi4j.UDDIElement; import org.w3c.dom.Element; /** * Interface for a SOAP transport to be used by UDDI4J. * * org.uddi4j.logEnabled If set, indicates that transport * should log message sent and received. * * These values may also be specified in a property * file TBD. * * @author David Melgar (dmelgar@us.ibm.com) */ public interface Transport { /** * Sends a UDDIElement to URL. * * @param el UDDIElement to send * @param url Destination URL * @return An element representing a XML DOM tree containing the UDDI response. * @exception TransportException * Thrown if a problem occurs during transmission */ public Element send(UDDIElement el, URL url) throws TransportException; /** * Sends a DOM Element to URL. * * @param el UDDIElement to send * @param url Destination URL * @return An element representing a XML DOM tree containing the UDDI response. * @exception TransportException * Thrown if a problem occurs during transmission */ public Element send(Element el, URL url) throws TransportException; } uddi4j-2.0.5/src/org/uddi4j/transport/TransportBase.java000066400000000000000000000043651173667134000231500ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.transport; import java.net.URL; import java.util.Properties; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.uddi4j.UDDIElement; import org.uddi4j.client.UDDIProxy; import org.w3c.dom.Element; /** * Partial implementation of Transport interface. * This class provides a default implementation of the * send UDDIElement method. This converts the UDDIElement * to a DOM element and invokes the send DOM Element * method. * In the future, if the data representation is not * DOM based, transports will need to implement their * own send UDDIElement methods. * * @author David Melgar (dmelgar@us.ibm.com) */ abstract public class TransportBase implements Transport { private Properties config; /** * Sends a UDDIElement to URL. * * @param el UDDIElement to send * @param url Destination URL * @return An element representing a XML DOM tree containing the UDDI response. * @exception TransportException * Thrown if a problem occurs during transmission */ public Element send(UDDIElement el, URL url) throws TransportException { Element base = null; try { DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); base = docBuilder.newDocument().createElement("tmp"); } catch (Exception e) { e.printStackTrace(); } el.saveToXML(base); return send((Element) base.getFirstChild(), url); } public boolean logEnabled() { return Boolean.valueOf(config.getProperty(UDDIProxy.LOGGING_PROPERTY)).booleanValue(); } //package access so only set by the TransportFactory //This is so the configs are always in synch - //don't want a user modifying them independently. void setConfiguration(Properties config) { this.config = config; } //only subclasses need to be able to read the config. protected Properties getConfiguration() { return config; } }uddi4j-2.0.5/src/org/uddi4j/transport/TransportException.java000066400000000000000000000042001173667134000242200ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.transport; /** * Represents a communications error originating * within the SOAP transport. The native exception * thrown by the SOAP transport is encapsulated * within this exception. * * @author David Melgar (dmelgar@us.ibm.com) */ public class TransportException extends Exception { Exception nativeException = null; /** * Constructs an TransportException with no specified detail message. */ public TransportException() { super(); } /** * Constructs a TransportException with the specified detail message. * * @param s the detail message. */ public TransportException(String s) { super(s); } /** * Constructs a TransportException wrappering the native transport * exception. * * @param e Native exception to be wrappered */ public TransportException(Exception e) { super(e.getMessage()); nativeException = e; } /** * Returns the native transport exception wrappered * by this class. * * @return Exception */ public Exception getException() { return nativeException; } /** * Prints this Throwable and its backtrace to the * specified print stream as well as the wrappered exception. */ public void printStackTrace() { printStackTrace(System.err); } /** * Prints this Throwable and its backtrace to the * specified print stream as well as the wrappered exception. * * @param s PrintStream to use for output */ public void printStackTrace(java.io.PrintStream s) { super.printStackTrace(s); if (nativeException != null) { s.println("\nNested exception:"); nativeException.printStackTrace(s); } } } uddi4j-2.0.5/src/org/uddi4j/transport/TransportFactory.java000066400000000000000000000055221173667134000237010ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.transport; import java.util.Properties; /** * Factory to dynamically create a Transport implementation. * * @author David Melgar (dmelgar@us.ibm.com) */ public class TransportFactory { public static final String PROPERTY_NAME = "org.uddi4j.TransportClassName"; public static final String DEFAULT_TRANSPORT_NAME= "org.uddi4j.transport.ApacheSOAPTransport"; private Transport transport = null; static private String transportClassName = null; Properties config = null; /** * Private constructor used by newInstance method. * * @param p */ private TransportFactory(Properties p) { config = p; } /** * Returns Transport implementation to be used. * Transport is cached. * Transport is dynamically loaded based on property * org.uddi4j.transport.TransportClassName set as * either a system property or in passed properties object. * If this property is not set, the default transport * is loaded. * * @return Transport * @exception TransportException * Thrown if transport class cannot be loaded. */ public Transport getTransport() throws TransportException { if (transport == null) { transportClassName = config.getProperty(PROPERTY_NAME, DEFAULT_TRANSPORT_NAME); // Load and return the class try { transport = (Transport)Class.forName(transportClassName).newInstance(); if (transport instanceof TransportBase) { //pass the config thru //We can only do this on a TransportBase class because the Transport interface does not contain //a setConfiguration method. ((TransportBase)transport).setConfiguration(config); } } catch (Exception e) { throw new TransportException(e); } } return transport; } /** * Create a TransportFactory. * * @return TransportFactory */ static public TransportFactory newInstance() { return new TransportFactory(System.getProperties()); } /** * Create a TransportFactory passing in configuration information * in a properties object. * * @param p Properties * @return TransportFactory * @see org.uddi4j.client.UDDIProxy#UDDIProxy(Properties) UDDIProxy(Properties) constructor for information on configuration object. */ static public TransportFactory newInstance(Properties p) { return new TransportFactory(p); } } uddi4j-2.0.5/src/org/uddi4j/util/000077500000000000000000000000001173667134000164275ustar00rootroot00000000000000uddi4j-2.0.5/src/org/uddi4j/util/AuthInfo.java000066400000000000000000000061141173667134000210110ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.util; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the authInfo element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *
      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This structure is used in all messages that update data on * behalf of a user initiated request. * * @author David Melgar (dmelgar@us.ibm.com) */ public class AuthInfo extends UDDIElement { public static final String UDDI_TAG = "authInfo"; protected Element base = null; String text = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public AuthInfo() { } /** * Construct the object with required fields. * * @param value String value */ public AuthInfo(String value) { setText(value); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public AuthInfo(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); text = getText(base); } public void setText(String s) { text = s; } public String getText() { return text; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. if (text!=null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/util/BindingKey.java000066400000000000000000000057101173667134000213200ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.util; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the bindingKey element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * * @author David Melgar (dmelgar@us.ibm.com) */ public class BindingKey extends UDDIElement { public static final String UDDI_TAG = "bindingKey"; protected Element base = null; String text = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public BindingKey() { } /** * Construct the object with required fields. * * @param value String value */ public BindingKey(String value) { setText(value); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public BindingKey(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); text = getText(base); } public void setText(String s) { text = s; } public String getText() { return text; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. if (text!=null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/util/BusinessKey.java000066400000000000000000000057151173667134000215460ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.util; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the businessKey element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *
      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * * @author David Melgar (dmelgar@us.ibm.com) */ public class BusinessKey extends UDDIElement { public static final String UDDI_TAG = "businessKey"; protected Element base = null; String text = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public BusinessKey() { } /** * Construct the object with required fields. * * @param value String value */ public BusinessKey(String value) { setText(value); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public BusinessKey(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); text = getText(base); } public void setText(String s) { text = s; } public String getText() { return text; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (text!=null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/util/CategoryBag.java000066400000000000000000000105011173667134000214560ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.util; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the categoryBag element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *
      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    Service element. Used in searching and categorization. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class CategoryBag extends UDDIElement { public static final String UDDI_TAG = "categoryBag"; protected Element base = null; // Vector of KeyedReference objects Vector keyedReference = new Vector(); /** * Default constructor. * */ public CategoryBag() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public CategoryBag(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, KeyedReference.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { keyedReference.addElement(new KeyedReference((Element)nl.item(i))); } } /** * Set keyedReference vector * * @param s Vector of KeyedReference objects. */ public void setKeyedReferenceVector(Vector s) { keyedReference = s; } /** * Get keyedReference * * @return s Vector of KeyedReference objects. */ public Vector getKeyedReferenceVector() { return keyedReference; } /** * Add a keyed reference to this collection * * @param kr KeyedReference */ public void add(KeyedReference kr) { keyedReference.add(kr); } /** * Remove the specified object from the collection. * * @param kr Keyed reference to remove * @return True if object was removed, false if it * was not found in the collection. */ public boolean remove(KeyedReference kr) { return keyedReference.remove(kr); } /** * Retrieve the object at the specified index within the collection. * * @param index * @return KeyedReference */ public KeyedReference get(int index) { return (KeyedReference)keyedReference.get(index); } /** * Return current size of the collection. * * @return int */ public int size() { return keyedReference.size(); } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. if (keyedReference!=null) { for (int i=0; i < keyedReference.size(); i++) { ((KeyedReference)(keyedReference.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/util/DiscoveryURL.java000066400000000000000000000101061173667134000216220ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.util; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the discoveryURL element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    Data: A url pointing to an external (typed by convention) discovery doc. * * @author David Melgar (dmelgar@us.ibm.com) */ public class DiscoveryURL extends UDDIElement { public static final String UDDI_TAG = "discoveryURL"; protected Element base = null; String text = null; String useType = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public DiscoveryURL() { } /** * Construct the object with required fields. * * @param value String value * @param useType String */ public DiscoveryURL(String value, String useType) { setText(value); this.useType = useType; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public DiscoveryURL(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); text = getText(base); useType = base.getAttribute("useType"); } public void setText(String s) { text = s; } public void setUseType(String s) { useType = s; } public String getText() { return text; } public String getUseType() { return useType; } public boolean equals(Object obj) { boolean result = false; if (obj != null && obj instanceof DiscoveryURL) { DiscoveryURL otherDiscURL = (DiscoveryURL)obj; if ((text == null && otherDiscURL.getText() == null) || (text != null && text.equals(otherDiscURL.getText()))) { if ((useType == null && otherDiscURL.getUseType() == null) || (useType != null && useType.equals(otherDiscURL.getUseType()))) { result = true; } } } return result; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. if (text!=null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } if (useType!=null) { base.setAttribute("useType", useType); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/util/DiscoveryURLs.java000066400000000000000000000117101173667134000220070ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.util; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the discoveryURLs element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    Service Element: accessor for one or more discoveryURL elements * * @author David Melgar (dmelgar@us.ibm.com) * @author Vivek Chopra (vivek@soaprpc.com) */ public class DiscoveryURLs extends UDDIElement { public static final String UDDI_TAG = "discoveryURLs"; protected Element base = null; // Vector of DiscoveryURL objects Vector discoveryURL = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public DiscoveryURLs() { } /** * Construct the object with required fields. * * @param discoveryURL Vector of DiscoveryURL objects. */ public DiscoveryURLs(Vector discoveryURL) { this.discoveryURL = discoveryURL; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public DiscoveryURLs(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, DiscoveryURL.UDDI_TAG); for (int i = 0; i < nl.getLength(); i++) { discoveryURL.addElement(new DiscoveryURL((Element)nl.item(i))); } } /** * Set discoveryURL vector. * * @param s Vector of DiscoveryURL objects. */ public void setDiscoveryURLVector(Vector s) { discoveryURL = s; } /** * Get discoveryURL. * * @return s Vector of DiscoveryURL objects. */ public Vector getDiscoveryURLVector() { return discoveryURL; } /** * Add a DiscoveryURL object to the collection * @param d Discovery URL to be added */ public void add(DiscoveryURL d) { discoveryURL.add(d); } /** * Remove a DiscoveryURL object from the collection * @param d Discovery URL to be removed * @return True if object was removed, false if it * was not found in the collection. */ public boolean remove(DiscoveryURL d) { return discoveryURL.remove(d); } /** * Retrieve the DiscoveryURL at the specified index within the collection. * @param index Index to retrieve from. * @return DiscoveryURL at that index */ public DiscoveryURL get(int index) { return (DiscoveryURL)discoveryURL.get(index); } /** * Return current size of the collection. * @return Number of Discovery URLs in the collection */ public int size() { return discoveryURL.size(); } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (discoveryURL != null) { for (int i = 0; i < discoveryURL.size(); i++) { ((DiscoveryURL) (discoveryURL.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/util/FindQualifier.java000066400000000000000000000101541173667134000220150ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.util; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the findQualifier element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This structure is provided to signal the behavior of the find * operations. See appropriate appendix in API specification. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ravi Trivedi (ravi_trivedi@hp.com) */ public class FindQualifier extends UDDIElement { public static final String UDDI_TAG = "findQualifier"; /** * Valid values for a find qualifier */ public static final String exactNameMatch = "exactNameMatch"; public static final String caseSensitiveMatch = "caseSensitiveMatch"; public static final String sortByNameAsc = "sortByNameAsc"; public static final String sortByNameDesc = "sortByNameDesc"; public static final String sortByDateAsc = "sortByDateAsc"; public static final String sortByDateDesc = "sortByDateDesc"; //V2 qualifiers public static final String orLikeKeys = "orLikeKeys"; public static final String orAllKeys = "orAllKeys"; public static final String combineCategoryBags = "combineCategoryBags"; public static final String serviceSubset = "serviceSubset"; public static final String andAllKeys = "andAllKeys"; // Removed in v2 errata 3 // public static final String soundex = "soundex"; protected Element base = null; String text = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public FindQualifier() { } /** * Construct the object with required fields. * * @param value String value */ public FindQualifier(String value) { setText(value); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public FindQualifier(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); text = getText(base); } public void setText(String s) { text = s; } public String getText() { return text; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (text!=null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/util/FindQualifiers.java000066400000000000000000000110331173667134000221750ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.util; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the findQualifiers element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    The container/accessor for findQualifiers * * @author David Melgar (dmelgar@us.ibm.com) * @author Vivek Chopra (vivek@soaprpc.com) */ public class FindQualifiers extends UDDIElement { public static final String UDDI_TAG = "findQualifiers"; protected Element base = null; // Vector of FindQualifier objects Vector findQualifier = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public FindQualifiers() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public FindQualifiers(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, FindQualifier.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { findQualifier.addElement(new FindQualifier((Element)nl.item(i))); } } /** * Set findQualifier vector. * * @param s Vector of FindQualifier objects. */ public void setFindQualifierVector(Vector s) { findQualifier = s; } /** * Add a FindQualifier object to the collection * @param f Find qualifier to be added */ public void add (FindQualifier f) { findQualifier.add (f); } /** * Remove a FindQualifier object from the collection * @param f Find qualifier to be removed * @return True if object was removed, false if it * was not found in the collection. */ public boolean remove (FindQualifier f) { return findQualifier.remove (f); } /** * Retrieve the findQualfier at the specified index within the collection. * @param index Index to retrieve from. * @return FindQualifier at that index */ public FindQualifier get (int index) { return (FindQualifier) findQualifier.get (index); } /** * Return current size of the collection. * @return Number of find qualifiers in the collection */ public int size () { return findQualifier.size (); } /** * Get findQualifier * * @return s Vector of FindQualifier objects. */ public Vector getFindQualifierVector() { return findQualifier; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (findQualifier!=null) { for (int i=0; i < findQualifier.size(); i++) { ((FindQualifier)(findQualifier.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/util/FromKey.java000066400000000000000000000055141173667134000206530ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.util; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the fromKey element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * * @author Mahesh C S (csmahesh@india.hp.com) */ public class FromKey extends UDDIElement { public static final String UDDI_TAG = "fromKey"; protected Element base = null; String text = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public FromKey() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public FromKey(Element base) throws UDDIException { super(base); text = getText(base); } /** * Construct the object with required fields. * * @param key String */ public FromKey(String key) { setText(key); } public void setText(String s) { text = s; } public String getText() { return text; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); if (text!=null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/util/IdentifierBag.java000066400000000000000000000105141173667134000217670ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.util; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the identifierBag element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *
      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    Service element. Used when searching and categorizing. * * @author David Melgar (dmelgar@us.ibm.com) * @author Ozzy (ozzy@hursley.ibm.com) */ public class IdentifierBag extends UDDIElement { public static final String UDDI_TAG = "identifierBag"; protected Element base = null; // Vector of KeyedReference objects Vector keyedReference = new Vector(); /** * Default constructor. * */ public IdentifierBag() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public IdentifierBag(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, KeyedReference.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { keyedReference.addElement(new KeyedReference((Element)nl.item(i))); } } /** * Set keyedReference vector * * @param s Vector of KeyedReference objects. */ public void setKeyedReferenceVector(Vector s) { keyedReference = s; } /** * Get keyedReference * * @return s Vector of KeyedReference objects. */ public Vector getKeyedReferenceVector() { return keyedReference; } /** * Add a keyed reference to this collection * * @param kr KeyedReference */ public void add(KeyedReference kr) { keyedReference.add(kr); } /** * Remove the specified object from the collection. * * @param kr Keyed reference to remove * @return True if object was removed, false if it * was not found in the collection. */ public boolean remove(KeyedReference kr) { return keyedReference.remove(kr); } /** * Retrieve the object at the specified index within the collection. * * @param index * @return KeyedReference */ public KeyedReference get(int index) { return (KeyedReference)keyedReference.get(index); } /** * Return current size of the collection. * * @return int */ public int size() { return keyedReference.size(); } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (keyedReference!=null) { for (int i=0; i < keyedReference.size(); i++) { ((KeyedReference)(keyedReference.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/util/KeyValue.java000066400000000000000000000056741173667134000210330ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.util; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the keyValue element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * * @author David Melgar (dmelgar@us.ibm.com) */ public class KeyValue extends UDDIElement { public static final String UDDI_TAG = "keyValue"; protected Element base = null; String text = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public KeyValue() { } /** * Construct the object with required fields. * * @param value String value */ public KeyValue(String value) { setText(value); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public KeyValue(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); text = getText(base); } public void setText(String s) { text = s; } public String getText() { return text; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. if (text!=null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/util/KeyedReference.java000066400000000000000000000126001173667134000221510ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.util; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the keyedReference element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *
      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    Service element. Represents a namespace qualified name-value * pair. Depending upon the context in which it is used, this structure can be * utilized within different convention frameworks. * * @author David Melgar (dmelgar@us.ibm.com) */ public class KeyedReference extends UDDIElement { public static final String UDDI_TAG = "keyedReference"; protected Element base = null; String tModelKey = null; String keyName = null; String keyValue = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public KeyedReference() { } /** * Construct the object with required fields. * * @param keyName String * @param keyValue String */ public KeyedReference(String keyName, String keyValue) { this.keyName = keyName; this.keyValue = keyValue; } public KeyedReference(String keyName, String keyValue, String tModelKey) { this(keyName, keyValue); this.tModelKey = tModelKey; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public KeyedReference(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); tModelKey = base.getAttribute("tModelKey"); keyName = getAttr(base,"keyName"); keyValue = getAttr(base,"keyValue"); } private String getAttr(Element base, String attrname) { if(base.getAttributeNode(attrname)!=null && base.getAttributeNode(attrname).getSpecified() ) { return base.getAttribute(attrname); } return null; } public void setTModelKey(String s) { tModelKey = s; } public void setKeyName(String s) { keyName = s; } public void setKeyValue(String s) { keyValue = s; } public String getTModelKey() { return tModelKey; } public String getKeyName() { return keyName; } public String getKeyValue() { return keyValue; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. if (tModelKey!=null) { base.setAttribute("tModelKey", tModelKey); } if (keyName!=null) { base.setAttribute("keyName", keyName); } if (keyValue!=null) { base.setAttribute("keyValue", keyValue); } parent.appendChild(base); } public boolean equals(Object obj) { boolean result = false; if (obj != null && obj instanceof KeyedReference) { KeyedReference otherKeyedReference = (KeyedReference)obj; if ((tModelKey == null && otherKeyedReference.tModelKey == null) || (tModelKey != null && tModelKey.equalsIgnoreCase(otherKeyedReference.tModelKey))) { if ((keyName == null && otherKeyedReference.keyName == null) || (keyName != null && keyName.equals(otherKeyedReference.keyName))) { if ((keyValue == null && otherKeyedReference.keyValue == null) || (keyValue != null && keyValue.equals(otherKeyedReference.keyValue))) { result = true; } } } } return result; } } uddi4j-2.0.5/src/org/uddi4j/util/ServiceKey.java000066400000000000000000000057101173667134000213460ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.util; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the serviceKey element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * * @author David Melgar (dmelgar@us.ibm.com) */ public class ServiceKey extends UDDIElement { public static final String UDDI_TAG = "serviceKey"; protected Element base = null; String text = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public ServiceKey() { } /** * Construct the object with required fields. * * @param value String value */ public ServiceKey(String value) { setText(value); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public ServiceKey(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); text = getText(base); } public void setText(String s) { text = s; } public String getText() { return text; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. if (text!=null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/util/TModelBag.java000066400000000000000000000127241173667134000210760ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.util; import java.util.Vector; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Represents the tModelBag element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *
      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    A support element used in searches by tModel key values. * * @author David Melgar (dmelgar@us.ibm.com) * @author Vivek Chopra (vivek@soaprpc.com) */ public class TModelBag extends UDDIElement { public static final String UDDI_TAG = "tModelBag"; protected Element base = null; // Vector of TModelKey objects Vector tModelKey = new Vector(); /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public TModelBag() { } /** * Construct the object with required fields. * * @param tModelKeyStrings Vector of TModelKey Strings. */ public TModelBag(Vector tModelKeyStrings) { Vector objects; objects = new Vector(); for (int i = 0; i < tModelKeyStrings.size(); i++) { objects.addElement( new TModelKey((String)tModelKeyStrings.elementAt(i)) ); } this.tModelKey = objects; } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public TModelBag(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); NodeList nl = null; nl = getChildElementsByTagName(base, TModelKey.UDDI_TAG); for (int i=0; i < nl.getLength(); i++) { tModelKey.addElement(new TModelKey((Element)nl.item(i))); } } /** * Set tModelKey vector. * * @param s Vector of TModelKey objects. */ public void setTModelKeyVector(Vector s) { tModelKey = s; } /** * Set tModelKey. * * @param s Vector of String objects. */ public void setTModelKeyStrings(Vector s) { tModelKey = new Vector(); for (int i = 0; i < s.size(); i++) { tModelKey.addElement( new TModelKey((String)s.elementAt(i)) ); } } /** * Get tModelKey. * * @return s Vector of TModelKey objects. */ public Vector getTModelKeyVector() { return tModelKey; } /** * Get tModelKey. * * @return s Vector of String objects. */ public Vector getTModelKeyStrings() { Vector strings = new Vector(); for (int i = 0; i < tModelKey.size(); i++) { strings.addElement( ((TModelKey)tModelKey.elementAt(i)).getText()); } return strings; } /** * Add a TModelKey object to the collection * @param t TModelKey to be added */ public void add (TModelKey t) { tModelKey.add (t); } /** * Remove a TModelKey object from the collection * @param t TModelKey to be removed * @return True if object was removed, false if it * was not found in the collection. */ public boolean remove (TModelKey t) { return tModelKey.remove (t); } /** * Retrieve the TModelKey at the specified index within the collection. * @param index Index to retrieve from. * @return TModelKey at that index */ public TModelKey get (int index) { return (TModelKey) tModelKey.get (index); } /** * Return current size of the collection. * @return Number of TModelKeys in the collection */ public int size () { return tModelKey.size (); } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. if (tModelKey!=null) { for (int i=0; i < tModelKey.size(); i++) { ((TModelKey)(tModelKey.elementAt(i))).saveToXML(base); } } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/util/TModelKey.java000066400000000000000000000057031173667134000211340ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.util; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the tModelKey element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *

      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * * @author David Melgar (dmelgar@us.ibm.com) */ public class TModelKey extends UDDIElement { public static final String UDDI_TAG = "tModelKey"; protected Element base = null; String text = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public TModelKey() { } /** * Construct the object with required fields. * * @param value String value */ public TModelKey(String value) { setText(value); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public TModelKey(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); text = getText(base); } public void setText(String s) { text = s; } public String getText() { return text; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. if (text!=null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/util/ToKey.java000066400000000000000000000055321173667134000203320ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, Hewlett-Packard Company * All Rights Reserved. * */ package org.uddi4j.util; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the toKey element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *
      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * * @author Mahesh C S (csmahesh@india.hp.com) */ public class ToKey extends UDDIElement { public static final String UDDI_TAG = "toKey"; protected Element base = null; String text = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public ToKey() { } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public ToKey(Element base) throws UDDIException { super(base); text = getText(base); } /** * Construct the object with required fields. * * @param key String */ public ToKey(String key) { setText(key); } public void setText(String s) { text = s; } public String getText() { return text; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. if (text!=null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } parent.appendChild(base); } } uddi4j-2.0.5/src/org/uddi4j/util/UploadRegister.java000066400000000000000000000062371173667134000222330ustar00rootroot00000000000000/* * The source code contained herein is licensed under the IBM Public License * Version 1.0, which has been approved by the Open Source Initiative. * Copyright (C) 2001, International Business Machines Corporation * All Rights Reserved. * */ package org.uddi4j.util; import org.uddi4j.UDDIElement; import org.uddi4j.UDDIException; import org.w3c.dom.Element; /** * Represents the uploadRegister element within the UDDI version 2.0 schema. * This class contains the following types of methods: * *
      *
    • A constructor that passes the required fields. *
    • A Constructor that will instantiate the object from an appropriate XML * DOM element. *
    • Get/set methods for each attribute that this element can contain. *
    • A get/setVector method is provided for sets of attributes. *
    • A SaveToXML method that serializes this class within a passed in * element. *
    * * Typically, this class is used to construct parameters for, or interpret * responses from, methods in the UDDIProxy class. * *

    Element description: *

    This class is deprecated in Version 2. It is still present in * this package because this tag is still found in the XML Schema of Version 2 API. * * @author David Melgar (dmelgar@us.ibm.com) */ public class UploadRegister extends UDDIElement { public static final String UDDI_TAG = "uploadRegister"; protected Element base = null; String text = null; /** * Default constructor. * Avoid using the default constructor for validation. It does not validate * required fields. Instead, use the required fields constructor to perform * validation. */ public UploadRegister() { } /** * Construct the object with required fields. * * @param value String value */ public UploadRegister(String value) { setText(value); } /** * Construct the object from a DOM tree. Used by * UDDIProxy to construct an object from a received UDDI * message. * * @param base Element with the name appropriate for this class. * * @exception UDDIException Thrown if DOM tree contains a SOAP fault * or a disposition report indicating a UDDI error. */ public UploadRegister(Element base) throws UDDIException { // Check if it is a fault. Throws an exception if it is. super(base); text = getText(base); } public void setText(String s) { text = s; } public String getText() { return text; } /** * Save an object to the DOM tree. Used to serialize an object * to a DOM tree, usually to send a UDDI message. * *
    Used by UDDIProxy. * * @param parent Object will serialize as a child element under the * passed in parent element. */ public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes. if (text!=null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } parent.appendChild(base); } } uddi4j-2.0.5/style.css000066400000000000000000000017221173667134000145650ustar00rootroot00000000000000body { padding-top: 6.0em; padding-left: 1.4em; font-family: Arial, Helvetica, Geneva, SunSans-Regular, sans-serif color : black; background-color: white } img.uddi4jlogo { position: absolute; top: 2em; left: 2em; border: 0; } h1 { background-color: #ccddff; PADDING-BOTTOM: 1px; PADDING-LEFT: 4px; PADDING-RIGHT: 4px; PADDING-TOP: 1px; font-family: Arial, Helvetica, Geneva, SunSans-Regular, sans-serif } h2 { background-color: #ccddff; PADDING-BOTTOM: 1px; PADDING-LEFT: 4px; PADDING-RIGHT: 4px; PADDING-TOP: 1px; font-family: Arial, Helvetica, Geneva, SunSans-Regular, sans-serif; } h3 { background-color: #ccddff; PADDING-BOTTOM: 1px; PADDING-LEFT: 4px; PADDING-RIGHT: 4px; PADDING-TOP: 1px; font-family: Arial, Helvetica, Geneva, SunSans-Regular, sans-serif; } a:link { color: blue } a:visited { color: purple } address { margin-top: 1em; padding-top: 1em; border-top: thin dotted }uddi4j-2.0.5/uddi4j.jpeg000066400000000000000000000044061173667134000147470ustar00rootroot00000000000000JFIFHHC   ",% )!&4&)-/111%69509,01/C  ///////////////////////////////////////////////////;! }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?먦EPEPEPEPzQ@Zm*i*QWF2ŐskF㪺"<1or c/_-cjM7)&nX( TaiwE+őSPI4 ܤպ:`}Qv^UGO;e@e.RmjuWU~H|1&U`8&8cj~?A;eG!*6~ѫE.~j(|'"݇r΁?OV}?S0΍?@+Sseje1Rr=z{]5ʑJvu.!elo=?:|?O5=JZb Tubsހ+Wd+MkDžu_@AxRIpėlg8xVwcOo$>o";}lW[MVX%`{S|OiMwc#ps@OLdߒ#E1!Mh^n`J湙<ui=ZL@vVy'UO 2R(n4UVUΐB{[GH\8_No {J;BW;:4TKTEPzu#xbP)N2zg}W2;o`_Ӽ-[R胐eU@9kNF,iյY-vVix^A/kk5gr8x[=iڶ\nVcZՏQH~lv3/'qm{-΃[ىNZ#(Au8 45u}j ˈ(<рGLyǧP((((J( ( ( ( (Ҋ