XML Working Group Web Services Initiative by lsj20521

VIEWS: 0 PAGES: 18

									XML Working Group:
Web Services Initiative

    Madhu Siddalingaiah
       June 19, 2002
Goal: Understand Web Services’ Potential

• Proposal at March, 2002 AIC meeting to consider new
  initiative on Web Services technology
   – Chairs wanted more information before making a decision
   – AIC authorized preparation of demo and educational presentation
        • Present at XML WG, AIC and then maybe CIO Council
• Today’s agenda: Implementer-level issues
   –   Architecture of Web Services
   –   USITC prototype: HTS Web Service
   –   Development process
   –   Demo
                  About the Presenter

• Java & XML consultant
   – Started with Java in 1995
   – Clients include Fairchild Space & Defense, Blue Cross/Blue
     Shield, Sun Microsystems
• Published author
   – XML and Web Services Unleashed, 2002, Sams Publishing
   – Numerous articles for JavaWorld, Internet.com, Network World
• Presented papers at conferences all over the world
   – JavaOne, SIGs conferences in Munich, London, New York, Evolve
     conference in Sydney
              What Are Web Services?

• A web service is a software component
   – Exposes a business function/service/data
   – Can be accessed by another application over Internet
   – Messages are exchanged using a standard XML format


                            Application Server (J2EE or .NET)
                <html>
                                                Business logic
                              Web Application

   Business
                  <xml>
                              Web Service
    <html>


                    <xml>



              Agency
             Advantages of Web Services

• Cross-platform, cross-language support
   – Java, .NET, PHP, Perl, Python
• Based on industry standards (W3C)
   – Catches the XML wave
   – XML, SOAP, WSDL
• Supported by many vendors
   – Unlike CORBA
• Relatively easy to implement
   – Simpler plumbing
• Service publication and lookup
   – Conduct business without prior relationship
   – “Zero latency” enterprise
• Loosely coupled
   – Low demands on network quality
   – Based on stateless request/response model
              Challenges to Web Services
                    Implementation
• Complete set of tools and specifications not yet available
    – Sun's web services recently released; MS .NET not fully delivered
    – Few established 3rd-party tools
    – Security & payment specs still being worked

• Lack of standardized schemas for vertical industries
    – Efforts under way

• Education of business executives and IT staff
    – Understand where W-S fits in to the big picture
    – Identify good W-S opportunities
    – Shortage of programmers knowledgeable in distributed systems

• The FUD of war: Microsoft and Sun
    – Constant threat of balkanization of standards
                    Web Services Protocols

•   XML http://www.w3.org
     – Web services messages are formatted using XML

•   SOAP http://www.w3.org/2000/xp/Group
     – Simple Object Access Protocol
     – Defines the standard format for XML messages
     – Functionally similar to RPC, CORBA, RMI

•   WSDL http://www.w3.org/2002/ws/desc
     – Web Services Description Language
     – Describes a web services as a collection of ports and operations
     – XML interface document similar to CORBA IDL or RMI/EJB remote interface

•   UDDI http://www.uddi.org
     – Universal Description, Discovery and Integration
     – Provides a searchable registry of web services
     – Similar, but broader in scope compared with CORBA or JNDI registry
                                     SOAP

• Standard packaging structure for transporting XML documents
   – “DOC” style
       • Send XML and receive XML documents
   – “RPC” style
       • Like a remote method call


• Defines encoding and binding standards

• Provides a simple structure for describing RPC operations
   – Works well with HTTP, SMTP, etc.

                            request

     SOAP                                      SOAP
     CLIENT                                   SERVICE
                           response
                               WSDL

• XML document for describing web services
   – Input and output data structures
       • Includes or refers to XML Schema type information
   – Method signatures
   – Protocol bindings (HTTP, SMTP etc.)
   – Location of the service


• Document can be stored in UDDI registry
   – Or served from same server


• Typically generated by a tool
   – xrpcc in Java Web Services Developer Pack
                             UDDI

• A registry of WSDL documents
   – Like an electronic Yellow Pages


• Web Service developer publishes WSDL to UDDI server

• Web Service clients can query the UDDI server for
  suitable service definitions
   – Accessible by humans and computers


• UDDI is not yet mature
   – Standards and implementation is experimental
   – How is trust established?
          Getting Started with Web Services

• Start out small with an internal project that provides value
    – Web service for read-only access
    – Find a partner that will use your service!
         • Validate interoperability & business value


• Provide XML and Web services training to development team

• Identify business functions available as existing software components:
  EJB or COM
    – Turn a Web application into a Web service

• Candidates for web services
    –   Free services
    –   Non-sensitive data
    –   Real time access to authoritative information
    –   Wherever machine to machine communication is valuable
       Harmonized Tariff Schedule (HTSUS)

