Docstoc

WSDL Coding Standard soap

Document Sample
WSDL Coding Standard soap Powered By Docstoc
					Web Service Definition Language (WSDL)
           Coding Standard
                  Version 1.0
                October 31, 2007




                       Prepared for:
       United States Patent and Trademark Office
            Office of Chief Information Officer
                    50-PAPT-2-01026
                                                                     WSDL Coding Standard
                                                                               Version 1.0
                                                                          October 31, 2007




                     Record of Changes/Version History
                              Date of    Sections                          Person Entering
   Change/Version Number                               Description
                              Change     Changed                                Change
ppc.uspto.07-03.cads.coding   10/31/07      All     Initial Submission   Christopher Eastman,
standards.WSDL.v1.0.doc                                                  Project Performance
                                                                         Corporation




                                          i
                                                                                                 WSDL Coding Standard
                                                                                                           Version 1.0
                                                                                                      October 31, 2007




                                           Table of Contents
1 INTRODUCTION ................................................................................... 1
  1.1   Purpose .............................................................................................................. 1
  1.2   Scope.................................................................................................................. 1
  1.3   Exceptions ......................................................................................................... 1

2 WSDL STANDARD ............................................................................... 2
  2.1   Example Scenario: The Patent Application Service ....................................... 2
  2.2   Guidelines for Structuring Service Names ...................................................... 4
    2.2.1 Infrastructure Services ................................................................................... 4
    2.2.2 Entity Services ............................................................................................... 4
    2.2.3 Activity Services ............................................................................................. 5
    2.2.4 Process Services ........................................................................................... 5
    2.2.5 Constraints on the discovered names ............................................................ 6




                                                              ii
                                                                              WSDL Coding Standard
                                                                                        Version 1.0
                                                                                   October 31, 2007




                                       List of Figures
Figure 1-1: Patent Application WSDL Example ......................................................... 4


                                        List of Tables
Table 1-1: Constraints on Discovered Names ........................................................... 6




                                                   iii
                                                                            WSDL Coding Standard
                                                                                      Version 1.0
                                                                                 October 31, 2007




                                     1 INTRODUCTION

1.1 Purpose
The purpose of this coding standard is to provide guidance to the U.S. Patent and Trademark
Office (USPTO) application development teams that use technologies addressed by this standard.
By following these recommended standards, teams will produce application code that is
consistent, readable, maintainable, and, to the extent possible, compliant with industry best
practices and conventions. This document contains the standard conventions for use by
developers and management at the USPTO in developing WSDL entries.

1.2 Scope
The full WSDL standard1 is maintained by W3C. This document is intended only to supplement
that standard by providing specific guidance to developers of USPTO systems.

This standard does not address areas that are covered by other technology-independent standards,
such as user interface behavior, or inter-technology standards, such as interoperability standards.

It is specifically not required that:

         Existing projects be retrofitted to comply with this standard.

         Third-party primary product source lines comply with this standard.

         Industry standard interfaces be ‘shoehorned’ into complying with this standard.

1.3 Exceptions
Exceptions to this standard must be approved in advance, in writing, by the Information Systems
Technical Working Group (IS-TWG).




1
    Web Services Description Language (WSDL) 1.1. (2001). W3C. http://www.w3.org/TR/wsdl



                                                   1
                                                                            WSDL Coding Standard
                                                                                      Version 1.0
                                                                                 October 31, 2007




                                 2 WSDL STANDARD
 This section introduces the basic concepts used in WSDL 2.0 and assumes a general
 understanding of WSDL. The standards will use patent application service as examples
 throughout this document.

 2.1 Example Scenario: The Patent Application Service
 Patent applications have been coming in through proprietary, tightly coupled interfaces. The
 object is to allow the application in web service to facilitate greater flexibility, access, and to
 enable controlled changes without impacting existing external interface systems. To facilitate
 this process two services will be created:

     SubmitPatentApplication. A successful application will be associated with a unique
      identifier. The Web service will return a patent ID (a string) if the application was
      accepted or a null if it was not accepted. If any input data is invalid, the service should
      return an error. Consequently, the service will accept a SubmitPatentApplication
      message and return a SubmitPatentApplicationResponse or InvalidDataFault
      message.

     CheckPatentApplicationStatus. After an application has been accepted the user should be
      able to check its status. The user must provide a patent ID and the service will return a
      status code and string. The service will return an error message if the id or any other data
      field is invalid. As a result, the service will accept a CheckPatentApplicationStatus
      message and return a CheckPatentApplicationStatusResponse or InvalidDataFault
      message.

<?xml version="1.0" encoding="utf-8" ?>
<description
    xmlns="http://www.w3.org/ns/wsdl"
    targetNamespace= "http://patent.uspto.gov/2007/wsdl/application"
    xmlns:tns= "http://patent.uspto.gov/2007/wsdl/PatentApplicationService"
    xmlns:pans = "http://patent.uspto.gov/2007/schemas/PatentApplicationService"
    xmlns:wsoap= "http://www.w3.org/ns/wsdl/soap"
    xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
    xmlns:wsdlx= "http://www.w3.org/ns/wsdl-extensions">

  <documentation>
    This document describes the Patent Web service. Additional
    application-level requirements for use of this service --
    beyond what WSDL 2.0 is able to describe -- are available
    at http://patent.uspto.gov/2007/patentApplicationDocumentation.html
  </documentation>

  <types>
    <xs:schema
        xmlns:xs="http://www.w3.org/2001/XMLSchema"


                                                 2
                                                              WSDL Coding Standard
                                                                        Version 1.0
                                                                   October 31, 2007




