OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

asap message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [asap] implementation details, resolution



Release 5.2.2 by default serializes all lists (observers, history events, instance responses)
as repeated elements rather than as xsd arrays as before, and is now out at the site....


On Feb 17, 2004, at 7:52 AM, John Fuller wrote:

Here is a revised CreateInstanceRq (the revised code has not yet moved out to the site)
In this demo, I just add an extra observer at the same port with a /tee extension.
Here ObserverKey just appears as multiple elements with the same name,
as opposed to an Array of URIs.

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><env:Header><ns1:Request xmlns:ns1="urn:xml:spec:asap:2003-12" xsi:type="ns1:Request"><SenderKey xsi:type="xsd:anyURI">http://enkidu.local:7776</SenderKey><ReceiverKey xsi:type="xsd:anyURI">http://enkidu.local:7777</ReceiverKey><ResponseRequired xsi:type="ns1:YesNoIfError">Yes</ResponseRequired></ns1:Request></env:Header><env:Body><m:CreateInstanceRq xmlns:m="urn:xml:spec:asap:2003-12"><StartImmediately xsi:type="xsd:boolean">true</StartImmediately><ObserverKey xsi:type="xsd:anyURI">http://enkidu.local:7776</ObserverKey><ObserverKey xsi:type="xsd:anyURI">http://enkidu.local:7776/tee</ObserverKey><Name xsi:type="xsd:string">OOS</Name><Subject xsi:type="xsd:string">Eaton</Subject><Description xsi:type="xsd:string">Run OOS for Eaton</Description><ContextData xsi:type="xsd:string">&lt;job_id&gt;14345&lt;/job_id&gt;</ContextData></m:CreateInstanceRq></env:Body></env:Envelope>

I suppose this better matches the schema as given, but as with list instances,
is there a reason to prefer using multiple elements over an array?
(I suppose it makes it easier to change the cardinality qualification...)
I guess, unless I hear otherwise, I'll change my serialization/deserialization of
unbounded elements like observerkey and list instances responses to
use multiple elements rather than arrays for now.
(Though perhaps the ListInstances would be a better case for an Array.)

***

As Java goes, I don't know of any Java implementation of my demonstrations, but
I think someone else was working on an AxisAsap Java project?



On Feb 13, 2004, at 3:13 PM, John Fuller wrote:

I just moved out the 5.2 sketch at
http://sourceforge.net/projects/easyasap/


For this release the user runs
server_asap_demo for the factory service that handles the requests
demo_asap_cli for the client observer that issues the creation request
observer_asap_demo for the observer server that receives the completion request

The given factory implementation is a multithreaded model where the soap-message receiving dispatcher thread writes to a channel consumed for the service that runs a finite state machine and writes to a channel for the instance that consumes instance requests and runs a finite state machine that controls a task (activity) which runs its own execution finite state machine.

Here's an example exchange


<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><env:Header><ns1:Request xmlns:ns1="urn:xml:spec:asap:2003-12" xsi:type="ns1:Request"><SenderKey xsi:type="xsd:anyURI">http://enkidu.local:7776</SenderKey><ReceiverKey xsi:type="xsd:anyURI">http://enkidu.local:7777</ReceiverKey><ResponseRequired xsi:type="ns1:YesNoIfError">Yes</ResponseRequired></ns1:Request></env:Header><env:Body><m:CreateInstanceRq xmlns:m="urn:xml:spec:asap:2003-12"><StartImmediately xsi:type="xsd:boolean">true</StartImmediately><ObserverKey xsi:type="enc:Array" enc:arrayType="xsd:anyURI[1]"><item xsi:type="xsd:anyURI">http://enkidu.local:7776</item></ObserverKey><Name xsi:type="xsd:string">OOS</Name><Subject xsi:type="xsd:string">Eaton</Subject><Description xsi:type="xsd:string">Run OOS for Eaton</Description><ContextData xsi:type="xsd:string">&lt;job_id&gt;14345&lt;/job_id&gt;</ContextData></m:CreateInstanceRq></env:Body></env:Envelope>

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><env:Header><ns1:Response xmlns:ns1="urn:xml:spec:asap:2003-12" xsi:type="ns1:Response"><SenderKey xsi:type="xsd:anyURI">http://enkidu.local:7777</SenderKey><ReceiverKey xsi:type="xsd:anyURI">http://enkidu.local:7776</ReceiverKey><RequestID xsi:type="xsd:anyURI"></RequestID></ns1:Response></env:Header><env:Body><m:CreateInstanceRs xmlns:m="urn:xml:spec:asap:2003-12"><InstanceKey xsi:type="xsd:anyURI">http://enkidu.local:7777?statesystem_instance_id=20040213--1557155238-1864-6@Enkidu.local</InstanceKey></m:CreateInstanceRs></env:Body></env:Envelope>

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><env:Header><ns1:Request xmlns:ns1="urn:xml:spec:asap:2003-12" xsi:type="ns1:Request"><ReceiverKey xsi:type="xsd:anyURI">http://enkidu.local:7776</ReceiverKey></ns1:Request></env:Header><env:Body><m:CompletedRq xmlns:m="urn:xml:spec:asap:2003-12"><InstanceKey xsi:type="xsd:anyURI">http://enkidu.local:7777?statesystem_instance_id=20040213--1557155238-1864-6@Enkidu.local</InstanceKey><ResultData xsi:type="xsd:string"></ResultData></m:CompletedRq></env:Body></env:Envelope>

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><env:Header><ns1:Response xmlns:ns1="urn:xml:spec:asap:2003-12" xsi:type="ns1:Response"><SenderKey xsi:type="xsd:anyURI">http://enkidu.local:7776</SenderKey><ReceiverKey xsi:type="xsd:anyURI"></ReceiverKey><RequestID xsi:type="xsd:anyURI"></RequestID></ns1:Response></env:Header><env:Body><m:CompletedRs xmlns:m="urn:xml:spec:asap:2003-12"><ns2:CompletedRs xmlns:ns2="AS"></ns2:CompletedRs></m:CompletedRs></env:Body></env:Envelope>


I recently looked at the "Cookbook" and noticed our Observerkey format appears to be a little different. When I first read our specification, the pseudo-xml and minOccurs in the schema suggested to me that we would have zero or more (possibly many) observers.

Should we allow multiple observers in the creation request?
If so, should I change the way I serialize them from what I have now somehow?




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]