pax_global_header00006660000000000000000000000064116657443500014525gustar00rootroot0000000000000052 comment=d7f5591016b4855435255ff36b82f25c68d2e6c9 wsil4j-1.0.0/000077500000000000000000000000001166574435000127375ustar00rootroot00000000000000wsil4j-1.0.0/LICENSE000066400000000000000000000050231166574435000137440ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ wsil4j-1.0.0/README.htm000066400000000000000000000264351166574435000144200ustar00rootroot00000000000000 Web Services Inspection Language for Java API - Overview

WSIL4J:
Web Services Inspection Language for Java API

The Web Services Inspection Language (WS-Inspection) provides a distributed Web service discovery method, by specifying how to inspect a web site for available Web services. The WS-Inspection specification defines the locations on a Web site where you could look for Web service descriptions.

WSIL4J Structure

WSIL4J is a Java class library that provides an API that is can be used to locate and process WS-Inspection documents. This class library can be used to read and parse a WS-Inspection document, as well as generate a new WS-Inspection document. The primary class for interacting with a WS-Inspection document is org.apache.wsil.WSILDocument. The org.apache.wsil.client.WSILProxy class is used for accessing specific service descriptions within a WS-Inspection document. For example, you can use this class to access service descriptions by service name. A WSILException is thrown when errors occur. This class will contain an exception message, and may also contain a reference to an exception that caused the error.

Prerequisites

Configuration

WSIL4J uses a set of system parameters to configure certain functions. The wsil.properties file is located in the org.apache.wsil.util package.

Property name Values Description
wsil.transport.class org.uddi4j.transport.ApacheAxisTransport The UDDI4J transport that should be used when accessing a UDDI registry.
wsil.hostname localhost The default hostname used when locating WS-Inspection documents.
wsil.port 80 The default port number used when locating WS-Inspection documents.
wsil.document.name inspection.wsil The default WS-Inspection document name.

Accessing Builds and Source Code

The source code for this package is available on the Apache web site. Individual files can be accessed using the web-based CVS interface. The entire package can be downloaded using the following instructions.

Accessing the Nightly Builds

This package is built nightly along with Axis. The build will create two zip files: wsil4j-bin.zip and wsil4j-src.zip. The first file contains a complete build image, which includes wsil4j.jar, Javadoc, and all source code. The second file contains just a copy of the source code, which could be built using Ant. Both of these files can be accessed at the same location as the Axis nightly builds.

Accessing the Source Tree (AnonCVS)

So, you've decided that you need access to the source tree to see the latest and greatest code. There's two different forms of CVS access. The first is anonymous and anybody can use it. The second is not and you must have a login to the development server. If you don't know what this means, join the mailing list and find out.

Anyone can checkout source code from our anonymous CVS server. To do so, simply use the following commands (if you are using a GUI CVS client, configure it appropriatly):

cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login
password: anoncvs

cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic checkout xml-axis-wsil

Full Remote CVS Access

If you are a Committer and have a login on the Apache development server, this section is for you. If you are not a Committer, but you want to submit patches or even request commit privelages, please see the Jakarta GuideLines page (we follow the same rules) for more information.

To have full access to the CVS server, you need to follow the links depending on the operating system you are using:

Building WSIL4J

Using WSIL4J

To run a program referencing WSIL4J,

Samples

There are two sample applications that use WSIL4J. Both of these samples are located in the samples directory. This directory also contains a sample WS-Inspection document.

Work To Be Done

The current WSIL4J implementation contains most of the basic support for the Web Services Inspection Language. Here is a list of future enhancements and usages for this package:

Reference


wsil4j-1.0.0/TODO.txt000066400000000000000000000001431166574435000142430ustar00rootroot00000000000000 WSIL Todo's =========================================== (need to fill out todo's for this project)wsil4j-1.0.0/build.xml000066400000000000000000000156771166574435000146000ustar00rootroot00000000000000 wsil4j-1.0.0/docs/000077500000000000000000000000001166574435000136675ustar00rootroot00000000000000wsil4j-1.0.0/docs/WSInspectionOverview.htm000066400000000000000000000673301166574435000205260ustar00rootroot00000000000000 Web Services Inspection Language (WS-Inspection) Overview

Web Services Inspection Language
(WS-Inspection)


Distributed Web Service Discovery Using WS-Inspection Documents

Service discovery defines a process for locating service providers and retrieving service description documents, and is a key component of the overall Web services model. Service discovery is a very broad concept, which means that it is unlikely to have one solution that addresses all of its requirements. The Universal Description, Discovery and Integration (UDDI) specification addresses a subset of the overall requirements by using a centralized service discovery model. This article will provide an overview of the Web Services Inspection Language (WS-Inspection), which is another related service discovery mechanism, but addresses a different subset of requirements using a distributed usage model. The WS-Inspection is designed around an XML-based model for building an aggregation of references to existing Web service descriptions, which are exposed using standard Web server technology.

The Web Services architecture is based upon the interactions between three primary roles: service provider, service registry, and service requestor. These roles interact using publish, find and bind operations. The service provider is the business that provides access to the Web service and publishes the service description in a service registry. The service requestor finds the service description in a service registry and uses the information in the description to bind to a service. A logical view of the Web Services architecture is shown in Figure 1. In this view of the Web Services architecture, the service registry provides a centralized location for storing service descriptions. A UDDI registry is an example of this type of service registry.

Figure 1: Web Services Architecture

Although it is important, the centralized service registry is not the only model for Web service discovery. The simplest form of service discovery is to request a copy of the service description from the service provider. After receiving the request, the service provider can simply email the service description as an attachment or provide it to the service requestor on a transferable media, such as a diskette. Although this type of service discovery is simple, it is not a very efficient since it requires prior knowledge of the Web service, as well as the contact information for the service provider.

Between these two extremes, there is a need for a distributed service discovery method that provides references to service descriptions at the service provider's point-of-offering. The Web Services Inspection Language provides this type of distributed discovery method, by specifying how to inspect a web site for available Web services. The WS-Inspection specification defines the locations on a Web site where you could look for Web service descriptions.

Since the Web Services Inspection Language focuses on distributed service discovery, the WS-Inspection specification complements UDDI by facilitating the discovery of services available on Web sites, but which may not yet be listed in a UDDI registry. Additional information on the relationship between the Web Services Inspection Language and UDDI can be found in The WS-Inspection and UDDI Relationship (see Resources).

WS-Inspection Overview

The WS-Inspection specification (see Resources) does not define a service description language. WS-Inspection documents provide a method for aggregating different types of service descriptions. Within a WS-Inspection document, a single service can have more than one reference to a service description. For example, a single Web service might be described with both a WSDL file and within UDDI. References to these two service descriptions should be put into a WS-Inspection document. If multiple references are available, it is beneficial to put all of them in the WS-Inspection document so that the document consumer can select the type of service description that they are capable of understanding and want to use. Figure 2 provides an overview of how WS-Inspection documents are used.

Figure 2: WS-Inspection Overview

The WS-Inspection specification contains two primary functions, which are discussed in more detail in the next two sections.

WS-Inspection Document Format

A WS-Inspection document provides an aggregation of references to service descriptions. These service descriptions can be defined in any service description format, such as WSDL, UDDI, or plain HTML. As mentioned previously, a WS-Inspection document is generally made available at the point-of-offering for the services that are referenced within the document.

A WS-Inspection document can contain a list of references to service descriptions, as well as references to other WS-Inspection documents. A WS-Inspection document will contain one or more <service> and <link> elements. A <service> element will contain one or more references to different types of service descriptions for the same Web service. The <link> element may contain references to only one type of service description, but these service descriptions do not have to reference the same Web service.

Listing 1 contains a simple example of a WS-Inspection document. This example contains two references to different service descriptions, and a single reference to another WS-Inspection document. The first <service> element contains only one service description, and it is a reference to a WSDL document. The second <service> element also contains only one service description reference. This reference is to a business service entry in a UDDI registry. The UDDI service key identifies one unique business service. The UDDI service reference also contains extensibility elements which are discussed in the next section. The <link> element is used to reference a collection of service descriptions. In this case, it is referencing another WS-Inspection document.

Listing 1: Example WS-Inspection Document
<?xml version="1.0"?>
<inspection xmlns="http://schemas.xmlsoap.org/ws/2001/10/inspection/">
  <service>
    <description referencedNamespace="http://schemas.xmlsoap.org/wsdl/"
                 location="http://example.com/exampleservice.wsdl" />
  </service>
  <service>
    <description referencedNamespace="urn:uddi-org:api">
       <wsiluddi:serviceDescription location="http://example.com/uddi/inquiryapi">
         <wsiluddi:serviceKey>52946BB0-BC28-11D5-A432-0004AC49CC1E</wsiluddi:serviceKey>
       </wsiluddi:serviceDescription>
    </description>
  </service>
  <link referencedNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/"
        location="http://example.com/tools/toolservices.wsil"/>
</inspection>

WS-Inspection document extensibility

The WS-Inspection specification does not limit the type of service descriptions that can be referenced. Both the <description> and <link> element may contain extensibility elements that represent information for a specific service description technology. The WS-Inspection specification defines a set of standard extensibility elements for both WSDL and UDDI. Since the <description> element is used to reference a single service description and the <link> element is used to reference one or more sets of service descriptions, any extensibility elements that are defined for these elements should follow this same pattern.

WSDL service descriptions can only be referenced from within a <description> element. The WSDL extensibility elements can be used to indicate whether or not the WSDL document contains an endpoint specification. If there is more than one service element in the WSDL document, then the <wsilwsdl:referencedService> element should be used to indicate which one is associated with the entry in the WS-Inspection document. One or more <wsilwsdl:implementedBinding> elements may appear in WSDL service description reference. Each of these elements references a binding that is implemented by the WSDL document. Listing 2 contains an example of a WS-Inspection document that contains all of the WSDL extensibility elements.

Listing 2: WS-Inspection Document with WSDL Extensibility Elements
<?xml version="1.0"?>
<inspection xmlns="http://schemas.xmlsoap.org/ws/2001/10/inspection/">
  ...
  <service>
    <name xml:lang="en-US">StockQuoteService</name>
    <description referencedNamespace="http://schemas.xmlsoap.org/wsdl/" 
      <wsilwsdl:reference endpointPresent="true">
                 location="http://localhost:8080/webservices/wsdl/stockquote/sqs.wsdl">
        <wsilwsdl:referencedService 
            xmlns:tns="http://www.getquote.com/StockQuoteService">
          tns:StockQuoteService
        </wsilwsdl:referencedService>
        <wsilwsdl:implementedBinding 
            xmlns:interface="http://www.getquote.com/StockQuoteService-interface">
          interface:StockQuoteServiceBinding
        </wsilwsdl:implementedBinding>
      </wsilwsdl:reference>
    </description>
  </service>
  ...
</inspection>

The UDDI extensibility elements may appear within either the <link> or <description> elements. The elements used within the <link> element can only reference a UDDI business entity. Since this element references a UDDI business entity, resolving this reference will result in one or more service descriptions. The elements used within the <description> element may only reference a single UDDI business service. Listing 3 contains an example of the UDDI bindings for a WS-Inspection document.

The <wsiluddi:businessDescription> element is used within a <link> element to specify a reference to a UDDI business entity. The businessService element may contain either a discoveryURL, or a businessKey, or both. If a businessKey is specified, then the location attribute on the businessDescription element must contain an inquiry URL for a UDDI registry. This URL is used to send a get_businessDetail messsage to the UDDI registry using the businessKey that was specified.

The <wsiluddi:serviceDescription> element can only be used within the <description> element, and can reference only one service description. Within the serviceDescription element, a discoveryURL, a serviceKey, or both can be specified. The location attribute on the serviceDescription must contain the inquiry URL for a UDDI registry, when the serviceKey is specified.

For both the businessDescription and serviceDescription elements, if both the discoveryURL and the businessKey or serviceKey are specified, then the person who is processing the WS-Inspection document can select which one they want to use. The discoveryURL will always return a UDDI business entity. So when it is used with the serviceDescription element, the serviceKey must be used to locate the individual service description within the business entity.

Listing 3: WS-Inspection Document with UDDI Extensibility Elements
<?xml version="1.0"?>
<inspection targetNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/"
    xmlns:wsiluddi="http://schemas.xmlsoap.org/ws/2001/10/inspection/uddi/"
    xmlns="http://schemas.xmlsoap.org/ws/2001/10/inspection/">
  <link referencedNamespace="urn:uddi-org:api">
    <wsiluddi:businessDescription location="http://www.getquote.com/uddi/inquiryapi">
      <wsiluddi:businessKey>3BF0ACC0-BC28-11D5-A432-0004AC49CC1E</wsiluddi:businessKey>
      <wsiluddi:discoveryURL useType="businessEntity">
        http://www.getquote.com/uddi?businessKey=3BF0ACC0-BC28-11D5-A432-0004AC49CC1E
      </wsiluddi:discoveryURL>
    </wsiluddi:businessDescription>
  </link>
  <service>
    <name>UDDI Service Description</name>
    <description referencedNamespace="urn:uddi-org:api">
      <wsiluddi:serviceDescription location="http://www.getquote.com/uddi/inquiryapi">
        <wsiluddi:serviceKey>52946BB0-BC28-11D5-A432-0004AC49CC1E</wsiluddi:serviceKey>
        <wsiluddi:discoveryURL useType="businessEntity">
          http://www.getquotecom/uddi?businessKey=3BF0ACC0-BC28-11D5-A432-0004AC49CC1E
        </wsiluddi:discoveryURL>
      </wsiluddi:serviceDescription>
    </description>
  </service>
</inspection>

Linking to WS-Inspection documents

One important feature of the WS-Inspection specification, is the ability to link a WS-Inspection document to one or more different WS-Inspection documents. This feature can be used to manage service description references by grouping them into different documents. Using the <link> element, a hierarchy of WS-Inspection documents can be built using these individual documents. For example, separate WS-Inspection documents can be created for different categories of services, and one primary WS-Inspection document can link all of them together.

Finding WS-Inspection documents

The second primary function provided by the WS-Inspection specification is to define the locations where you can access WS-Inspection documents.There are two conventions which were created to make the location and retrieval of WS-Inspection documents easy:

The fixed name for WS-Inspection documents is inspection.wsil. A document with this name can be placed at common entry points for a Web site. For example, if the common entry point is http://example.com or http://example.com/services, then the location of the WS-Inspection document would be http://example.com/inspection.wsil or http://example.com/services/inspection.wsil, respectively.

References to WS-Inspection documents may also appear within different content documents, such as HTML pages. When putting entries in an HTML page, a META tag may be used to convey the location of a WS-Inspection document. Listing 4 contains an example of an HTML page that contains the same WS-Inspection document references listed above. The HTML page that is used should be widely used. This could be the root document for a web server, or it could be a Web page, in a human readable format, that describes one or more Web services that appear in the WS-Inspection document.

Listing 4: WS-Inspection Document References in an HTML Page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <META name="serviceInspection" content="http://example.com/inspection.wsil"
    <META name="serviceInspection" content="http://example.com/services/inspection.wsil"
  <head>
...
<html>

Web Services Toolkit Support for WS-Inspection Documents

The Web Services Toolkit (see Resources) includes integrated support for the Web Services Inspection Language. This support includes a demonstration of how to use WS-Inspection documents, and a Java API that allows you to parse existing WS-Inspection documents and programmatically create new documents.

Most of the toolkit demos provide an option to use WS-Inspection technology or UDDI as the service discovery mechanism. If the WS-Inspection option is used, the demos request a WS-Inspection document from the Web server configured using the toolkit configuration utility. This request is submitted using the fixed name for the WS-Inspection document. This document name is set up to invoke a Java servlet. This servlet will dynamically create the WS-Inspection document, by searching for WSDL service description documents with the toolkit directory structure.

Figure 3 contains an overview of this process:

  1. The WS-Inspection document proxy is used to request the contents of the WS-Inspection document using a fixed name.
  2. The URL that is used to retrieve the WS-Inspection document maps to a servlet. This servlet will search through the local filesystem for all WSDL service descriptions. A reference to each service description will be put into the WS-Inspection document.
  3. The dynamically generated WS-Inspection document is returned to the client.

Figure 3: WS-Inspection Document Support in the Web Services Toolkit

Listing 5 contains a portion of the WS-Inspection document that is returned by the WS-Inspection servlet. The service name is set from the name attribute on the definition element within the WSDL document. The entry that appears in this listing is for the stock quote demo.

Listing 5: WS-Inspection Document Generated by the Web Services Toolkit
<?xml version="1.0"?>
<inspection xmlns="http://schemas.xmlsoap.org/ws/2001/10/inspection/">
  ...
  <service>
    <name xml:lang="en-US">StockQuoteService</name>
    <description referencedNamespace="http://schemas.xmlsoap.org/wsdl/" 
                 location="http://localhost:8080/webservices/wsdl/stockquote/sqs.wsdl">
      <wsilwsdl:reference endpointPresent="true">
        <wsilwsdl:implementedBinding 
            xmlns:interface="http://www.getquote.com/StockQuoteService-interface">
          interface:StockQuoteServiceBinding
        </wsilwsdl:implementedBinding>
      </wsilwsdl:reference>
    </description>
  </service>
  ...
</inspection>

Running the WSTK Demos

Starting with the Web Services Toolkit V2.4.1, the toolkit demos can be run using either the Web Services Inspection Language or UDDI as the service discovery mechanism. You can select the service discovery method by using the new -mode option. This option accepts two parameters: uddi or wsil (which is the default). The following command is an example of how you would run the Web Service Example demo using the WS-Inspection as the service discovery process:

webservicedemo -mode wsil -role all -demo both

Using the Web Services Inspection Language for Java API

The Web Services Inspection Language for Java API (WSIL4J) provides a Java interface, which can be used to parse existing WS-Inspection documents or programmatically create new WS-Inspection documents. Most of the WSIL4J classes represent the elements that can appear in a WS-Inspection document. For example, the <inspection> element is represented by the Inspection class, and the <service> element is represented by the Service class. There are also utility classes that make it easy to read and parse a WS-Inspection document, as well as write out the contents of the WSIL4J objects as an XML document.

Listing 6 contains an example of how to use this API. In this sample code, a WS-Inspection document is read and the service elements are searched for references to WSDL service descriptions. When a WSDL service description is found, its location is saved in a list which is displayed on the console. You can view and download the complete WSInspectionExample application. If you have installed the toolkit, you can use the wstkenv command to set up the classpath that is needed to compile and run these examples. This command is located in the WSTK bin directory. The purpose of this command is to define a set of environment variables. One of the environment variables is named WSTK_CP. This environment variable contains the classpath that is required to compile and run the examples.

Listing 6: Example WS-Inspection Application
...
// Create a new instance of a WS-Inspection document
WSILDocument document = WSILDocument.newInstance();

// Read and parse the WS-Inspection document
document.read(wsinspectionURL);

// Get the inspection element from the document
Inspection inspection = document.getInspection();

// Obtain a list of all service elements
Service[] services = inspection.getServices();

// Display purpose of list
System.out.println("Display list of WSDL service description references...");
                  
// Process each service element to find all WSDL document references
for (int serviceCount = 0; serviceCount < services.length; serviceCount++)
{
  // Get the next set of description elements
  descriptions = services[serviceCount].getDescriptions();

  // Process each description to find the WSDL references
  for (int descCount = 0; descCount < descriptions.length; descCount++)
  {
    // If the referenced namespace is for WSDL, then save the location reference
    if (descriptions[descCount].getReferencedNamespace().equals(WSDLConstants.NS_URI_WSDL))
    {
      // Add WSDL location to the list
      wsdlList.add(descriptions[descCount].getLocation());
    }
  }

  // If this service has WSDL service descriptions, then display the list
  if (wsdlList.size() > 0)
  {
    // Get service name
    serviceName = (services[serviceCount].getServiceNames().length == 0) ? 
    "[no service name]" : services[serviceCount].getServiceNames()[0].getText();
                                                
    // Display service name
    System.out.println("  Service: " + serviceName);

    // Display list
    Iterator iterator = wsdlList.iterator();
    for (int count = 1; iterator.hasNext(); count++)
    {
      System.out.println("    [" + count + "] " + ((String) iterator.next()));
    }
  }

  // Clear the list
  wsdlList.clear();
}
...

Using the WS-Inspection proxy

The WSIL4J API also provides a WSILProxy class which can be used to easily access certain types of information within a WS-Inspection document. The proxy interface will read the WS-Inspection document, then allow you to directly access the WSDL documents for UDDI business services that you need. Listing 7 contains a portion of an application that shows how to use the WS-Inspection proxy to get a list of WSDL documents for a given service name. You can also view and download the complete WSInspectionProxyExample application.

Listing 7: Example WS-Inspection Proxy Usage
...
// Create a new instance of a WS-Inspection document proxy
WSILProxy proxy = new WSILProxy(wsinspectionURL);

// Get all of the WSDL documents using the input service name
WSDLDocument[] wsdlDocuments = proxy.getWSDLDocumentByServiceName(serviceName);

// Display purpose of list
System.out.println("Display contents of WSDL service description documents for service name [" +
                   serviceName + "]...");
                  
// Process each WSDL document reference
for (int wsdlCount = 0; wsdlCount < wsdlDocuments.length; wsdlCount++)
{
  // Display contents of the document
  System.out.println("[" + wsdlCount + "] \n" + wsdlDocuments[wsdlCount].serializeToXML());
}
...

Summary

In this article, we described the Web Services Inspection Language and how it provides a simple, distributed service discovery method for any type of Web service description document. We also described how the WS-Inspection technology is complementary to existing service discovery methods, such as UDDI, because it defines a process for inspecting a Web site for service descriptions.

In the future, we will start to see additional uses for the WS-Inspection technology. For example, we may see the implementation of WS-Inspection interfaces for Web service description repositories. We may also see this technology used to develop Web service crawlers. These service crawlers would search through Web sites for WS-Inspection documents and then aggregate the service description references from multiple sites. With this and other applications of this technology, the Web Services Inspection Language will become an effective service discovery technology.

Resources

wsil4j-1.0.0/docs/images/000077500000000000000000000000001166574435000151345ustar00rootroot00000000000000wsil4j-1.0.0/docs/images/WSInspectionOverview.jpg000066400000000000000000001142511166574435000217560ustar00rootroot00000000000000JFIFHHC   ",% )!&4&)-/111%69509,01/C  ///////////////////////////////////////////////////0! }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (Eqq fKR$^%}5fd"r?2 oY?O&aba#X<]1?I~)G_ |WO?o 8Zz@P $J3Lׯ[w3~udRΞQ@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@kǾ+&C&"$;nCk/k8qսmއHUzTT%ZiKnUpE6M/iA;ipOZ_U7:UjQ-Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@ď;ṧs9`b:',rĒy$iړwg;PH"ײ$kc5통wȄi6sŻ$˜}~ľյMbϙ)zrgB(((((((((((((O M9Okc ?:󵯭G |6\H"z8͏ FEޭyVV$K|CU6 { v4n-LB1vkV1̪T%)]`z&+X wcc:46<Ӫ.I [TC,pmQ{͌Wuw%6_;TfM[0<,:$$ `p?_VfgOI>IK{SIEtRT_# ]aqd& >_:sތeե诖>((((((((((((((~,xP j>Z־ z#1?Ɵn*f'ܒ@ϥ0I.(7~8QrQV*j-yR;{Phe+۫7$TkMUjV];j0 ,&I$rMXmrژmmxoeo%{y&m2XtM20U f'rO:N @$* E:hTneהCiHVp-v? ۭF:4jҼe&z'Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Ks'r0&^1+Z ╫ԚBzo[կEjv~'.gOs~]Px,d-MI:m;.oO_/k6l]IM}Cq3lhZ\:6LGeSثW^O} hSW*D*R[GTt*%'3g5i:ՅݔzV<U #wcp9Ehƾ){g ͕%؎?L;9N*J&6{\PJ*|e|UHY4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mχ/oZ$' tQ]xr}Ob)E$Š((((((((r~CU '__($ I!(KD3$>_mc^QZ^i,j\)+սa{vڋj1@%JNGPq|ە#J'h?ТSVXԬ|=3zʐNci8}`yi۹HJ%ORuRZ6AF(=Ghm Qz 6AF(=-PEPEPEPEPEPEPEPEPEx#?^Q?/WŜTG~4nal.ٶ)*x-Rě΄s>Go;b Aq1c]jr@v$tZk˛{tqUu2$hq N9⫯3"&8a$IⓢcV:_-Xim3K=؆R"8€ <ߡiekuQIv@{Y94N24 ~dWrf/GG}|%Ɨo4Ywzi%\]E-E!Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@+u}kzOhnd1能d® 3 kԊg[*֛8][/f([/f)fs/L*7G*7GjL*7G*7GjL*7G*7GjL*7H u{.;rY#eTA'^VlyF S[+|P5Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@wsil4j-1.0.0/docs/images/WSInspectionServlet.jpg000066400000000000000000001411701166574435000215740ustar00rootroot00000000000000JFIFHHC   ",% )!&4&)-/111%69509,01/C  ///////////////////////////////////////////////////! }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (h y|,*y]"K0do;_ }?oC{ƨOv5G&?7Q @7jMk!To;_ }?oC{ƨOv5G&?7Q @7jMk!To;_ }?oC{ƨOv5G&?7Q @7jMk!To;_ }?oC{ƨOv5G&?7Q @7j44v]i瑕]u&ѕ0 FZV7ui})nmm㹸8ą"V O>7Fy j>h7OoF>7Fy j>h7OoF>7Fy jk~/{NF^ y.eXiE,@͸hzz# (Ƞ PEPEPEPEPEPEPEPEs_kMk(((((((_ {zZ+ ?ZoC@-Q@Q@|G{_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0= AK@Q@Q@Q@Q@Q@E b+Qg42[ᦄNDN=OVz5|cjȾ4?'iZܓ4sϸE  t>!ji4 QԹ7."7c"PP;OjPEPEPEPEPEPEPEPEPEPEPEPEP|Ku[-cK)綸S q1r_stZ13V~mwPB9>S5kƜSV[jxK?((((((((((/4w\zO Ev:djXj"6q ~u7%mHggQבSpS~Oy~6/Or&#ϔ3Vqx/ nQ,"3o7cQSv_[]66((_z-|0Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@_?iѿC?;/>t459cέ{?_V7s41btەCT2_6Ҽ3-ż_g.L$lÚa)[}?Iᙕv`³)GDvU)TnMZ-]vߢϝ ("s_^_:~PEPEPEPEPEPEPEPEPEPEyOtovl'䃌o%.axe)2`qs[ԓVS曲oFmgpȗcQ$LE {>OAgoq,;'K!"TbGC8`+M&_Mn}V+kvϱ0G*nU=NZa)ʱ9#qII8*iYO]~w5F1-C3rhj%-zyiKoUJ*S"s_^_:~PEPEPEPEPEPEPEPEPEPEyOtovl'ҹKNncHl/mef1] nJ9zMYvsڶ|o|5)had]!sjYwSEj95i5+UGJYZ7c:?] "IeaCϹgsOp'>bAe pI|PJ;[Ș'M߷c-.Aoj?.i |?ŞkN=UN6;RoEnygW D /ʽt((((((((((zF{}j=W?fhG*N0\Oؼa@k'ǖf*Vu^1_4}?& ~~//>EG|X_x//>}?&x V^1_4}?&zOM@4Wg^q!EPEPEPEPEPEPEPEPEPEPZ6A@(=GhmPz 6A@(=-Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@wsil4j-1.0.0/docs/wsil4j.css000066400000000000000000000022521166574435000156160ustar00rootroot00000000000000BODY { border-top-style : none; border-left-style : none; border-right-style : none; border-bottom-style : none; font-size : 12px; font-family : Arial,sans-serif; } A:hover { BACKGROUND: #ffffff ; } P { TEXT-INDENT: 1.5em ; } H3 { background-color : #3cbfff; padding-left : 6px; padding-right : 6px; padding-top : 2px; padding-bottom : 2px; font-size : 16px; font-family : Arial,sans-serif; } H2 { background-color : #004e9b; PADDING-BOTTOM: 1px; PADDING-LEFT: 4px; PADDING-RIGHT: 4px; PADDING-TOP: 1px; FONT-FAMILY: Arial ; color : white; } H1 { text-align : left; FONT-FAMILY: Arial ; padding-top : 1px; padding-left : 1px; padding-right : 1px; padding-bottom : 1px; border-top-style : none; border-right-style : none; border-bottom-style : none; border-left-style : none; font-style : italic; } DT { FONT-WEIGHT: 700 ; } .masthead { TEXT-ALIGN: center ; } .NOTESID { COLOR: #004400; FONT-FAMILY: Arial ; } H4{ background-color : silver; font-family : Arial; padding-top : 1px; padding-left : 4px; padding-right : 4px; padding-bottom : 1px; } TABLE{ font-size : 12px; font-family : Arial,sans-serif; } wsil4j-1.0.0/docs/wsinspection.html000066400000000000000000001636201166574435000173120ustar00rootroot00000000000000 Web Services Inspection Language (WS-Inspection) 1.0

