96
XML and e-Business Speaker: 呂呂呂 國國國國國國國國國國國 Email: [email protected] URL: http://web.nchu.edu.tw/~jlu

XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: [email protected] URL: jlu

Embed Size (px)

Citation preview

Page 1: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

XML and e-Business

Speaker: 呂瑞麟 國立中興大學資管系教授

Email: [email protected]: http://web.nchu.edu.tw/~jlu

Page 2: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

電子商務的定義 Electronic Exchange of Data to Support

Business Transaction ( 依據 European Workshop

on Open System‘s Technical Guide 的定義 ) … technology-mediated exchanges

between parties (individuals, organizations, or both) as well as the electronically based intra- or inter-organizational activities that facilitate such exchanges ( 依據 Rayport and Jaworski 的定義 )

Page 3: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

e-Business IBM popularized the term “e-Business”

when it launched an ad campaign in 1997 to differentiate its products from others

In its simplest sense, e-business is the use of Internet technologies to improve and transform key business processes.

e-Business encompasses all the activities of a company that makes e-commerce possible.

Page 4: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

電子商務的分類 常見的分類︰ (Rayport and Jaworski, “e-Commerce,” McGraw-Hill, 2001)

B2B Refers to the full spectrum of e-commerce

that can occur between two organizations. EDI 、 SCM 、 ERP 等 依據 Kalakota 的定義

Business, government, and other organizations depend on computer-to-computer communication as a fast, an economical, and a dependable way to conduct business transactions.

Buy for production

Page 5: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

電子商務的分類 B2C

Refers to exchanges between business and consumers.

Ex. Amazon.com and Yahoo.com Video-on-demand, game-on-demand, interactive

distance education, video conferencing, medical consultation, etc.

By Kalakota In a marketplace transactions, customers learn about

products … through electronic publishing, buy them … using electronic cash and secure payment systems, and have them delivered differently.

Buy for consumption

Page 6: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

電子商務的分類 C2C :

Exchanges involves transactions between and among consumers. These transactions may or may not include third-party involvement as in the case of eBay.

Classified ads (104 人力銀行)、 games( 遊戲點數、網路金幣交換? )

C2B : Consumers band together to form and present

themselves as a buyer group to businesses. 團購、集體議價(拍賣王) [ 在網路上,誰來號召?號召後若廠商不予回應或價差太大,誰來協調? ]

Page 7: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

電子商務的分類 一個公司利用電子的方式購買四部電腦給員工用 B2B, B2C, … ?

代購?

Page 8: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu
Page 9: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Software Framework A software framework is intended

to define and create tools that integrate the information found in today’s closed systems and allow the development of e-commerce applications.

對企業而言,其重點在於 how to synthesize the diverse resources already in place in corporations to facilitate the integration of data and software for applications

Page 10: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Software Framework

Order processingPayment schemes -- electronic cashClearinghouse or virtual mall

Application services

Brokerage and datamanagement

Interface layer

Secure messaging

Middleware services

Network Infrastructure

B2CB2BIntra-organizational

Interactive catalogsDirectory support functionsSoftware agents

Secure hypertext transfer protocolsEncrypted email, EDIRemote programming (RPC)

Structured documents (SGML, XML, HTML)Compound documents (OLE, OpenDoc)

Wireless -- cellular, radio, PCSWireline -- POTS, coaxial, fiber optics

Page 11: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Information Brokerage and Management

Information brokerage and management layer Provides service integration through

information brokerages because the huge amount of information in the

networks. 基本功能: search, collect, and analysis 再加上: personalized and intelligent

Ex. a personalized automated trading system 能由每日匯率找出最佳外幣投資組合並找出最佳交換銀行

Page 12: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Interface layer The interface layer

Provides interfaces for EC applications such as interactive catalogs and supports directory services (ie. Search and access)

Interactive catalog Incorporate features such as sophisticated graphics and

video to make the advertising more attractive Deals with people

Directory service Operate behind the scenes and attempt to organize the

enormous amount of information and transactions generated to facilitate EC.

Ex. White pages/yellow pages, on-line directories, etc. Deals with other software application

Page 13: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Secured messaging and structured document interchange

