[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [ws-caf-implement] Discussion on the demo application
For those interested I have attached files
defining Retailer Malik -----Original Message----- Hi
All After
a silence (Hmmm let say it a “little silence”), let’s
re-discuss on the demo application. Simeon
has produced some files to use in demo application. These files concern mainly
the Retailer. I
have added hereafter Simeon’s comment explaining the files. “I've stripped down
the Retailer wsdl from WS-I. I haven't changed the namespaces, but I've
removed dependencies on some other schemas and wsdls. So there are now
only 3 fiels that we need for implementing the Retailer. The Retailer.wsdl
has the operations and messages; RetailerOrder.xsd has type definitions for
product ordering and customer info; RetailCatalog.xsd has the item definition
and descriptions. So the general idea is that when you invoke the
getCatalog operation on Retailer you will get a list of CatalogItem
types. When you make a call to submitOrder on the Retailer you will send
a PartsOrderRequest (which has specifies the quantity and price of each catalog
item you wish to purchase) and then get a response that shows what you've
purchased. Let’s
consider the following points: - In the document
DemoApplication_WSContext, we have defined a set of components to use for the
demo application. Among these components, there is an Activity LifeCycle
Service or ALS. We can define only one. When enlisted with the Context Service,
it should provide the protocol-uri for this enlistement. This same protocol-uri
is the one to be used by the application on context creation and control
(begin, complete, …). In order to use a same protocol-uri, let’s
consider this simple uri for the demo application “urn:wscafdemo:contextprotocol“ -
In the same document, we have indicated that an ALS may be used to augment the
context and the context can be augmented by a separate service. We need to
clarify the behaviour of the ALS. According to this behaviour we could see how
many ALS need to be enlisted (one per company?), when they/it need to be
enlisted and with which Context Service they/it are/is enlisted? -
Concerning the shopping card that should define the context, we should agree on
its content and decide on the way to propagate it (reference/value). What
we need to do now is enhancing the behaviour of the submitOrder invocation. Malik |
<?xml version="1.0" encoding="utf-8"?> <!-- November 14, 2002 (c) Copyright 2002, The Web Services-Interoperability Organization (WS-I) Download or use of this file is governed by the Policies and Bylaws of WS-I. For more information, send email info@ws-i.org. --> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:tns="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailOrder.xsd" targetNamespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailOrder.xsd"> <xsd:annotation> <xsd:documentation xml:lang="en">Definition of PartsOrder types for Retailer component of WS-I</xsd:documentation> </xsd:annotation> <xsd:complexType name="PartsOrderType"> <xsd:sequence> <xsd:element name="Item" type="tns:PartsOrderItem" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="PartsOrderItem"> <xsd:sequence> <xsd:element name="productNumber" type="tns:productNumber" minOccurs="1" maxOccurs="1"/> <xsd:element name="quantity" type="xsd:nonNegativeInteger" minOccurs="1" maxOccurs="1"/> <xsd:element name="price" type="xsd:decimal" minOccurs="1" maxOccurs="1"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="PartsOrderResponseType"> <xsd:sequence> <xsd:element name="Item" type="tns:PartsOrderResponseItem" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="PartsOrderResponseItem"> <xsd:sequence> <xsd:element name="productNumber" type="tns:productNumber" minOccurs="1" maxOccurs="1"/> <xsd:element name="quantity" type="xsd:nonNegativeInteger" minOccurs="1" maxOccurs="1"/> <xsd:element name="price" type="xsd:decimal" minOccurs="1" maxOccurs="1"/> <xsd:element name="comment" type="xsd:string" minOccurs="0" maxOccurs="1"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="CustomerDetailsType"> <xsd:sequence> <xsd:element name="custnbr" type="tns:CustomerReferenceType" minOccurs="1" maxOccurs="1"/> <xsd:element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="street1" type="xsd:string" minOccurs="0" maxOccurs="1"/> <xsd:element name="street2" type="xsd:string" minOccurs="0" maxOccurs="1"/> <xsd:element name="city" type="xsd:string" minOccurs="0" maxOccurs="1"/> <xsd:element name="state" type="xsd:string" minOccurs="0" maxOccurs="1"/> <xsd:element name="zip" type="xsd:string" minOccurs="0" maxOccurs="1"/> <xsd:element name="country" type="xsd:string" minOccurs="0" maxOccurs="1"/> </xsd:sequence> </xsd:complexType> <xsd:simpleType name="productNumber"> <xsd:restriction base="xsd:integer"> <xsd:minInclusive value="1"/> <xsd:maxInclusive value="999999"/> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="CustomerReferenceType"> <xsd:restriction base="xsd:normalizedString"> <xsd:maxLength value="20"/> <xsd:pattern value="[A-D][0-9]{5}-[0-9A-Z]{7}-[a-z]{3}#*"/> </xsd:restriction> </xsd:simpleType> <xsd:element name="InvalidProductCode" type="tns:InvalidProductCodeType"/> <xsd:complexType name="InvalidProductCodeType"> <xsd:sequence> <xsd:element name="Reason"> <xsd:simpleType> <xsd:restriction base="xsd:NMTOKEN"> <xsd:enumeration value="InvalidProductCode"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="ProductNumber" type="tns:productNumber" /> </xsd:sequence> </xsd:complexType> <xsd:element name="BadOrderReason" type="xsd:string"/> </xsd:schema>
<?xml version="1.0" encoding="utf-8"?> <!-- September 14, 2002 (c) Copyright 2002, The Web Services-Interoperability Organization (WS-I) Download or use of this file is governed by the Policies and Bylaws of WS-I. For more information, send email info@ws-i.org. --> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:tns="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailCatalog.xsd" targetNamespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailCatalog.xsd"> <xsd:annotation> <xsd:documentation xml:lang="en">Catalog schema for Retailer component of WS-I</xsd:documentation> </xsd:annotation> <xsd:element name="catalog" type="tns:CatalogType"/> <xsd:element name="comment" type="xsd:string"/> <xsd:complexType name="CatalogType"> <xsd:sequence> <xsd:element name="Item" type="tns:CatalogItem" maxOccurs="10"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="CatalogItem"> <xsd:sequence> <xsd:element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="description" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="productNumber" type="tns:productNumber" minOccurs="1" maxOccurs="1"/> <xsd:element name="category" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="brand" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="price" type="xsd:decimal" minOccurs="1" maxOccurs="1"/> </xsd:sequence> </xsd:complexType> <xsd:simpleType name="productNumber"> <xsd:restriction base="xsd:integer"> <xsd:minInclusive value="1"/> <xsd:maxInclusive value="999999"/> </xsd:restriction> </xsd:simpleType> </xsd:schema>
<?xml version="1.0" encoding="utf-8" ?> <!-- September 14, 2002 (c) Copyright 2002, The Web Services-Interoperability Organization (WS-I) Download or use of this file is governed by the Policies and Bylaws of WS-I. For more information, send email info@ws-i.org. --> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cat="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailCatalog.xsd" xmlns:order="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailOrder.xsd" xmlns:tns="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl" targetNamespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/"> <wsdl:documentation> This WSDL document describes the Retailer service for the WS-I Basic Sample Application. This service is part of a supply chain management system. It is used to demonstrate a web service that is conformant with the Basic Profile and to show how different web service platforms can interoperate.</wsdl:documentation> <wsdl:types> <xs:schema> <xs:import namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailCatalog.xsd" schemaLocation="RetailCatalog.xsd"/> <xs:import namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailOrder.xsd" schemaLocation="RetailOrder.xsd"/> </xs:schema> </wsdl:types> <wsdl:message name="getCatalogRequest"/> <wsdl:message name="getCatalogResponse"> <wsdl:part name="return" type="cat:CatalogType"> <wsdl:documentation>the product catalog</wsdl:documentation> </wsdl:part> </wsdl:message> <wsdl:message name="submitOrderRequest"> <wsdl:part name="PartsOrder" type="order:PartsOrderType"> <wsdl:documentation>XML structure holding product/quantity pairs</wsdl:documentation> </wsdl:part> <wsdl:part name="CustomerDetails" type="order:CustomerDetailsType"/> </wsdl:message> <wsdl:message name="submitOrderResponse"> <wsdl:part name="return" type="order:PartsOrderResponseType"> <wsdl:documentation>XML structure holding product/quantity ordered pairs, with optional failure message</wsdl:documentation> </wsdl:part> </wsdl:message> <wsdl:message name="BadOrderFault"> <wsdl:part name="Reason" element="order:BadOrderReason"/> </wsdl:message> <wsdl:message name="InvalidProductCodeFault"> <wsdl:part name="InvalidProductCode" element="order:InvalidProductCode"/> </wsdl:message> <wsdl:portType name="RetailerPortType"> <wsdl:operation name="getCatalog"> <wsdl:documentation>returns a product catalog</wsdl:documentation> <wsdl:input message="tns:getCatalogRequest" name="getCatalogRequest"/> <wsdl:output message="tns:getCatalogResponse" name="getCatalogResponse"/> </wsdl:operation> <wsdl:operation name="submitOrder"> <wsdl:documentation>Accept an order for quantities of multiple products</wsdl:documentation> <wsdl:input message="tns:submitOrderRequest" name="submitOrderRequest"/> <wsdl:output message="tns:submitOrderResponse" name="submitOrderResponse"/> <wsdl:fault name="BadOrder" message="tns:BadOrderFault"/> <wsdl:fault name="InvalidProductCode" message="tns:InvalidProductCodeFault"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="RetailerSoapBinding" type="tns:RetailerPortType"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="getCatalog"> <soap:operation soapAction="" style="rpc"/> <wsdl:input> <soap:body use="literal" namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl"/> </wsdl:input> <wsdl:output> <soap:body use="literal" namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="submitOrder"> <soap:operation soapAction="" style="rpc"/> <wsdl:input> <soap:body use="literal" namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl" parts="PartsOrder CustomerDetails"/> </wsdl:input> <wsdl:output> <soap:body use="literal" namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl"/> </wsdl:output> <wsdl:fault name="BadOrder"> <soap:fault name="BadOrder" use="literal"/> </wsdl:fault> <wsdl:fault name="InvalidProductCode"> <soap:fault name="InvalidProductCode" use="literal"/> </wsdl:fault> </wsdl:operation> </wsdl:binding> </wsdl:definitions> <!-- The following is an example of a getCatalog SOAP request message compliant with the above WSDL: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <ns1:getCatalog xmlns:ns1="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl"> </ns1:getCatalog> </SOAP-ENV:Body> </SOAP-ENV:Envelope> The following is an example of a getCatalog SOAP response message compliant with the above WSDL: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <ns1:getCatalogResponse xmlns:ns1="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl"> <return> <Item xmlns="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailCatalog.xsd"> <name>TV,Brand1</name> <description>24", Color, Advanced Velocit Scan Modular</description> <productNumber>605001</productNumber> <category>TV</category> <brand>Brand1</brand> <price>299.95</price> </Item> <Item xmlns="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailCatalog.xsd"> <name>TV, Brand2</name> <description>32", Super Slim Flat Panel Plasma</description> <productNumber>605002</productNumber> <category>TV</category> <brand>Brand2</brand> <price>1499.99</price> </Item> </return> </ns1:getCatalogResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> The following is an example of a submitOrder SOAP request message compliant with the above WSDL: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header> <h:Configuration xmlns:h="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.xsd"> <h:UserId>griddell@bowstreet.com</h:UserId> <h:ServiceUrl Role="LoggingFacility">http://example1/SampleApp/SCM/LoggingFacility</h:ServiceUrl> <h:ServiceUrl Role="Retailer">http://example2/wsi/soaprpc/wsi/RetailerImpl</h:ServiceUrl> <h:ServiceUrl Role="WarehouseA">http://example3/wsi/soaprpc/wsi/WarehouseAImpl</h:ServiceUrl> <h:ServiceUrl Role="WarehouseB">http://example4/wsi/soaprpc/wsi/WarehouseBImpl</h:ServiceUrl> <h:ServiceUrl Role="WarehouseC">http://example5/wsi/soaprpc/wsi/WarehouseCImpl</h:ServiceUrl> <h:ServiceUrl Role="ManufacturerA">http://example6/ws-i_sample/ManufacturerA</h:ServiceUrl> <h:ServiceUrl Role="ManufacturerB">http://example7/ws-i_sample/ManufacturerB</h:ServiceUrl> <h:ServiceUrl Role="ManufacturerC">http://example8/ws-i_sample/ManufacturerC</h:ServiceUrl> </h:Configuration> </SOAP-ENV:Header> <SOAP-ENV:Body> <ns1:submitOrder xmlns:ns1="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl"> <PartsOrder xmlns:p="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailOrder.xsd"> <p:Item> <p:productNumber>605006</p:productNumber> <p:quantity>182</p:quantity> <p:price>3.99</p:price> </p:Item> <p:Item><p:productNumber>605002</p:productNumber> <p:quantity>4</p:quantity> <p:price>3.99</p:price> </p:Item> <p:Item> <p:productNumber>605003</p:productNumber> <p:quantity>82</p:quantity> <p:price>7.99</p:price> </p:Item> </PartsOrder> <CustomerDetails xmlns:c="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailOrder.xsd"> <c:custnbr>ABCD999999999EFG</c:custnbr> <c:name>Joe Bloggs</c:name> <c:street1 /> <c:city /> <c:state>NH</c:state> <c:zip>03870</c:zip> <c:country>USA</c:country> </CustomerDetails> </ns1:submitOrder> </SOAP-ENV:Body> </SOAP-ENV:Envelope> The following is an example of a submitOrder SOAP response message that is compliant with the WSDL: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <ns1:submitOrderResponse xmlns:ns1="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl"> <return xmlns:ns2="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailOrder.xsd"> <ns2:Item> <ns2:productNumber>605002</ns2:productNumber> <ns2:quantity>4</ns2:quantity> <ns2:price>3.99</ns2:price> <ns2:comment>in stock from WarehouseA</ns2:comment> </ns2:Item> <ns2:Item> <ns2:productNumber>605006</ns2:productNumber> <ns2:quantity>0</ns2:quantity> <ns2:price>0</ns2:price> <ns2:comment>insufficient stock</ns2:comment> </ns2:Item> <ns2:Item> <ns2:productNumber>605003</ns2:productNumber> <ns2:quantity>0</ns2:quantity> <ns2:price>0</ns2:price> <ns2:comment>insufficient stock</ns2:comment> </ns2:Item> </return> </ns1:submitOrderResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> -->
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]