• Official lists of duty rates (tariffs)
    – Applicable to goods imported into the United States
    – Applies to 20,000 or so line items in HTSUS classification
         • Okra, steel, transistors, etc.


• Information published in three ways by USITC
    – Hardcopy
    – PDF format (downloadable from USITC Website)
    – Unofficial browser accessible Web form

• Application is a good candidate for Web service
    – Data is free, authoritative, non-sensitive
    – Builds on existing web/database app
    – Data will be consumed by customs brokers business apps
        Current vs. Web Service Workflow

                                                  Corporate importers
 HTSUS hardcopy                       Data tape
 manually re-keyed                                   Walmart

                                                  General Motors
                     Customs
USITC
                                                  Brokers



                                      Customs
     USITC                <xml>                   Corporate importers

                                                      Walmart
 Web service                  <xml>

                                                  General Motors
                      <xml>

                                      Brokers
                    Prototype Architecture

• J2EE server
   – Java Web services developer pack (JWSDP)
       • http://java.sun.com/webservices
       • Includes Tomcat server
• Exposes two methods
   – getProductList(String description)
       • Generic query for products matching description
   – getProductDetail(String productCode, String beginDate)
       • Returns tariff data for specific product

                                   JWSDP/Tomcat
                    JDBC
                                   Web service             <xml>

    Tariff
  database
                                       IIS/ASP
                    ODBC
                                                           <html>
                                    Web form
                      Development Process

          Java Interface             Configuration File


Could start
                             xrpcc
  with                                       WSDL
 WSDL

                                             Server
                    Client                  Skeletons
                    Stubs                                   Deploy to
                                                           J2EE Server
                                             Service
                                          Implementation

  Can be used                                 SOAP
  to build static                             Library
      client
                                               WSDL for HTS

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="HTS_Service" targetNamespace="http://usitc.gov/hts/wsdl" ... >
      <message name="getProductDetail">
                <part name=“productCode" type="xsd:string"/>
                <part name=“beginDate" type="xsd:string"/>
      </message>
      <message name="getProductDetailResponse">
                <part name="result" type="xsd:string"/>                                           Some details
      </message>
...
                                                                                                    Left out!
      <portType name="HTSInterface">
                <operation name="getProductDetail">
                                <input message="tns:getProductDetail"/>
                                <output message="tns:getProductDetailResponse"/>
                </operation>
      </portType>
      <binding name="HTSInterfaceBinding" type="tns:HTSInterface">
                <operation name="getProductDetail">
                                <input><soap:body encodingStyle="..." use="encoded" namespace="http://usitc.gov/hts/wsdl"/></input>
                                <output><soap:body encodingStyle="..." use="encoded" namespace="http://usitc.gov/hts/wsdl"/></output>
                                <soap:operation soapAction=""/>
                </operation>
                <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>                      URL of
      <service name="HTS">
                <port name="HTSInterfacePort" binding="tns:HTSInterfaceBinding">
                                                                                                                            service
                                <soap:address location="http://205.197.120.95/usitc/jaxrpc/HTSInterface"/>
                </port>
      </service>
</definitions>
       XML Schema for HTS Detail Response

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" … >                      Some details
     <xs:element name="HTS_DETAIL">                                               Left out!
             <xs:complexType>
                          <xs:sequence>
                                      <xs:element name="BRIEF_DESCRIPTION"/>
                                      <xs:element name="QUANTITY_1_CODE"/>
                                      <xs:element name="QUANTITY_2_CODE"/>
                                      <xs:element name="MFN_RATE_TYPE_CODE"/>
                                      <xs:element name="WTO_BINDING_CODE"/>
                                      <xs:element name="MFN_AD_VAL_RATE"/>
…
                                      <xs:element name="NAFTA_CANADA_IND"/>
                                      <xs:element name="NAFTA_MEXICO_IND"/>
                                      <xs:element name="MEXICO_AD_VAL_RATE"/>
                                      <xs:element name="MEXICO_SPECIFIC_RATE"/>
…
                                      <xs:element name="BEGIN_EFFECT_DATE"/>
                                      <xs:element name="END_EFFECTIVE_DATE"/>
                                      <xs:element name="MFN_TEXT_RATE"/>
                          </xs:sequence>
             </xs:complexType>
     </xs:element>
</xs:schema>
                          References

• World Wide Web Consortium
   – Source of specifications
   – http://www.w3.org
• Case studies
   – http://www.microsoft.com/net/use/casestudies.asp
   – http://www-3.ibm.com/software/solutions/webservices/casestudies
   – http://dcb.sun.com/practices/webservices
• Xmethods
   – Great list of interesting Web services
   – http://www.xmethods.com
• Soapclient.com
   – Dynamic web client for Web services

								
To top