Security Messaging: 傳遞訊息的 software/protocols (如

email/SOAP ),可傳遞非結構性文件(如信、公文)以及結構性文件(如採購單、請假單)

Unstructured messaging: fax, email, Lotus Notes Structured messaging: EDI

Can be synchronous or asynchronous Not associated with any particular

communication protocol (well-suited for client-server and peer-to-peer computing)

Is central to work-group computing Group publishing, project version control Workflow management

Page 14: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Middleware Services An emerging area when software and

hardware choice become large, how to integrate them becomes an important issue.

Computing paradigm shifts from application-centric to data-centric

In simple terms, middleware is the ultimate mediator between diverse software programs that enables them talk to one another.

Important elements Transparency

The ultimate goal of distributed computing Access, location, concurrency, replication, failure,

performance (reconfigure), migration (movement of an object), and scaling.

Page 15: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Middleware Services Transaction security and management

Traditionally, we have gigantic centralized TP systems. For EC, middleware provides the qualities expected in a standard TP system: the so-called ACID properties (atomicity, consistency, isolation, and durability)

Distributed object management and services Objects are defined as the combination of data and

instructions acting on the data. Component computing

Rent a component (ex. Word’s “Equation Editor”) Construction of software by assembling components

(ex. J2EE, IBM’s San Francisco) Eclipse Project: The Eclipse Platform is based on the

concept of a plug-in. Tools that "plug in" to the Eclipse Platform are provided with a set of common services that make tool-to-tool integration possible.

Page 16: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Middleware Services Document-oriented computing (vs. data-

oriented computing) A natural instance of an object in EC is a document The trend is to move away from single-type

documents such as texts, pictures, or video toward integrated documents known as compound document architectures. An example of this approach is an active document (a Word document containing Excel’s spreadsheet or charts + Access’s data. Reflect changes immediately. When a component is chosen, tool bar is automatically switched to its corresponding application.)

Many believe that relational model 是不自然的,而文件才是資訊系統要處理的!

CORBA, COM/DCOM, RMI, EJB, OLE, etc.

Page 17: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Cloud Computing vs. EC

Did cloud computing change EC software framework?

Page 18: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

What is EDI?

Electronic Data Interchange is the interchange of standard formatted data between computer application systems of trading partners with minimal human intervention.

[ 出處: UN/EDIFACT Trading Guide]

Page 19: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Why EDI? The amount of B2B transactions is

much larger than B2C transactions C2C and C2B is even much lesser (or not

recorded) 可以參考 NACHA 的統計資料

EDI is the foundation of B2B. Exchange of large volume of data

Errors caused by human intervention Scalability

Page 20: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

History of EDI Europe

Developed since early 1960s by UN/ECE

United States Developed since late 1960s, and

released by TDCC in 1975. 1979, ANSI X.12 (mainly used in US)

1986, UN/EDIFACT (used in the rest of the world)

Page 21: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

EDI 的步驟 轉換軟體含 Mapper and Translator. EDI 標準並不考慮傳送媒介,傳送可以經過 TAPE , DISK,或者網路。

公司內之格式 海關內之格式

轉換軟體

通訊軟體

轉換軟體

通訊軟體

Page 22: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Advantages 減少重複輸入所可能造成的錯誤

錯誤所造成之糾紛與解決,信譽毀損等 降低處理成本與時間

Nabisco 預估訂單處理成本從 $75~$125 降至 93 cents. ( 含紙張,傳遞等)

增加 customer/supplier base. 易於 tracking

可提升客戶服務與提供問題解決能力。

Page 23: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

四個大量使用 EDI 的行業 International Trade Financial EDI Health Care and Insurance EDI Manufacturing/Retail Procurement

Page 24: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

International Trade A typical international trade

transaction may involve 30 different parties, 60 original documents, and 360 document copies, all of which (if not using EDI) have to be checked, transmitted, re-entered into various information systems, processed, and filed.

這對中小型企業來說是一個遙不可及的門檻。

Page 25: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

International Trade 聯合國預估

>50% error rate 在信用狀, >30% error rate 在 manual processing of custom entries

這些 paper works, delay, and errors 等約佔 10% 的商品價值

