[Wsf-general] The configuration file for the database service
supun
supun at wso2.com
Wed Feb 28 01:39:00 PST 2007
Hi,
> I would suggest the following XML syntax for output:
>
> <output singleRow="true|false"
> rowElementName="row"
> rowsElementName="rows"
> useNil="true|false"
> defaultNamespace="..."
> columnDefault="element|attribute|omit">
> <attribute columnName="country"/>
> <element elementName="IndexedState" columnName="ISINDEX"/>
> ...
> </output>
>
> Note that everything is optional, so for example,
>
> <output>
> <element elementName="IndexedState" columnName="ISINDEX"/>
> </output>
>
> is allowed, as is no <output> element at all.
>
>
There must be a way for the user to know if something went wrong in the
server side. The simplest way to do this will be sending a SOAP-fault.
We also have the option of defining another optional element in the
output element so that the service can send the status of performing the
query. By adding this element we have a uniform way of sending
responses in the case of queries like UPDATE, DELETE or INSERT. All
these queries give the number of affected rows. For example lets say
user sends a request to update a table. The query will be something like
"UPDATE items,month SET items.price=month.price WHERE items.id=5"
This query may actually update the table or may not. But how is the user
going to know weather the data he sent is accepted? By using another
element we can send the number of updated rows in the respose so that
user knows what is happening.
So I suggest we add a extra optional attribute and a optional element to
what James suggest.
<output singleRow="true|false"
rowElementName="row"
rowsElementName="rows"
useNil="true|false"
defaultNamespace="..."
columnDefault="element|attribute|omit"
resultCode="true | false">
<attribute columnName="country"/>
<element elementName="IndexedState" columnName="ISINDEX"/>
<resultStatus/> ...
</output>
If the resultCode is false and if a error occurs we send a SOAP fault.
If we get resultCode attribute true and no resultStatus present there
will be a default resultStaus element in the output.
I'm not sure about the composition of the resultStatus element. For now
I'm suggesting we send the number of affected rows or a string value.
The string value may contain a error string or a success message.
Supun
More information about the Wsf-general
mailing list