Web Services Inspection Language (WS-Inspection) 1.0

Authors (alphabetically):
Keith Ballinger, Microsoft
Peter Brittenham, IBM
Ashok Malhotra, Microsoft
William A. Nagy, IBM
Stefan Pharies, Microsoft

Abstract

The WS-Inspection specification provides an XML format for assisting in the inspection of a site for available services and a set of rules for how inspection related information should be made available for consumption. A WS-Inspection document provides a means for aggregating references to pre-existing service description documents which have been authored in any number of formats. These inspection documents are then made available at the point-of-offering for the service as well as through references which may be placed within a content medium such as HTML.

Status

This draft represents the current thinking with regard to locating and inspecting services within IBM and Microsoft. It consolidates concepts found in ADS and DISCO (earlier proposals in this space).

Table of Contents

1 Introduction
    1.1 Design Goals
    1.2 WS-Inspection Document Examples
    1.3 Notational Conventions
2.0 Inspection Document Definition
    2.1 WS-Inspection Document Structure
        2.1.1 Language Extensibility and Bindings
        2.1.2 Documentation
    2.2 Services
        2.2.1 Text Descriptions of Services
        2.2.2 Service Names
        2.2.3 Service Description References
    2.3 Links to Other Inspection Documents and Related Aggregation Information Sources
3.0 WSDL Binding
    3.1 How the WSDL Binding Extends the WS-Inspection Specification
    3.2 wsilwsdl:reference
        3.2.1 wsilwsdl:referencedService
        3.2.2 wsilwsdl:implementedBinding
4.0 UDDI Binding
    4.1 How the UDDI Binding Extends the WS-Inspection Specification
    4.2 wsiluddi:businessDescription
    4.3 wsiluddi:serviceDescription
5.0 Developing Additional Bindings
6.0 Inspection Document Publication
    6.1 Fixed Name Inspection Documents
    6.2 Linked Inspection Documents
        6.2.1 Linking to Inspection Documents within HTML
7.0 References
A 1 Notes on URIs
A 1.1 XML Namespaces and Schema Locations
A 1.2 Relative URIs
A 2 The Complete WS-Inspection Grammar
A 3 Schemas
    A 3.1 WS-Inspection Schema
    A 3.2 WSDL Binding Schema
    A 3.3 UDDI v1 Binding Schema
    A 3.4 UDDI v2 Binding Schema

1. Introduction

Specifications have been proposed to describe Web Services at different levels and from various perspectives. It is the goal of the proposed Web Services Description Language (WSDL) [1] to describe services at a functional level. The Universal Description, Discovery, and Integration (UDDI) [2] schema aims at providing a more business-centric perspective. What has not yet been provided by these proposed standards is the ability to tie together, at the point of offering for a service, these various sources of information in a manner which is both simple to create and use. the WS-Inspection specification addresses this need by defining an XML grammar which facilitates the aggregation of references to different types of service description documents, and then provides a well defined pattern of usage for instances of this grammar. By doing this, the WS-Inspection specification provides a means by which to inspect sites for service offerings.

Repositories already exist where descriptive information about Web services has been gathered together. The WS-Inspection specification provides mechanisms with which these existing repositories can be referenced and utilized, so that the information contained in them need not be duplicated if such a duplication is not desired.

1.1 Design Goals

The two major design goals of the WS-Inspection specification are simplicity and extensibility. A WS-Inspection document essentially an aggregation of pointers to service description documents. WS-Inspection documents are, as a result, fairly easy to write and maintain. Because a WS-Inspection document may point to a variety of service description document formats, WS-Inspection documents may be created that allow the consumer of the document to pick and choose from the available descriptions and to access only those which they are able to understand. As new description formats arise, new references can be added to existing WS-Inspection documents without requiring that a modification be made to the base WS-Inspection schema.

1.2 WS-Inspection Document Examples

The following is an example of a simple WS-Inspection document for a single service which provides stock quote information. The service has a corresponding HTTP accessible WSDL document which describes its interface.

<?xml version="1.0"?>
<inspection xmlns="http://schemas.xmlsoap.org/ws/2001/10/inspection/">
  <service>
    <description referencedNamespace="http://schemas.xmlsoap.org/wsdl/"
                 location="http://example.com/stockquote.wsdl" />
  </service>
</inspection>

The next example shows the WS-Inspection document for two services which provide financial tools. The first service, providing stock quotes, has two available descriptions; one in an HTTP accessible WSDL document, and the other in a UDDI directory. The second service, providing a calculator, is described by only an anonymous-FTP accessible WSDL document. The WS-Inspection document also contains a link to another WS-Inspection document.

<?xml version="1.0"?>
<inspection xmlns="http://schemas.xmlsoap.org/ws/2001/10/inspection/"
            xmlns:wsiluddi="http://schemas.xmlsoap.org/ws/2001/10/inspection/uddi/">
  <service>
    <abstract>A stock quote service with two descriptions</abstract>
    <description referencedNamespace="http://schemas.xmlsoap.org/wsdl/"
                 location="http://example.com/stockquote.wsdl"/>
    <description referencedNamespace="urn:uddi-org:api">
       <wsiluddi:serviceDescription location="http://www.example.com/uddi/inquiryapi">
         <wsiluddi:serviceKey>4FA28580-5C39-11D5-9FCF-BB3200333F79</wsiluddi:serviceKey>
       </wsiluddi:serviceDescription>
    </description>
  </service>
  <service>
    <description referencedNamespace="http://schemas.xmlsoap.org/wsdl/"
                 location="ftp://anotherexample.com/tools/calculator.wsdl"/>
  </service>
  <link referencedNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/"
        location="http://example.com/moreservices.wsil"/>
</inspection>

A detailed description of the elements used in these two examples is provided in Section 2.

Note: For these examples, the referenced WSDL documents are each assumed to contain a single WSDL service element. See Section 3 for more information.