雖然 EDI 好處多多,但是在已開發國家只有 7.5% 的公司使用,開發中國家更低。

Page 26: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Financial EDI Financial EDI comprises the electronic

transmission of payments and remittance information between a payer, a payee, and their corresponding banks.

一般用於 B2B 的交易,而且處理的量也很大。如果交易發生在國與國之間,那麼複雜度更高。

Page 27: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Financial EDI 分類

Bank Checks 最受業界採用因為 (1) 熟悉 (2) float

(created by the delays in the check-collection process)

在 1993 , >96% 的 non-cash payments 用 check

Interbank Electronic Fund Transfer (EFT)

美國有兩大系統 Federal reserve’s Fedwire CHIPS (Clearing House Interbank Payment

System) 主要用於大金額交易

Page 28: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Financial EDI 分類

Automated Clearinghouse (ACH) Transfer 主要用於雇主與員工、 B2B 等交易。 主要提供的服務

Pre-authorized credits: 薪資轉帳 Pre-authorized debits: 自動扣款(電話,水電等) Consumer-initiated payment

In 2001, 8 billion transactions worth more than $22 trillion. By 2006 about 15 billion transactions.

雖然銀行與 Clearinghouse 的往來很頻繁,且加解密技術已經成熟,但是是否會使用 Internet 目前情勢還不明朗。

Page 29: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Financial EDI NACHA reported a grand total of

10.017 billion ACH payments in 2003 valued at $27.4 trillion. The number of financial EDI payments

was 181.5 million in 2003. The dollar value of these payments was $19.7 trillion, accounting for 71.7 percent of all dollars moving via the ACH Network.

Internet-initiated ACH debit (WEB): American consumers initiated 689 million ACH debits on the Internet. The average amount of a Web e-check was $291.

資料來源: http://www.nacha.org/c/ACHntwkstats.cfm

Page 30: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Financial EDI NACHA reported a grand total of 15

billion ACH payments in 2008 valued at $29.96 trillion. The number of financial EDI payments

was 1 billion in 2008. Internet-initiated ACH debits (WEB)

increased to almost 2.1 billion payments. When combined with consumer-initiated credit payments (CIE), the dollar value of consumer ACH payments made via the Internet is nearing $1 trillion annually

Page 31: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Health Care and Insurance

先看看美國 insurance claim 的過程 A claim filled out manually by the health

care provider. If the insurance is not accepted by the provider, insurant has to fill out the forms by himself.

Photocopy, filed, placed them into an envelop and mail it out.

Upon receiving the mail, insurance company will microfilmed it and then enter into the insurer’s DB.

Page 32: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Health Care and Insurance

一般來說,這整個過程需要四週以上。 錯誤可能會產生(重來一次) 一次並可能涉及多於一個地方(看診,拿藥,檢驗,麻醉等)

每個人所保的金額與組合不同。 估計如果使用 EDI 的話,處理時間可降至

14~20 天。 有人知道健保的 claim 過程嗎?

Page 33: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Health Care and Insurance

In 2003, provisions of the U.S. Health Insurance Portability and Accountability Act (HIPAA), go into effect mandating EDI for back-office health care transactions.

The health care industry represents one-seventh of the U.S. economy, and HIPAA requires that interactions between payers and providers for health plan enrollment, claims, remittances, and other common exchanges be transmitted electronically in formats meeting ASC X12 standards

Page 34: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

EDI 的目前情形與缺點 依據數據顯示, EDI 成功的例子只出現在長期固定合作的企業間 非常不適用於 short-term 合作的企業間(這對於新的經營型態的發展不利)

目前 EDI 的採用並不普遍 尤其是中小企業 主要原因如下頁所示

Page 35: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

EDI 的主要缺點 EDI 的導入與使用成本過高

Translation software: $5000 for PC-based systems to $250,000 for mainframe applications.

VAN: monthly fee $50, $0.55~$0.70 per transaction.

Maintenance. Solution: Internet-EDI or Web-EDI

For example, Wal-Mart is now requiring its trading partners to switch to the AS2 protocol.

Page 36: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

EDI 的主要缺點 EDI 標準的制定過程過於冗長

不適合於現今快速多變的商業環境 Will there be ONE universal standard