targetNamespace="http://patent.uspto.gov/2007/schemas/PatentApplicationService"
        xmlns="http://patent.uspto.gov/2007/schemas/PatentApplicationService">

     <xs:element name="PatentApplication" type="PatentApplicationType"/>
     <xs:complexType name="PatentApplicationType">
       <xs:sequence>
         <xs:element name="Title" type="xs:date"/>
         <xs:element name="SubmissionDate" type="xs:date"/>
         <xs:element name="CreationiDate" type="xs:date"/>
         <xs:element name="PatentType" type="xs:string"/>
       </xs:sequence>
     </xs:complexType>

     <xs:element name="PatentApplicationResponse" type="xs:double"/>

     <xs:element name="invalidDataError" type="xs:string"/>

   </xs:schema>
 </types>

 <interface     name = "PatentApplicationInterface" >

   <fault name = "InvalidDataFault"
           element = "pans:invalidDataError"/>

   <operation name="opPatentApplication"
           pattern="http://www.w3.org/ns/wsdl/in-out"
           style="http://www.w3.org/ns/wsdl/style/iri"
           wsdlx:safe = "true">
       <input messageLabel="In"
             element="pans:PatentApplication" />
       <output messageLabel="Out"
             element="pans:PatentApplicationResponse" />
       <outfault ref="tns:InvalidDataFault" messageLabel="Out"/>
   </operation>

 </interface>

 <binding name="PatentApplicationSOAPBinding"
         interface="tns:PatentApplicationInterface"
         type="http://www.w3.org/ns/wsdl/soap"
         wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP/">

   <fault ref="tns:InvalidDataFault"
     wsoap:code="soap:Sender"/>

   <operation ref="tns:opPatentApplication"
     wsoap:mep="http://www.w3.org/2003/05/soap/mep/soap-response"/>

 </binding>

 <service name="PatentApplicationService"



                                          3
                                                                               WSDL Coding Standard
                                                                                         Version 1.0
                                                                                    October 31, 2007



           interface="tns:PatentApplicationInterface">

       <endpoint name="PatentApplicationEndpoint"
                 binding="tns:PatentApplicationSOAPBinding"
                 address ="http://patent.uspto.gov/2007/PatentApplication"/>

  </service>

</description>
                                Figure 2-1: Patent Application WSDL Example


 2.2 Guidelines for Structuring Service Names
 This section is based on Service Naming Conventions2, published by the USPTO in 2007.

 2.2.1      Infrastructure Services

          Exposes shared functionality that is not specific to a business process or entity (not
           domain specific)

          Synchronous request-response (In-Out )

          May abstract interactions with third party services or legacy systems

          Returns exceptions

          Does not invoke other services

          Structure:

           Name: (Verb) | (Verb) (Noun)

           E.g. MessageRouter, Route

 2.2.2      Entity Services

          Exposes business entity and associated reference data

          Synchronous request-response (In-Out )



 2
     USPTO. (2007). Service Naming Conventions.




                                                     4
                                                                            WSDL Coding Standard
                                                                                      Version 1.0
                                                                                 October 31, 2007




       Uses a published schema to represent the entity

       Atomic

       Structure:

        Name: (Noun) | (Qualifier) (Noun)

        E.g. Customer, PreferredCustomer, OrderService

2.2.3    Activity Services

       Exposes business activities that encapsulate calls to multiple entity services and perhaps
        infrastructure services to perform a single activity. Usually composite.

       Request-response pattern (Message Exchange Pattern (MEP) In-Out )

       Structure:

        Name: (Verb) | (Qualifier) (Verb) | (Noun) (Verb)

        E.g. CreditCardProcessing, CustomerRating

2.2.4    Process Services

       Expose a business process

       Long running and one-way ( In Optional-Out )

       Composite – can invoke activity, entity and infrastructure services

       Structure:

        Name: (Verb) (Noun) | (Verb) ((Noun) (Qualifier))

        E.g. OrderProcessor, WorkAllocator




                                                 5
                                                                                     WSDL Coding Standard
                                                                                               Version 1.0
                                                                                          October 31, 2007




2.2.5      Constraints on the Discovered Names

                               Table 2-1: Constraints on Discovered Names

                                                                                 References in the Code
         Discovered Name                        Description                           Conventions

Service Name                       The service name should be written in Follows Standard naming conventions
                                   mixed case with the first letter of each for Java classes.
                                   internal word capitalized.

                                   Example:

                                   WeatherService


Service endpoint                   Service endpoint interface : <service-   Follows Standard naming conventions
                                   name>SEI                                 for Java classes.


Service Implementation class       As EJB :<service-name>Bean               Follows Standard naming conventions
                                                                            for Java classes.
                                   JAX-RPC : class :<service-
                                   name>Impl

                                   JAX-WS (Java 5 ?): class


JAX-RPC/JAX-WS message handler Client side handler : <service-              Follows Standard naming conventions
                               name>ClientHandler                           for Java classes.

                                   Server side handler :<service-
                                   name>ServerHandler


Configuration files                WSDL file : <service-name>

                                   Example:

                                   WeatherService.wsdl

                                   JAX-RPC mapping file :<all-lower-
                                   case-service-name>-mapping

                                   Example:

                                   weatherservice-mapping.xml

                                   wscompile configuration file :<all-




                                                     6
                                                              WSDL Coding Standard
                                                                        Version 1.0
                                                                   October 31, 2007




                                                            References in the Code
Discovered Name                Description                       Conventions

                  lower-case-service-name>-config

                  Example:

                  weatherservice-config.xml

                  wscompile configuration file for client
                  :<all-lower-case-service-name>-
                  client-config

                  Example:

                  weatherservice-client-config.xml




                                     7

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:50
posted:6/29/2010
language:English
pages:11
Description: WSDL Coding Standard soap