1.3 Notational Conventions

  1. The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC-2119 [3].
  2. The following namespace prefixes are used throughout this document:

    prefix namespace URI definition
    wsil http://schemas.xmlsoap.org/ws/2001/10/inspection/ WS-Inspection namespace for the WS-Inspection framework.
    wsilwsdl http://schemas.xmlsoap.org/ws/2001/10/inspection/wsdl/ WS-Inspection namespace for the WS-Inspection WSDL binding.
    wsiluddi http://schemas.xmlsoap.org/ws/2001/10/inspection/uddi/ WS-Inspection namespace for the WS-Inspection UDDI binding.
    uddi urn:uddi-org:api API and document namespace defined by the UDDI v1 specification.
    uddiv2 urn:uddi-org:api_v2 API and document namespace defined by the UDDI v2 specification.
    (other) (various) All other namespace prefixes are samples only. In particular, URIs starting with "http://example.com" represent some application-dependent or context-dependent URI [4].

  3. This specification uses an informal syntax to describe the XML grammar of a WS-Inspection document:
    • The syntax appears as an XML instance, but the values indicate the data types instead of values.
    • Characters are appended to elements and attributes as follows: "?" (0 or 1), "*" (0 or more), "+" (1 or more).
    • Element names ending in "...…" (such as <element...…/> or <element...…>) indicate that elements/attributes irrelevant to the context are being omitted.
    • Grammar in bold has not been introduced earlier in the document, or is of particular interest in an example.
    • <-- extensibility element --> is a placeholder for elements from some "other" namespace (like ##other in XSD).
    • The XML namespace prefixes (defined above) are used to indicate the namespace of the element being defined.
    • Examples starting with <?xml contain enough information to conform to this specification; others examples are fragments and require additional information to be specified in order to conform.

2.0 Inspection Document Definition

This section describes the core elements of the WS-Inspection language. Binding extensions for WSDL and UDDI are covered in Sections 3 and 4.

2.1 WS-Inspection Document Structure

A WS-Inspection document contains an inspection element at the root, and references to individual service descriptions or links to collections of service descriptions as descendants. The grammar of a WS-Inspection document is as follows:

<wsil:inspection>
  <wsil:abstract xml:lang=""? ... /> * 
  <wsil:service> *
    <wsil:abstract xml:lang=""? ... /> *
    <wsil:name xml:lang=""? ... /> *
    <wsil:description referencedNamespace="uri" location="uri"?> *
      <wsil:abstract xml:lang=""? ... /> * 
      <-- extensibility element --> ?
    </wsil:description>
  </wsil:service>
  <wsil:link referencedNamespace="uri" location="uri"?/>  *
    <wsil:abstract xml:lang=""? ... /> * 
    <-- extensibility element --> ?
  </wsil:link>
</wsil:inspection>

There is an additional constraint that the inspection element MUST contain at least one service child or one link child, and MAY contain a combination of both. A more exact definition of the grammar, which includes the above constraint, may be found in Appendix 2. Each of the elements in this example is described in a corresponding section below.

2.1.1 Language Extensibility and Bindings

In the WS-Inspection specification, the term binding refers to the process of associating specific description format/retrieval-related information with a more abstract WS-Inspection entity. For example, hints describing what type of information may be found in a referenced document of a particular type or information concerning the retrieval of such documents require the use of description format specific bindings. The WS-Inspection specification allows elements representing a specific technology (referred to here as extensibility elements) under both description and link elements. Extensibility elements MUST use an XML namespace different from that of the base WS-Inspection language.

Extensibility elements allow innovation to proceed with service description without having to revise the base WS-Inspection specification. This document recommends that specifications defining such description formats also define any necessary WS-Inspection extensions required to reference them.

See Sections 3 and 4 for examples of extensibility elements defined as part of the base WS-Inspection specification.

2.1.2 Documentation

The WS-Inspection specification uses the optional abstract element as a container where a small textual description can be placed. The content of this element is intended for human consumption. The abstract element is allowed inside any base WS-Inspection language element which allows child elements.

An optional xml:lang attribute, as defined in [5], may be specified on the element to indicate the language in which the abstract has been written. Multiple abstract elements which have the same value for the xml:lang attribute MAY appear as siblings.

2.2 Services

The service element acts as the delineator between collections of description references for services. An inspection element may contain any number of service elements within it. Each service element MAY have one or more abstract elements and one or more name elements, and MUST have at least one description element, but MAY have more.

2.2.1 Text Descriptions of Services

One or more abstract elements may be used within a service element to provide a location where a small textual description about the service can be placed. The content of this abstract is intended for human consumption, and is only intended to provide a small fragment of useful information about the service. Upon receiving a WS-Inspection document, a tool may use this field to ask the user if they wish to gain more information about the service, without requiring that any of the referenced descriptions be obtained beforehand. It is not the purpose of this element to replace a more complete service description language.

More complex sets of documentation MAY be added through the use of description elements which point to full-fledged description documents.

2.2.2 Service Names

The name element may be used to associate a name with a particular service. As with the abstract element, the name element is intended only for human consumption, and is not guaranteed to be unique.

An optional xml:lang attribute may be specified on the element to indicate the language in which the name has been written. Multiple name elements which have the same value for the xml:lang attribute MAY appear as siblings.

2.2.3 Service Description References

The most useful part of the inspection is the information contained within the description elements. These elements can be used to provide pointers to service description documents of various forms, allowing consumers to process only the ones that they find useful. The referencedNamespace attribute identifies the namespace to which the referenced document belongs. For example, the value of the referencedNamespace attribute on a description element which points to a WSDL document would be "http://schemas.xmlsoap.org/wsdl/". Consumers of WS-Inspection documents may use the referencedNamespace attribute to determine whether or not it is of value to them to retrieve the referenced description document.

The optional location attribute MAY be used to provide the actual reference to the description. The value of the location attribute MUST be a valid URL, and the description MUST be retrievable from that URL using the primary access mechanism for the scheme specified in the URL (e.g. for an HTTP URL, the document must be retrievable by performing an HTTP GET on the provided URL.) If the document cannot be retrieved using the primary access mechanism, or if more information is necessary to perform the retrieval, then that information MUST be specified using the extensibility mechanism.

One extensibility element MAY appear under the description element to provide any additional information which is needed to retrieve or process the service description, or any hints about the contents of the description document which may prove useful for the consumer deciding whether or not that particular service description should be retrieved. The extensibility element used MUST be the supported binding, if one exists, for the document namespace specified by the referencedNamespace attribute of the parent description element. A binding is "supported" if its definition is included as part of this specification or if it is agreed upon by the controlling body of the specification for the description mechanism to which it is being bound. If there is no supported binding for a particular description mechanism, then interoperability is not guaranteed.

While every attempt should be made to insure that the information contained within a WS-Inspection document is accurate, consumers of the document MUST NOT assume that the information provided matches exactly what is in the referenced document. While bindings may be used to provide hints about referenced documents, they MUST NOT be used as the final source of service description information.

Authors of WS-Inspection documents need make every attempt to be sure that the information contained within the documents is accurate, but consumers of the documents MUST NOT assume that the information provided matches exactly what is in the referenced documents. The final decision must be made by retrieving and processing the referenced document.

2.3 Links to other Inspection Documents and Related Aggregation Information Sources

The link element allows WS-Inspection documents to reference additional aggregations of service descriptions, such as other WS-Inspection documents or UDDI repositories.

A hierarchy of WS-Inspection documents could be created, for example, using link elements of the following form:

<wsil:link referencedNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/"
           location="uri of WS-Inspection document">

Because many service descriptions will be published only within other information registries such as UDDI, the link element may be used to prevent service providers from having to create inspection documents with large numbers of service elements which contain only single description elements, all pointing back to the same location in the information registry. The service provider is able to indicate to the consumer of the WS-Inspection link that they should look in the indicated location for additional service description aggregations by using link elements of the following form:

<wsil:link referencedNamespace="uri" location="uri"?>
  <-- extensibility element -->
</wsil:link>

This gives the provider the ability to reference the pre-existing information while still allowing it to be discovered through the WS-Inspection inspection process.

The link element MUST only be used to reference well-defined service description aggregations, such as WS-Inspection documents and UDDI businessEntities.

The referencedNamespace attribute on the link element identifies the namespace of the linked aggregation source. The optional location attribute MAY be used to provide the actual link to the source if it is retrievable from the provided URL using the primary access mechanism for the scheme specified in the URL. If the aggregation cannot be retrieved using the primary access mechanism, then that information MUST be specified using the extensibility mechanism.

One extensibility element MAY appear under the link element to provide any additional information which is needed to retrieve the aggregation which has been linked. The extensibility element MUST be a supported binding for the document namespace specified by the referencedNamespace attribute of the parent link element. See Section 2.2.3 for a definition of supported bindings.

The WS-Inspection specification does not specify a pattern for processing the link elements: a consumer MAY follow the links as they so desire, and a service provider MUST NOT assume that they will be followed at all. In addition, the WS-Inspection specification does not impose any restrictions upon the structure created by the references, so it is up to the processor of WS-Inspection documents to make sure that circular references are not followed interminably.

The following example shows a WS-Inspection document which contains two links to other WS-Inspection documents:

<?xml version="1.0"?>
<inspection xmlns="http://schemas.xmlsoap.org/ws/2001/10/inspection/">
  <link referencedNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/"
        location="http://example.com/financial/services.wsil"/>
  <link referencedNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/"
        location="http://example.com/purchasing/poservices.wsil"/>
</inspection>

3.0 WSDL Binding

The WS-Inspection specification includes a binding for WSDL 1.1 and provides the following capabilities:

  • Indication of the type(s) of WSDL bindings which appear in the referenced WSDL document
  • Specification of which WSDL service is being referenced if several services exist within the same document
  • Indication of whether or not a particular referenced WSDL document is providing endpoint information

Note that use of the WSDL binding is OPTIONAL if the referenced WSDL document has one or no service elements. In those cases, a reference to a WSDL document MAY be made with only the description element. If the referenced WSDL document has more than one service element, then the WSDL binding MUST be used to indicate which service element is being referenced.

The WS-Inspection specification allows references to be made to any WSDL document, irrespective of the contents of that document. Any portion of a WSDL description for a single service which is contained in a retrievable unit, e.g. a single file, may be referenced. The only constraint which is imposed is that two referenced WSDL documents within the same WS-Inspection service MAY NOT contain conflicting information. This mechanism MUST NOT be used as a substitute for the WSDL import element; they are not equivalent.

Because WSDL is a description format and does not specify a retrieval mechanism for its documents, this binding only applies to the WS-Inspection description element.

3.1 How the WSDL Binding Extends the WS-Inspection Specification

The WSDL binding extends the WS-Inspection specification using the following extension element:

<inspection xmlns:wsilwsdl="http://schemas.xmlsoap.org/ws/2001/10/inspection/wsdl/ ...>
  <service ...>
    <description referencedNamespace="http://schemas.xmlsoap.org/wsdl/"
                 location="uri">
      <wsilwsdl:reference endpointPresent="boolean"?>
        <wsilwsdl:referencedService>qname</wsilwsdl:referencedService> ?
        <wsilwsdl:implementedBinding>qname</wsilwsdl:implementedBinding> *
      </wsilwsdl:reference>
    </description>
  </service>
</inspection>

The interpretation of the WSDL extension, including additional restrictions, is described in the following section.

3.2 wsilwsdl:reference

The WS-Inspection WSDL binding element reference acts as the container element for the rest of the binding information. The reference element MAY have an endpointPresent attribute, a single referencedService child, and/or one or more implementedBinding children, but MUST have at least one of the three.

The endpointPresent attribute MAY be used to indicate whether or not the referenced WSDL document contains endpoint information. If the attribute has a boolean value of true (or 1), then the referenced WSDL document MUST contain a service element. If the attribute has a boolean value of false (or 0), then the referenced WSDL document MUST NOT contain a service element. A WS-Inspection consumer that is looking only for service endpoint information may choose to examine this attribute to determine whether or not a referenced WSDL document should be retrieved.

The following example shows a WS-Inspection document for the stock quote service that appeared in Section 1.2. In this case, the WSDL document which describes the service is assumed to be split into three files, with the "main" file importing the other two.

<?xml version="1.0"?>
<inspection xmlns="http://schemas.xmlsoap.org/ws/2001/10/inspection/"
            xmlns:wsilwsdl="http://schemas.xmlsoap.org/ws/2001/10/inspection/wsdl/">
  <service>
    <description referencedNamespace="http://schemas.xmlsoap.org/wsdl/"
                 location="http://example.com/stockquote/main.wsdl">
    </description>
    <description referencedNamespace="http://schemas.xmlsoap.org/wsdl/"
                 location="http://example.com/stockquote/bindings.wsdl">
       <wsilwsdl:reference endpointPresent="false"/>
    </description>
  </service>
</inspection>

Notice that references have only been created for two of the three WSDL files. As was stated earlier, The WS-Inspection specification does not impose any restrictions upon what WSDL information is referenced.

3.2.1 wsilwsdl:referencedService

Although WSDL allows multiple services to be described within a single document, WS-Inspection references are made at a per-service level. If a referenced WSDL document contains more than one WSDL service element, then the referencedService element of the WS-Inspection WSDL binding MUST be used to specify which service is being referenced. The QName specified by the referencedService element MUST be a valid QName corresponding to a service in the referenced WSDL document.

The following example shows a WS-Inspection document for the stock quote and calculator services that appeared in Section 1.2. In this case, the WSDL document is assumed to contain descriptions for multiple financial services.

<?xml version="1.0"?>
<inspection xmlns="http://schemas.xmlsoap.org/ws/2001/10/inspection/"
            xmlns:wsilwsdl="http://schemas.xmlsoap.org/ws/2001/10/inspection/wsdl/">
  <service>
    <description referencedNamespace="http://schemas.xmlsoap.org/wsdl/"
                 location="http://example.com/finance.wsdl">
       <wsilwsdl:reference>
         <wsilwsdl:referencedService xmlns:ns1="http://example.com/finance.wsdl">ns1:StockQuoteService<wsilwsdl:referencedService>  
       </wsilwsdl:reference>
    </description>
  </service>
  <service>
    <description referencedNamespace="http://schemas.xmlsoap.org/wsdl/"
                 location="http://example.com/finance.wsdl">
       <wsilwsdl:reference>
         <wsilwsdl:referencedService xmlns:ns1="http://example.com/finance.wsdl">ns1:CalculatorService<wsilwsdl:referencedService>  
       </wsilwsdl:reference>
    </description>
  </service>
</inspection>
3.2.2 wsilwsdl:implementedBinding

The implementedBinding element MAY be used to indicate the type(s) of bindings which appear in a referenced WSDL document. A reference element MAY have multiple implementedBinding elements as children. The QName specified by the implementedBinding element MUST be a valid QName corresponding to a binding in the referenced WSDL document.

The following example shows a WS-Inspection document for the stock quote and calculator services that appeared in the example in Section 1.2. The first service has a reference to a WSDL description which implements two bindings: http://example.com/stockquote.wsdl/StockQuoteSoapBinding and http://example.com/stockquote.wsdl/StockSymbolLookupSoapBinding. The second service also has a reference to a WSDL description, but it does not provide any additional information about the bindings contained within that document.

<?xml version="1.0"?>
<inspection xmlns="http://schemas.xmlsoap.org/ws/2001/10/inspection/"
            xmlns:wsilwsdl="http://schemas.xmlsoap.org/ws/2001/10/inspection/wsdl/">
  <service>
    <description referencedNamespace="http://schemas.xmlsoap.org/wsdl/"
                 location="http://example.com/stockquote.wsdl">
       <wsilwsdl:reference>
         <wsilwsdl:implementedBinding xmlns:ns1="http://example.com/stockquote.wsdl">ns1:StockQuoteSoapBinding</wsilwsdl:implementedBinding>
         <wsilwsdl:implementedBinding xmlns:ns1="http://example.com/stockquote.wsdl">ns1:StockSymbolLookupSoapBinding</wsilwsdl:implementedBinding>
       </wsilwsdl:reference>
    </description>
  </service>
  <service>
    <description referencedNamespace="http://schemas.xmlsoap.org/wsdl/"
                 location="http://example.com/tools/calculator.wsdl"/>
  </service>
</inspection>

4.0 UDDI Bindings

Many service descriptions will be stored in UDDI registries, so the WS-Inspection specification provides a set of usage patterns for references to this information. This is accomplished using a set of UDDI extensibility elements that provide references to UDDI businessEntity or businessService entries from the version 1 and version 2 UDDI specifications. The bindings for the two versions are identical, except for the schemas which are used to represent them. The referencedNamespace attribute on a link or description element which references a version 1 UDDI document has a value of "urn:uddi-org:api", while it has a value of "urn:uddi-org:api_v2" for a version 2 document.

4.1 How the UDDI Binding Extends the WS-Inspection Specification

The UDDI binding extends the WS-Inspection specification using the following extension elements:

<inspection (xmlns:wsiluddi://schemas.xmlsoap.org/ws/2001/10/inspection/uddi/
             | xmlns:wsiluddi://schemas.xmlsoap.org/ws/2001/10/inspection/uddiv2/) ... >
  <link ... >
    <wsiluddi:businessDescription location="uri"?>
      <wsiluddi:discoveryURL useType="nmtoken"> ?
      <wsiluddi:businessKey> ?
    </wsiluddi:businessDescription>
  </link>  

  <service ... >
    <description ... >
      <wsiluddi:serviceDescription location="uri"?>
        <wsiluddi:discoveryURL useType="nmtoken"> ?
        <wsiluddi:serviceKey> ?
      </wsiluddi:serviceDescription>
    </description>
  </service>
</inspection>

The interpretation of these UDDI extensions are described in the following sections.

4.2 wsiluddi:businessDescription

Users who choose to register their service descriptions in UDDI can create WS-Inspection references which instruct consumers to use UDDI to discover service description information. The WS-Inspection link element, together with UDDI extensibility elements, describes the record which should be retrieved. For UDDI, the link element will contain only the referencedNamespace attribute. The location attribute is not used with the link element when it contains a UDDI businessDescription element. The following example illustrates this usage:

<?xml version="1.0"?>
<inspection targetNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/"
    xmlns:wsiluddi="http://schemas.xmlsoap.org/ws/2001/10/inspection/uddi/"
    xmlns="http://schemas.xmlsoap.org/ws/2001/10/inspection/">
  <link referencedNamespace="urn:uddi-org:api">
    <wsiluddi:businessDescription location="http://www.example.com/uddi/inquiryapi">
      <wsiluddi:businessKey>3C9CADD0-5C39-11D5-9FCF-BB3200333F79</wsiluddi:businessKey>
      <wsiluddi:discoveryURL useType="businessEntity">
        http://www.example.com/uddi?3C9CADD0-5C39-11D5-9FCF-BB3200333F79
      </wsiluddi:discoveryURL>
    </wsiluddi:businessDescription>
  </link>
</inspection>

When using the UDDI extension elements, the link element must contain a reference to the UDDI namespace. This indicates that the extensibility elements contained by this element are used to reference a UDDI businessEntity. The WS-Inspection extension is specified using the businessDescription element. This element must contain either a UDDI businessKey element, a UDDI discoveryURL element, or both.

The value of the businessKey element is to be used in conjunction with the UDDI get_businessDetail message. To use the businessKey, the businessDescription element must contain a location attribute. The value of this attribute is the URL for the UDDI registry inquiry interface, and is used to issue an HTTP POST with the get_businessDetail message to the registry. The response to this message is the UDDI businessEntity record that is associated with the business key.

If a discoveryURL element is present, the UDDI businessEntity record may be retrieved via an HTTP GET issued against the URL that is specified in the value of this element. If both a businessKey element and a discoveryURL element are present, then the consumer of the WS-Inspection document may choose which method is used to retrieve the record.

4.3 wsiluddi:serviceDescription

References to single service descriptions which exist within UDDI may also be referenced through WS-Inspection documents. By using the description element along with added extensibility elements, the correct record can be retrieved. The following example illustrates this usage:

<?xml version="1.0"?>
<inspection targetNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/"
    xmlns:wsiluddi="http://schemas.xmlsoap.org/ws/2001/10/inspection/uddi/"
    xmlns="http://schemas.xmlsoap.org/ws/2001/10/inspection/">
  <service>
    <name>UDDI Service Description</name>
    <description referencedNamespace="urn:uddi-org:api">
      <wsiluddi:serviceDescription location="http://www.example.com/uddi/inquiryapi">
        <wsiluddi:serviceKey>4FA28580-5C39-11D5-9FCF-BB3200333F79</wsiluddi:serviceKey>
        <wsiluddi:discoveryURL useType="businessEntity">
          http://www.example.com/uddi?3C9CADD0-5C39-11D5-9FCF-BB3200333F79
        </wsiluddi:discoveryURL>
      </wsiluddi:serviceDescription>
    </description>
  </service>
</description>

The WS-Inspection description element contains a reference to a single UDDI service description using the serviceDescription extension element. The UDDI serviceKey element must appear as a child of the serviceDescription element. The value of the serviceKey element is used in conjunction with the UDDI get_serviceDetail message to retrieve the UDDI service description.

The UDDI discoveryURL element may also appear as a child of the serviceDescription element. If present, it may be used to retrieve a UDDI businessEntity via HTTP GET. A single service description is extracted from the UDDI businessEntity using the specified serviceKey.

5.0 Developing Additional Bindings

A reference to most description documents in the most common WS-Inspection documents can be made using a simple description element, as illustrated in Section 2.2.3, without requiring that any additional information be present. As was previously mentioned, however, there are some instances, such as with UDDI, in which the description element or link element cannot alone provide enough information to allow for the retrieval of the desired information. There are also instances, such as with many WSDL documents, where it is useful to be able to provide additional information about the referenced document. Although this specification has created bindings for two of the most prevalent service description mechanisms, WSDL in Section 3.0 and UDDI in Section 4.0, it is not feasible for it to do so for all of the other pre-existing description mechanisms. It is therefore left to the community to determine when new bindings need to be developed, and to agree upon their format and usage. The following are a few guidelines to help in the design of these new bindings:

  • Each binding MAY have one root element for extending the description element, and one for extending the link element, but MUST NOT have more than one for each. The binding MAY use the same root element for extending both.
  • The binding MUST limit the amount of information about the referenced description which is exposed. It is not the intention of the WS-Inspection document to replace the description document.
  • The binding MAY use elements from the description language for which it was created where appropriate, but SHOULD limit the extent to which their associated semantics are altered.

6.0 Inspection Document Publication

The WS-Inspection grammar only provides a partial solution to the problem of advertising services. A second component is required that provides a consistent means of locating and accessing the inspections that have been created. If the WS-Inspection documents cannot be easily located, then they provide minimal added value. To this end, the WS-Inspection specification provides two methods of usage for inspection documents, describing where they should be placed, and how they should be found. The two usage patterns are defined in the following two subsections.

6.1 Fixed Name Inspection Documents

WS-Inspection documents, when available, must be easily located. If a URL is obtained, which does not directly correspond to a WS-Inspection document, and perhaps not directly to any type of document, then it would be desirable to use what has been given and still be able to retrieve any inspection related documents which have been made available at that location. To this end, a WS-Inspection document named inspection.wsil MAY be placed where the most common entry points to websites or applications deployed on the server are located.

For example, the company example.com would create an inspection.wsil file in the root of its web server (available through http://example.com/inspection.wsil). If they offer services through http://example.com/financial and http://example.com/shipping then they may also put inspection.wsil files accessible under each of those URIs as well. It is possible that the inspection.wsil file at the root level may only contain pointers to the other WS-Inspection files.

The inspection.wsil documents do not necessarily have to be static documents; they MAY be dynamically generated upon request.

By providing a consistently named WS-Inspection file, applications can be easily modified to inspect sites for available services.

6.2 Linked Inspection Documents

Besides assisting those who are actively inspecting sites, the WS-Inspection specification also allows for a mechanism to inform users about service inspection related documents through other types of content, such as HTML pages. The exact mechanism by which the inspection documents are referenced is dependent upon the content type, but a binding for HTML is described in the following section.

6.2.1 Linking to Inspections Documents within HTML

WS-Inspection documents can be linked to in HTML pages through the use of a META tag carrying the value of serviceInspection in its name attribute. The corresponding content attribute on the tag must be a valid URI indicating the location of a WS-Inspection document. Typically, one would include this tag on highly visible pages, like the root document of the server. It is possible to reference multiple WS-Inspection documents by including several META tags within the same HTML page. The document at the location specified in the content attribute MUST be a WS-Inspection document; it cannot be another HTML document.

The following example shows an HTML fragment which has references to three WS-Inspection documents:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
  <HEAD>
    <META name="serviceInspection" content="localservices.wsil">
    <META name="serviceInspection" content="http://www.example.com/calculators.wsil">
    <META name="serviceInspection" content="ftp://www.anotherexample.com/translators.wsil">
  </HEAD>
  <BODY>
   ...
  </BODY>
</HTML>

7.0 References

[1] Web Services Description Language (WSDL) 1.1 "http://www.w3.org/TR/2001/NOTE-wsdl-20010315"
[2] Universal Description, Discovery, and Integration (UDDI) 2.0 "http://www.uddi.org"
[3] S. Bradner, "Key words for use in RFCs to Indicate Requirement Levels", RFC 2119, Harvard University, March 1997
[4] T. Berners-Lee, R. Fielding, L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax", RFC 2396, MIT/LCS, U.C. Irvine, Xerox Corporation, August 1998.
[5] Extensible Markup Language (XML) 1.0 "http://www.w3.org/TR/2001/NOTE-wsdl-20010315"

A 1 Notes on URIs

This section does not directly contribute to the specification, but provides background that may be useful when implementing the specification.

A 1.1 XML Namespaces and Schema Locations

It is a common misperception to equate the targetNamespace of an XML schema or the value of the xmlns attribute in XML instances with the location of the corresponding schema. Namespaces are in fact URIs, and URIs may be locations. So you may be able to retrieve a schema from that location. But this does not mean that is the only schema that is associated with that namespace. There can be multiple schemas associated with a particular namespace, and it is up to a processor of XML to determine which one to use in a particular processing context.

A 1.2 Relative URIs

Throughout this document you see fully qualified URIs used in WS-Inspection documents. The use of a fully qualified URI is simply to illustrate the referencing concepts. The use of relative URIs is completely allowed and is warranted in many cases. For information on processing relative
URIs, see http://www.normos.org/ietf/rfc/rfc2396.txt.

A 2 The Complete WS-Inspection Grammar

<wsil:inspection>
  <wsil:abstract xml:lang=""? ... /> * 
[  <wsil:service>  
     <wsil:abstract xml:lang=""? ... /> *
     <wsil:name xml:lang=""? ... /> *
     <wsil:description referencedNamespace="uri" location="uri"?> *
       <wsil:abstract xml:lang=""? ... /> * 
       <-- extensibility element --> ?
     </wsil:description>
   </wsil:service>
|
   <wsil:link referencedNamespace="uri" location="uri"?/>
     <wsil:abstract xml:lang=""? ... /> * 
     <-- extensibility element --> ?
   </wsil:link> ] +
</wsil:inspection>

A3 Schemas

A 3.1 WS-Inspection Schema

<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/"
  xmlns:wsil="http://schemas.xmlsoap.org/ws/2001/10/inspection/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="qualified">

  <complexType name="typeOfAbstract">
    <simpleContent>
      <extension base="xsd:string">
        <attribute ref="xml:lang" use="optional"/>
      </extension>
    </simpleContent>
  </complexType>

  <complexType name="itemWithAbstracts" abstract="true">
    <sequence>
      <element name="abstract" type="wsil:typeOfAbstract" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
  </complexType>
  
  <complexType name="nameType">
    <simpleContent>
      <extension base="xsd:string">
        <attribute ref="xml:lang" use="optional"/>
      </extension>
    </simpleContent>
  </complexType>

  <complexType name="referenceType">
    <complexContent>
      <extension base="wsil:itemWithAbstracts">
        <attribute name="referencedNamespace" type="anyURI" use="required"/>
        <attribute name="location" type="anyURI" use="optional"/>
      </extension>
    </complexContent>
  </complexType>
  
  <complexType name="descriptionType">
    <complexContent>
      <extension base="wsil:referenceType">
        <sequence>
          <any namespace="##other" minOccurs="0" processContents="lax"/>
        </sequence>
      </extension>
    </complexContent>
  </complexType>

  <complexType name="linkType">
    <complexContent>
      <extension base="wsil:referenceType">
        <sequence>
          <any namespace="##other" minOccurs="0" processContents="lax"/>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  
  <complexType name="serviceType">
    <complexContent>
      <extension base="wsil:itemWithAbstracts">
        <sequence>
          <element name="name" type="wsil:nameType" minOccurs="0" maxOccurs="unbounded"/>
          <element name="description" type="wsil:descriptionType" minOccurs="1" maxOccurs="unbounded"/>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
            
  <element name="inspection">
    <complexType>
      <complexContent>
        <extension base="wsil:itemWithAbstracts">
          <sequence minOccurs='1' maxOccurs='unbounded'>
            <choice>
              <element name="service" type="wsil:serviceType"/>
              <element name="link" type="wsil:linkType"/>
            </choice>
          </sequence>
        </extension>
      </complexContent>
    </complexType>
  </element>

</schema>

A 3.2 WSDL Binding Schema

<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/wsdl/"
  xmlns:wsilwsdl="http://schemas.xmlsoap.org/ws/2001/10/inspection/wsdl/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="qualified">

  <complexType name="reference">
    <sequence>
      <element name="referencedService" type="xsd:QName" minOccurs="0"/>
      <element name="implementedBinding" type="xsd:QName" minOccurs="0" maxOccurs="unbounded" />
    </sequence>
    <attribute name="endpointPresent" type="xsd:boolean" use="optional"/>
  </complexType>

  <element name="reference" type="wsilwsdl:reference" />

</schema>

A 3.3 UDDI v1 Binding Schema

<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/uddi/"
  xmlns:wsiluddi="http://schemas.xmlsoap.org/ws/2001/10/inspection/uddi/"
  xmlns:uddi="urn:uddi-org:api"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="qualified">

  <import namespace="urn:uddi-org:api" schemaLocation="http://www.uddi.org/schema/2001/uddi_v1.xsd"/>

  <complexType name="descriptionType">
    <sequence>
      <element name="discoveryURL" type="uddi:DiscoveryUrl" minOccurs="0"/>
    </sequence>
    <attribute name="location" type="anyURI" use="optional"/>
  </complexType>

  <!-- This element is to be used as a child of a WS-Inspection link -->
  <element name="businessDescription">
    <complexType>
      <complexContent>
        <extension base="wsiluddi:descriptionType">
          <sequence>
            <element name="businessKey" type="xsd:string" minOccurs="0"/>
          </sequence>
        </extension>
      </complexContent>
    </complexType>
  </element>

  <!-- This element is to be used as a child of a WS-Inspection description -->
  <element name="serviceDescription">
    <complexType>
      <complexContent>
        <extension base="wsiluddi:descriptionType">
          <sequence>
            <element name="serviceKey" type="xsd:string"/>
          </sequence>
        </extension>
      </complexContent>
    </complexType>
  </element>

</schema>

A 3.4 UDDI v2 Binding Schema

<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/uddiv2/"
  xmlns:wsiluddi="http://schemas.xmlsoap.org/ws/2001/10/inspection/uddiv2/"
  xmlns:uddi="urn:uddi-org:api_v2"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="qualified">

  <import namespace="urn:uddi-org:api_v2" schemaLocation="http://www.uddi.org/schema/2001/uddi_v2.xsd"/>

  <complexType name="descriptionType">
    <sequence>
      <element name="discoveryURL" type="uddi:discoveryURL" minOccurs="0"/>
    </sequence>
    <attribute name="location" type="anyURI" use="optional"/>
  </complexType>

  <!-- This element is to be used as a child of a WS-Inspection link -->
  <element name="businessDescription">
    <complexType>
      <complexContent>
        <extension base="wsiluddi:descriptionType">
          <sequence>
            <element name="businessKey" type="uddi:businessKey" minOccurs="0"/>
          </sequence>
        </extension>
      </complexContent>
    </complexType>
  </element>

  <!-- This element is to be used as a child of a WS-Inspection description -->
  <element name="serviceDescription">
    <complexType>
      <complexContent>
        <extension base="wsiluddi:descriptionType">
          <sequence>
            <element name="serviceKey" type="uddi:serviceKey"/>
          </sequence>
        </extension>
      </complexContent>
    </complexType>
  </element>

</schema>
wsil4j-1.0.0/samples/000077500000000000000000000000001166574435000144035ustar00rootroot00000000000000wsil4j-1.0.0/samples/WSInspectionExample.java000066400000000000000000000132741166574435000211560ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ import org.apache.wsil.*; import org.apache.wsil.extension.wsdl.*; import java.util.*; /** * An example of how to read and use the contents of * a WS-Inpsection document. * * @version: 1.0 * @author: Peter Brittenham */ public class WSInspectionExample { /** * WSInspectionExample. */ public WSInspectionExample() { } /** * Read the specified WS-Inspection document and list all * of the WSDL documents. * * @param args an array of command-line arguments */ public static void main(String[] args) { String wsinspectionURL; Description[] descriptions; String serviceName; Vector wsdlList = new Vector(); try { //If there is no input argument, then throw exception if (args.length == 0) { throw new IllegalArgumentException("Usage: WSInspectionExample documentURL"); } // Get the location of the WS-Inspection document wsinspectionURL = args[0]; // Create a new instance of a WS-Inspection document WSILDocument document = WSILDocument.newInstance(); // Read and parse the WS-Inspection document document.read(args[0]); // Get the inspection element from the document Inspection inspection = document.getInspection(); // Obtain a list of all service elements Service[] services = inspection.getServices(); // Display purpose of list System.out.println("Display list of WSDL service description references..."); // Process each service element to find all WSDL document references for (int serviceCount = 0; serviceCount < services.length; serviceCount++) { // Get the next set of description elements descriptions = services[serviceCount].getDescriptions(); // Process each description to find the WSDL references for (int descCount = 0; descCount < descriptions.length; descCount++) { // If the referenced namespace is for WSDL, then save the location reference if (descriptions[descCount].getReferencedNamespace().equals(WSDLConstants.NS_URI_WSDL)) { // Add WSDL location to the list wsdlList.add(descriptions[descCount].getLocation()); } } // If this service has WSDL service descriptions, then display the list if (wsdlList.size() > 0) { // Get service name serviceName = (services[serviceCount].getServiceNames().length == 0) ? "[no service name]" : services[serviceCount].getServiceNames()[0].getText(); // Display service name System.out.println(" Service: " + serviceName); // Display list Iterator iterator = wsdlList.iterator(); for (int count = 1; iterator.hasNext(); count++) { System.out.println(" [" + count + "] " + ((String) iterator.next())); } } // Clear the list wsdlList.clear(); } } catch (Exception e) { // Display exception message System.out.println("EXCEPTION: " + e.getMessage()); e.printStackTrace(); } // Exit System.exit(0); } } wsil4j-1.0.0/samples/WSInspectionProxyExample.java000066400000000000000000000106521166574435000222150ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ import org.apache.wsil.*; import org.apache.wsil.client.*; import org.apache.wsil.util.*; import java.util.*; /** * This is an example of how to use the WSILProxy class * to read the contents of a WS-Inpsection document. * * @version: 1.0 * @author: Peter Brittenham */ public class WSInspectionProxyExample { /** * WSInspectionProxyExample. */ public WSInspectionProxyExample() { } /** * Use the WS-Inspection proxy to read a WS-Inspection document. * * @param args an array of command-line arguments */ public static void main(String[] args) { String wsinspectionURL; String serviceName; try { // If there is no input argument, then throw exception if (args.length < 2) { throw new IllegalArgumentException("Usage: WSInspectionProxyExample documentURL serviceName"); } // Get the location of the WS-Inspection document wsinspectionURL = args[0]; serviceName = args[1]; // Create a new instance of a WS-Inspection document proxy WSILProxy proxy = new WSILProxy(wsinspectionURL); // Get all of the WSDL documents using the input service name WSDLDocument[] wsdlDocuments = proxy.getWSDLDocumentByServiceName(serviceName); // Display purpose of list System.out.println("Display contents of WSDL service description documents for service name [" + serviceName + "]..."); // Process each WSDL document reference for (int wsdlCount = 0; wsdlCount < wsdlDocuments.length; wsdlCount++) { // Display contents of the document System.out.println("[" + wsdlCount + "] \n" + wsdlDocuments[wsdlCount].serializeToXML()); } } catch (Exception e) { // Display exception message System.out.println("EXCEPTION: " + e.getMessage()); e.printStackTrace(); } // Exit System.exit(0); } } wsil4j-1.0.0/samples/addressbook.wsdl000066400000000000000000000015201166574435000175740ustar00rootroot00000000000000 Address Book Service wsil4j-1.0.0/samples/inspection.wsil000066400000000000000000000017641166574435000174660ustar00rootroot00000000000000 A service with two descriptions that contain relative URLs StockQuoteService This is an example of an unknown extension element Link to another WSIL document wsil4j-1.0.0/samples/moreservices.wsil000066400000000000000000000007251166574435000200150ustar00rootroot00000000000000 Another WSDL service description AddressBookService wsil4j-1.0.0/samples/service-description.unknown000066400000000000000000000002151166574435000220030ustar00rootroot00000000000000 wsil4j-1.0.0/samples/stockquote.wsdl000066400000000000000000000014721166574435000175030ustar00rootroot00000000000000 Stock Quote Service wsil4j-1.0.0/src/000077500000000000000000000000001166574435000135265ustar00rootroot00000000000000wsil4j-1.0.0/src/org/000077500000000000000000000000001166574435000143155ustar00rootroot00000000000000wsil4j-1.0.0/src/org/apache/000077500000000000000000000000001166574435000155365ustar00rootroot00000000000000wsil4j-1.0.0/src/org/apache/wsil/000077500000000000000000000000001166574435000165145ustar00rootroot00000000000000wsil4j-1.0.0/src/org/apache/wsil/Abstract.java000066400000000000000000000056471166574435000211360ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil; /** * Abstract element in a WS-Inspection document. * * @version 1.0 * @author Peter Brittenham */ public interface Abstract extends WSILElementWithText { /** * Element name. */ public static final String ELEM_NAME = WSILConstants.ELEM_ABSTRACT; /** * QName. */ public static final QName QNAME = new QName(WSILConstants.NS_URI_WSIL, ELEM_NAME); } wsil4j-1.0.0/src/org/apache/wsil/Base64Converter.java000066400000000000000000000115121166574435000222730ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil; /** * Converts to Base 64. * */ class Base64Converter { /** * Constants for conversion. * */ public static final char alphabet[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/' }; /** * Creates a new Base64Converter instance. * */ Base64Converter() { } /** * Encodes the passed string to Base64. * * @param s a String value * @return a String value */ public static String encode(String s) { return encode(s.getBytes()); } public static String encode(byte octetString[]) { char out[] = new char[((octetString.length - 1) / 3 + 1) * 4]; int outIndex = 0; int i; for(i = 0; i + 3 <= octetString.length;) { int bits24 = (octetString[i++] & 0xff) << 16; bits24 |= (octetString[i++] & 0xff) << 8; bits24 |= (octetString[i++] & 0xff) << 0; int bits6 = (bits24 & 0xfc0000) >> 18; out[outIndex++] = alphabet[bits6]; bits6 = (bits24 & 0x3f000) >> 12; out[outIndex++] = alphabet[bits6]; bits6 = (bits24 & 0xfc0) >> 6; out[outIndex++] = alphabet[bits6]; bits6 = bits24 & 0x3f; out[outIndex++] = alphabet[bits6]; } if(octetString.length - i == 2) { int bits24 = (octetString[i] & 0xff) << 16; bits24 |= (octetString[i + 1] & 0xff) << 8; int bits6 = (bits24 & 0xfc0000) >> 18; out[outIndex++] = alphabet[bits6]; bits6 = (bits24 & 0x3f000) >> 12; out[outIndex++] = alphabet[bits6]; bits6 = (bits24 & 0xfc0) >> 6; out[outIndex++] = alphabet[bits6]; out[outIndex++] = '='; } else if(octetString.length - i == 1) { int bits24 = (octetString[i] & 0xff) << 16; int bits6 = (bits24 & 0xfc0000) >> 18; out[outIndex++] = alphabet[bits6]; bits6 = (bits24 & 0x3f000) >> 12; out[outIndex++] = alphabet[bits6]; out[outIndex++] = '='; out[outIndex++] = '='; } return new String(out); } } wsil4j-1.0.0/src/org/apache/wsil/Description.java000066400000000000000000000100761166574435000216460ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil; import org.apache.wsil.extension.*; /** * WS-Inspection description element. * * @version 1.0 * @author Peter Brittenham */ public interface Description extends WSILElementWithAbstract { /** * Element name. */ public static final String ELEM_NAME = WSILConstants.ELEM_DESCRIPTION; /** * QName. */ public static final QName QNAME = new QName(WSILConstants.NS_URI_WSIL, ELEM_NAME); /** * Set location for this description. * * @param location the location of the service description document */ public void setLocation(String location); /** * Get location for this description. * * @return Returns the location for the service description document. */ public String getLocation(); /** * Set referenced namespace for this description. * * @param namespace the namespace associated with the service description document */ public void setReferencedNamespace(String namespace); /** * Get referenced namespace for this description. * * @return Returns the namespace for the referenced service description document. */ public String getReferencedNamespace(); /** * Set extension element. * * @param extensionElement the extension element to set within the description element */ public void setExtensionElement(ExtensionElement extensionElement); /** * Get extension elment. * * @return Returns the extension element within the description element. */ public ExtensionElement getExtensionElement(); } wsil4j-1.0.0/src/org/apache/wsil/DocumentReader.java000066400000000000000000000061021166574435000222570ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil; import org.apache.wsil.*; import java.io.*; /** * An implementation of this interface is used to read and * parse a WS-Inspection document. * * @version 1.0 * @author Peter Brittenham */ public interface DocumentReader { /** * Parse the contents of a WSIL Document from a input reader. * * @param wsilDocument the WS-Inspection document * @param reader the input reader where the document can be read */ public void parseDocument(WSILDocument wsilDocument, Reader reader) throws WSILException; } wsil4j-1.0.0/src/org/apache/wsil/DocumentWriter.java000066400000000000000000000060711166574435000223360ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil; import org.apache.wsil.*; import java.io.*; /** * An implementation of this interface is used to write out the * contents of a WS-Inspection document. * * @version 1.0 * @author Peter Brittenham */ public interface DocumentWriter { /** * Write the contents of a WS-Inspection Document to an output writer. * * @param wsilDocument the WS-Inspection document * @param writer the output writer */ public void writeDocument(WSILDocument wsilDocument, Writer writer) throws WSILException; } wsil4j-1.0.0/src/org/apache/wsil/Inspection.java000066400000000000000000000112321166574435000214710ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil; /** * Inspection element within a WS-Inspection document. The inspection * element may contain a abstract, link or service element. * * @version 1.0 * @author Peter Brittenham */ public interface Inspection extends WSILElementWithAbstract { /** * Element name. */ public static final String ELEM_NAME = WSILConstants.ELEM_INSPECTION; /** * QName. */ public static final QName QNAME = new QName(WSILConstants.NS_URI_WSIL, ELEM_NAME); /** * Add link element. * * @param link the link element to add */ public void addLink(Link link); /** * Get link elements. * * @return Returns an array of link elements. */ public Link[] getLinks(); /** * Remove link element. * * @param link the link element to remove */ public void removeLink(Link link); /** * Add service element. * * @param service the service element to add */ public void addService(Service service); /** * Get service elements. * * @return Returns an array of service elements. */ public Service[] getServices(); /** * Remove service element. * * @param service the service element to remove */ public void removeService(Service service); /** * Get the target namespace in which the WSDL elements * are defined. * * @return the target namespace */ public String getTargetNamespace(); /** * Set the target namespace in which WSDL elements are defined. * * @param namespace the target namespace */ public void setTargetNamespace(String targetNamespace); /** * Add namespace. * * @param localName the local name part of the namespace * @param value the namespace value */ public void addNamespace(String localName, String value); /** * Get list of namespaces. * * @return Returns a list of all specified namespaces. */ public QName[] getNamespaces(); /** * Remove namespace. * * @param localName the local name part of the namespace * @param value the namespace value */ public void removeNamespace(String localName, String value); } wsil4j-1.0.0/src/org/apache/wsil/Link.java000066400000000000000000000077511166574435000202660ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil; import org.apache.wsil.extension.*; /** * Link element within a WS-Inspection document. * * @version 1.0 * @author Peter Brittenham */ public interface Link extends WSILElementWithAbstract { /** * Element name. */ public static final String ELEM_NAME = WSILConstants.ELEM_LINK; /** * QName. */ public static final QName QNAME = new QName(WSILConstants.NS_URI_WSIL, ELEM_NAME); /** * Set location for this link. * * @param location the location of the linked document */ public void setLocation(String location); /** * Get location for this link. * * @return Returns the location for the linked document. */ public String getLocation(); /** * Set referenced namespace for this link. * * @param namespace the namespace associated with the linked document */ public void setReferencedNamespace(String namespace); /** * Get referenced namespace for this link. * * @return Returns the namespace for the referenced service description document. */ public String getReferencedNamespace(); /** * Set extension element. * * @param extensionElement the extension element to set within the link element */ public void setExtensionElement(ExtensionElement extensionElement); /** * Get extension elment. * * @return Returns the extension element within the link element. */ public ExtensionElement getExtensionElement(); } wsil4j-1.0.0/src/org/apache/wsil/QName.java000066400000000000000000000113251166574435000203620ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil; import org.w3c.dom.*; /** * This class represents a qualified name, which has a local name * and a namespace URI. * * @version 1.0 * @author Peter Brittenham */ public class QName implements java.io.Serializable { /** * Namespace URI. */ protected String namespaceURI; /** * Local name. */ protected String localName; /** * Create a QName using a namespace URI and a local name. * * @param namespaceURI the namespace URI * @param localName the local name */ public QName(String namespaceURI, String localName) { this.namespaceURI = namespaceURI; this.localName = localName; } /** * Create a QName using the namespace URI and local name for a node. * * @param node the node element */ public QName(Node node) { this.namespaceURI = node.getNamespaceURI(); this.localName = node.getLocalName(); } /** * Get the namespace URI. * * @return Returns the namespace URI for the QName. */ public String getNamespaceURI() { return this.namespaceURI; } /** * Get the local name. * * @return Returns the local name part of the QName. */ public String getLocalName() { return this.localName; } /** * Determine if the input QName equals this QName. * @param qname the QName to compare * * @return Returns true if the QNames are equal. */ public boolean equals(QName qname) { // Return true if equal return (qname != null && this.namespaceURI.equals(qname.getNamespaceURI()) && this.localName.equals(qname.getLocalName())); } /** * Determine if the QName for the input Node equals this QName. * @param node the DOM node * * @return Returns true if the specified node was the same QName. */ public boolean equals(Node node) { // Return true if they are equal return (node != null && this.equals(new QName(node))); } /** * String representation of this object. * * @return Returns the string representation of this object. */ public String toString() { // Return string return "QName: namespaceURI=" + namespaceURI + ", localName=" + localName; } } wsil4j-1.0.0/src/org/apache/wsil/Service.java000066400000000000000000000075031166574435000207640ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil; /** * WS-Inspection service element. * * @version 1.0 * @author Peter Brittenham */ public interface Service extends WSILElementWithAbstract { /** * Element name. */ public static final String ELEM_NAME = WSILConstants.ELEM_SERVICE; /** * QName. */ public static final QName QNAME = new QName(WSILConstants.NS_URI_WSIL, ELEM_NAME); /** * Add a service name. * * @param serviceName the service name element to add */ public void addServiceName(ServiceName serviceName); /** * Get service names. * * @return Returns an array of service names. */ public ServiceName[] getServiceNames(); /** * Remove service name. * * @param serviceName the service name element to remove */ public void removeServiceName(ServiceName serviceName); /** * Add description element. * * @param description the description element to add */ public void addDescription(Description description); /** * Get description elements. * * @return Returns an array of descriptions. */ public Description[] getDescriptions(); /** * Remove description element. * * @param description the description element to remove */ public void removeDescription(Description description); } wsil4j-1.0.0/src/org/apache/wsil/ServiceName.java000066400000000000000000000056701166574435000215700ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil; /** * Service name element in a WS-Inspection document. * * @version 1.0 * @author Peter Brittenham */ public interface ServiceName extends WSILElementWithText { /** * Element name. */ public static final String ELEM_NAME = WSILConstants.ELEM_NAME; /** * QName. */ public static final QName QNAME = new QName(WSILConstants.NS_URI_WSIL, WSILConstants.ELEM_NAME); } wsil4j-1.0.0/src/org/apache/wsil/WSILConstants.java000066400000000000000000000114371166574435000220400ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil; /** * Constants used when processing WS-Inspection documents. * * version 1.0 * @author Peter Brittenham */ public interface WSILConstants { /** * XML declaration statement. */ public static final String XML_DECL = ""; /** * XML namespace URI. */ public static final String NS_URI_XMLNS = "http://www.w3.org/2000/xmlns/"; /** * XML schema namespace URI. */ public static final String NS_URI_XSD = "http://www.w3.org/2001/XMLSchema"; /** * XML schema namespace name. */ public static final String NS_XSD = "xsd"; /** * WSIL namespace URI. */ public static final String NS_URI_WSIL = "http://schemas.xmlsoap.org/ws/2001/10/inspection/"; /** * WSIL namespace name. */ public static final String NS_WSIL = "wsil"; /** * Default language for abstract and name elements. */ public static final String DEF_LANG = "en-US"; /** * Inspection element name. */ public static final String ELEM_INSPECTION = "inspection"; /** * Service element name. */ public static final String ELEM_SERVICE = "service"; /** * Service name element name. */ public static final String ELEM_NAME = "name"; /** * Description element name. */ public static final String ELEM_DESCRIPTION = "description"; /** * Import element name. */ public static final String ELEM_LINK = "link"; /** * Abstract element name. */ public static final String ELEM_ABSTRACT = "abstract"; /** * XML namespace attribute name. */ public static final String ATTR_XMLNS = "xmlns"; /** * XML lang namespace. */ public static final String ATTR_XML_NS = "xml"; /** * XML lang attribute. */ public static final String ATTR_XML_LANG = "lang"; /** * Target namespace attribute name. */ public static final String ATTR_TARGET_NAMESPACE = "targetNamespace"; /** * Referenced namespace attribute name. */ public static final String ATTR_REF_NAMESPACE = "referencedNamespace"; /** * Location attribute name. */ public static final String ATTR_LOCATION = "location"; /** * EndpointPresent attribute name. */ public static final String ATTR_ENDPOINT_PRESENT = "endpointPresent"; } wsil4j-1.0.0/src/org/apache/wsil/WSILDocument.java000066400000000000000000000265531166574435000216470ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil; import org.apache.wsil.util.*; import org.apache.wsil.xml.*; import org.apache.wsil.extension.*; import java.net.*; import java.io.*; /** * Instance of a WS-Inspection document. * * @version 1.0 * @author Peter Brittenham */ public abstract class WSILDocument { /** * Set default document reader. */ protected DocumentReader docReader = new XMLReader(); /** * Set default document writer. */ protected DocumentWriter docWriter = new XMLWriter(); /** * WS-Inspection extension registry. */ protected ExtensionRegistry extRegistry = null; /** * Inspection element. */ protected Inspection inspection = null; /** * WSIL document URL. * NOTE: This field will not be set when the document is read from a Reader. */ protected String documentURL = null; /** * Create abstract element. * * @return Returns an abstract object. */ public abstract Abstract createAbstract(); /** * Create description element. * * @return Returns a description object. */ public abstract Description createDescription(); /** * Create link element. * * @return Returns a link object. */ public abstract Link createLink(); /** * Create service element. * * @return Returns a service object. */ public abstract Service createService(); /** * Create service name element. * * @return Returns a serviceName object. */ public abstract ServiceName createServiceName(); /** * Get the WS-Inspection extension registry implementation. * * @param Returns a reference to the extension registry. */ public ExtensionRegistry getExtensionRegistry() { // Return WS-Inspection extension registry return this.extRegistry; } /** * Get the inspection element for this document. * * @return Returns a reference to the inspection element. */ public Inspection getInspection() { // Return inspection element return inspection; } /** * Get the WS-Inspection reader implementation. * * @return Returns the document reader. */ public DocumentReader getReader() { // Return WS-Inspection reader return this.docReader; } /** * Get the WS-Inspection writer implementation. * * @return Returns the document writer. */ public DocumentWriter getWriter() { // Return WS-Inspection writer return this.docWriter; } /** * Read a WS-Inspection document and display its contents. * * @param args command line arguments */ public static void main(String[] args) { String filename = null; if (args.length == 0) { System.out.println("Usage: WSILDocument "); } else { try { filename = args[0]; // Display message System.out.println("Reading WS-Inspection document [" + filename + "]..."); // Get an new instance of a WS-Inspection document WSILDocument wsilDocument = newInstance(); // Read WS-Inspection document wsilDocument.read(filename); // Display contents of document System.out.println(wsilDocument.toString()); } catch (Exception e) { // Display exception System.out.println("EXCEPTION: Could not process WS-Inspection document [" + filename + "]."); e.printStackTrace(); } } // Exit System.exit(0); } /* * Create a new instance of a WS-Inspection document. * * @return Returns a new instance of a WS-Inspection document. */ public static WSILDocument newInstance() throws WSILException { WSILDocument wsilDocument = null; // Get the WS-Inspection document factory WSILDocumentFactory factory = WSILDocumentFactory.newInstance(); // Create new WS-Inspection document instance wsilDocument = factory.newDocument(); // Return document return wsilDocument; } /** * Read the WS-Inspection document from a input reader. * * @param reader the input reader */ public void read(Reader reader) throws WSILException { // Read WS-Inspection document docReader.parseDocument(this, reader); } /** * Read the WS-Inspection document from a file URL string. * * @param urlString the file URL string for the WS-Inspection document */ public void read(String urlString) throws WSILException { try { // Read the WSIL document read(new URL(urlString)); } catch (Exception e) { // Throw exception throw new WSILException("Could not read WS-Inspection file URL string: " + urlString + ".", e); } } /** * Read the WS-Inspection document from a location specified using a URL. * * @param url location of the document */ public void read(URL url) throws WSILException { try { InputStream is; // Save the URL passed documentURL = url.toString(); // Get proxy userName and password String proxyUserName = System.getProperty("http.proxyUserName"); String proxyPassword = System.getProperty("http.proxyPassword"); if (proxyUserName != null && proxyPassword != null) { // Handle authenticating proxies String userPassword = proxyUserName + ":" + proxyPassword; // Encode userid and password String encoding = Base64Converter.encode(userPassword); // Open connection and set encoding property URLConnection uc = url.openConnection(); uc.setRequestProperty("Proxy-authorization", "Basic " + encoding); // Get input stream is = uc.getInputStream(); } else // Open input stream is = (InputStream) url.openStream(); // Read the WS-Inspection document read(new InputStreamReader(is)); } catch (Exception e) { // Throw exception throw new WSILException("Could not read WS-Inspection document from: " + url.toString(), e); } } /** * Set the WS-Inspection extension registry implementation. * * @param extRegistry the extension registry implementation */ public void setExtensionRegistry(ExtensionRegistry extRegistry) throws WSILException { // Save reference to WS-Inspection extension registry if (this.extRegistry == null) this.extRegistry = extRegistry; else { // Throw exception throw new WSILException("ExtensionRegistry is already set in WSILDocument."); } } /** * Set the WS-Inspection reader implementation. * * @param docReader the WS-Inpsection document reader */ public void setReader(DocumentReader docReader) { // Save reference to WS-Inspection reader this.docReader = docReader; } /** * Set the WS-Inspection writer implementation. * * @param docWriter the WS-Inpsection document writer */ public void setWriter(DocumentWriter docWriter) { // Save reference to WS-Inspection writer this.docWriter = docWriter; } /** * Return string representation of this object. * * @return Returns the string representation of this object. */ public String toString() { // Return string return "WS-Inspection Document: \n" + inspection.toString(); } /** * Write the WS-Inpsection document to an output writer. * * @param writer the output writer */ public void write(Writer writer) throws WSILException { // Write WS-Inspection document docWriter.writeDocument(this, writer); } /** * Write the WS-Inspection document to an output file. * * @param filename the filename for the WS-Inspection document */ public void write(String filename) throws WSILException { try { // Create file writer and then write output write(new FileWriter(filename)); } catch (IOException ioe) { // Throw exception throw new WSILException("Could not write to " + filename + ".", ioe); } } /** * This method is used to resolve a relative URL into a full URL. * * @param relativeURL the relative URL value * @return Returns the full URL. */ public String resolveURL(String relativeURL) { String resolvedURL = relativeURL; // If the relative URL is not a full URL (example: http://...) if ((documentURL != null) && (relativeURL != null) && (relativeURL.indexOf("://") == -1)) { // Find location of last "/" in document URL int index = documentURL.lastIndexOf('/'); // Create resolved URL resolvedURL = documentURL.substring(0, index+1) + relativeURL; } return resolvedURL; } /** * Set the location for the WS-Inspection document. * * @param documentURL the document URL */ public void setDocumentURL(String documentURL) { this.documentURL = documentURL; } } wsil4j-1.0.0/src/org/apache/wsil/WSILDocumentFactory.java000066400000000000000000000077031166574435000231730ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil; import org.apache.wsil.util.*; import java.util.*; /** * This class is used to access an implementation of a WSILDocument abstract class. * * @version 1.0 * @author Peter Brittenham */ public abstract class WSILDocumentFactory { /** * Create a new instance of a WS-Inspection document. * * @return Returns an object that implements the WSILDocument interface. */ public abstract WSILDocument newDocument() throws WSILException; /** * Instantiate the implementation of the WSILDocumentFactory class. * The implementation class for this interface is specified in the following * Java system property: *
    *
  • wsil.document.factory *
* * @return */ public static WSILDocumentFactory newInstance() throws WSILException { WSILDocumentFactory docFactory = null; String factoryClassName = null; try { // Get factory class name factoryClassName = WSILProperties.getDocumentFactory(); // Create the factory class Class factoryClass = Class.forName(factoryClassName); // Instantiate the factory docFactory = (WSILDocumentFactory) factoryClass.newInstance(); } catch (Exception e) { throw new WSILException("Could not instantiate document factory class: " + factoryClassName + ".", e); } // Return factory return docFactory; } } wsil4j-1.0.0/src/org/apache/wsil/WSILElement.java000066400000000000000000000055151166574435000214550ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil; /** * Common WSIL element definition. */ public interface WSILElement extends java.io.Serializable { /** * Display contents of the WSIL element as an XML string. * * @return Returns the XML string format of this element. */ public String toXMLString(); } wsil4j-1.0.0/src/org/apache/wsil/WSILElementWithAbstract.java000066400000000000000000000063631166574435000237770ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil; /** * Common WS-Inpsection element definition for elements that contain an abstract element. */ public interface WSILElementWithAbstract extends WSILElement { /** * Add one abstract to this element. * * @param abs the abstract to add */ public void addAbstract(Abstract abs); /** * Add abstracts to this element. * * @param abstracts the array of abstracts to add */ public void addAbstracts(Abstract[] abstracts); /** * Remove all abstracts from this element. */ public void removeAbstracts(); /** * Get all abstracts for this element. * * @return Returns all abstracts for this element. */ public Abstract[] getAbstracts(); } wsil4j-1.0.0/src/org/apache/wsil/WSILElementWithText.java000066400000000000000000000065531166574435000231610ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil; /** * A WS-Inspection element that can contain a text value. The text value * can be associated with a language setting. * * @version 1.0 * @author Peter Brittenham */ public interface WSILElementWithText extends WSILElement { /** * Get the language attribute for the abstract. * * @return Returns the language type for this abstract. */ public String getLang(); /** * Get the abstract text string. * * @return Returns the abstract as a text string. */ public String getText(); /** * Set the language attribute for the abstract. * * @param the language type for this abstract. */ public void setLang(String lang); /** * Set the documentation text string. * * @param text the documentation text string */ public void setText(String text); } wsil4j-1.0.0/src/org/apache/wsil/WSILException.java000066400000000000000000000120221166574435000220110ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil; import java.util.MissingResourceException; import java.lang.reflect.InvocationTargetException; /** * Primary WS-Inpsection exception. * * @version 1.0 * @author Peter Brittenham */ public class WSILException extends Exception { /** * Throwable. */ protected Throwable throwable = null; /** * Create an exception without a message. */ public WSILException() { // Exception super(); } /** * Create an exception with a message. * * @param msg the exception message */ public WSILException(String msg) { // Exception super(msg); } /** * Create an exception with a message and related exception. * * @param msg the exception message * @param throwable throwable that is related to this exception */ public WSILException(String msg, Throwable throwable) { // Exception super(msg); // Save input reference this.throwable = throwable; } /** * Returns the String representation of this object's values. * * @return Returns the detail message of this throwable object. */ public String getMessage() { // Always get message from super class String msg = super.getMessage(); // If this exception contains a reference to another exception, // then add it to the message if (throwable != null) { msg += "\n" + "------------------------------------------------------------------------------\n" + " Nested exception is: \n\n " + throwable.toString() + "\n"; // If throwable is MissingResourceException, // then add class name and key to output if (throwable instanceof MissingResourceException) { MissingResourceException mre = (MissingResourceException) throwable; // Get class name and key msg += " - " + mre.getKey() + "\n\t" + "[Class Name: " + mre.getClassName() + "]"; } // If throwable is InvocationTargetException, // then target of exception else if (throwable instanceof InvocationTargetException) { InvocationTargetException ite = (InvocationTargetException) throwable; // Get target msg += " - " + ite.getTargetException().toString(); } } // Return message return msg; } /** * Returns the exception that caused this exception to be created. * * @return Returns the encapsulated throwable object. */ public Throwable getTargetException() { // Return throwable return throwable; } } wsil4j-1.0.0/src/org/apache/wsil/client/000077500000000000000000000000001166574435000177725ustar00rootroot00000000000000wsil4j-1.0.0/src/org/apache/wsil/client/WSILProxy.java000066400000000000000000000551601166574435000224640ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.client; import org.apache.wsil.*; import org.apache.wsil.util.*; import org.apache.wsil.Service; import org.apache.wsil.extension.*; import org.apache.wsil.extension.wsdl.*; import org.apache.wsil.extension.uddi.*; import org.apache.wsil.WSILDocument; import org.apache.wsil.util.WSILDocBuilder; import org.apache.wsil.util.WSDLDocument; import com.ibm.wsdl.util.xml.DOM2Writer; import org.uddi4j.*; import org.uddi4j.datatype.service.*; import org.uddi4j.util.*; import org.uddi4j.transport.*; import org.uddi4j.client.*; import org.uddi4j.response.*; import org.w3c.dom.Element; import javax.wsdl.*; import java.io.*; import java.util.*; import java.net.*; /** * This class gives access to an inspection.wsil document and its * contents. This information can be use to find, deploy and bind services. * * @version 1.0 * @author Alfredo da Silva */ public class WSILProxy { /** * WSIL inspection document reference. */ private WSILDocument wsilDocument = null; /** * WSIL inspection document vector */ private Vector wsilDocVector = new Vector(); /** * Creates a new WSILProxy instance. * * @exception WSILException if an error occurs */ public WSILProxy() throws WSILException { // WSIL Document URL String wsilDocumentURL = Util.formatURL(WSILProperties.WSIL_HOSTNAME, WSILProperties.WSIL_PORT, WSILProperties.WSIL_DOCUMENT_NAME); init(wsilDocumentURL); } /** * Creates a new WSILProxy instance. * * @param wsilDocumentURL an URL value * @exception WSILException if an error occurs */ public WSILProxy(String wsilDocumentURL) throws WSILException { init(wsilDocumentURL); } /** * Creates a new WSILProxy instance. * * @param inspectionElement an Element value * @exception WSILException if an error occurs */ public WSILProxy(Element inspectionElement) throws WSILException { try { // Create a StringWriter StringWriter swriter = new StringWriter(); // Serialize the XML to the string writer DOM2Writer.serializeAsXML(inspectionElement, swriter); // Create a StringReader StringReader sreader = new StringReader(swriter.toString()); // Create new WSIL document instance wsilDocument = WSILDocument.newInstance(); wsilDocument.read(sreader); // Add wsilDocument to wsilDocVector wsilDocVector.add(wsilDocument); } catch (Exception e) { throw new WSILException("Invalid inspection element", e); } } /** * Creates a new WSIL document. * * @param wsilDocumentURL an URL value * @exception WSILException if an error occurs */ private void init(String wsilDocumentURL) throws WSILException { // Create new WSIL document instance wsilDocument = WSILDocument.newInstance(); // Read the contents of the WSIL document try { URL inURL = new URL(wsilDocumentURL); wsilDocument.read(inURL); // Add wsilDocument to wsilDocVector wsilDocVector.add(wsilDocument); } catch (MalformedURLException e) { throw new WSILException("Invalid inspection.wsil document URL", e); } } /** * Returns a WSIL document. * * @return a WSILDocument value. */ public WSILDocument getWSILDocument() { return wsilDocument; } /** * Returns an array of WSDLDocuments given a service name. * * @param serviceName a String value * @return a WSDLDocument[] value or null if no documents * were found. * @exception WSILException if an error occurs */ public WSDLDocument[] getWSDLDocumentByServiceName(String serviceName) throws WSILException { WSDLDocument[] wsdlDocArray = null; // Get WSDL location array String[] wsdlDocLocationArray = getWSDLDocumentLocations(serviceName); if (wsdlDocLocationArray != null) { wsdlDocArray = new WSDLDocument[wsdlDocLocationArray.length]; for (int i = 0; i < wsdlDocLocationArray.length; i++) { // Read WSDL document wsdlDocArray[i] = readWSDLDocument(wsdlDocLocationArray[i]); } } return wsdlDocArray; } /** * Returns an array of WSDLDocuments given a name. * * @param wsdlDocName a String value * @return a WSDLDocument value or null if no documents were * found. * @exception WSILException if an error occurs */ public WSDLDocument[] getWSDLDocumentByName(String wsdlDocName) throws WSILException { WSDLDocument[] wsdlDocArray = null; Vector wsdlDocVector = new Vector(); // Process links handleLinks(this.wsilDocument); for (int k = 0; k < wsilDocVector.size(); k++) { WSILDocument currentWSILDoc = (WSILDocument)wsilDocVector.elementAt(k); Service[] serviceArray = currentWSILDoc.getInspection().getServices(); String wsdlDocLocation = null; for (int i = 0; i < serviceArray.length; i++) { Description[] descriptionArray = serviceArray[i].getDescriptions(); for (int j = 0; j < descriptionArray.length; j++) { wsdlDocLocation = descriptionArray[j].getLocation(); if (wsdlDocLocation != null && wsdlDocLocation.indexOf(wsdlDocName) != -1) { // Read WSDL document wsdlDocVector.add(readWSDLDocument(currentWSILDoc.resolveURL(wsdlDocLocation))); } } } } // Create wsdlDocArray if (wsdlDocVector.size() != 0) { wsdlDocArray = new WSDLDocument[wsdlDocVector.size()]; wsdlDocVector.copyInto(wsdlDocArray); } return wsdlDocArray; } /** * Returns an array of WSDLDocuments given a binding name. * * @param bindingName a QName value * @return a WSDLDocument value or null if no documents were * found. * @exception WSILException if an error occurs */ public WSDLDocument[] getWSDLDocumentByBinding(org.apache.wsil.QName bindingName) throws WSILException { WSDLDocument[] wsdlDocArray = null; Vector wsdlDocVector = new Vector(); // Process links handleLinks(this.wsilDocument); for (int l = 0; l < wsilDocVector.size(); l++) { WSILDocument currentWSILDoc = (WSILDocument)wsilDocVector.elementAt(l); Service[] serviceArray = currentWSILDoc.getInspection().getServices(); String wsdlDocLocation = null; for (int i = 0; i < serviceArray.length; i++) { Description[] descriptionArray = serviceArray[i].getDescriptions(); for (int j = 0; j < descriptionArray.length; j++) { Reference reference = (Reference)descriptionArray[j].getExtensionElement(); if (reference != null) { ImplementedBinding[] implementedBindingArray = reference.getImplementedBindings(); for (int k = 0; k < implementedBindingArray.length; k++) { org.apache.wsil.QName tmpQName = implementedBindingArray[k].getBindingName(); if (tmpQName.equals(bindingName)) { // Read WSDL document wsdlDocVector.add(readWSDLDocument(currentWSILDoc.resolveURL(descriptionArray[j].getLocation()))); } } } } } } // Create wsdlDocArray if (wsdlDocVector.size() != 0) { wsdlDocArray = new WSDLDocument[wsdlDocVector.size()]; wsdlDocVector.copyInto(wsdlDocArray); } return wsdlDocArray; } /** * Returns an array of WSDLDocuments given a portType name. * * @param portTypeName a QName value * @return a WSDLDocument value or null if no documents were * found. * @exception WSILException if an error occurs */ public WSDLDocument[] getWSDLDocumentByPortType(org.apache.wsil.QName portTypeName) throws WSILException { WSDLDocument[] wsdlDocArray = null; Vector wsdlDocVector = new Vector(); // Process links handleLinks(this.wsilDocument); for (int l = 0; l < wsilDocVector.size(); l++) { WSILDocument currentWSILDoc = (WSILDocument)wsilDocVector.elementAt(l); Service[] serviceArray = currentWSILDoc.getInspection().getServices(); String wsdlDocLocation = null; for (int i = 0; i < serviceArray.length; i++) { Description[] descriptionArray = serviceArray[i].getDescriptions(); for (int j = 0; j < descriptionArray.length; j++) { Description description = descriptionArray[j]; Reference reference = (Reference)description.getExtensionElement(); if (reference != null) { ImplementedBinding[] implementedBindingArray = reference.getImplementedBindings(); WSDLDocument definition = null; try { definition = readWSDLDocument( currentWSILDoc.resolveURL( description.getLocation())); } catch (Exception e) {} if (definition != null) { for (int k = 0; k < implementedBindingArray.length; k++) { if (!wsdlDocVector.contains(definition)) { org.apache.wsil.QName tmpQName = implementedBindingArray[k].getBindingName(); javax.xml.namespace.QName nqname = new javax.xml.namespace.QName( tmpQName.getNamespaceURI(), tmpQName.getLocalName()); Binding binding = definition.getDefinitions().getBinding(nqname); if (binding != null) { PortType portType = binding.getPortType(); if (portType != null) { if (portType.getQName().getLocalPart().equals(portTypeName.getLocalName()) && portType.getQName().getNamespaceURI().equals(portTypeName.getNamespaceURI())) { wsdlDocVector.add(definition); } } } } } } } } } } // Create wsdlDocArray if (wsdlDocVector.size() != 0) { wsdlDocArray = new WSDLDocument[wsdlDocVector.size()]; wsdlDocVector.copyInto(wsdlDocArray); } return wsdlDocArray; } /** * Returns an array of BusinessServices given a service name. * * @param serviceName a String value * @return a BusinessService value or null if no elements were * found. * @exception WSILException if an error occurs */ public BusinessService[] getBusinessServiceByServiceName(String serviceName) throws WSILException { Vector businessServiceVector = new Vector(); BusinessService[] businessServiceArray = null; // Process links handleLinks(this.wsilDocument); for (int l = 0; l < wsilDocVector.size(); l++) { WSILDocument currentWSILDoc = (WSILDocument)wsilDocVector.elementAt(l); Service[] serviceArray = currentWSILDoc.getInspection().getServices(); // Get services for (int i = 0; i < serviceArray.length; i++) { if (serviceArray[i].getServiceNames()[0].getText().equals(serviceName)) { Description[] descriptionArray = serviceArray[i].getDescriptions(); for (int j = 0; j < descriptionArray.length; j++) { ServiceDescription serviceDescription = (ServiceDescription)descriptionArray[j].getExtensionElement(); if (serviceDescription != null) { String location = serviceDescription.getLocation(); ServiceKey serviceKey = serviceDescription.getServiceKey(); try { Properties p = new Properties(); // Set SOAP transport p.setProperty(TransportFactory.PROPERTY_NAME, WSILProperties.TRANSPORT_CLASS); // Set inquiry URL p.setProperty("org.uddi4j.inquiryURL", new URL(location).toString()); // Create UDDIProxy object UDDIProxy up = new UDDIProxy(p); // Get ServiceDetail object ServiceDetail serviceDetail = up.get_serviceDetail(serviceKey.getText()); Vector bServiceVector = serviceDetail.getBusinessServiceVector(); if (bServiceVector.size() > 0) { BusinessService businessService = (BusinessService)bServiceVector.firstElement(); businessServiceVector.add((businessService)); } } catch (MalformedURLException e) { throw new WSILException("Problems connecting to registry", e); } catch (UDDIException e) { throw new WSILException("Unable to find service " + serviceName, e); } catch (TransportException e) { throw new WSILException("SOAP transport problems", e); } } } } } } // Create businessServiceArray if (businessServiceVector.size() != 0) { businessServiceArray= new BusinessService[businessServiceVector.size()]; businessServiceVector.copyInto(businessServiceArray); } return businessServiceArray; } /** * Print the internal WSIL document. * * @param out an OutputStream value * @exception WSILException if an error occurs */ public void print(OutputStream out) throws WSILException { wsilDocument.write(new PrintWriter(out)); } /** * Returns the an array of WSDL document locations given a service name. * * @param serviceName a String value * @return a String[] value or null if no locations were found. */ public String[] getWSDLDocumentLocations(String serviceName) throws WSILException { String[] wsdlDocLocationArray = null; Vector wsdlDocLocationVector = new Vector(); // Process links handleLinks(this.wsilDocument); for (int l = 0; l < wsilDocVector.size(); l++) { WSILDocument currentWSILDoc = (WSILDocument)wsilDocVector.elementAt(l); // Get service array Service[] serviceArray = currentWSILDoc.getInspection().getServices(); for (int i = 0; i < serviceArray.length; i++) { ServiceName[] serviceNameArray = serviceArray[i].getServiceNames(); // Search for service name passed for (int j = 0; j < serviceNameArray.length; j++) { if (serviceNameArray[j].getText().equals(serviceName)) { Description[] descriptionArray = serviceArray[i].getDescriptions(); String currentLocation = null; for (int k = 0; k < descriptionArray.length; k++) { String location = descriptionArray[k].getLocation(); // Avoid duplicates if (currentLocation != null && currentLocation.equals(location)) continue; // Add to vector only if this is a WSDL service description if (descriptionArray[k].getReferencedNamespace().equals(WSDLConstants.NS_URI_WSDL)) { currentLocation = location; wsdlDocLocationVector.add(currentWSILDoc.resolveURL(location)); } } } } } } // Create wsdlDocLocationArray if (wsdlDocLocationVector.size() != 0) { wsdlDocLocationArray = new String[wsdlDocLocationVector.size()]; wsdlDocLocationVector.copyInto(wsdlDocLocationArray); } return wsdlDocLocationArray; } /** * Reads a WSDLDocument given a location. * * @param wsdlDocLocation a String value * @return a WSDLDocument value or null if the document could * not be read. * @exception WSILException if an error occurs */ private WSDLDocument readWSDLDocument(String wsdlDocLocation) throws WSILException { WSDLDocument wsdlDoc = null; // Read the contents of the WSDL document try { wsdlDoc = new WSDLDocument(new URL(wsdlDocLocation)); } catch (MalformedURLException e) { throw new WSILException("Invalid WSDL document URL", e); } catch (WSDLException e) { throw new WSILException("Problems creating WSDL document", e); } return wsdlDoc; } /** * Traverse all link objects and fill wsilDocArray. * * @param wsilDocument a WSILDocument value * @exception WSILException if an error occurs */ private void handleLinks(WSILDocument wsilDocument) throws WSILException { // Get Link Link[] linkArray = wsilDocument.getInspection().getLinks(); for (int i = 0; i < linkArray.length; i++) { String linkNamespace = linkArray[i].getReferencedNamespace(); String linkLocation = wsilDocument.resolveURL(linkArray[i].getLocation()); ExtensionElement linkExtensionElem = linkArray[i].getExtensionElement(); if (linkNamespace.equals(WSILConstants.NS_URI_WSIL)) { // Create new WSIL document instance WSILDocument wsilDoc = WSILDocument.newInstance(); // Read wsil document try { URL inURL = new URL(linkLocation); wsilDoc.read(inURL); } catch (MalformedURLException e) { throw new WSILException("Invalid wsil document URL", e); } // Add it to the WSIL document vector wsilDocVector.add(wsilDoc); // Get all the links handleLinks(wsilDoc); } else { if ((linkNamespace.equals(UDDIConstants.NS_URI_UDDI)) || (linkNamespace.equals(UDDIConstants.NS_URI_UDDI_V2))) { // Get BusinessDescription BusinessDescription businessDescription = (BusinessDescription)linkArray[i].getExtensionElement(); if (businessDescription != null) { String location = businessDescription.getLocation(); String businessKey = businessDescription.getBusinessKey().getText(); try { WSILDocBuilder wsilDocBuilder = new WSILDocBuilder(new URL(location), businessKey); // Add it to the WSIL document vector wsilDocVector.add(wsilDocBuilder.getWSILDocument()); } catch (MalformedURLException e) { throw new WSILException("Problems creating WSIL document", e); } } } else { throw new WSILException("Invalid wsil link namespace: " +linkNamespace); } } } } /** * Displays the contents of the default WS-Inspection document * or the specified document. * * @param args an array of command-line arguments */ public static void main(String[] args) { WSILProxy proxy; String serviceName; Vector wsdlList = new Vector(); try { // If there is no input argument, then throw exception if ((args.length > 0) && (args[0].equals("-?"))) { throw new IllegalArgumentException("Usage: WSILProxy "); } // Create a new instance of a WS-Inspection proxy proxy = (args.length == 0) ? new WSILProxy() : new WSILProxy(args[0]); // Get the WSIL document and display the contents System.out.println(proxy.getWSILDocument().toString()); } catch (Exception e) { // Display exception message System.out.println("EXCEPTION: " + e.getMessage()); e.printStackTrace(); } // Exit System.exit(0); } } wsil4j-1.0.0/src/org/apache/wsil/extension/000077500000000000000000000000001166574435000205305ustar00rootroot00000000000000wsil4j-1.0.0/src/org/apache/wsil/extension/ExtensionBuilder.java000066400000000000000000000055011166574435000246570ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.extension; import org.apache.wsil.*; /** * This class will ... * @version 1.0 * @author: Peter Brittenham */ public interface ExtensionBuilder { /** * Create extension element. */ public ExtensionElement createElement(QName qname) throws WSILException; } wsil4j-1.0.0/src/org/apache/wsil/extension/ExtensionElement.java000066400000000000000000000054451166574435000246710ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.extension; import org.apache.wsil.*; /** * This class will ... * @version 1.0 * @author: Peter Brittenham */ public interface ExtensionElement extends WSILElement { /** * Get extension element qname. */ public QName getQName(); } wsil4j-1.0.0/src/org/apache/wsil/extension/ExtensionReader.java000066400000000000000000000056431166574435000245020ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.extension; import org.apache.wsil.*; import org.w3c.dom.*; /** * This is the interface definition for an extension element reader. * * @version 1.0 * @author: Peter Brittenham */ public interface ExtensionReader { /** * Parse extension element. */ public ExtensionElement parseElement(Element element, WSILElement wsilElement) throws WSILException; } wsil4j-1.0.0/src/org/apache/wsil/extension/ExtensionRegistry.java000066400000000000000000000103411166574435000250770ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.extension; import java.util.*; /** * This class is the base class for all extension registry implementations. * * @version 1.0 * @author: Peter Brittenham */ public abstract class ExtensionRegistry { /** * List of extension readers. */ protected Map readers = new HashMap(); /** * List of extension writers. */ protected Map writers = new HashMap(); /** * List of extension builders. */ protected Map builders = new HashMap(); /** * Add an extension reader for a specific namespace. */ public void addReader(String namespace, ExtensionReader reader) { // Add reader readers.put(namespace, reader); } /** * Get an extension reader for a specific namespace. */ public ExtensionReader getReader(String namespace) { // Return reader return (ExtensionReader) readers.get(namespace); } /** * Add an extension writer for a specific namespace. */ public void addWriter(String namespace, ExtensionWriter writer) { // Add writer writers.put(namespace, writer); } /** * Get an extension writer for a specific namespace. */ public ExtensionWriter getWriter(String namespace) { // Return writer return (ExtensionWriter) writers.get(namespace); } /** * Add an extension builder for a specific namespace. */ public void addBuilder(String namespace, ExtensionBuilder builder) { // Add builder builders.put(namespace, builder); } /** * Get an extension builder for a specific namespace. */ public ExtensionBuilder getBuilder(String namespace) { // Return builder return (ExtensionBuilder) builders.get(namespace); } } wsil4j-1.0.0/src/org/apache/wsil/extension/ExtensionWriter.java000066400000000000000000000057531166574435000245560ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.extension; import java.io.*; /** * This class will write out the extension element. * * @version 1.0 * @author: Peter Brittenham */ public interface ExtensionWriter { /** * Write extension element. * * @param extElement the extension element * @param writer the writer that will be used to write out the extention element */ public void writeElement(ExtensionElement extElement, Writer writer) throws IOException; } wsil4j-1.0.0/src/org/apache/wsil/extension/UnknownExtensionElement.java000066400000000000000000000105171166574435000262450ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.extension; import org.apache.wsil.*; import com.ibm.wsdl.util.xml.DOM2Writer; import org.w3c.dom.Element; import java.io.*; /** * This class is used to represent an unknown extension element. * * @version 1.0 * @author: Peter Brittenham */ public class UnknownExtensionElement implements ExtensionElement { /** * QName for the unknown extension element. */ protected QName qname = null; /** * Unknown extension element. */ protected Element element = null; /** * Create an uknown extension element. * * @param qname the element type for this element * @param element the unknown extension element */ public UnknownExtensionElement(QName qname, Element element) { this.qname = qname; this.element = element; } /** * Get the language attribute for the abstract. * * @return Returns the element type for this element. */ public QName getQName() { return qname; } /** * Get the Element for this extension element. * * @return the unknown element that was encountered */ public Element getElement() { return element; } /** * XML String representation of this object. */ public String toXMLString() { String xmlString = ""; try { // Create a StringWriter StringWriter swriter = new StringWriter(); // Serialize the XML to the string writer DOM2Writer.serializeAsXML(element, swriter); // Get XML string xmlString = swriter.toString(); } catch (Exception e) { // ADD: How should this exception be handled? // For now, just print stack trace System.out.println("Exception in UnknownExtensionElement.toXMLString:"); e.printStackTrace(); } // Return string return xmlString; } } wsil4j-1.0.0/src/org/apache/wsil/extension/uddi/000077500000000000000000000000001166574435000214555ustar00rootroot00000000000000wsil4j-1.0.0/src/org/apache/wsil/extension/uddi/BusinessDescription.java000066400000000000000000000120161166574435000263170ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.extension.uddi; import org.apache.wsil.*; import org.apache.wsil.extension.*; import org.uddi4j.util.*; /** * UDDI extension element for WSIL document - businessDescription element. * * @version: 1.0 * @author: Alfredo da Silva */ public interface BusinessDescription extends ExtensionElement { /** * Element name. */ public static final String ELEM_NAME = UDDIConstants.ELEM_BUSINESS_DESCRIPTION; /** * BusinessKey Element name. */ public static final String BUSINESS_KEY_ELEM_NAME = UDDIConstants.ELEM_BUSINESS_KEY; /** * DiscoveryURL Element name. */ public static final String DISCOVERY_URL_ELEM_NAME = UDDIConstants.ELEM_DISCOVERY_URL; /** * QName. */ public static final QName QNAME = new QName(UDDIConstants.NS_URI_WSIL_UDDI, ELEM_NAME); /** * QName for UDDI V2. */ public static final QName QNAME_V2 = new QName(UDDIConstants.NS_URI_WSIL_UDDI_V2, ELEM_NAME); /** * BusinessKey QName. */ public static final QName BUSINESS_KEY_QNAME = new QName(UDDIConstants.NS_URI_WSIL_UDDI, BUSINESS_KEY_ELEM_NAME); /** * BusinessKey QName for UDDI V2. */ public static final QName BUSINESS_KEY_QNAME_V2 = new QName(UDDIConstants.NS_URI_WSIL_UDDI_V2, BUSINESS_KEY_ELEM_NAME); /** * DiscoveryURL QName. */ public static final QName DISCOVERY_URL_QNAME = new QName(UDDIConstants.NS_URI_WSIL_UDDI, DISCOVERY_URL_ELEM_NAME); /** * DiscoveryURL QName for UDDI V2. */ public static final QName DISCOVERY_URL_QNAME_V2 = new QName(UDDIConstants.NS_URI_WSIL_UDDI_V2, DISCOVERY_URL_ELEM_NAME); /** * Create business key. */ public BusinessKey createBusinessKey(); /** * Set business key. */ public void setBusinessKey(BusinessKey businessKey); /** * Get business key. */ public BusinessKey getBusinessKey(); /** * Create discoveryURL */ public DiscoveryURL createDiscoveryURL(); /** * Set discoveryURL */ public void setDiscoveryURL(DiscoveryURL discoveryURL); /** * Get discoveryURL */ public DiscoveryURL getDiscoveryURL(); /** * Set location */ public void setLocation(String location); /** * Get location for this ServiceDescription. */ public String getLocation(); } wsil4j-1.0.0/src/org/apache/wsil/extension/uddi/ServiceDescription.java000066400000000000000000000113741166574435000261320ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.extension.uddi; import org.apache.wsil.*; import org.apache.wsil.extension.*; import org.uddi4j.util.*; /** * UDDI extension element for WSIL document - serviceDescription element. * * @version: 1.0 * @author: Peter Brittenham */ public interface ServiceDescription extends ExtensionElement { /** * Element name. */ public static final String ELEM_NAME = UDDIConstants.ELEM_SERVICE_DESCRIPTION; /** * ServiceKey Element name. */ public static final String SERVICE_KEY_ELEM_NAME = UDDIConstants.ELEM_SERVICE_KEY; /** * DiscoveryURL Element name. */ public static final String DISCOVERY_URL_ELEM_NAME = UDDIConstants.ELEM_DISCOVERY_URL; /** * QName. */ public static final QName QNAME = new QName(UDDIConstants.NS_URI_WSIL_UDDI, ELEM_NAME); /** * QName for UDDI V2. */ public static final QName QNAME_V2 = new QName(UDDIConstants.NS_URI_WSIL_UDDI_V2, ELEM_NAME); /** * ServiceKey QName. */ public static final QName SERVICE_KEY_QNAME = new QName(UDDIConstants.NS_URI_WSIL_UDDI, SERVICE_KEY_ELEM_NAME); /** * ServiceKey QName for UDDI V2. */ public static final QName SERVICE_KEY_QNAME_V2 = new QName(UDDIConstants.NS_URI_WSIL_UDDI_V2, SERVICE_KEY_ELEM_NAME); /** * DiscoveryURL QName. */ public static final QName DISCOVERY_URL_QNAME = new QName(UDDIConstants.NS_URI_WSIL_UDDI, DISCOVERY_URL_ELEM_NAME); /** * DiscoveryURL QName for UDDI V2. */ public static final QName DISCOVERY_URL_QNAME_V2 = new QName(UDDIConstants.NS_URI_WSIL_UDDI_V2, DISCOVERY_URL_ELEM_NAME); /** * Create service key. */ public ServiceKey createServiceKey(); /** * Set service key. */ public void setServiceKey(ServiceKey serviceKey); /** * Get service key. */ public ServiceKey getServiceKey(); /** * Create discoveryURL */ public DiscoveryURL createDiscoveryURL(); /** * Set discoveryURL */ public void setDiscoveryURL(DiscoveryURL discoveryURL); /** * Get discoveryURL */ public DiscoveryURL getDiscoveryURL(); /** * Set location */ public void setLocation(String location); /** * Get location for this ServiceDescription. */ public String getLocation(); } wsil4j-1.0.0/src/org/apache/wsil/extension/uddi/UDDIConstants.java000066400000000000000000000103651166574435000247470ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.extension.uddi; /** * This class contains the constants required to support the UDDI extension elements. * * @version 1.0 * @author: Peter Brittenham */ public interface UDDIConstants { /** * UDDI V1 API namespace URI. */ public static final String NS_URI_UDDI = "urn:uddi-org:api"; /** * UDDI V2 API namespace URI. */ public static final String NS_URI_UDDI_V2 = "urn:uddi-org:api_v2"; /** * UDDI API namespace name. */ public static final String NS_UDDI = "uddi"; /** * WSIL/UDDI V1 namespace URI. */ public static final String NS_URI_WSIL_UDDI = "http://schemas.xmlsoap.org/ws/2001/10/inspection/uddi/"; /** * WSIL/UDDI V2 namespace URI. */ public static final String NS_URI_WSIL_UDDI_V2 = "http://schemas.xmlsoap.org/ws/2001/10/inspection/uddiv2/"; /** * WSIL/UDDI namespace name. */ public static final String NS_WSIL_UDDI = "wsiluddi"; /** * Business description element name. */ public static final String ELEM_BUSINESS_DESCRIPTION = "businessDescription"; /** * Service desription element name. */ public static final String ELEM_SERVICE_DESCRIPTION = "serviceDescription"; /** * Business key element name. */ public static final String ELEM_BUSINESS_KEY = "businessKey"; /** * Service key element name. */ public static final String ELEM_SERVICE_KEY = "serviceKey"; /** * Discovery URL element name. */ public static final String ELEM_DISCOVERY_URL = "discoveryURL"; /** * Category bag element name. */ public static final String ELEM_CATEGORY_BAG = "categoryBag"; /** * Keyed reference element name. */ public static final String ELEM_KEYED_REFERENCE = "keyedReference"; } wsil4j-1.0.0/src/org/apache/wsil/extension/wsdl/000077500000000000000000000000001166574435000215015ustar00rootroot00000000000000wsil4j-1.0.0/src/org/apache/wsil/extension/wsdl/ImplementedBinding.java000066400000000000000000000063351166574435000261110ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.extension.wsdl; import org.apache.wsil.*; import org.apache.wsil.extension.*; /** * This is the interface definition for yhe <implementedBinding> element. * * @version 1.0 * @author: Peter Brittenham */ public interface ImplementedBinding extends ExtensionElement { /** * Element name. */ public static final String ELEM_NAME = WSDLConstants.ELEM_IMPL_BINDING; /** * QName. */ public static final QName QNAME = new QName(WSDLConstants.NS_URI_WSIL_WSDL, ELEM_NAME); /** * Set implemented binding name. */ public void setBindingName(QName binding); /** * Get implemented binding name. */ public QName getBindingName(); } wsil4j-1.0.0/src/org/apache/wsil/extension/wsdl/Reference.java000066400000000000000000000074651166574435000242560ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.extension.wsdl; import org.apache.wsil.*; import org.apache.wsil.extension.*; /** * This is the interface definition for yhe <reference> element. * * @version 1.0 * @author: Peter Brittenham */ public interface Reference extends ExtensionElement { /** * Element name. */ public static final String ELEM_NAME = WSDLConstants.ELEM_REFERENCE; /** * QName. */ public static final QName QNAME = new QName(WSDLConstants.NS_URI_WSIL_WSDL, ELEM_NAME); /** * Add implemented binding. */ public void addImplementedBinding(ImplementedBinding binding); /** * Remove implemented binding. */ public void removeImplementedBinding(ImplementedBinding binding); /** * Get list of implemented bindings. */ public ImplementedBinding[] getImplementedBindings(); /** * Set endpointPresent */ public void setEndpointPresent(Boolean value); /** * Get endpointPresent */ public Boolean getEndpointPresent(); /** * Get referencedService */ public ReferencedService getReferencedService(); /** * Set referencedService */ public void setReferencedService(ReferencedService referencedService); /** * Create referencedService */ public ReferencedService createReferencedService(); } wsil4j-1.0.0/src/org/apache/wsil/extension/wsdl/ReferencedService.java000066400000000000000000000063531166574435000257360ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.extension.wsdl; import org.apache.wsil.*; import org.apache.wsil.extension.*; /** * This is the interface definition for yhe <referencedService> element. * * @version 1.0 * @author: Alfredo da Silva */ public interface ReferencedService extends ExtensionElement { /** * Element name. */ public static final String ELEM_NAME = WSDLConstants.ELEM_REF_SERVICE; /** * QName. */ public static final QName QNAME = new QName(WSDLConstants.NS_URI_WSIL_WSDL, ELEM_NAME); /** * Set referenced service name. */ public void setReferencedServiceName(QName binding); /** * Get referenced service name. */ public QName getReferencedServiceName(); } wsil4j-1.0.0/src/org/apache/wsil/extension/wsdl/WSDLConstants.java000066400000000000000000000067121166574435000250200ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.extension.wsdl; /** * This class will ... * @version 1.0 * @author: Peter Brittenham */ public interface WSDLConstants { /** * WSDL namespace URI. */ public static final String NS_URI_WSDL = "http://schemas.xmlsoap.org/wsdl/"; /** * WSDL namespace URI. */ public static final String NS_WSDL = "wsdl"; /** * WSIL/WSDL namespace URI. */ public static final String NS_URI_WSIL_WSDL = "http://schemas.xmlsoap.org/ws/2001/10/inspection/wsdl/"; /** * WSIL/WSDL namespace name. */ public static final String NS_WSIL_WSDL = "wsilwsdl"; /** * Reference element name. */ public static final String ELEM_REFERENCE = "reference"; /** * Implemented binding element name. */ public static final String ELEM_IMPL_BINDING = "implementedBinding"; /** * Referenced Service element name. */ public static final String ELEM_REF_SERVICE = "referencedService"; } wsil4j-1.0.0/src/org/apache/wsil/impl/000077500000000000000000000000001166574435000174555ustar00rootroot00000000000000wsil4j-1.0.0/src/org/apache/wsil/impl/AbstractImpl.java000066400000000000000000000061011166574435000227030ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl; import org.apache.wsil.*; import org.apache.wsil.util.*; /** * This class provides the support for the <abstract> element. * * @version 1.0 * @author: Peter Brittenham */ public class AbstractImpl extends WSILElementWithTextImpl implements Abstract { /** * AbstractImpl constructor comment. */ public AbstractImpl() { super(); } /** * XML string representation of this object. */ public String toXMLString() { // Return string return toXMLString(ELEM_NAME); } } wsil4j-1.0.0/src/org/apache/wsil/impl/DescriptionImpl.java000066400000000000000000000062101166574435000234240ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl; import org.apache.wsil.*; import org.apache.wsil.extension.*; import org.apache.wsil.util.*; import java.util.*; /** * This class provides the support for the <description> element. * * @version 1.0 * @author: Peter Brittenham */ public class DescriptionImpl extends ServiceReferenceElement implements Description { /** * DescriptionImpl constructor comment. */ public DescriptionImpl() { super(); } /** * XML string representation of this object. */ public String toXMLString() { // Return string return toXMLString(ELEM_NAME); } } wsil4j-1.0.0/src/org/apache/wsil/impl/InspectionImpl.java000066400000000000000000000155041166574435000232620ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl; import org.apache.wsil.*; import org.apache.wsil.util.*; import org.apache.wsil.extension.wsdl.*; import org.apache.wsil.extension.uddi.*; import java.util.*; /** * This class provides the support for the <inspection> element. * * @version 1.0 * @author: Peter Brittenham */ public class InspectionImpl extends WSILElementWithAbstractImpl implements Inspection { /** * Links. */ protected List links = new Vector(); /** * Services. */ protected List services = new Vector(); /** * Target namespace. */ protected String targetNamespace; /** * Namespace list. */ protected List namespaces = new Vector(); /** * InspectionImpl constructor comment. */ public InspectionImpl() { super(); } /** * Add link element. */ public void addLink(Link link) { // Add link to list links.add(link); } /** * Remove link element. */ public void removeLink(Link link) { // Remove link from list links.remove(link); } /** * Get link elements. */ public Link[] getLinks() { // Allocate array Link[] array = new Link[links.size()]; // Get array from vector Object[] objArray = links.toArray(); // Copy array for (int i = 0; i < objArray.length; i++) array[i] = (Link) objArray[i]; // Return array return (array); } /** * Add namespace. */ public void addNamespace(String localName, String value) { // Add namespace this.namespaces.add(new QName(localName, value)); } /** * Get list of namespaces. */ public QName[] getNamespaces() { // Get array from vector QName[] array = new QName[namespaces.size()]; Object[] objArray = abstracts.toArray(); // Copy array for (int i = 0; i < objArray.length; i++) array[i] = (QName) objArray[i]; // Return array return (array); } /** * Remove namespace. */ public void removeNamespace(String localName, String value) { QName tmpQName = new QName(localName, value); int i; for (i = 0; i < namespaces.size(); i++) { if (tmpQName.equals((QName)namespaces.get(i))) break; } // Remove namespace this.namespaces.remove(i); } /** * Add service element. */ public void addService(Service service) { // Add service to list services.add(service); } /** * Removed service element. */ public void removeService(Service service) { // Remove service from list services.remove(service); } /** * Get service elements. */ public Service[] getServices() { // Allocate array Service[] array = new Service[services.size()]; // Get array from vector Object[] objArray = services.toArray(); // Copy array for (int i = 0; i < objArray.length; i++) array[i] = (Service) objArray[i]; // Return array return (array); } /** * Get the target namespace in which the WSDL elements * are defined. * * @return the target namespace */ public String getTargetNamespace() { return targetNamespace; } /** * Set the target namespace in which WSDL elements are defined. * * @param namespace the target namespace */ public void setTargetNamespace(String targetNamespace) { this.targetNamespace = targetNamespace; } /** * XML string representation of this object. */ public String toXMLString() { // Start inspection element StringBuffer sb = new StringBuffer("<" + ELEM_NAME); // Namespace sb.append(" xmlns=\"" + WSILConstants.NS_URI_WSIL + "\"\n"); sb.append("xmlns:" + WSDLConstants.NS_WSIL_WSDL + "=\"" + WSDLConstants.NS_URI_WSIL_WSDL + "\"\n"); sb.append("xmlns:" + UDDIConstants.NS_WSIL_UDDI + "=\"" + UDDIConstants.NS_URI_WSIL_UDDI + "\"\n"); sb.append("xmlns:" + UDDIConstants.NS_UDDI + "=\"" + UDDIConstants.NS_URI_UDDI + "\">\n"); // Abstract elements sb.append(Util.toXMLString(abstracts)); // Link elements sb.append(Util.toXMLString(links)); // Service elements sb.append(Util.toXMLString(services)); // End inspection element sb.append("\n"); // Return string return sb.toString(); } } wsil4j-1.0.0/src/org/apache/wsil/impl/LinkImpl.java000066400000000000000000000061211166574435000220370ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl; import org.apache.wsil.*; import org.apache.wsil.extension.*; import org.apache.wsil.util.*; /** * This class provides the support for the <link> element. * * @version 1.0 * @author: Peter Brittenham */ public class LinkImpl extends ServiceReferenceElement implements Link { /** * LinkImpl constructor comment. */ public LinkImpl() { super(); } /** * XML string representation of this object. */ public String toXMLString() { // Return string return toXMLString(ELEM_NAME); } } wsil4j-1.0.0/src/org/apache/wsil/impl/ServiceImpl.java000066400000000000000000000120521166574435000225420ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl; import org.apache.wsil.*; import org.apache.wsil.util.*; import java.util.*; /** * This class provides the support for the <service> element. * * @version 1.0 * @author: Peter Brittenham */ public class ServiceImpl extends WSILElementWithAbstractImpl implements Service { /** * Service names. */ protected Vector serviceNames = new Vector(); /** * Descriptions. */ protected List descriptions = new Vector(); /** * ServiceImpl constructor comment. */ public ServiceImpl() { super(); } /** * Add description element. */ public void addDescription(Description description) { // Add description descriptions.add(description); } /** * Remove description element. */ public void removeDescription(Description description) { // Remove description descriptions.remove(description); } /** * Get description elements. */ public Description[] getDescriptions() { Description[] descriptionList = null; Object[] array = descriptions.toArray(); descriptionList = new Description[array.length]; for (int i = 0; i < array.length; i++) { descriptionList[i] = (Description)array[i]; } return descriptionList; } /** * Add service name. */ public void addServiceName(ServiceName serviceName) { // Add service name this.serviceNames.add(serviceName); } /** * Remove a service name. */ public void removeServiceName(ServiceName serviceName) { // Remove service name this.serviceNames.remove(serviceName); } /** * Get the service name. */ public ServiceName[] getServiceNames() { // Get array from vector ServiceName[] array = new ServiceName[serviceNames.size()]; Object[] objArray = serviceNames.toArray(); // Copy array for (int i = 0; i < objArray.length; i++) array[i] = (ServiceName) objArray[i]; // Return array return (array); } /** * XML string representation of this object. */ public String toXMLString() { // Start inspection element StringBuffer sb = new StringBuffer("<" + ELEM_NAME + ">\n"); // Abstract elements sb.append(Util.toXMLString(abstracts)); // Link elements sb.append(Util.toXMLString(serviceNames)); // Service elements sb.append(Util.toXMLString(descriptions)); // End inspection element sb.append("\n"); // Return string return sb.toString(); } } wsil4j-1.0.0/src/org/apache/wsil/impl/ServiceNameImpl.java000066400000000000000000000060531166574435000233470ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl; import org.apache.wsil.*; /** * This class provides the support for the <name> element. * * @version 1.0 * @author: Peter Brittenham */ public class ServiceNameImpl extends WSILElementWithTextImpl implements ServiceName { /** * ServiceNameImpl constructor comment. */ public ServiceNameImpl() { super(); } /** * XML string representation of this object. */ public String toXMLString() { // Return string return toXMLString(ELEM_NAME); } } wsil4j-1.0.0/src/org/apache/wsil/impl/ServiceReferenceElement.java000066400000000000000000000114751166574435000250610ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl; import org.apache.wsil.*; import org.apache.wsil.extension.*; import org.apache.wsil.util.*; import java.util.*; /** * This class is the base class for elements that contain service references. * * @version 1.0 * @author: Peter Brittenham */ public abstract class ServiceReferenceElement extends WSILElementWithAbstractImpl { /** * Reference namespace. */ protected String referencedNamespace = null; /** * Location. */ protected String location = null; /** * Extension element. */ protected ExtensionElement extElement = null; /** * ServiceReferenceElement constructor comment. */ public ServiceReferenceElement() { super(); } /** * Set location for this link. */ public void setLocation(String location) { this.location = location; } /** * Get location for this link. */ public String getLocation() { return location; } /** * Set referenced namespace for this link. */ public void setReferencedNamespace(String referencedNamespace) { this.referencedNamespace = referencedNamespace; } /** * Get referenced namespace for this link. */ public String getReferencedNamespace() { return referencedNamespace; } /** * Set extension element. */ public void setExtensionElement(ExtensionElement extElement) { this.extElement = extElement; } /** * Get extension elment. */ public ExtensionElement getExtensionElement() { return extElement; } /** * XML string representation of this object. */ protected String toXMLString(String elementName) { // Start inspection element StringBuffer sb = new StringBuffer("<" + elementName); // Add referenced namespace sb.append(" " + WSILConstants.ATTR_REF_NAMESPACE + "=\"" + referencedNamespace + "\""); // Add location if (location != null) sb.append(" " + WSILConstants.ATTR_LOCATION + "=\"" + location + "\""); sb.append(">\n"); // Abstract elements sb.append(Util.toXMLString(abstracts)); // Link elements if (extElement != null) sb.append(extElement.toXMLString()); // End inspection element sb.append("\n"); // Return string return sb.toString(); } } wsil4j-1.0.0/src/org/apache/wsil/impl/WSILDocumentFactoryImpl.java000066400000000000000000000062571166574435000247610ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl; import org.apache.wsil.*; import org.apache.wsil.impl.extension.*; /** * This class is an implementation of the WSILDocumentFactory. * * @version 1.0 * @author: Peter Brittenham */ public class WSILDocumentFactoryImpl extends WSILDocumentFactory { /** * Create a new instance of a WSIL document. */ public WSILDocument newDocument() throws WSILException { // Create new WSIL document WSILDocumentImpl wsilDocument = new WSILDocumentImpl(); // Set the extension registry wsilDocument.setExtensionRegistry(new ExtensionRegistryImpl()); // Return WSIL document return wsilDocument; } } wsil4j-1.0.0/src/org/apache/wsil/impl/WSILDocumentImpl.java000066400000000000000000000130251166574435000234200ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl; import org.apache.wsil.*; import org.apache.wsil.extension.*; import org.apache.wsil.extension.wsdl.*; import org.apache.wsil.extension.uddi.*; import java.io.*; /** * This class is an implementation of the WSILDocument class. * * @version 1.0 * @author: Peter Brittenham */ public class WSILDocumentImpl extends WSILDocument { /** * Create a WSIL document. */ public WSILDocumentImpl() { // Create an inspection element this.inspection = new InspectionImpl(); } /** * Create abstract element. */ public Abstract createAbstract() { return new AbstractImpl(); } /** * Create description element. */ public Description createDescription() { return new DescriptionImpl(); } /** * Create link element. */ public Link createLink() { return new LinkImpl(); } /** * Create service element. */ public Service createService() { return new ServiceImpl(); } /** * Create service name element. */ public ServiceName createServiceName() { return new ServiceNameImpl(); } /** * Command line interface for unit testing only. */ public static void main(String[] args) { try { String filename; // Get filename from first arg if (args.length == 0) filename = "c:\\temp\\inspection.wsil"; else filename = args[0]; // Create new WSIL document instance WSILDocument wdRead = WSILDocument.newInstance(); // Read the contents of the WSIL document wdRead.read(filename); // Test writer function wdRead.write(new PrintWriter(System.out)); // ======================================================= System.out.println("\n================================================\n"); // Create new document WSILDocument wdCreate = WSILDocument.newInstance(); // Create new service Service service = wdCreate.createService(); // Create new desc Description desc = wdCreate.createDescription(); // Get WSDL ext builder ExtensionBuilder extBuilder = wdCreate.getExtensionRegistry().getBuilder(WSDLConstants.NS_URI_WSIL_WSDL); // Create WSDL reference Reference ref = (Reference) extBuilder.createElement(Reference.QNAME); // Create WSDL implementedBinding ImplementedBinding ib = (ImplementedBinding) extBuilder.createElement(ImplementedBinding.QNAME); // Add implementedBinding to reference ref.addImplementedBinding(ib); // Add reference to description desc.setExtensionElement(ref); // Add description to service service.addDescription(desc); // Add service wdCreate.getInspection().addService(service); // Test writer function wdCreate.write(new PrintWriter(System.out)); } catch (Exception e) { // Display exception System.out.println("EXCEPTION: " + e.toString()); e.printStackTrace(); } } } wsil4j-1.0.0/src/org/apache/wsil/impl/WSILElementWithAbstractImpl.java000066400000000000000000000103071166574435000255530ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl; import org.apache.wsil.*; import org.apache.wsil.extension.*; import org.apache.wsil.util.*; import java.util.*; /** * This class is the base class for all elements that have an abstract. * * @version 1.0 * @author: Peter Brittenham */ public abstract class WSILElementWithAbstractImpl implements WSILElementWithAbstract { /** * Abstracts. */ protected List abstracts = new Vector(); /** * WSILElementWithAbstractImpl constructor. */ public WSILElementWithAbstractImpl() { super(); } /** * Add one abstract to this element. * * @param abs the abstract to add */ public void addAbstract(Abstract abs) { abstracts.add(abs); } /** * Add abstracts to this element. * * @param abstracts the array of abstracts to add */ public void addAbstracts(Abstract[] array) { // Add all abstracts for (int i = 0; i < array.length; i++) this.abstracts.add(array[i]); } /** * Get all abstracts for this element. * * @return Returns all abstracts for this element. */ public Abstract[] getAbstracts() { // Get array from vector Abstract[] array = new Abstract[abstracts.size()]; Object[] objArray = abstracts.toArray(); // Copy array for (int i = 0; i < objArray.length; i++) array[i] = (Abstract) objArray[i]; // Return array return (array); } /** * Remove all abstracts from this element. */ public void removeAbstracts() { abstracts.clear(); } /** * String representation of this object. */ public String toString() { // Return string return toXMLString(); } } wsil4j-1.0.0/src/org/apache/wsil/impl/WSILElementWithTextImpl.java000066400000000000000000000104131166574435000247320ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl; import org.apache.wsil.*; import org.apache.wsil.util.*; /** * This class is the base class for elements that have a text node. * * @version 1.0 * @author: Peter Brittenham */ public abstract class WSILElementWithTextImpl implements WSILElementWithText { /** * Language setting. */ protected String lang = WSILConstants.DEF_LANG; /** * Text. */ protected String text = ""; /** * Set the language attribute for the abstract. * * @param the language type for this abstract. */ public void setLang(String lang) { this.lang = lang; } /** * Get the language attribute for the abstract. * * @return Returns the language type for this abstract. */ public String getLang() { return lang; } /** * Set the documentation text string. * * @param text the documentation text string */ public void setText(String text) { this.text = text.trim(); } /** * Get the abstract text string. * * @return Returns the abstract as a text string. */ public String getText() { return text; } /** * String representation of this object. */ public String toString() { // Return string return toXMLString(); } /** * XML string representation of this object. */ protected String toXMLString(String elementName) { // Start inspection element StringBuffer sb = new StringBuffer("<" + elementName); // Add lang attribute sb.append(" xml:lang=" + "\"" + getLang() + "\""); sb.append(">\n"); // Add text sb.append(getText() + "\n"); // End inspection element sb.append("\n"); // Return string return sb.toString(); } } wsil4j-1.0.0/src/org/apache/wsil/impl/extension/000077500000000000000000000000001166574435000214715ustar00rootroot00000000000000wsil4j-1.0.0/src/org/apache/wsil/impl/extension/ExtensionElementImpl.java000066400000000000000000000063651166574435000264560ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl.extension; import org.apache.wsil.*; import org.apache.wsil.extension.*; import org.apache.wsil.util.*; /** * This class is the base class for all implementations of the * ExtensionElement interface. * * @version 1.0 * @author: Peter Brittenham */ public abstract class ExtensionElementImpl implements ExtensionElement { /** * Qname. */ protected QName qname; /** * Get the language attribute for the abstract. * * @return Returns the language type for this abstract. */ public QName getQName() { return qname; } /** * String representation of this object. */ public String toString() { // Return string return toXMLString(); } } wsil4j-1.0.0/src/org/apache/wsil/impl/extension/ExtensionRegistryImpl.java000066400000000000000000000075721166574435000266760ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl.extension; import org.apache.wsil.extension.*; import org.apache.wsil.extension.wsdl.*; import org.apache.wsil.extension.uddi.*; import org.apache.wsil.impl.extension.wsdl.*; import org.apache.wsil.impl.extension.uddi.*; import java.util.*; /** * This class is an implementation of an ExtensionRegistry. * * @version 1.0 * @author: Peter Brittenham */ public class ExtensionRegistryImpl extends ExtensionRegistry { /** * ExtensionRegistryImpl constructor comment. */ public ExtensionRegistryImpl() { // Set WSDL extension reader and writer addReader(WSDLConstants.NS_URI_WSIL_WSDL, new WSDLExtensionReader()); addWriter(WSDLConstants.NS_URI_WSIL_WSDL, new WSDLExtensionWriter()); addBuilder(WSDLConstants.NS_URI_WSIL_WSDL, new WSDLExtensionBuilder()); // Set UDDI V1 extension reader and writer addReader(UDDIConstants.NS_URI_WSIL_UDDI, new UDDIExtensionReader()); addWriter(UDDIConstants.NS_URI_WSIL_UDDI, new UDDIExtensionWriter()); addBuilder(UDDIConstants.NS_URI_WSIL_UDDI, new UDDIExtensionBuilder()); // Set UDDI V2 extension reader and writer addReader(UDDIConstants.NS_URI_WSIL_UDDI_V2, new UDDIExtensionReader()); addWriter(UDDIConstants.NS_URI_WSIL_UDDI_V2, new UDDIExtensionWriter()); addBuilder(UDDIConstants.NS_URI_WSIL_UDDI_V2, new UDDIExtensionBuilder()); } } wsil4j-1.0.0/src/org/apache/wsil/impl/extension/uddi/000077500000000000000000000000001166574435000224165ustar00rootroot00000000000000wsil4j-1.0.0/src/org/apache/wsil/impl/extension/uddi/BusinessDescriptionImpl.java000066400000000000000000000125621166574435000301100ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl.extension.uddi; import org.apache.wsil.*; import org.apache.wsil.extension.uddi.*; import org.apache.wsil.impl.extension.*; import org.uddi4j.util.*; /** * This class contains the implementation for a * <wsiluddi:businessDescription> element. * * @version 1.0 * @author: Alfredo da Silva */ public class BusinessDescriptionImpl extends ExtensionElementImpl implements BusinessDescription { /** * Business key. */ protected BusinessKey businessKey = null; /** * Discovery URL */ protected DiscoveryURL discoveryURL = null; /** * location */ protected String location = null; /** * BusinessDescriptionImpl constructor comment. */ public BusinessDescriptionImpl() { super(); } /** * Create business key. */ public BusinessKey createBusinessKey() { return new BusinessKey(); } /** * Set businessKey. */ public void setBusinessKey(BusinessKey businessKey) { this.businessKey = businessKey; } /** * Get business key. */ public BusinessKey getBusinessKey() { return businessKey; } /** * Create discoveryURL. */ public DiscoveryURL createDiscoveryURL() { return new DiscoveryURL(); } /** * Set discoveryURL. */ public void setDiscoveryURL(DiscoveryURL discoveryURL) { this.discoveryURL = discoveryURL; } /** * Get discoveryURL. */ public DiscoveryURL getDiscoveryURL() { return discoveryURL; } /** * Get location for this ServiceDescription. */ public String getLocation() { return location; } /** * Set location for this ServiceDescription. */ public void setLocation(String location) { this.location = location; } /** * XML string representation of this object. */ public String toXMLString() { String elementName = UDDIConstants.NS_WSIL_UDDI + ":" + ELEM_NAME; // Start BusinessDescription element StringBuffer sb = new StringBuffer("<" + elementName); // Location sb.append(" location=" + "\"" + location + "\">\n"); if (businessKey != null) { String businessKeyName = UDDIConstants.NS_WSIL_UDDI + ":" + UDDIConstants.ELEM_BUSINESS_KEY; sb.append("<" + businessKeyName + ">"); sb.append(businessKey.getText()); sb.append("\n"); } if (discoveryURL != null) { String discoveryURLName = UDDIConstants.NS_WSIL_UDDI + ":" + UDDIConstants.ELEM_DISCOVERY_URL; sb.append("<" + discoveryURLName + " useType=" + "\"" + discoveryURL.getUseType() + "\">"); sb.append(discoveryURL.getText()); sb.append("\n"); } // End inspection element sb.append("\n"); // Return string return sb.toString(); } } wsil4j-1.0.0/src/org/apache/wsil/impl/extension/uddi/ServiceDescriptionImpl.java000066400000000000000000000125331166574435000277130ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl.extension.uddi; import org.apache.wsil.*; import org.apache.wsil.extension.uddi.*; import org.apache.wsil.impl.extension.*; import org.uddi4j.util.*; /** * This class contains the implementation for a * <wsiluddi:serviceDescription> element. * * @version 1.0 * @author: Peter Brittenham */ public class ServiceDescriptionImpl extends ExtensionElementImpl implements ServiceDescription { /** * Service key. */ protected ServiceKey serviceKey = null; /** * Discovery URL */ protected DiscoveryURL discoveryURL = null; /** * location */ protected String location = null; /** * ServiceDescriptionImpl constructor comment. */ public ServiceDescriptionImpl() { super(); } /** * Create service key. */ public ServiceKey createServiceKey() { return new ServiceKey(); } /** * Set serviceKey. */ public void setServiceKey(ServiceKey serviceKey) { this.serviceKey = serviceKey; } /** * Get service key. */ public ServiceKey getServiceKey() { return serviceKey; } /** * Create discoveryURL. */ public DiscoveryURL createDiscoveryURL() { return new DiscoveryURL(); } /** * Set discoveryURL. */ public void setDiscoveryURL(DiscoveryURL discoveryURL) { this.discoveryURL = discoveryURL; } /** * Get discoveryURL. */ public DiscoveryURL getDiscoveryURL() { return discoveryURL; } /** * Get location for this ServiceDescription. */ public String getLocation() { return location; } /** * Set location for this ServiceDescription. */ public void setLocation(String location) { this.location = location; } /** * XML string representation of this object. */ public String toXMLString() { String elementName = UDDIConstants.NS_WSIL_UDDI + ":" + ELEM_NAME; // Start ServiceDescription element StringBuffer sb = new StringBuffer("<" + elementName); // Location sb.append(" location=" + "\"" + location + "\">\n"); if (serviceKey != null) { String serviceKeyName = UDDIConstants.NS_WSIL_UDDI + ":" + UDDIConstants.ELEM_SERVICE_KEY; sb.append("<" + serviceKeyName + ">"); sb.append(serviceKey.getText()); sb.append("\n"); } if (discoveryURL != null) { String discoveryURLName = UDDIConstants.NS_WSIL_UDDI + ":" + UDDIConstants.ELEM_DISCOVERY_URL; sb.append("<" + discoveryURLName + " useType=" + "\"" + discoveryURL.getUseType() + "\">"); sb.append(discoveryURL.getText()); sb.append("\n"); } // End ServiceDescription element sb.append("\n"); // Return string return sb.toString(); } } wsil4j-1.0.0/src/org/apache/wsil/impl/extension/uddi/UDDIExtensionBuilder.java000066400000000000000000000071661166574435000272240ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl.extension.uddi; import org.apache.wsil.*; import org.apache.wsil.extension.*; import org.apache.wsil.extension.uddi.*; /** * This class will ... * @version 1.0 * @author: Peter Brittenham */ public class UDDIExtensionBuilder implements ExtensionBuilder { /** * UDDIExtensionBuilder constructor comment. */ public UDDIExtensionBuilder() { super(); } /** * Create extension element. */ public ExtensionElement createElement(QName qname) throws WSILException { ExtensionElement extElement = null; // businessDescription if (qname.equals(BusinessDescription.QNAME)) { // Create implementation extElement = new BusinessDescriptionImpl(); } // serviceDescription else if (qname.equals(ServiceDescription.QNAME)) { // Create implementation extElement = new ServiceDescriptionImpl(); } else { // Throw exception throw new WSILException("Could not create WSDL extension element: " + qname + "."); } // Return extension element return extElement; } } wsil4j-1.0.0/src/org/apache/wsil/impl/extension/uddi/UDDIExtensionReader.java000066400000000000000000000225521166574435000270340ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl.extension.uddi; import java.util.*; import org.apache.wsil.*; import org.apache.wsil.extension.*; import org.apache.wsil.extension.uddi.*; import org.apache.wsil.util.*; import org.w3c.dom.*; import org.uddi4j.util.*; /** * The UDDI extension reader class is used to parse the UDDI extension elements. * * @version 1.0 * @author: Peter Brittenham */ public class UDDIExtensionReader implements ExtensionReader { /** * WSDLExtensionReader constructor comment. */ public UDDIExtensionReader() { super(); } /** * Parse extension element. */ public ExtensionElement parseElement(Element element, WSILElement wsilElement) throws WSILException { ExtensionElement extElement = null; // Get QName for the element QName qname = new QName(element); // If this is the ServiceDescription element if ((qname.equals(ServiceDescription.QNAME)) || (qname.equals(ServiceDescription.QNAME_V2))) { // Parse ServiceDescription element extElement = parseServiceDescription(element, wsilElement); } // If this is the BusinessDescription element else if ((qname.equals(BusinessDescription.QNAME)) || (qname.equals(BusinessDescription.QNAME_V2))) { // Parse businessDescription element extElement = parseBusinessDescription(element, wsilElement); } else { // Throw exception throw new WSILException("WSIL document contains undefined UDDI extension element: " + element.getTagName() + "."); } // Return extension element return extElement; } /** * Parse service description element. */ protected ExtensionElement parseServiceDescription(Element serviceDescriptionElement, WSILElement wsilElement) throws WSILException { ServiceDescription serviceDescription = new ServiceDescriptionImpl(); // Get a list of attributes NamedNodeMap attrList = serviceDescriptionElement.getAttributes(); // Get the first attribute Attr attr = (Attr)attrList.item(0); // Get the attribute value String location = attr.getValue(); // Set the location serviceDescription.setLocation(location); // Get the first child element Element element = XMLUtil.getFirstChild(serviceDescriptionElement); // Process each child element while (element != null) { // ServiceKey if ((ServiceDescription.SERVICE_KEY_QNAME.equals(element)) || (ServiceDescription.SERVICE_KEY_QNAME_V2.equals(element))) { serviceDescription.setServiceKey(parseServiceKey(element, serviceDescription)); } // DiscoveryURL else if ((serviceDescription.DISCOVERY_URL_QNAME.equals(element)) || (serviceDescription.DISCOVERY_URL_QNAME_V2.equals(element))) { serviceDescription.setDiscoveryURL(parseDiscoveryURL(element, serviceDescription)); } else { // Throw exception throw new WSILException("WSIL document contains undefined UDDI extension element: " + element.getTagName() + "."); } // Get next child element element = XMLUtil.getNextSibling(element); } // Return service description element return serviceDescription; } /** * Parse business description element. */ protected ExtensionElement parseBusinessDescription(Element businessDescriptionElement, WSILElement wsilElement) { BusinessDescription businessDescription = new BusinessDescriptionImpl(); // Get a list of attributes NamedNodeMap attrList = businessDescriptionElement.getAttributes(); // Get the first attribute Attr attr = (Attr)attrList.item(0); // Get the attribute value String location = attr.getValue(); // Set the location businessDescription.setLocation(location); // Get the first child element Element element = XMLUtil.getFirstChild(businessDescriptionElement); // Process each child element while (element != null) { // BusinessKey if (BusinessDescription.BUSINESS_KEY_QNAME.equals(element)) { businessDescription.setBusinessKey(parseBusinessKey(element, businessDescription)); } else // DiscoveryURL if (BusinessDescription.DISCOVERY_URL_QNAME.equals(element)) { businessDescription.setDiscoveryURL(parseDiscoveryURL(element, businessDescription)); } // Get next child element element = XMLUtil.getNextSibling(element); } // Return business description element return businessDescription; } /** * Parse businessKey element. */ protected BusinessKey parseBusinessKey(Element element, WSILElement wsilElement) { BusinessKey businessKey = new BusinessKey(); // Set business key businessKey.setText(XMLUtil.getText(element)); // Return businessKey element return businessKey; } /** * Parse discoveryURL element. */ protected DiscoveryURL parseDiscoveryURL(Element element, WSILElement wsilElement) { DiscoveryURL discoveryURL = new DiscoveryURL(); // Get a list of attributes NamedNodeMap attrList = element.getAttributes(); // Get the first attribute Attr attr = (Attr)attrList.item(0); // Get the attribute value String useType = attr.getValue(); // Set the use type discoveryURL.setUseType(useType); // Set value discoveryURL.setText(XMLUtil.getText(element)); // Return discoveryURL element return discoveryURL; } /** * Parse serviceKey element. */ protected ServiceKey parseServiceKey(Element element, WSILElement wsilElement) { ServiceKey serviceKey = new ServiceKey(); // Set service key serviceKey.setText(XMLUtil.getText(element)); // Return serviceKey element return serviceKey; } /** * Parse CategoryBag element. */ protected CategoryBag parseCategoryBag(Element categoryBagElement, WSILElement wsilElement) { CategoryBag categoryBag = new CategoryBag(); // Get the first child element Element element = XMLUtil.getFirstChild(categoryBagElement); // Get a list of attributes NamedNodeMap attrList = element.getAttributes(); // Get keyName Attr attr = (Attr)attrList.item(0); // Get keyName value String keyName = attr.getValue(); // Get keyValue attr = (Attr)attrList.item(1); // Get keyValue value String keyValue = attr.getValue(); // Create KeyedRerence KeyedReference keyedReference = new KeyedReference(keyName, keyValue); Vector keyedReferenceVector = new Vector(); keyedReferenceVector.add(keyedReference); // Add keyedReference categoryBag.setKeyedReferenceVector(keyedReferenceVector); // Return categoryBag element return categoryBag; } } wsil4j-1.0.0/src/org/apache/wsil/impl/extension/uddi/UDDIExtensionWriter.java000066400000000000000000000064251166574435000271070ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl.extension.uddi; import org.apache.wsil.*; import org.apache.wsil.extension.*; import org.apache.wsil.extension.wsdl.*; import org.w3c.dom.Element; import java.io.*; /** * The UDDI extension writer class is used to write the UDDI extension elements * to an output writer. * * @version 1.0 * @author: Peter Brittenham */ public class UDDIExtensionWriter implements ExtensionWriter { /** * UDDIExtensionWriter constructor comment. */ public UDDIExtensionWriter() { super(); } /** * Write extension element. */ public void writeElement(ExtensionElement extElement, Writer writer) throws IOException { // Write out the specfied element writer.write(extElement.toXMLString()); } } wsil4j-1.0.0/src/org/apache/wsil/impl/extension/wsdl/000077500000000000000000000000001166574435000224425ustar00rootroot00000000000000wsil4j-1.0.0/src/org/apache/wsil/impl/extension/wsdl/ImplementedBindingImpl.java000066400000000000000000000076251166574435000276770ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl.extension.wsdl; import org.apache.wsil.*; import org.apache.wsil.extension.wsdl.*; import org.apache.wsil.impl.extension.*; /** * This class contains the implementation for a * <wsilwsdl:implementedBinding> element. * * @version 1.0 * @author: Peter Brittenham */ public class ImplementedBindingImpl extends ExtensionElementImpl implements ImplementedBinding { /** * Binding name. */ protected QName bindingName; /** * ImplementedBindingImpl constructor comment. */ public ImplementedBindingImpl() { super(); } /** * Get implemented binding name. */ public QName getBindingName() { return bindingName; } /** * Set implemented binding name. */ public void setBindingName(QName bindingName) { this.bindingName = bindingName; } /** * XML string representation of this object. */ public String toXMLString() { String elementName = WSDLConstants.NS_WSIL_WSDL + ":" + ELEM_NAME; // Start inspection element StringBuffer sb = new StringBuffer("<" + elementName); // QName sb.append(" xmlns:interface=" + "\"" + bindingName.getNamespaceURI() + "\">" + "interface:" + bindingName.getLocalName()); // End inspection element sb.append("\n"); // Return string return sb.toString(); } } wsil4j-1.0.0/src/org/apache/wsil/impl/extension/wsdl/ReferenceImpl.java000066400000000000000000000134061166574435000260310ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl.extension.wsdl; import org.apache.wsil.*; import org.apache.wsil.extension.*; import org.apache.wsil.extension.wsdl.*; import org.apache.wsil.impl.extension.*; import java.util.*; /** * This class contians the implementation for a * <wsilwsdl:reference element>. * * @version 1.0 * @author: Peter Brittenham */ public class ReferenceImpl extends ExtensionElementImpl implements Reference { /** * referencedService */ protected ReferencedService referencedService = null; /** * endpointPresent */ protected Boolean endpointPresent = null; /** * Implemented bindings. */ protected List implementedBindings = new Vector(); /** * ReferenceImpl constructor comment. */ public ReferenceImpl() { super(); } /** * Get extension element qname. */ public QName getQName() { return QNAME; } /** * Add implemented binding. */ public void addImplementedBinding(ImplementedBinding binding) { this.implementedBindings.add(binding); } /** * Get list of implemented bindings. */ public ImplementedBinding[] getImplementedBindings() { // Get array from vector ImplementedBinding[] array = new ImplementedBinding[implementedBindings.size()]; Object[] objArray = implementedBindings.toArray(); // Copy array for (int i = 0; i < objArray.length; i++) array[i] = (ImplementedBinding) objArray[i]; // Return array return (array); } /** * Remove implemented binding. */ public void removeImplementedBinding(ImplementedBinding binding) { this.implementedBindings.remove(binding); } /** * Set endpointPresent */ public void setEndpointPresent(Boolean value) { this.endpointPresent = value; } /** * Get endpointPresent */ public Boolean getEndpointPresent() { return this.endpointPresent; } /** * Set referenced service */ public void setReferencedService(ReferencedService referencedService) { this.referencedService = referencedService; } /** * Get referencedService */ public ReferencedService getReferencedService() { return this.referencedService; } /** * Create referencedService */ public ReferencedService createReferencedService() { return new ReferencedServiceImpl(); } /** * XML string representation of this object. */ public String toXMLString() { String elementName = WSDLConstants.NS_WSIL_WSDL + ":" + ELEM_NAME; // Start reference element StringBuffer sb = new StringBuffer("<" + elementName); if (endpointPresent != null) // Add endpointPresent attribute sb.append(" " + WSILConstants.ATTR_ENDPOINT_PRESENT + "=\"" + endpointPresent.booleanValue() + "\">\n"); else sb.append(">\n"); // ReferencedServices if (referencedService != null) sb.append(referencedService.toXMLString()); // ImplementedBindings for (int i = 0; i < implementedBindings.size(); i++) { sb.append(((ImplementedBinding)implementedBindings.get(i)).toXMLString()); } // End reference element sb.append("\n"); // Return string return sb.toString(); } } wsil4j-1.0.0/src/org/apache/wsil/impl/extension/wsdl/ReferencedServiceImpl.java000066400000000000000000000077161166574435000275250ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl.extension.wsdl; import org.apache.wsil.*; import org.apache.wsil.extension.wsdl.*; import org.apache.wsil.impl.extension.*; /** * This class contains the implementation for a * <wsilwsdl:referencedService> element. * * @version 1.0 * @author: Alfredo da Silva */ public class ReferencedServiceImpl extends ExtensionElementImpl implements ReferencedService { /** * Binding name. */ protected QName referencedServiceName; /** * ReferencedServiceImpl constructor comment. */ public ReferencedServiceImpl() { super(); } /** * Get referenced service name. */ public QName getReferencedServiceName() { return referencedServiceName; } /** * Set referenced service name. */ public void setReferencedServiceName(QName referencedServiceName) { this.referencedServiceName = referencedServiceName; } /** * XML string representation of this object. */ public String toXMLString() { String elementName = WSDLConstants.NS_WSIL_WSDL + ":" + ELEM_NAME; // Start inspection element StringBuffer sb = new StringBuffer("<" + elementName); // QName sb.append(" xmlns:impl=" + "\"" + referencedServiceName.getNamespaceURI() + "\">" + "impl:" + referencedServiceName.getLocalName()); // End inspection element sb.append("\n"); // Return string return sb.toString(); } } wsil4j-1.0.0/src/org/apache/wsil/impl/extension/wsdl/WSDLExtensionBuilder.java000066400000000000000000000075771166574435000273020ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl.extension.wsdl; import org.apache.wsil.*; import org.apache.wsil.extension.*; import org.apache.wsil.extension.wsdl.*; /** * This class is used to create the object that is associated with * the WSDL extension element. * * @version 1.0 * @author: Peter Brittenham */ public class WSDLExtensionBuilder implements ExtensionBuilder { /** * WSDLExtensionBuilder constructor comment. */ public WSDLExtensionBuilder() { super(); } /** * Create extension element. */ public ExtensionElement createElement(QName qname) throws WSILException { ExtensionElement extElement = null; // reference if (qname.equals(Reference.QNAME)) { // Create reference implementation extElement = new ReferenceImpl(); } // referencedService else if (qname.equals(ReferencedService.QNAME)) { // Create referencedService implementation extElement = new ReferencedServiceImpl(); } // implementedBinding else if (qname.equals(ImplementedBinding.QNAME)) { // Create implementedBinding implementation extElement = new ImplementedBindingImpl(); } else { // Throw exception throw new WSILException("Could not create WSDL extension element: " + qname + "."); } // Return extension element return extElement; } } wsil4j-1.0.0/src/org/apache/wsil/impl/extension/wsdl/WSDLExtensionReader.java000066400000000000000000000166211166574435000271040ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl.extension.wsdl; import org.apache.wsil.*; import org.apache.wsil.extension.*; import org.apache.wsil.extension.wsdl.*; import org.apache.wsil.util.*; import org.w3c.dom.*; /** * The WSDL extension reader class is used to parse the WSDL extension elements. * * @version 1.0 * @author: Peter Brittenham */ public class WSDLExtensionReader implements ExtensionReader { /** * WSDLExtensionReader constructor comment. */ public WSDLExtensionReader() { super(); } /** * Parse extension element. */ public ExtensionElement parseElement(Element element, WSILElement wsilElement) throws WSILException { ExtensionElement extElement = null; // Get QName for the element QName qname = new QName(element); // If this is the reference element if (qname.equals(Reference.QNAME)) { // Parse reference element extElement = parseReference(element, wsilElement); } // If this is the referencedService element else if (qname.equals(ReferencedService.QNAME)) { // Parse referencedService element extElement = parseReferencedService(element, wsilElement); } // If this is the implemented binding element else if (qname.equals(ImplementedBinding.QNAME)) { // Parse implementedBinding element extElement = parseImplementedBinding(element, wsilElement); } else { // Throw exception throw new WSILException("WSIL document contains undefined WSDL extension element: " + element.getTagName() + "."); } // Return extension element return extElement; } /** * Parse reference element. */ protected ExtensionElement parseReference(Element referenceElement, WSILElement wsilElement) { Reference reference = new ReferenceImpl(); // Get a list of attributes NamedNodeMap attrList = referenceElement.getAttributes(); // Get the first attribute Attr attr = (Attr)attrList.item(0); if (attr != null) { // Get the attribute value String endpointPresent = attr.getValue(); if (endpointPresent != null) // Set the endpointPresent reference.setEndpointPresent(Boolean.valueOf(endpointPresent)); } // Get the first child element Element element = XMLUtil.getFirstChild(referenceElement); // EndPointPresent found if (element == null) return reference; // Get QName for the element QName qname = new QName(element); // If this is the referencedService element if (qname.equals(ReferencedService.QNAME)) { // Parse referencedService element reference.setReferencedService((ReferencedService)parseReferencedService(element, wsilElement)); } // If this is the implementedBinding element if (qname.equals(ImplementedBinding.QNAME)) { // Process each child element while (element != null) { reference.addImplementedBinding((ImplementedBinding)parseImplementedBinding(element, reference)); // Get next child element element = XMLUtil.getNextSibling(element); } } // Return reference element return reference; } /** * Parse implementedBinding element. */ protected ExtensionElement parseImplementedBinding(Element element, WSILElement wsilElement) { ImplementedBinding implementedBinding = new ImplementedBindingImpl(); int index = XMLUtil.getText(element).lastIndexOf(":"); String localName = XMLUtil.getText(element).substring(index + 1); // Get a list of attributes NamedNodeMap attrList = element.getAttributes(); // Get the first attribute Attr attr = (Attr)attrList.item(0); // Get the attribute value String namespaceURI = attr.getValue(); // Set the binding name implementedBinding.setBindingName(new QName(namespaceURI, localName)); // Return implementedBinding element. return implementedBinding; } /** * Parse referencedService element. */ protected ExtensionElement parseReferencedService(Element element, WSILElement wsilElement) { ReferencedService referencedService = new ReferencedServiceImpl(); int index = XMLUtil.getText(element).lastIndexOf(":"); String localName = XMLUtil.getText(element).substring(index + 1); // Get a list of attributes NamedNodeMap attrList = element.getAttributes(); // Get the first attribute Attr attr = (Attr)attrList.item(0); // Get the attribute value String namespaceURI = attr.getValue(); // Set the referencedService name referencedService.setReferencedServiceName(new QName(namespaceURI, localName)); // Return referencedService element. return referencedService; } } wsil4j-1.0.0/src/org/apache/wsil/impl/extension/wsdl/WSDLExtensionWriter.java000066400000000000000000000064251166574435000271570ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.impl.extension.wsdl; import org.apache.wsil.*; import org.apache.wsil.extension.*; import org.apache.wsil.extension.wsdl.*; import org.w3c.dom.Element; import java.io.*; /** * The WSDL extension writer class is used to write the WSDL extension elements * to an output writer. * * @version 1.0 * @author: Peter Brittenham */ public class WSDLExtensionWriter implements ExtensionWriter { /** * WSDLExtensionWriter constructor comment. */ public WSDLExtensionWriter() { super(); } /** * Write extension element. */ public void writeElement(ExtensionElement extElement, Writer writer) throws IOException { // Write out the specfied element writer.write(extElement.toXMLString()); } } wsil4j-1.0.0/src/org/apache/wsil/util/000077500000000000000000000000001166574435000174715ustar00rootroot00000000000000wsil4j-1.0.0/src/org/apache/wsil/util/FileListBuilder.java000066400000000000000000000126141166574435000233620ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.util; import java.io.*; import java.util.*; /** * This class builds a file list. * * @author Alfredo da Silva */ public class FileListBuilder { /** * Filter to be used. */ protected FileFilterImpl filter = null; /** * Creates a new FileListBuilder instance. * * @param root a String value * @param extension a String value * @exception IOException if an error occurs */ public FileListBuilder(String root, String extension) throws IOException { filter = new FileFilterImpl(root, extension); } /** * Returns a File array. * * @return a File[] value */ public File[] getFiles() { return filter.getFiles(); } public static void main (String[] args) { try { FileListBuilder fileListBuilder = new FileListBuilder("c:\\wstk-2.3\\demos", "wsdl"); File[] filesList = fileListBuilder.getFiles(); for (int i = 0; i < filesList.length; i++) { System.out.println(filesList[i].getPath()); } } catch (IOException e) { e.printStackTrace(); } } } /** * This class implements a filter. * */ class FileFilterImpl implements FileFilter { /** * File extension. */ private String extension; /** * Directory root. */ private File root; /** * File list. */ private Vector fileVector = new Vector(); /** * Creates a new FileFilterImpl instance. * * @param root a String value * @param extension a String value * @exception IOException if an error occurs */ public FileFilterImpl(String root, String extension) throws IOException { this.root = new File(root); if (this.root.isDirectory() == false) { this.root = null; throw new IOException("Not a directory: " + this.root ); } this.extension = extension; } /** * Called every time a filter is evaluated. * * @param pathname a String value * @return true if parameter matches filter criteria. */ public boolean accept(File pathname) { if (pathname.isDirectory() == true) pathname.listFiles(this); String filename = pathname.getName(); if (filename.substring(filename.lastIndexOf(".") + 1).equals(extension)) { if (pathname.isDirectory() == false) { fileVector.add(pathname); return true; } } return false; } /** * Returns a File list. * * @return a File[] value */ public File[] getFiles() { root.listFiles(this); return getFileList(); } /** * Converts Vector to array. * * @return a File[] value */ private File[] getFileList() { File[] fileList = new File[fileVector.size()]; fileVector.copyInto(fileList); return fileList; } } wsil4j-1.0.0/src/org/apache/wsil/util/Util.java000066400000000000000000000375011166574435000212570ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.util; import org.apache.wsil.*; import java.util.*; import java.awt.Dimension; import java.awt.Toolkit; import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStream; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.net.ConnectException; import java.net.InetAddress; import java.net.MalformedURLException; import java.net.URL; import java.net.URLStreamHandler; import java.text.DateFormat; import java.util.Date; import java.util.MissingResourceException; import java.util.StringTokenizer; /** * This class will ... * @version 1.0 * @author: Peter Brittenham */ public final class Util { /** * Class name. */ protected static String sClassName = Util.class.getName(); /** * Line separator character. */ public static final String LINE_SEPARATOR = System.getProperty("line.separator"); /** * Screen size (width and height). */ //public final static Dimension SCREEN_SIZE = Toolkit.getDefaultToolkit().getScreenSize(); /** * Do not allow an object to be created. */ private Util() { } /** * Local a thread group using its name. * * @param sName thread group name * * @return Returns thread group. */ public static ThreadGroup findThreadGroup ( String sName ) { boolean bThgFound = false; ThreadGroup thgReturn = null; // Get current thread group ThreadGroup thgCurrent = Thread.currentThread().getThreadGroup(); // If the current thread group is the one we are looking for, // then return a reference to it if (thgCurrent.getName().equals(sName)) { bThgFound = true; thgReturn = thgCurrent; } // If the thread group was not found, then try to go through parent chain if (!(bThgFound)) { // Setup to search parent chain ThreadGroup thgPrev = null; ThreadGroup thgNext = thgCurrent; // Go through each parent till requested group found for (thgPrev = thgNext; thgNext != null && !(bThgFound); thgNext = thgPrev.getParent()) { // Save current reference thgPrev = thgNext; // If this is the requested thread group, then stop if (thgNext.getName().equals(sName)) { bThgFound = true; thgReturn = thgNext; } } } // If the thread group was not found, then try to go down the chain if (!(bThgFound)) { // Allocate array to hold active thread groups ThreadGroup thg[] = new ThreadGroup[thgCurrent.activeGroupCount()]; // Get all of the active thread groups int iCnt = thgCurrent.enumerate(thg); for (int i = 0; i < iCnt && !(bThgFound); i++) { // If this is the requested thread group, then stop if (thg[i].getName().equals(sName)) { bThgFound = true; thgReturn = thg[i]; } } } // Return thread group return thgReturn; } /** * This method prints a formatted message using System.out.prinln. * * @param className class name which originated message * @param methodName method name which originated message * @param e exception */ public static void out ( String className, String methodName, Exception e ) { out(className, methodName, e.toString()); } /** * This method prints a formatted message using System.out.prinln. * * @param className class name which originated message * @param methodName method name which originated message * @param msg message text */ public static void out ( String className, String methodName, String msg ) { // Print formatted message string System.out.println("[" + className + "] [" + methodName + "()] " + msg); } /** * This method prints a formatted message using System.out.prinln. * * @param className class name which originated message * @param methodName method name which originated message * @param e exception */ public static void debug ( String className, String methodName, Exception e ) { // Print formatted message string debug(className, methodName, e.toString()); } /** * This method prints a formatted message using System.out.prinln. * * @param className class name which originated message * @param methodName method name which originated message * @param msg message text */ public static void debug ( String className, String methodName, String msg ) { // Print formatted message string System.out.println("[" + className + "] [" + methodName + "()] " + msg); } /** * Get date/time stamp for current date/time. * @param sName thread group name */ public static String getDateTimeStamp() { // Return date/time stamp return getDateTimeStamp(new Date()); } /** * Get date/time stamp for current date/time. * @param sName thread group name */ public static String getDateTimeStamp ( Date date ) { // Return date/time stamp return "UTC-Timestamp=" + DateFormat.getDateTimeInstance().format(date); } /** * Get contents of a resource and return as a input stream. * * @param sResourceName the name of the resource to get and return as * an input stream */ public static InputStream getInputStream ( String sResourceName ) throws IOException { InputStream is = null; // If resource reference is a URL, then input stream from URL try { // Try to create URL URL urlResource = new URL(sResourceName); // If successful, then get URL input stream is = getInputStream(urlResource); } // Else try to read resource directly catch (MalformedURLException mue) { boolean bTryClassLoader = false; try { // Open file input stream is = new BufferedInputStream(new FileInputStream(sResourceName)); } catch (FileNotFoundException fnfe) { // Set try class loader flag bTryClassLoader = true; } catch (SecurityException se) { // Set try class loader flag bTryClassLoader = true; } catch (Exception e) { // DEBUG: out(sClassName, "getInputStream", e.toString()); } // If try class loader, then use it to get input stream if (bTryClassLoader) { // Use class loader to load resource is = ClassLoader.getSystemResourceAsStream(sResourceName); } } // If the input stream is null, then throw FileNotFoundException if (is == null) { //try this is = Thread.currentThread().getContextClassLoader().getResourceAsStream(sResourceName); } // If the input stream is null, then throw FileNotFoundException if (is == null) { //try this URL aURL = Thread.currentThread().getContextClassLoader().getResource(sResourceName); if ( aURL != null ) is = getInputStream(aURL); } if (is == null) // Throw execption throw new FileNotFoundException("Could not locate resource file: " + sResourceName); // Return input stream return is; } /** * Get the input stream from a URL. * @param url the URL to get the input stream from */ public static InputStream getInputStream ( URL urlFile ) throws IOException, ConnectException { InputStream is = null; // ADD: how are URLs that are password protected handled???? try { // Open file input stream is = new BufferedInputStream(urlFile.openStream()); } catch (ConnectException e) { // Re-throw this excpetion with additional information throw new java.net.ConnectException("Could not connect to URL: " + urlFile.toExternalForm() + "."); } // Return input stream return is; } /** * Get local host name. */ public static String getLocalHostName() { String sLocalHostName; try { // Get local host name sLocalHostName = InetAddress.getLocalHost().getHostName(); } catch (Exception e) { // Set default local host name sLocalHostName = "127.0.0.1"; } // Return local host name return sLocalHostName; } /** * Build a URL string from hostname, port and URN. * * @param hostname the hostname * @param port the port * @param urn the URN * * @return Returns formatted URL string. */ public static String formatURL(String hostname, String port, String urn) { // Build URN String formatURN = urn; // If URN doesn't start with "/", then add it if (!(formatURN.startsWith("/"))) { // Add "/" to beginning of the string formatURN = "/" + urn; } // Return URL string return "http://" + hostname + ":" + port + formatURN; } /** * This method will replace all of the occurances of a string * with a substitution string. * * @param sText String to udpate. * @param sFind String to find. * @param sReplace String to use for substitution. * * @return Returns updated string. */ public static String replaceString ( String sText, String sFind, String sReplace ) { int iPrevIndex = 0; int iFindLen = sFind.length(); int iReplaceLen = sReplace.length(); String sUpdatedText = sText; // Replace all occurances of the find string for (int iIndex = sUpdatedText.indexOf(sFind); iIndex < (sUpdatedText.length()-1) && iIndex != -1; iIndex = sUpdatedText.indexOf(sFind, iPrevIndex+iReplaceLen)) { // Set updated text from the front portion + replacement text + back portion sUpdatedText = sUpdatedText.substring(0, iIndex) + sReplace + sUpdatedText.substring(iIndex + iFindLen); // Set the previous index field iPrevIndex = iIndex; } // Return updated text string return sUpdatedText; } /** * Convert a string into a string array. * @param s string to convert to a string array */ public static String[] toStringArray ( String s ) { return toStringArray(s, " "); } /** * Convert a string into a string array. * @param s string to convert to a string array */ public static String[] toStringArray ( String s, String sDelim ) { int iCnt = 0; String sa[] = null; // If string is null, then bypass tokenize process if (s == null) { sa = new String[0]; } // Else tokenize the argument string else { // Get string tokenizer StringTokenizer st = new StringTokenizer(s, " "); // Allocate string array sa = new String[st.countTokens()]; // Get all of the string tokens while (st.hasMoreTokens()) sa[iCnt++] = st.nextToken(); } // Return the string array return sa; } /** * Creates a URL object. If the URL uses the https protocol, then the correct URLStreamHandler * is associated with the URL object. * * @param urlString URL string to format into a URL object * * @return Returns a URL object. A null value is returned if the input URL string is null. */ public static URL createURL(String urlString) throws MalformedURLException, ClassNotFoundException, InstantiationException, IllegalAccessException { URL url = null; // If input URL string is NOT null, then create URL object if (urlString != null) { if (urlString.startsWith("https")) { String t1 = new String(urlString.substring(8)); String host = new String(t1.substring(0, t1.indexOf('/'))); String file = new String(t1.substring(t1.indexOf('/'))); int index; if ((index = host.indexOf(":443")) != -1) host = host.substring(0, index); url = new URL("https", host, 443, file, (URLStreamHandler)Class.forName("com.ibm.net.ssl.internal.www.protocol.https.Handler").newInstance()); } // Else just create URL object else { url = new URL(urlString); } } // Return URL object return url; } /** * Create an HTTPS URL. */ public static String createHttpsURL(String url) { String returnURL = null; if (url != null) { if (url.startsWith("https")) { String t1 = new String(url.substring(8)); String prot = new String(url.substring(0, 8)); String host = new String(t1.substring(0, t1.indexOf('/'))); String file = new String(t1.substring(t1.indexOf('/'))); int index; if ((index = host.indexOf(":443")) != -1) host = host.substring(0, index); returnURL = prot + host + ":443" + file; } else { returnURL = url; } } // Return URL return returnURL; } /** * Get XML string representation for WSIL element. */ public static String toXMLString(Collection collection) { StringBuffer sb = new StringBuffer(""); // Get list of WSIL elements Iterator iterator = collection.iterator(); // Process each element while (iterator.hasNext()) { sb.append(((WSILElement) iterator.next()).toXMLString()); } // Return string return sb.toString(); } } wsil4j-1.0.0/src/org/apache/wsil/util/WSDLDocument.java000066400000000000000000000376771166574435000226300ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.util; import javax.wsdl.*; import javax.wsdl.factory.*; import com.ibm.wsdl.Constants; import javax.wsdl.factory.WSDLFactory; import javax.wsdl.xml.WSDLReader; import javax.wsdl.xml.WSDLWriter; import org.w3c.dom.Document; import org.xml.sax.InputSource; import java.io.*; import java.net.*; import java.util.*; /** * Provides an easy way to read and write information to and from * WSDL documents. */ public class WSDLDocument { /** * Class name. */ protected static final String className = "WSDLDocument"; // The primary Definition element for our WSDL document. private Definition wsdlDocumentDef = null; /** * WSDL related namespaces. */ public static final String NS_URI_XSD = "http://www.w3.org/2001/XMLSchema"; public static final String NS_URI_WSDL_SOAP = "http://schemas.xmlsoap.org/wsdl/soap/"; public static final String NS_URI_WSDL_HTTP = "http://schemas.xmlsoap.org/wsdl/http/"; public static final String NS_URI_WSDL_MIME = "http://schemas.xmlsoap.org/wsdl/mime/"; /** * WSDL factory class */ public static final String WSDL_FACTORY = "com.ibm.wsdl.factory.WSDLFactoryImpl"; protected static WSDLFactory wsdlFactory= null; protected static WSDLException wsdlException= null; static { try { wsdlFactory= WSDLFactory.newInstance(WSDL_FACTORY); }catch(WSDLException e) { wsdlException= e; } } /** * Constructs a new WSDL document from the specified file. * * @param fileName The name of the WSDL file to be read. Specify either * the full path to the file, or a URL address. * * @exception WSDLException if the WSDL document cannot be created. */ public WSDLDocument(String fileName) throws WSDLException { read(fileName); } /** * Constructs a new WSDL document from the specified URL. * * @param documentURL the URL where the WSDL document is located * * @exception WSDLException if the WSDL document cannot be created. */ public WSDLDocument(URL documentURL) throws WSDLException { this (documentURL.toExternalForm()); } /** * Constructs a new WSDL document from the specified Reader. * * @param reader the reader that will be used to get the contents * of the WSDL document * * @exception WSDLException if the WSDL document cannot be created. */ public WSDLDocument(Reader reader) throws WSDLException { this.wsdlDocumentDef = getWSDLReader().readWSDL(null,new InputSource(reader)); } /** * Constructs a WSDLReader * * Set verbose option off. * Sets reslove imports off. * * @exception WSDLException if the WSDL document cannot be created. */ public static WSDLReader getWSDLReader() throws WSDLException { return getWSDLReader(false); } /** * Constructs a WSDLReader * * Set verbose option off. * * @param imports set to true if imports are to be reslolved, false if not. * * @exception WSDLException if the WSDL document cannot be created. */ public static WSDLReader getWSDLReader(final boolean imports) throws WSDLException { if(null!= wsdlException) throw wsdlException; WSDLReader ret= null; ret= wsdlFactory.newWSDLReader(); ret.setFeature(com.ibm.wsdl.Constants.FEATURE_VERBOSE, false); ret.setFeature(com.ibm.wsdl.Constants.FEATURE_IMPORT_DOCUMENTS, imports); return ret; } /** * Constructs a WSDLWriter * * * @exception WSDLException if the WSDL document cannot be created. */ public static WSDLWriter getWSDLWriter() throws WSDLException { if(null!= wsdlException) throw wsdlException; WSDLWriter ret= null; ret= wsdlFactory.newWSDLWriter(); return ret; } /** * Constructs a new WSDL document from a Document DOM. * * @param document A parsed XML document that conforms to the WSDL schema. * * @exception WSDLException if the WSDL document cannot be created. */ public WSDLDocument( Document document ) throws WSDLException { this.wsdlDocumentDef = getWSDLReader().readWSDL(null,document); } /** * Constructs a new WSDL document from a UDDI businessService. * * @param definition A WSDL definition element. * * @exception WSDLException if the WSDL document cannot be created. */ public WSDLDocument(Definition definition) throws WSDLException { this.wsdlDocumentDef = definition; } /** * Read the information contained in a WSDL file. * * @param fileName The name of the WSDL file to be read. Specify either * the full path to the file, or a URL address. * * @exception WSDLException if a error occurs processing the file. */ public void read(String fileName) throws WSDLException { read(fileName,true); } /** * Read the information contained in a WSDL file * * @param fileName the name of the WSDL file to be read. Specify either * the full path to the file, or a URL address. * @param imports true if imports in the WSDL file should be resolved * @exception WSDLException if an error occurs processing the file. */ public void read(String fileName, boolean imports) throws WSDLException { this.wsdlDocumentDef = getWSDLReader(imports).readWSDL(null,fileName); } /** * Write the WSDL document to the specified file. * * @param fileName The name of the file to write to. */ public void write(String fileName) { try { FileWriter fw = new FileWriter(fileName); write(fw); fw.close(); } catch (IOException e) { // An IOException is possible when you create the FileWriter // or when you invoke the close() method. System.out.println("IOException occurred attempting to write document to file: " + fileName); } } /** * Write the WSDL document content to the specified writer. * * @param writer The Writer to use. */ public void write(Writer writer) { try { getWSDLWriter().writeWSDL(wsdlDocumentDef,writer); } catch (WSDLException e) { System.out.println("Exception occurred writing the document."); e.printStackTrace(); } } /** * Generate an XML string that represents the WSDL document content. * * @return String The string containing this document serialized as XML. */ public String serializeToXML() { StringWriter sw = new StringWriter(); write(sw); try { sw.close(); } catch (IOException e) { // An IOException is possible when you invoke the close() method. System.out.println("IOException occurred closing the writer"); } return sw.toString(); } /** * Get the definition element of the WSDL document. * * @return The definition element */ public Definition getDefinitions() { // Return the definition element return wsdlDocumentDef; } /** * Get all the message elements from the WSDL document. * * @return The list of message elements. */ public Message[] getMessages() { // Generate an array of Messages from the Message map for this Definition return (Message[])wsdlDocumentDef.getMessages().values().toArray(new Message[0]); } /** * Get all the portType elements from the WSDL document. * * @return The list of portType elements. */ public PortType[] getPortTypes() { // Generate an array of PortTypes from the PortType map for this Definition return (PortType[])wsdlDocumentDef.getPortTypes().values().toArray(new PortType[0]); } /** * Get all the binding elements from the WSDL document. * * @return The list of binding elements. */ public Binding[] getBindings() { // Generate an array of Bindings from the Binding map for this Definition return (Binding[])wsdlDocumentDef.getBindings().values().toArray(new Binding[0]); } /** * Get all the import elements from the WSDL document. * * @return The list of import elements. */ public Import[] getImports() { /* * Each entry in the Import map is actually a list of Imports. * Gather all the Imports for this Definition. */ Iterator importListIterator = wsdlDocumentDef.getImports().values().iterator(); Vector importVector = new Vector(); while (importListIterator.hasNext()) { importVector.addAll((List)importListIterator.next()); } // Generate an array of Imports return (Import[])importVector.toArray(new Import[0]); } /** * Get all the service elements from the WSDL document. * * @return The list of service elements. */ public Service[] getServices() { // Generate an array of Services from the Service map for this Definition return (Service[])wsdlDocumentDef.getServices().values().toArray(new Service[0]); } /** * Check if this document is a service interface. * That means it must contain Message, PortType and Binding elements. * * @return true if Message, PortType and Binding elements are all found; * false otherwise */ public boolean isServiceInterface() { return WSDLDocumentIdentifier.isInterfaceDocument( this ); } /** * Check if this document is a service interface with bindings only. * That means it must contain Binding elements only. * * @return true if Binding element is found; * false otherwise */ public boolean isServiceInterfaceWithBindingsOnly() { return WSDLDocumentIdentifier.isBindingInterfaceDocument( this ); } /** * Check if this document is a service implementation. * That means it must contain at least one Import and one Service element. * No attempt is made to verify the content of any imported document. * * @return true if at least one Import and one Service element is found; * false otherwise */ public boolean isServiceImplementation() { return WSDLDocumentIdentifier.isImplementationDocument( this ); } /** * Check if this document is both a service interface and a service implementation. * That means it must contain Message, PortType, Binding and Service elements. * * @return true if Message, PortType, Binding and Service elements are all found; * false otherwise */ public boolean isCompleteServiceDefinition() { return WSDLDocumentIdentifier.isCompleteDocument( this ); } /** * Find the Service Interface document which this Service Implementation * document references. * * A Service Implementation document is expected to contain an Import * statement that references the Service Interface document. * * @return WSDLDocument the Service Interface document. A null is returned * if the source document is not a service implementation * document or we didn't find an import for a service * implementation document. * * @exception WSDLException if an error occurs while reading * an imported document. */ public WSDLDocument findServiceInterface() throws WSDLException { String documentURI; WSDLDocument wsdlDoc = null; /* * If this is a Service Implementation document, scan the list of * imports, looking for the first one that could be a Service Interface * document. */ if (isServiceImplementation()) { // Get the list of import statements for this source document Import [] wsdlImportList = getImports(); for (int i = 0; i < wsdlImportList.length; i++) { // If the imported WSDL document is a Service Interface, we are done. documentURI = wsdlImportList[i].getLocationURI(); wsdlDoc = new WSDLDocument(documentURI); if (wsdlDoc.isServiceInterface()) { return wsdlDoc; } else { wsdlDoc = null; } } } // Return null return wsdlDoc; } /** * Return string representation of this object. */ public String toString() { // Return string return (wsdlDocumentDef == null) ? "WSDL definition element is null." : wsdlDocumentDef.toString(); } /** * Command line interface for validating WSDL documents. */ public static void main(String[] args) { String filename = null; if (args.length == 0) { System.out.println("Usage: WSDLDocument "); } else { try { filename = args[0]; // Display message System.out.println("Reading WSDL document [" + filename + "]..."); // Read WSDL document WSDLDocument wsdlDocument = new WSDLDocument(filename); // Display message System.out.println("Document contents: "); // Display contents of document System.out.println(wsdlDocument.toString()); } catch (Exception e) { // Display exception System.out.println("EXCEPTION: Could not process WSDL document [" + filename + "]."); e.printStackTrace(); } } // Exit System.exit(0); } private static String WSDL4J_DEFINITION_FACTORY_PROP= "javax.wsdl.factory.DefinitionFactory"; //see WSDL4J documentation. static { //This defines to WSDL4J additional extensions used in WSDL generated by Microsoft's SOAP toolkit. String existing= System.getProperty(WSDL4J_DEFINITION_FACTORY_PROP); if(null == existing) System.setProperty(WSDL4J_DEFINITION_FACTORY_PROP,"com.ibm.wsdl.factory.IBMWSTKDefinitionFactoryImpl"); } } wsil4j-1.0.0/src/org/apache/wsil/util/WSDLDocumentIdentifier.java000066400000000000000000000204071166574435000246120ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.util; import javax.wsdl.*; import com.ibm.wsdl.Constants; import java.util.*; public class WSDLDocumentIdentifier { /** * Determine whether the document meets the criteria for an Interface document. * The document must contain Message, PortType and Binding elements. * * @param wsdlDocument the document to be evaluated * @return true if Message, PortType and Binding elements are found; * false otherwise */ public static boolean isInterfaceDocument( WSDLDocument wsdlDocument ) { Definition definition = wsdlDocument.getDefinitions(); return ( hasMessageElement( definition ) && hasPortTypeElement( definition ) && hasBindingElement( definition ) ); } /** * Determine whether the document meets the criteria for an Interface document * that has bindings only. * The document must contain Binding elements. * * @param wsdlDocument the document to be evaluated * @return true if Binding element is found; * false otherwise */ public static boolean isBindingInterfaceDocument( WSDLDocument wsdlDocument ) { Definition definition = wsdlDocument.getDefinitions(); return ( hasBindingElement( definition ) ); } /** * Determine whether the document meets the criteria for an Implementation document. * The document must contain at least one Import and one Service element. * We do not make any effort to verify the content of any import documents. * * @param wsdlDocument the document to be evaluated * @return true if at least one Import and one Service element are found; * false otherwise */ public static boolean isImplementationDocument( WSDLDocument wsdlDocument ) { Definition definition = wsdlDocument.getDefinitions(); return ( hasImportElement( definition ) && hasServiceElement( definition ) ); } /** * Determine whether the document meets the criteria for a Complete document. * The document must contain Message, PortType, Binding and Service elements. * * @param wsdlDocument the document to be evaluated * @return true if Message, PortType, Binding and Service elements are found; * false otherwise */ public static boolean isCompleteDocument( WSDLDocument wsdlDocument ) { Definition definition = wsdlDocument.getDefinitions(); return ( hasMessageElement( definition ) && hasPortTypeElement( definition ) && hasBindingElement( definition ) && hasServiceElement( definition )); } private static boolean hasMessageElement( Definition definition ) { /* * Our usage of WSDL documents does not require the IMPORT statement * to be read in and processed. This means our Message map can contain * defined and undefined entries. A defined entry would represent * a Message defined in our current document. An undefined entry would * represent a Message that is referenced in our current document, but * most likely defined in some other (Imported) document. * * Get the Message map for this WSDL Definition and see if it * contains any entries that are marked as defined. * */ Iterator theIterator = definition.getMessages().values().iterator(); while (theIterator.hasNext()) { Message x = (Message)theIterator.next(); if (!x.isUndefined()) { // Found a defined Message. return true; } } // No defined Messages were found. return false; } private static boolean hasPortTypeElement( Definition definition ) { /* * Our usage of WSDL documents does not require the IMPORT statement * to be read in and processed. This means our PortType map can contain * defined and undefined entries. A defined entry would represent * a PortType defined in our current document. An undefined entry would * represent a PortType that is referenced in our current document, but * most likely defined in some other (Imported) document. * * Get the PortType map for this WSDL Definition and see if it * contains any entries that are marked as defined. * */ Iterator theIterator = definition.getPortTypes().values().iterator(); while (theIterator.hasNext()) { PortType x = (PortType)theIterator.next(); if (!x.isUndefined()) { // Found a defined PortType. return true; } } // No defined PortTypes were found. return false; } private static boolean hasBindingElement( Definition definition ) { /* * Our usage of WSDL documents does not require the IMPORT statement * to be read in and processed. This means our Binding map can contain * defined and undefined entries. A defined entry would represent * a Binding defined in our current document. An undefined entry would * represent a Binding that is referenced in our current document, but * most likely defined in some other (Imported) document. * * Get the Binding map for this WSDL Definition and see if it * contains any entries that are marked as defined. * */ Iterator theIterator = definition.getBindings().values().iterator(); while (theIterator.hasNext()) { Binding x = (Binding)theIterator.next(); if (!x.isUndefined()){ // Found a defined Binding. return true; } } // No defined Bindings were found. return false; } private static boolean hasImportElement( Definition definition ) { // Check to see if the Import map has any elements. return !(definition.getImports().isEmpty()); } private static boolean hasServiceElement( Definition definition ) { // Check to see if the Service map has any elements. return !(definition.getServices().isEmpty()); } } wsil4j-1.0.0/src/org/apache/wsil/util/WSILDocBuilder.java000066400000000000000000000545371166574435000230650ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.util; import org.apache.wsil.*; import org.apache.wsil.extension.*; import org.apache.wsil.extension.wsdl.*; import org.apache.wsil.extension.uddi.*; import org.apache.wsil.impl.extension.wsdl.*; import org.apache.wsil.impl.extension.uddi.*; import org.uddi4j.*; import org.uddi4j.util.*; import org.uddi4j.transport.*; import org.uddi4j.client.*; import org.uddi4j.response.*; import org.uddi4j.datatype.business.*; import org.uddi4j.datatype.service.*; import org.uddi4j.datatype.Name; import javax.wsdl.*; import java.io.*; import java.net.*; import java.util.*; /** * This class builds a WSIL document. * * @author Alfredo da Silva */ public class WSILDocBuilder { /** * Max number of rows returned by the UDDI registry. * */ protected static final int MAX_ROWS = 100; /** * WSIL inspection document reference. * */ protected WSILDocument wsilDocument = null; /** * Creates a new WSILDocBuilder instance. * */ public WSILDocBuilder() throws WSILException { // Create WSIL document object wsilDocument = WSILDocument.newInstance(); } /** * Creates a new WSILDocBuilder instance. * * @param root a String value * @exception WSILException if an error occurs * @exception WSDLException if an error occurs * @exception IOException if an error occurs */ public WSILDocBuilder(String root) throws WSILException, WSDLException, IOException { initWSDL(root); } /** * Creates a new WSILDocBuilder instance. * * @param registryURL an URL value * @exception WSILException if an error occurs */ public WSILDocBuilder(URL registryURL) throws WSILException { initUDDI(registryURL, null); } /** * Creates a new WSILDocBuilder instance. * * @param registryURL an URL value * @param businessKey a String value * @exception WSILException if an error occurs */ public WSILDocBuilder(URL registryURL, String businessKey) throws WSILException { initUDDI(registryURL, businessKey); } /** * Creates a new initWSDL instance. * * @param root a String value * @exception WSILException if an error occurs * @exception WSDLException if an error occurs * @exception IOException if an error occurs */ private void initWSDL(String root) throws WSILException, WSDLException, IOException { // Create WSIL document object wsilDocument = WSILDocument.newInstance(); wsilDocument.setDocumentURL(Util.formatURL(WSILProperties.WSIL_HOSTNAME, WSILProperties.WSIL_PORT, "")); // Get ExtensionRegistry object ExtensionRegistry extensionRegistry = wsilDocument.getExtensionRegistry(); WSDLExtensionBuilder wsdlExtensionBuilder = (WSDLExtensionBuilder)extensionRegistry.getBuilder(WSDLConstants.NS_URI_WSIL_WSDL); // Get list of WSDL documents FileListBuilder fileListBuilder = new FileListBuilder(root, WSILProperties.WSDL_EXTENSION); File[] filesList = fileListBuilder.getFiles(); for (int i = 0; i < filesList.length; i++) { try { WSDLDocument wsdlDocument = new WSDLDocument(filesList[i].getPath()); String wsdlDocLocation = null; org.apache.wsil.QName qName = null; javax.wsdl.Service[] serviceList = null; if (wsdlDocument.isServiceImplementation() == true) { String originalPath = filesList[i].getPath(); // Replace '\' with '/' originalPath = originalPath.replace('\\', '/'); // Replace '\' with '/' root = root.replace('\\', '/'); int index = originalPath.indexOf(root) != -1 ? originalPath.indexOf(root) + root.length() + 1 : 0; String filteredPath = originalPath.substring(index); // Get filtered WSDL document location wsdlDocLocation = filteredPath.replace('\\', '/'); // Get service list serviceList = wsdlDocument.getServices(); // Create Description object Description description = wsilDocument.createDescription(); description.setReferencedNamespace(WSDLConstants.NS_URI_WSDL); description.setLocation(wsdlDocLocation); // Create Reference object Reference reference = (Reference)wsdlExtensionBuilder.createElement(Reference.QNAME); // Get all Services for (int j = 0; j < serviceList.length; j++) { // Get all ports Object[] portsArray = serviceList[j].getPorts().values().toArray(); org.apache.wsil.QName currentQName = null; for (int k = 0; k < portsArray.length; k++) { qName = new org.apache.wsil.QName(((Port)portsArray[k]).getBinding().getQName().getNamespaceURI(), ((Port)portsArray[k]).getBinding().getQName().getLocalPart()); // Avoid duplicates if (currentQName != null && currentQName.equals(qName)) continue; currentQName = qName; // Create ImplementedBinding object ImplementedBinding implementedBinding = (ImplementedBinding)wsdlExtensionBuilder.createElement(ImplementedBinding.QNAME); implementedBinding.setBindingName(qName); // Set endpointPresent accordingly // ADS if (wsdlDocument.isServiceInterface() == true) // { reference.setEndpointPresent(new Boolean("true")); // } // Add referencedService if there are more then 1 service defined if (serviceList.length > 1) { // Create ReferencedService object ReferencedService referencedService = (ReferencedService)wsdlExtensionBuilder.createElement(ReferencedService.QNAME); org.apache.wsil.QName refServQName = new org.apache.wsil.QName(wsdlDocument.getDefinitions().getTargetNamespace(), serviceList[j].getQName().getLocalPart()); referencedService.setReferencedServiceName(refServQName); // Set ReferencedService reference.setReferencedService(referencedService); } // Add ImplementedBinding reference.addImplementedBinding(implementedBinding); } // Add Reference object description.setExtensionElement(reference); // Create new Service object org.apache.wsil.Service service = wsilDocument.createService(); // Create ServiceName object ServiceName serviceName = wsilDocument.createServiceName(); // Set text serviceName.setText(serviceList[j].getQName().getLocalPart()); // Add service name service.addServiceName(serviceName); service.addDescription(description); // Add Service object wsilDocument.getInspection().addService(service); } } } catch( WSDLException e) { System.err.println("WSDL Exception occurred for:\"" + filesList[i].getPath()+ "\" error is: " + e.getMessage()); } catch( WSILException e) { System.err.println("WSILExceptione occurred for:\"" + filesList[i].getPath()+ "\" error is: " + e.getMessage()); } } } /** * Creates a new initUDDI instance. * * @param registryURL an URL value * @param businessKey a String value * @exception WSILException if an error occurs */ private void initUDDI(URL registryURL, String businessKey) throws WSILException { // Create WSIL document object wsilDocument = WSILDocument.newInstance(); // Get ExtensionRegistry object ExtensionRegistry extensionRegistry = wsilDocument.getExtensionRegistry(); UDDIExtensionBuilder uddiExtensionBuilder = (UDDIExtensionBuilder)extensionRegistry.getBuilder(UDDIConstants.NS_URI_WSIL_UDDI); try { Properties p = new Properties(); // Set SOAP transport p.setProperty(TransportFactory.PROPERTY_NAME, WSILProperties.TRANSPORT_CLASS); // Set inquiry URL p.setProperty("org.uddi4j.inquiryURL", registryURL.toString()); // Create UDDIProxy object UDDIProxy up = new UDDIProxy(p); ServiceList serviceList = null; if (businessKey == null) { // Find all services serviceList = up.find_service("", "%", null, MAX_ROWS); } else { // Find BusinessDetail object BusinessDetail businessDetail = up.get_businessDetail(businessKey); Vector businessEntityVector = businessDetail.getBusinessEntityVector(); BusinessEntity businessEntity = null; // Get BusinessEntity object if (businessEntityVector.size() > 0) businessEntity = (BusinessEntity)businessEntityVector.firstElement(); // Find all services given a BusinessEntity serviceList = up.find_service("", businessEntity.getDefaultNameString(), null, MAX_ROWS); } BusinessService[] businessServiceArray = findServices(serviceList, up); for (int i = 0; i < businessServiceArray.length; i++) { // Get service name String serviceNameString = businessServiceArray[i].getDefaultNameString(); // Get service key String serviceKeyUUID = businessServiceArray[i].getServiceKey(); // Create Description object Description description = wsilDocument.createDescription(); description.setReferencedNamespace(UDDIConstants.NS_URI_UDDI); //////////////////////////////////////////////////////////////////// //ServiceDescription /////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Create ServiceDescription object ServiceDescription serviceDescription = (ServiceDescription)uddiExtensionBuilder.createElement(ServiceDescription.QNAME); // Set location serviceDescription.setLocation(registryURL.toString()); //ServiceKey ///////////////////////////////////////////////////// // Create ServiceKey object ServiceKey serviceKey = serviceDescription.createServiceKey(); // Set service key serviceKey.setText(serviceKeyUUID); // Set service key serviceDescription.setServiceKey(serviceKey); //DiscoveryURL ///////////////////////////////////////////////////// // Find BusinessDetail object BusinessDetail businessDetail = up.get_businessDetail(businessServiceArray[i].getBusinessKey()); Vector businessEntityVector = businessDetail.getBusinessEntityVector(); BusinessEntity businessEntity = null; // Get BusinessEntity object if (businessEntityVector.size() > 0) { businessEntity = (BusinessEntity)businessEntityVector.firstElement(); // Get DiscoverURLs DiscoveryURLs discoveryURLs = businessEntity.getDiscoveryURLs(); Vector discoveryURLsVector = discoveryURLs.getDiscoveryURLVector(); for (int j = 0; j < discoveryURLsVector.size(); j++) { // Set discoveryURL serviceDescription.setDiscoveryURL((DiscoveryURL)discoveryURLsVector.elementAt(j)); } } // Add serviceDescription object description.setExtensionElement(serviceDescription); // Create new Service object org.apache.wsil.Service service = wsilDocument.createService(); // Create ServiceName object ServiceName serviceName = wsilDocument.createServiceName(); // Set text serviceName.setText(serviceNameString); // Add service name service.addServiceName(serviceName); service.addDescription(description); // Add Service object wsilDocument.getInspection().addService(service); } } catch(Exception e) { throw new WSILException("Unable to create WSILDocBuilder", e); } } /** * Returns a WSIL document. * * @return a WSILDocument value */ public WSILDocument getWSILDocument() { return wsilDocument; } /** * Adds a link object to the WSIL document * * @param referencedNamespace a String value * @param location a String value */ public void addLink(String referencedNamespace, String location) { // Create link object Link link = wsilDocument.createLink(); link.setReferencedNamespace(referencedNamespace); link.setLocation(location); // Add link object wsilDocument.getInspection().addLink(link); } /** * Adds a link object to the WSIL document * * @param registryURL an URL value * @exception WSILException if an error occurs */ public void addLink(URL registryURL) throws WSILException { // Get ExtensionRegistry object ExtensionRegistry extensionRegistry = wsilDocument.getExtensionRegistry(); UDDIExtensionBuilder uddiExtensionBuilder = (UDDIExtensionBuilder)extensionRegistry.getBuilder(UDDIConstants.NS_URI_WSIL_UDDI); try { Properties p = new Properties(); // Set SOAP transport p.setProperty(TransportFactory.PROPERTY_NAME, WSILProperties.TRANSPORT_CLASS); // Set inquiry URL p.setProperty("org.uddi4j.inquiryURL", registryURL.toString()); // Create UDDIProxy object UDDIProxy up = new UDDIProxy(p); // Find all Service providers BusinessList businessList = up.find_business("%", null, MAX_ROWS); BusinessEntity[] businessEntityArray = null; businessEntityArray = findBusinessEntities(businessList.getBusinessInfos(), up); for (int i = 0; i < businessEntityArray.length; i++) { // Create link object Link link = wsilDocument.createLink(); link.setReferencedNamespace(UDDIConstants.NS_URI_UDDI); // Get Business key String businessKeyUUID = businessEntityArray[i].getBusinessKey(); //////////////////////////////////////////////////////////////////// //businessDescription /////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Create BusinessDescription object BusinessDescription businessDescription = (BusinessDescription)uddiExtensionBuilder.createElement(BusinessDescription.QNAME); // Set location businessDescription.setLocation(registryURL.toString()); //BusinessKey ///////////////////////////////////////////////////// // Create BusinessKey object BusinessKey businessKey = businessDescription.createBusinessKey(); // Set business key String businessKey.setText(businessKeyUUID); // Set business key businessDescription.setBusinessKey(businessKey); //DiscoveryURL ///////////////////////////////////////////////////// // Get DiscoverURLs DiscoveryURLs discoveryURLs = businessEntityArray[i].getDiscoveryURLs(); Vector discoveryURLsVector = discoveryURLs.getDiscoveryURLVector(); for (int j = 0; j < discoveryURLsVector.size(); j++) { // Set discoveryURL businessDescription.setDiscoveryURL((DiscoveryURL)discoveryURLsVector.elementAt(j)); } // Add businessDescription object link.setExtensionElement(businessDescription); // Add link object wsilDocument.getInspection().addLink(link); } } catch(Exception e) { throw new WSILException("Unable to create WSILDocBuilder", e); } } /** * Adds a list of WSIL Service objects to the WSIL Document. * * @param root a String value * @exception WSILException if an error occurs * @exception WSDLException if an error occurs * @exception IOException if an error occurs */ public void addService(String root) throws WSILException, WSDLException, IOException { initWSDL(root); } /** * Adds a list of UDDI Service objects to the WSIL Document. * * @param registryURL an URL value * @exception WSILException if an error occurs */ public void addService(URL registryURL) throws WSILException { initUDDI(registryURL, null); } /** * Find all BusinessService objects given a serviceList object * * @param serviceList * @return Return a BusinessService array */ protected BusinessService[] findServices(ServiceList serviceList, UDDIProxy up) throws WSILException { BusinessService[] businessServiceList = null; ServiceDetail serviceDetail; Vector siList, skList = new Vector(); try { // Get the list of services siList = serviceList.getServiceInfos().getServiceInfoVector(); // Build service key list for (int i = 0; i < siList.size(); i++) { // Get the service detail for the next service skList.addElement(((ServiceInfo) siList.elementAt(i)).getServiceKey()); } // Get the service detail for all of the services serviceDetail = up.get_serviceDetail(skList); // Get the business service list Vector bsList = serviceDetail.getBusinessServiceVector(); // Build BusinessService list if (bsList.size() > 0) { businessServiceList = new BusinessService[bsList.size()]; bsList.copyInto(businessServiceList); } } catch (Exception e) { // Throw exception throw new WSILException("Find services exception: " + e.toString(), e); } return businessServiceList; } /** * Get all BusinessEntity objects from a BusinessInfos object. * * @param businessInfos * * @return Return a BusinessEntity array */ protected BusinessEntity[] findBusinessEntities(BusinessInfos businessInfos, UDDIProxy up) throws WSILException { BusinessEntity[] businessEntityList = null; BusinessDetail businessDetail; Vector keyList; try { // Get business info list keyList = getBusinessKeyVector(businessInfos); if (keyList.size() > 0) { // Get business detail businessDetail = up.get_businessDetail(keyList); // Get business entity list Vector beList = businessDetail.getBusinessEntityVector(); // Create businessEntityList if (beList.size() > 0) { businessEntityList = new BusinessEntity[beList.size()]; beList.copyInto(businessEntityList); } } } catch(Exception e) { // Throw exception throw new WSILException("Could not list all business entities.", e); } return businessEntityList; } /** * Get business keys from a list of businessInfos. * * @return Return a list of business keys. */ public static Vector getBusinessKeyVector(BusinessInfos businessInfos) { Vector keyList = new Vector(); // Get list of business infos Vector biList = businessInfos.getBusinessInfoVector(); // Process each business info for (int i = 0; i < biList.size(); i++) { // Get serviceInfos keyList.add(((BusinessInfo) biList.elementAt(i)).getBusinessKey()); } // Return key list return keyList; } } wsil4j-1.0.0/src/org/apache/wsil/util/WSILProperties.java000066400000000000000000000201211166574435000231630ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.util; import java.util.*; import java.io.*; import org.apache.wsil.util.*; /** * The WS-Inspection properties can be defined in one of three locations. * * 1. The wsil.properties file which can be located anywhere in the classpath. * 2. The system property settings. * 3. The thread local property settings. * * The properties are set based on this ordering. For example, the properties * from the wsil.properties file will be replaced by properties from the system * property settings, which will be replaced by the thread local property settings. * * The properties that are used to define the implementation classes can be * specified as system properties or as properties that are set in a thread * local variable. System properties should be used if only one implementation * is needed per JVM. If two or more implementations are needed per JVM, then * the properties should be set using the thread local variable. * * @version 1.0 * @author: Peter Brittenham */ public final class WSILProperties { /** * Properties object. */ protected static Properties props = new Properties(); /** * Default WSILDocumentFactory class name. */ protected static final String DEF_DOCUMENT_FACTORY = "org.apache.wsil.impl.WSILDocumentFactoryImpl"; /** * Property that contains WSILDocumentFactory class name. */ protected static final String PROP_DOCUMENT_FACTORY = "wsil.document.factory"; /** * Property file name. */ protected static final String PROP_FILENAME = "wsil.properties"; /** * WSDL extension. */ public static final String WSDL_EXTENSION = "wsdl"; /** * Tranport class. */ public static String TRANSPORT_CLASS = "org.uddi4j.transport.ApacheAxisTransport"; public static final String PROP_TRANSPORT_CLASS = "wsil.transport.class"; /** * WSIL hostname. */ public static String WSIL_HOSTNAME = "localhost"; public static final String PROP_WSIL_HOSTNAME = "wsil.hostname"; /** * WSIL port. */ public static String WSIL_PORT = "8080"; public static final String PROP_WSIL_PORT = "wsil.port"; /** * WSIL inspection document name. */ public static String WSIL_DOCUMENT_NAME = "inspection.wsil"; public static final String PROP_WSIL_DOCUMENT_NAME = "wsil.document.name"; /** * Thread local variable. */ private static ThreadLocal propsThreadLocal = new ThreadLocal(); static { loadProperties(); } public static void loadProperties() { try { // Get properties file props.load(Util.getInputStream(PROP_FILENAME)); // Get tranport class TRANSPORT_CLASS = props.getProperty(PROP_TRANSPORT_CLASS, TRANSPORT_CLASS); // Get hostname WSIL_HOSTNAME = props.getProperty(PROP_WSIL_HOSTNAME, WSIL_HOSTNAME); // Get port WSIL_PORT = props.getProperty(PROP_WSIL_PORT, WSIL_PORT); // Get inspection document name WSIL_DOCUMENT_NAME = props.getProperty(PROP_WSIL_DOCUMENT_NAME, WSIL_DOCUMENT_NAME); // Debug // System.out.println("TRANSPORT_CLASS = " + TRANSPORT_CLASS); // System.out.println("WSIL_HOSTNAME = " + WSIL_HOSTNAME); // System.out.println("WSIL_PORT = " + WSIL_PORT); // System.out.println("WSIL_DOCUMENT_NAME = " + WSIL_DOCUMENT_NAME); } catch (IOException e) { } // Check for properties in the localThread and in the System. getProperties(); } /** * Do not allow this class to be instantiated. */ private WSILProperties() { } /** * Get properties that were set for this thread only. */ public static Properties getProperties() { // Get the properties from the thread local variable if ((props = (Properties) propsThreadLocal.get()) == null) { // Get the system properties props = System.getProperties(); } // Return properties return props; } /** * Set properties for this thread only. */ public static void setProperties(Properties props) { // Save the properties as thread local variables propsThreadLocal.set(props); } /** * Get the WSIL document factory class name. */ public static String getDocumentFactory() { // Get document factory class name from the properties settings return getProperties().getProperty(PROP_DOCUMENT_FACTORY, DEF_DOCUMENT_FACTORY); } /** * This method is used to unit test this class. */ public static void main(String[] args) { try { // Start four threads to verify that the multithreaded use of tread local vars works for (int i = 0; i < 5; i++) { // Create new thread (new Thread(new ThreadTest("test" + i))).start(); try { // Sleep Thread.sleep(200); // Display properties, which should be system properties System.out.println("System Properties? - " + WSILProperties.getProperties()); } catch(Exception e){} } } catch(Exception e) { e.printStackTrace(); } } /** * Inner class used for unit test. */ static private class ThreadTest extends Thread { String name; ThreadTest(String name) { this.name = name; } public void run() { Properties props = new Properties(); props.setProperty(PROP_DOCUMENT_FACTORY , name); WSILProperties.setProperties(props); //System.out.println("Thread Properyties? - " + WSILProperties.getProperties()); } } } wsil4j-1.0.0/src/org/apache/wsil/util/XMLUtil.java000066400000000000000000000122031166574435000216300ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.util; import org.w3c.dom.*; /** * This class contains a set of XML related utility methods. * * @version 1.0 * @author: Peter Brittenham */ public final class XMLUtil { /** * Get attribute value. */ public static String getAttributeValue(Element element, String attrName) { String attrValue = null; Attr attr = null; // Get the attribute using its name if ((attr = element.getAttributeNode(attrName)) != null) { attrValue = attr.getValue(); } // Return attribute value return attrValue; } /** * Get attribute value. */ public static String getAttributeValueNS(Element element, String namespace, String attrName) { String attrValue = null; Attr attr = null; // Get the attribute using its name if ((attr = element.getAttributeNodeNS(namespace, attrName)) != null) { attrValue = attr.getValue(); } // Return attribute value return attrValue; } /** * Get the first child element from the input elment. */ public static Element getFirstChild(Element element) { // Return the first child element return findNextSibling(element.getFirstChild()); } /** * Get the next sibling element. */ public static Element getNextSibling(Element element) { // Return next sibling element return findNextSibling(element.getNextSibling()); } /** * Find the next sibling element. */ protected static Element findNextSibling(Node startNode) { Node node = null; Element returnElement = null; // Find the next sibling element for (node = startNode; node != null && returnElement == null; node = node.getNextSibling()) { // If this node is an element node, then return it if (node.getNodeType() == Node.ELEMENT_NODE) { returnElement = (Element) node; } } // Return next sibling element return (Element) returnElement; } /** * Get the text that is associated with this element. */ public static String getText(Element element) { String text = null; // Get first child element Node node = element.getFirstChild(); // Process while there are nodes and the text hasn't been found while ((node != null) && (text == null)) { // If a text node or cdata section is found, then get text if ((node.getNodeType() == Node.TEXT_NODE) || (node.getNodeType() == Node.CDATA_SECTION_NODE)) { text = ((CharacterData) node).getData(); } // Get next sibling node = node.getNextSibling(); } return text; } } wsil4j-1.0.0/src/org/apache/wsil/util/wsil.properties000066400000000000000000000016001166574435000225620ustar00rootroot00000000000000# Property file used to set parameters for WSIL4J # ----------------------------------------------------------------------- # Class responsible for SOAP transport. # # ----------------------------------------------------------------------- wsil.transport.class=org.uddi4j.transport.ApacheAxisTransport # ----------------------------------------------------------------------- # Hostname to use. # # ----------------------------------------------------------------------- wsil.hostname=localhost # ----------------------------------------------------------------------- # Server port to use. # # ----------------------------------------------------------------------- wsil.port=8080 # ----------------------------------------------------------------------- # WSIL document name. # # ----------------------------------------------------------------------- wsil.document.name=inspection.wsilwsil4j-1.0.0/src/org/apache/wsil/xml/000077500000000000000000000000001166574435000173145ustar00rootroot00000000000000wsil4j-1.0.0/src/org/apache/wsil/xml/XMLReader.java000066400000000000000000000326631166574435000217540ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.xml; import org.apache.wsil.*; import org.apache.wsil.util.*; import org.apache.wsil.extension.*; import org.w3c.dom.*; import org.xml.sax.*; import javax.xml.parsers.*; import java.net.*; import java.io.*; /** * This class will use a DOM parser to read and process the contents * of a WS-Inspection document. * * @version 1.0 * @author: Peter Brittenham */ public class XMLReader implements DocumentReader { /** * Reader which is used to obtain contents of a WSIL document. */ protected Reader reader = null; /** * WSIL document. */ protected WSILDocument wsilDocument = null; /** * WSIL extension registry. */ protected ExtensionRegistry extRegistry = null; /** * Create a WSIL document reader. */ public XMLReader() { } /** * Parse abstract element. * * @param abstractElement the DOM element that contains the abstract element * @param wsilElement the WSIL element with that contains the abstract element */ protected Abstract parseAbstract(Element abstractElement, WSILElementWithAbstract wsilElement) throws WSILException { String lang; // Create abstract Abstract abs = wsilDocument.createAbstract(); // Set lang if ((lang = XMLUtil.getAttributeValue(abstractElement, WSILConstants.ATTR_XML_NS + ":" + WSILConstants.ATTR_XML_LANG)) != null) { abs.setLang(lang); } // Set text abs.setText(XMLUtil.getText(abstractElement)); // Return abstract return abs; } /** * Parse description element. * * @param descriptionElement the DOM element that contains the description element * @param service the service element */ protected Description parseDescription(Element descriptionElement, Service service) throws WSILException { // Create description Description description = wsilDocument.createDescription(); // Set location and referencedNamespace description.setLocation(XMLUtil.getAttributeValue(descriptionElement, WSILConstants.ATTR_LOCATION)); description.setReferencedNamespace(XMLUtil.getAttributeValue(descriptionElement, WSILConstants.ATTR_REF_NAMESPACE)); // Get the first child element Element element = XMLUtil.getFirstChild(descriptionElement); // Process each child element while (element != null) { // Abstract if (Abstract.QNAME.equals(element)) { description.addAbstract(parseAbstract(element, description)); } // Extension else { description.setExtensionElement(parseExtensionElement(element, description)); } // Get next child element element = XMLUtil.getNextSibling(element); } // Return description return description; } /** * Create a WSIL document from the contents of a reader. * * @param wsilDocument WS-Inspection document object * @param reader the reader from which to obtain the contents of the document */ public void parseDocument(WSILDocument wsilDocument, Reader reader) throws WSILException { // Save input references this.reader = reader; this.wsilDocument = wsilDocument; // Get the extension registry if ((this.extRegistry = wsilDocument.getExtensionRegistry()) == null) { // Throw exception throw new WSILException("WSIL document does not have a defined extension registry."); } // Start parsing the WSIL document parseInspection(parseXML(reader).getDocumentElement()); } /** * Parse extension element. * * @param element the DOM element that contains the extension element * @param wsilElement the WSIL element that contains the extension element */ protected ExtensionElement parseExtensionElement(Element element, WSILElement wsilElement) throws WSILException { ExtensionElement extElement = null; ExtensionReader extReader = null; // Get QName for the extension element QName qname = new QName(element); // Get the reader for this extension namespace if ((extReader = extRegistry.getReader(qname.getNamespaceURI())) == null) { // Use UnknownExtensionElement extElement = new UnknownExtensionElement(qname, element); // Throw exception //throw new WSILException("Could not locate handler for extension element: " + element.getTagName() + "."); } else { extElement = extReader.parseElement(element, wsilElement); } // Return extension return extElement; } /** * Parse inspection element. * * @param inspectionElement the DOM element that contains the inspection element */ protected void parseInspection(Element inspectionElement) throws WSILException { // Get inspection object from WSIL document Inspection inspection = wsilDocument.getInspection(); // Get the target namespace inspection.setTargetNamespace(XMLUtil.getAttributeValue(inspectionElement, WSILConstants.ATTR_TARGET_NAMESPACE)); // Save namespace specifications saveNS(inspectionElement, inspection); // Get the first child element Element element = XMLUtil.getFirstChild(inspectionElement); // Process each child element while (element != null) { // Abstract if (Abstract.QNAME.equals(element)) { inspection.addAbstract(parseAbstract(element, inspection)); } // Link else if (Link.QNAME.equals(element)) { inspection.addLink(parseLink(element, inspection)); } // Service else if (Service.QNAME.equals(element)) { inspection.addService(parseService(element, inspection)); } // Else throw exception else { throw new WSILException("WSIL document contains undefined element: " + element.getTagName() + "."); } // Get next child element element = XMLUtil.getNextSibling(element); } } /** * Parse link element. * * @param linkElement the DOM element that contains the link element * @param inspection the inspection element */ protected Link parseLink(Element linkElement, Inspection inspection) throws WSILException { // Create link Link link = wsilDocument.createLink(); // Set location and referencedNamespace link.setLocation(XMLUtil.getAttributeValue(linkElement, WSILConstants.ATTR_LOCATION)); link.setReferencedNamespace(XMLUtil.getAttributeValue(linkElement, WSILConstants.ATTR_REF_NAMESPACE)); // Get the first child element Element element = XMLUtil.getFirstChild(linkElement); // Process each child element while (element != null) { // Abstract if (Abstract.QNAME.equals(element)) { link.addAbstract(parseAbstract(element, link)); } // Extension else { link.setExtensionElement(parseExtensionElement(element, link)); } // Get next child element element = XMLUtil.getNextSibling(element); } // Return link return link; } /** * Parse service element. * * @param linkElement the DOM element that contains the service element * @param inspection the inspection element */ protected Service parseService(Element serviceElement, Inspection inspection) throws WSILException { // Create service Service service = wsilDocument.createService(); // Get the first child element Element element = XMLUtil.getFirstChild(serviceElement); // Process each child element while (element != null) { // Abstract if (Abstract.QNAME.equals(element)) { service.addAbstract(parseAbstract(element, service)); } // Name else if (ServiceName.QNAME.equals(element)) { service.addServiceName(parseServiceName(element, service)); } // Description else if (Description.QNAME.equals(element)) { service.addDescription(parseDescription(element, service)); } // Else throw exception else { throw new WSILException("WSIL document contains undefined element: " + element.getTagName() + "."); } // Get next child element element = XMLUtil.getNextSibling(element); } // Return service return service; } /** * Parse service name element. * * @param linkElement the DOM element that contains the name element * @param service the service element */ protected ServiceName parseServiceName(Element nameElement, Service service) throws WSILException { String lang; // Create name ServiceName serviceName = wsilDocument.createServiceName(); // Set lang if ((lang = XMLUtil.getAttributeValue(nameElement, WSILConstants.ATTR_XML_NS + ":" + WSILConstants.ATTR_XML_LANG)) != null) { serviceName.setLang(lang); } // Set text serviceName.setText(XMLUtil.getText(nameElement)); // Return service name return serviceName; } /** * Parse the XML document. */ protected Document parseXML(Reader reader) throws WSILException { Document doc = null; // Create input source InputSource inputSource = new InputSource(reader); // Get the document factory DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); // Set namespace aware, but for now do not validate factory.setNamespaceAware(true); factory.setValidating(false); try { // Parse the document DocumentBuilder builder = factory.newDocumentBuilder(); doc = builder.parse(inputSource); } catch (Exception e) { throw new WSILException("Could not parse WSIL document.", e); } // Return document return doc; } /** * Save namespace settings. */ protected void saveNS(Element element, Inspection inspection) { Attr attr; String namespaceURI, localName, attrValue; // Get a list of attributes NamedNodeMap attrList = element.getAttributes(); // For each attribute, for (int i = 0; i < attrList.getLength(); i++) { // Get the next attribute attr = (Attr) attrList.item(i); // Get the attribute value attrValue = attr.getValue(); // If the namespace URI is the XML namespace, then save local name setting if ((namespaceURI = attr.getNamespaceURI()) != null && namespaceURI.equals(WSILConstants.NS_URI_XMLNS)) { // If the local name is xmlns, then save just the attribute value if ((localName = attr.getLocalName()) != null && localName.equals(WSILConstants.ATTR_XMLNS)) { inspection.addNamespace(null, attrValue); } // Else save the local name and the attribute value else { inspection.addNamespace(localName, attrValue); } } } } } wsil4j-1.0.0/src/org/apache/wsil/xml/XMLWriter.java000066400000000000000000000076421166574435000220250ustar00rootroot00000000000000/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "xml-axis-wsil" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.wsil.xml; import org.apache.wsil.*; import org.apache.wsil.extension.*; import java.io.*; /** * This class will write the contents of a WS-Inspection document. * * @version 1.0 * @author: Peter Brittenham */ public class XMLWriter implements DocumentWriter { /** * WSIL document. */ protected WSILDocument wsilDocument = null; /** * WSIL extension registry. */ protected ExtensionRegistry extRegistry = null; /** * Create a WSIL document writer. */ public XMLWriter() { } /** * Write WSIL document. */ public void writeDocument(WSILDocument wsilDocument, OutputStream stream) throws WSILException { // Write WSIL document writeDocument(wsilDocument, new OutputStreamWriter(stream)); } /** * Write WSIL document. */ public void writeDocument(WSILDocument wsilDocument, Writer writer) throws WSILException { // Save document reference this.wsilDocument = wsilDocument; this.extRegistry = wsilDocument.getExtensionRegistry(); // Create print writer PrintWriter pw = new PrintWriter(writer); // Print XML declaration pw.println(WSILConstants.XML_DECL); // Print WSIL starting with the inspection element if (wsilDocument.getInspection() != null) pw.println(wsilDocument.getInspection().toXMLString()); // Flush print writer pw.flush(); } }