for all? XEDI, ebXML, BizTalk, eCo, RosettaNet, …

Possible solutions: No prior agreement (ontology-based reasoning) or microstandards (less time consuming on standardization procedure)

Page 37: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

解決方案 New-EDI (Steel; 1994) Open-EDI (University of Melbourne; 1996)

可利用物件導向技術來建置 例如: Eric Jui-Lin Lu and Rong-Ji Hwang, "A Distributed

EDI Model", The Journal of Systems and Software, vol. 56, no. 1, Feb. 2001, pp. 1--7. [SCI, EI]

SGML-EDI (Joint Electronic Document Interchange) EDML (1998, Electronic Data Markup Language) XML/EDI (1997, The XML/EDI Group)

Eric Jui-Lin Lu, Shihyu Chou, and Ru-Hui Tsai, "An Empirical Study of XML/EDI", The Journal of Systems and Software, vol. 58, no. 3, Sep. 2001, pp. 269--277. [SCI, EI]

Eric Jui-Lin Lu and Chang-Chuan Wu, "A ReScUE XML/EDI Model", Software-Practice & Experience, vol. 34, no. 3, Mar. 2004, pp. 315-338. [SCI]

Page 38: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

XML/EDI 小組 成立於 1997 年 7 月 網站在 http://www.xmledi.net 目標︰

期望 XML/EDI 能讓任何企業使用更聰明、更經濟、且更易於維護的電子資料交換系統與全球任一貿易夥伴進行交易。

已經慢慢轉到 ebXML

Page 39: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

XML/EDI Architecture

* 資料來源 ︰ David RR Webber, “Introducing XML/EDI Frameworks”, Electronic Markets, vol. 8, no. 1, 1998, pp. 38--41.

Page 40: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

XML/EDI 的組成元件 (I) EDI XML (eXtensible Markup

Language) An example XML/EDI document

(next page)

Page 41: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

ANSI X12 與 XMLQty Part No. Description Unit Price Total

100 CO633 Fuzzy Dice $1.23 $123.00

PO1**100*EA*1.23*WE*MG*CO633

<Item>

<Quantity>100</Quantity>

<UnitPrice Code=“EA”>1.23</UnitPrice>

<PriceBase Code=“WE”/>

<IDQualifier Code=“MG”/>

<ID Description=“Fuzzy Dice”>CO633</ID>

</Item>

資料來源︰ Uche Ogbuji, “XML: The Future of EDI?”, SunWorld, February 1999.

Page 42: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

XML/EDI 的組成元件 (II) Templates ( 處理規則 )

資料處理的邏輯與呈現方式 可隨資料傳送或參考標準倉儲之物件 常以 XSLT 定義

Agents ( 代理程式 ) 依照 XML/EDI 處理或轉換資料 與現有資訊系統整合

Page 43: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

XML/EDI 的組成元件 (III) Global Repository ( 標準倉儲 )

儲存已被業界所共同接受的 DTDs 、 Templates 、 Agents 等。

相關的發展有 BSR (ISO’s Basic Semantic Repository) ebXML Microsoft BizTalk RosettaNet, cXML, xCBL, …

UBL (Universal Business Language): a synthesis of existing XML business document libraries.

Page 44: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

XML/EDI Architecture

* 資料來源 ︰ David RR Webber, “Introducing XML/EDI Frameworks”, Electronic Markets, vol. 8, no. 1, 1998, pp. 38--41.

Page 45: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

XML/EDI 的特色 100% 與傳統 EDI 相容 適用於短期合作的企業間交流 提高商業交易之接觸面 比傳統 EDI 可節省約 50% 的成本 容易與現有系統整合

Page 46: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

XML/EDI 的缺點 訊息的大小變大 ︰ 約增加 4~8 倍

可利用 compression 安全考量

可利用現有的 PKI 架構 相關標準尚未發展完成 (?)

Page 47: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

目前最受矚目的 frameworks ebXML BizTalk

Page 48: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

ebXML Electronic business extensible markup

language by UN/CEFACT and OASIS URL: http://www.ebxml.org

The vision of ebXML is to enable a global electronic marketplace where enterprises of any size and in any geographical location can meet and conduct business with each other through the exchange of XML-based messages.

