Title: The Use of Existing XML Vocabularies for Web Services
1The Use of Existing XML Vocabularies for Web
Services
- Querying Product Information with Web Services
and BMEcat
co-authors Dr. Stefan Kuhlins and Ross Tredwell
Universität MannheimLehrstuhl für
Wirtschaftsinformatik IIIkuhlins_at_uni-mannheim.de
Gabriel VöglerDaimlerChrysler Forschungszentrum
UlmSoftware Architekturen (RIC/SA)gabriel.voegle
r_at_daimlerchrysler.com
2Agenda
- Web Services and electronic price comparisons
- XML vocabularies for product data - BMEcat
- Integration of XML vocabularies in SOAP and WSDL
- Two approaches illustrated using one example
- Procedure-oriented approach
- Document-oriented approach
- Conclusion and Future Directions
3Web Services and electronic price comparisons
- The vision of Dynamic E-Business
- Vision of a fully automatic price comparison
agent - Finds all potential suppliers of a certain
product, - Queries their electronic catalog,
- Thus determines the best offer.
4Web Services and electronic price comparisons
(contd.)
- Mapping to Web Service technologies
- All suppliers publish/register their catalog
service via UDDI - The agent finds all potential suppliers by
querying the UDDI yellow pages - For every supplier
- The agent localizes the WSDL file for the catalog
service by reading the UDDI green pages - The agent gets the concrete address of the
catalog service and generates specific query code
by looking into the WSDL file - The agent executes the generated code, which
queries the catalog service via SOAP - The agent stores the offer
- The Agent compares all stored offers and thus
determines the best offer
5XML vocabularies for product data - BMEcat
- Existing Web Service standards solves the problem
on the syntactic (technical) level - Whats about semantics?
6XML vocabularies for product data - BMEcat
(contd.)
- Several XML vocabularies address the exchange of
product data (e.g., cXML, xCBL and BMEcat) - Defined as XML-Schema
- Developed by the industry
- Independent of the transmission method
7XML vocabularies for product data - BMEcat
(contd.)
- BMEcat
- Widespread exchange standard for electronic
product catalogues in German-speaking countries - Data Elements
- article master data (part number, abbreviation,
price and delivery time) - structural data (product group affiliation,
product classification) - additional Information (keywords, references to
multimedia data)
8Integration of XML vocabularies in SOAP and WSDL
- SOAP can be used as
- Simple transport mechanism for arbitrary XML
- RPC protocol with own type system
- WSDL uses XML Schema to describe messages
abstractly - External schemas can be imported
- WSDL guidelines for using XML Schema
- BMEcat does not comply with these guidelines
9Two approaches illustrated using one example
- Example Online Shop
- Classic multi-tier architecture
- Existing web interface has standard possibilities
for product searches - Implemented as EJBs, which are invoked by a JSP
front-end - Uses a proprietary product model (in terms of a
Java Bean Product) - An additional catalog management system allows
the generation of BMEcat files
10Two approaches illustrated using one example
- Two Approaches to provide a product query Web
Service - Procedure-oriented
- SOAP RPC guidelines and encoding rules are used
- The WSDL file uses BMEcat as an abstract message
description - Document-oriented
- Only the SOAP messaging framework is used
- The WSDL file uses BMEcat to describe the
concrete transfer syntax
11Procedure-oriented approach
- Declaration of a WSDL procedure
lookupDescription() with return type ARTICLE - a subset of the BMEcat vocabulary is used
- Referencing SOAP encoding rules
- Generation of code skeleton with Service Template
Generator - Mapping of proprietary product model to BMEcat
must be hand coded
12Procedure-oriented approach (contd.)
public generated.bmecat.ARTICLE
lookupDescription(String description) throws
Exception // invoke existing search
implementation de.myCompany.Product
products de.myCompany.shopServer.searchByD
escription(description) // construct BMEcat
types generated.bmecat.ARTICLE articles
new ARTICLEproducts.length // fill
ARTICLE with data of Product for (int i 0
i lt products.length i) articlesi
new de.myCompany.generated.ARTICLE()
articlesi.setSUPPLIER_AID(producti.getProductI
d()) articlesi.getARTICLE_DETAILS.setDESC
RIPTION_SHORT (producti.getDescription()
) articlesi.getARTICLE_PRICE_DETAILS.getA
RTICLE_PRICE .setPRICE_AMOUNT(producti.g
etPrice()) // ... more BMEcat fields
return articles
--gt Uses exisiting Java search methods
13Document-oriented approach
- Declaration of a WSDL procedure
lookupDescription() with return type BMEcat - The response contains a complete catalog
structure - A few mandatory data elements must be filled with
dummy data - No SOAP encoding rules
- Using the BMEcat interface of the catalog
software - Implement searchByDescription()with XPath
- No mapping between different data representations
(Java?XML) - Result of a query is already in BMEcat and can be
inserted directly into the SOAP-Body
14Document-oriented approach (contd.)
public SOAPMessage onMessage(SOAPMessage
inMessage) throws Exception //
extract search string from SOAP request
String description inMessage.getSOAPPart(). ...
.getValue() // process XPath query
org.w3c.dom.NodeList resultList
XPathAPI.selectNodes(bmecatDocument,
//ARTICLE....) // generate BMEcat document
for the response org.w3c.dom.Document
bmecatResult ... // fill bmecatResult with
resultLists ARTICLE elements // ... //
generate SOAP response SOAPMessage outMessage
messageFactory.createMessage() SOAPBody
soapBody outMessage.getSOAPPart().getEnvel
ope().getBody() insertDOM(soapBody,
bmecatResult) return outMessage
private void insertDOM(SOAPBody soapBody,
org.w3c.dom.Document document) throws Exception
// inserts a DOM document into the SOAP
body // ...
(other XML APIs)
--gt Uses existing BMEcat catalog
15Conclusion and Future Directions
16Conclusion and Future Directions (contd.)
- Importance of standardized semantics
- Problems with fully automatic Web Service Tools
- Standardization
- Lack of a worldwide accepted standard for product
description - Definition of a query interface (search criteria
and result structure) - Web-Service bindings for BMEcat