[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[alf-dev] ALF Vocabularies - Problem with Document Literal for Event declaration
|
ALF has previously
recommended using "Document Literal" or more "Document Literal Wrapped"
WSDL for the web services implemented for use with ALF.
While this is still the
recommendation it has some problems for events.
Document Literal that is WS-I compliant
requires the use or an element to link
the WSDL message to its data definition. Event declaration as so
far proposed relies on XSD type derivation by restriction. The problem is
that the same element name cannot
have the a different type in the same namespace. You end up with something like this as the SOAP
message. Notice the element
"MyEventNotice". This should really be "EventNotice". This
means the service flow would have to be written for the specific
event and cannot be generic. So far I have
not found a way to get around that when using a derived type.
<?xml version="1.0" encoding="UTF-8"
?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:q0="http://www.eclipse.org/alf/schema/EventBase/M7"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<q0:MyEventNotice
version="1.0">
<q0:Base
Version="1.0">
<q0:EventId
/>
<q0:Timestamp>2001-10-26T21:32:52</q0:Timestamp>
<q0:EventType>My
Product Event Type
A</q0:EventType>
<q0:ObjectType>MyObjectType1Name</q0:ObjectType>
<q0:ObjectId
/>
<q0:Source>
<q0:Product>My
Product
Name</q0:Product>
<q0:ProductVersion>
My
Product
Version
</q0:ProductVersion>
<q0:ProductInstance
/>
</q0:Source>
<q0:User>
<q0:CommonName
/>
<q0:LoginID
/>
<q0:Credentials
/>
</q0:User>
</q0:Base>
</q0:MyEventNotice>
</soapenv:Body>
</soapenv:Envelope>
It seems
that RPC Literal may work. This is WS-I compliant and
doesn't require much to be changed. To make it work like
somewhat like document literal so there is a single parameter called EventNotice
we need another layer hence the two "EventNotice" elements in the example
below. The first is the RPC operation and the second is the single
parameter it takes. Since the
parameter can be defined within a type rather than an element, the XML always has EventNotice as its
base element even if it is a derived type.
<?xml version="1.0" encoding="UTF-8"
?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:q0="http://www.eclipse.org/alf/schema/EventBase/M7"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<q0:EventNotice>
<parameters>
<q0:EventNotice
version="1.0">
<q0:Base
Version="1.0">
<q0:EventId>123</q0:EventId>
<q0:Timestamp>2001-10-26T21:32:52</q0:Timestamp>
<q0:EventType>
My
Product Event Type
A
</q0:EventType>
<q0:ObjectType>MyObjectType1Name</q0:ObjectType>
<q0:ObjectId
/>
<q0:Source>
<q0:Product>My
Product
Name</q0:Product>
<q0:ProductVersion>
My
Product
Version
</q0:ProductVersion>
<q0:ProductInstance
/>
</q0:Source>
<q0:User>
<q0:CommonName
/>
<q0:LoginID
/>
<q0:Credentials
/>
</q0:User>
</q0:Base>
</q0:EventNotice>
</parameters>
</q0:EventNotice>
</soapenv:Body>
</soapenv:Envelope>
I
think this should allows us to declare events in a way that is
interchangeable with the base defintion. Need to do some more checking to
see if it hangs together. An issue is that it is not the generally
recommended option (eg WTP does not suppport
it as a bottom up target although it will generate frameworks and proxies fromt
eh WSDL) and is not the
option ALF recommends for services.
Tim
**********************************************************************
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.