That is, a super EDI

Page 49: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Key components of ebXML Business Process and Information

Modeling Core Components Collaboration Protocol Profile (CPP) Collaboration Protocol Agreement

(CPA) Messaging and Registry/Repository

Page 50: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Business Process and Information Modeling

Business Process Model defines interactions between parties, the sequencing of interactions, and the documents exchanged in each interaction.

The Information Model defines the documents, and the industry-specific context in which the transactions take place.

These specifications are used by authors when constructing CPP's and are also used to describe and share business processes or information formats.

Page 51: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Core Components 對 ebXML 而言

Business process model 是動詞 Core components 就是名詞與形容詞 They are defined using identity items that are

common across all businesses. formats for business data, such as dates,

taxation amounts, account owner, exchange contract, and more.

Defined in either UBL (Universal Business Language) or xCBL (XML Common Business Language)

Page 52: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu
Page 53: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu
Page 54: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

CPP (Collaboration Protocol Profile) A CPP describes a company's offerings

the business scenarios you support, the service interfaces you implement, as well as document formats exchanged and technical requirements and options for protocols, security, and reliability. The profile is composed of business process models, information models, and context rules.

Attempt to eliminate prior agreement from standard business scenarios.

Defined in ebXML Specification Schema

Page 55: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu
Page 56: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

CPA (Collaboration Protocol Agreement) A CPA describes the exact requirements

and mechanisms for the transactions that two companies perform with each other.

It is formed from a manually or automatically derived intersection of their CPP's, which has been reviewed and agreed upon by both sides.

This CPA becomes a contract between the two parties and specifies the "rules of engagement" for a particular collaboration.

Page 57: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu
Page 58: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Messaging Goal: Exchange business messages

without replying on proprietary technologies and solutions.

ebXML messaging is a format that encapsulates a message with all the related message-oriented middleware semantic (e.g. asynchronous/synchronous, security options).

ebXML messaging is built on top of SOAP-encapsulated message-passing invocations.

Page 59: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Registry/Repository The ebXML registry/repository is a service

that stores CPP's, CPA's, ebXML core components and any other ebXML documents or fragments including WSDL documents, JAR files with Java code and even audio and video etc.

It contains powerful query abilities to allow users to search for relevant components and potential business partners.

Page 60: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

A Standard ebXML Process Creation of re-usable objects and register In a wide-area web service discovery scenario,

a potential business partner would first search for a service in UDDI, which would contain a reference to a CPP or other documentation that is actually stored in an ebXML registry.

The potential business partner then uses the information in UDDI to access the ebXML Registry where they subsequently discover the CPP for a business partner.

They then use the CPP to initiate a partnership agreement (ie. CPA) for subsequent B2B transactions with the partner.

Page 61: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu
Page 62: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

References Ravi Kalakota and Andrew B. Whinston,

Frontiers of Electronic Commerce, Addison-Wesley, 1996.

鄒世民,“ EDI 標準 – UN/EDIFACT 之發展與應用” , 工業財產與標準 , vol. 21, Dec. 1994, p. 137—149.

Fu et al., “A Practical Approach to Web-based Internet EDI”, 19th IEEE International Conference on Distributed Computing Systems Workshops on Electronic Commerce and Web-based Applications/Middleware, 1999, p. 53—58.

Page 63: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

References Kammie Kayl, “ebXML: The Key

Components”, http://java.sun.com/features/2001/09/ebxmlkey.html, 09/2001.

David Webber and Anthony Dutton, “Understanding ebXML, UDDI, XML/EDI,” http://www.xml.org/feature_articles/2000_1107_miller.shtml, 10/2000.

White papers from http://www.ebxml.org

Page 64: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

A ReScUE XML/EDI Model

Eric Jui-Lin Lu and Chang-Chuan WuSoftware-Practice & Experiencevol. 34, no. 3, Mar. 2004, pp. 315-338.

Page 65: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Motivations To make EDI to work, we need

pre-agreement on the format of interchanged data

standard transaction sets 標準的訂定時間非常冗長 不適合變動快速的現代化商業環境 短期合作的組織( ex. outsourcing )

pre-agreement is resource consuming.

Page 66: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Motivations Latest EDI solutions

a common data dictionary (ex. repository or ontology)

a process of mapping between terms from the common data dictionary

以後,會有一個超級標準來”一統中原”? Because XML allows organizations to design

their own XML/EDI documents, it is common to receive XML/EDI documents with unknown elements.

Also, language issue: ex. XML/EDI documents encoded in Bog5!

Page 67: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Our Design Considered Factors

many data dictionaries each element has metadata which can

be associated with multiple data dictionaries

encoding issue can be resolved practical semantic resolution scheme flexible and (semi-)automatic

translation

Page 68: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

The ReScUE XML/EDI model

Legacy System

ORACLE SQL

Templates Repository

Template

Metadata Base

Metadata

InternetXML/EDIMessage

Mapping Repository

Mapping

EDIFACT, X12,BSR, Bizcodes,Other Standards

TemplateManager

communicationManager

TemplateGenerator

MappingManager

Control Agent

Page 69: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Key Components Template repository

The template repository is composed of reusable templates for document presentation and transformation.

There are two types of templates. Transformation templates are generated by the

template generator automatically and used to convert the received EDI documents into a pre-defined format.

These formatted EDI documents can then be converted into other presentation formats such as HTML or WML by layout templates.

Page 70: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Key Components Metadata base

The metadata base contains a collection of metadata files.

In the metadata base, it is ensured that, for every type of XML/EDI documents used in an enterprise, there is a corresponding metadata file.

Each metadata base must have a system metadata file that provides links between documents and their associated metadata files.

Page 71: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Example Metadata

Page 72: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Key Components Mapping repository

For each trading partner, there is a corresponding mapping file in the repository. In the mapping file, all elements used in the company and their corresponding elements received from the trading partner are recorded.

It is assumed that the element name used in an enterprise is unique.

Page 73: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Key Components Control Agent

Lookup manager. When a document is received, the control agent will invoke

the lookup manager to verify whether or not the document’s template exists in the template repository.

If not, search for the mappings of all the elements in the received document.

Communication manager. If the requested templates or mappings cannot be found, the

communication managers at both sides are responsible for exchanging the elements’ metadata.

During communications, the communication managers at both ends need an agreed communication protocol and a message format to exchange metadata. Either KQML [24] or SOAP [20] can be employed.

Template generator. According to the newly generated mappings in the mapping

repository, the template generator is invoked to create a transformation template and store the template in the template repository for later usage.

Page 74: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

The ReScUE XML/EDI model A resolution scheme for unknown

elementsRead an unknown element

Search it's mapping

Exist or not?

Reuse mapping

Yes

CommunicateNo

Have common data dictionaries

Create mapping

Yes

Saved and notifydevelopers

No

End or not?No necessary mappings

are created

Yes

Yes

Generate new template

No

Page 75: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

The ReScUE XML/EDI model

Sender

Receiver's Agents

Metadata Base

(Metadata)

Sender's Agents

LegacySystem

Mapping Repository

Receiver

Template Repository

Receive A XML/EDI Document

Reference TemplateProcess with Template

ConnectSearch MappingReturn Mapping

Search MetadataReturn Metadata

.

.

.

Communications

Save New Mappings

Generate A New TemplateRecord Transaction

Page 76: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Design and Implementation Document schema

DTD, XML Schema, XDR etc. DTD is selected

simpler widely used

Template Repository Consists of reusable templates and

each of them is a XSLT file

Page 77: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Design and Implementation (cont.)

Metadata base Designed in XML format The DTD of the metadata files

<!ELEMENT metadata (element*)><!ELEMENT element (tagname, common+, datatype?, format?, necessary?)><!ELEMENT tagname (#PCDATA)><!ELEMENT common (#PCDATA)><!ATTLIST common standard CDATA #REQUIRED><!ATTLIST common version CDATA #REQUIRED><!ELEMENT datatype (#PCDATA)><!ELEMENT format (#PCDATA)><!ELEMENT necessary EMPTY>

Page 78: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Design and Implementation

The DTD of the system metadata<!ELEMENT Forms_metadata (Form*)><!ELEMENT Form (Form_name, common+, metadata_name, DTD_name, XSLT_name, Update)><!ELEMENT Form_name (#PCDATA)><!ELEMENT common (#PCDATA)><!ATTLIST common standard CDATA #REQUIRED><!ATTLIST common version CDATA #REQUIRED><!ELEMENT metadata_name (#PCDATA)><!ELEMENT DTD_name (#PCDATA)><!ELEMENT XSLT_name (#PCDATA)><!ELEMENT Update(#PCDATA)>

Page 79: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Design and Implementation (cont.) Mapping repository

Designed in XML format The DTD of the Mapping files

<!ELEMENT Mapping_Data (Mapping*)><!ELEMENT Mapping (Tagname, To, Format?)><!ELEMENT Tagname (#PCDATA)><!ELEMENT To (#PCDATA)><!ELEMENT Format (DataType, From, To)><!ELEMENT DataType (#PCDATA)><!ELEMENT From (#PCDATA)>

Page 80: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Design and Implementation (cont.)

Attributes Attributes are converted to elements

<Quantity Unit="Box">100</Quantity><Quantity>100</Quantity><Unit>Box</Unit>

<Mapping><Tagname>Quantity</Tagname><To>ItemQuantity</To>

</Mapping><Mapping>

<Tagname>Quantity/@Unit</Tagname><To>ItemUnit</To>

</Mapping>

Page 81: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Design and Implementation (cont.)

Control Agent All modules are coordinated by the

control agent implemented in KQML

Page 82: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Design and Implementation (cont.)

Performative paramaters Keyword Layer Meaning

:content Content The content of the exchanged message.

:language Message The language used to express the “:content” message.

:ontology Message The name of ontology used in the “:content” message.

:reply-with Communication The sender expects the receiver reply with this label.

:in-reply-to Communication The label used in a reply message.

:sender Communication The actual sender of the performative

:receiver Communication The actual receiver of the performative

(Performative :sender <word> :receiver <word> :reply-with <word> :in-reply-to <word> :language <word> :ontology <word> :content <expression>)

Page 83: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Design and Implementation (cont.)

Performative definitions

Performative name Meaning (S: Sender ; R: Receiver)

ask-one S wants one response from R regarding a question about the :content.

reply S replies to a request.

next S wants next response from R to a prior request.

sorry S understands R's message but cannot provide a more information reply.

tell S tells R some information.

Page 84: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Design and Implementation (cont.)

Content definitions for each performative The contents of “ask-one” performative

The contents of “reply” performative

Performative Meaning Parameters Meaning

formtype Query the semantic of the root element.

:content The name of root element.

semantic Query the semantic of a unknown element.

:content The element name.

format Query the format of an element. :content The element name.

Performative Meaning Parameters Meaning

semantic Reply the semantic of elements for “formtype” and “semantic” requests.

:standard The name of data dictionaries

:version The version of data dictionaries

:content The terms defined in data dictionaries.

format Reply the format information for “format” requests.

:type The data type of elements

Page 85: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Design and Implementation (cont.)

The contents of “tell” performative

The contents of “next” performative as well as “ask-one” performative.

The content message of “sorry” performative are empty.

Performative Meaning Parameters Meaning

formtype Tell the receiver that the root element of documents.

:content The name of root element.

update Tell the receiver that the document schema is changed.

:content The update date.

noupdate Tell the receiver that the document schema is not changed.

   

Page 86: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Design and Implementation (cont.)

Example

(ask-one :sender CYUT :receiver IM :language KQML :reply-with CYUT_KOD :content ( formtype :content (OrderList)))

(reply :sender IM :receiver CYUT :language KQML :in-reply-to CYUT_KOD :content ( semantic :standard

EDIFACT :version 95A :content (0065=ORDERS)))

(ask-one :sender CYUT :receiver IM :language KQML :reply-with CYUT_Date_1 :content ( semantic :content (Date)))

(reply :sender IM :receiver CYUT :language KQML :in-reply-to CYUT_Date_1 :content ( semantic :standard

EDIFACT :version 95A :content (2005=4)))

(ask-one :sender CYUT :receiver IM :language KQML :reply-with CYUT_Date_1 :content ( format :content (Date)))

(reply :sender IM :receiver CYUT :language KQML :in-reply-to CYUT_Date_1 :content ( format :type datetime :content

(MMddyyyy)))

(tell :sender IM :receiver CYUT :language KQML :content ( update :content

(2000/01/22)))

CYUT IMWhen "CYUT" receives an XML document from “IM” and does not known what kind of of the document is.

If "IM" has never traded with "CYUT“.When "CYUT" finds an unknown element "Date“.When "CYUT" observe a format conversion is needed in their metadata.

When mappings for all of unknown elements have been produced, the mappings are saved into the mapping repository.

Page 87: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Design and Implementation (cont.) Template generator

Five content types of elements in DTD

“ANY” and “Mixed” content types are suggested not using in structural documents.

Content type of an element

Declarations Examples

ANY <!ELEMENT test ANY> <test>…<A>…</A>…</test>

EMPTY <!ELEMENT test EMPTY> <test/> or <test></test>

(children) <!ELEMENT A (B, C, D)><!ELEMENT A (B| C| D)>

<A><B>…</B><C>…</C><D>…</D></A>

(#PCDATA) <!ELEMENT A (#PCDATA)> <A>…</A>

Mixed <!ELEMENT A (#PCDATA|B|C)*> <A>…<B>…</B>…<C>…</C>…</A>

Page 88: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Design and Implementation (cont.)

Three major parts in the algorithm to produce XSLT expressions

Element type name transformations Ex. mapping a A of type #PCDATA

<A><xsl:value-of select=“/a”/></A>

Page 89: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Design and Implementation (cont.)

Choice list transformations: EX: A (B|C|D)<A> <xsl:for-each select=“/a”> <xsl:apply-templates select”b|c|d”/> <xsl:for-each></A>

At the end of the XSLT, the following expressions are append:

<xsl:template match="b"> <B>…<B><xsl:template><xsl:template match="c"> <C>…<C><xsl:template><xsl:template match="d"> <D>…<D><xsl:template>

Page 90: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Design and Implementation (cont.)

Sequence list transformations: EX: A (B,C,D)<A> <B>…</B> <C>…</C> <D>…</D></A>

If “*” and “+” is exist, a loop is needed for the element. EX: A (B*,C+)

<A> <xsl:for-each select=“a/b”> <B>…</B> </xsl:for-each> <xsl:for-each select=“a/c> <C>…</C> </xsl:for-each></A>

Page 91: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Design and Implementation (cont.)

With recursion, the following situations can be processed correctly.

Choice lists in a sequence such as (B,(C|D)) Sequence lists in a sequence such as (B|(c,D))

Format conversions The function of format conversions is added into

templates. Example: “MMDDyyyy” “yyyy/MM/dd”

<Odate><xsl:variable name=“Date” select=“OrderList/Date”/>

<xsl:value-of select=“java:TransformDate.ParserDate ($Date,‘MMddyyyy’,‘yyyy/MM/dd’)”/>

<Odate>

Page 92: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Design and Implementation (cont.)

Quantifier conversions

Page 93: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Design and Implementation (cont.)

The received documents are converted by the transformation templates into expected formats.

Page 94: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Design and Implementation (cont.)

Development environment Java: JDK1.2 XML parser: Xerces 1.2.1 by IBM DTD parser: DTD parser by Wutka XSLT processor: Xalan-Java 2 by IBM JATLite: Developed at Stanford for

constructing agents. A top-level KQML layer is provided.

Page 95: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Analysis Resolve unknown elements with multiple

standards Less human intervention and High

flexibility on designing and processing documents

Multilingual support A Lower barrier for trading partners with

short-term relationships Miscellaneous conversions

data format conversions "MMddyyyy“ “yyyy/MM/dd”

Page 96: XML and e-Business Speaker: 呂瑞麟 國立中興大學資管系教授 Email: jllu@nchu.edu.tw URL: jlu

Conclusions The ReScUE XML/EDI model is

implemented and works correctly File Systems XML DB (ex.

eXcelon) The maintenance of semantics in

the metadata base can be greatly simplified

Future Works RDF (Resource Description Framework) The complexity and the flexibility of

using RDF requires further study