Hi community. I'd like to disscuss about service's attribute definition
descriptive at servicedef.

I need to integrate OFBiz with other system based on web service. But the
problem I found OFBiz's SOAP message is not compatible to the other
services. Now the OFBiz's SOAP message be like hash map, with key and value.
It is good for communication between OFBiz to OFBiz but it is not good for
OFBiz to the other systems.

The current SOAP message of OFBiz look like this:

<[serviceName]>
    <map-Map>
        <map-Entry>
            <map-Key>
                <std-String value="[parameter name]"/>
            </map-Key>
           <map-Value>
               <std-String value="[parameter value]"/>
               or
               <col-Collection>
                   ....
                   ....
               </col-Collection>
               or
               <map-Map>
                   ....
                   ....
               <map-Map>
           </map-Value>
        <map-Entry>
    </map-Map>
</[serviceName]>

The parameter type would specify by tag's name such as: map-Map, std-String,
isn't in schema.

I need the SOAP message like this:

<[param name>
    [param value]
</[param name]>

or

<[param name 1]>
    <[param name 2]>
        <item>[param value 1]</item>
        <item>[param value 2]</item>
    </[param name 2>
</[param name1]>

For the type of [param name], would be define in schema.

But I can not convert servicedef to schema at all now. I have a problem
about attributes which have complex type such as: List, Map, GenericValue. I
can not know what type be inside these complex type.

So, would it be possible if I could add some information in attribute tag at
servicedef like this:


<service name="[serviceName]" engine="[engine]" location="[location]"
invoke="[methodName]">
    <description>...</description>
    <attribute name="[attribute name 1]" type="[attribute type]"
mode="[mode]" optional="[optional]">
       <structure itemType="List">
           <attribute name="[attribute name 2]" type="Map">
               <structure itemType="String"/>
               <structure itemType="String"/>
           </attribute>
       </structure>
    </attribute>
</service>

The [attribute name 1] is a normal service's attribute.
The first structure tag for define a structure of [attribute name 1] by has
"itemType" attribute to tell the type of inner attribute.
The [attribute name 2] is a item that be contained in the first structure
tag.
The second and thrid structure tags to tell a structure in [attribute name
2].

For this format, I can generate schema for the complex type.

Do you have any idea about this?

Regards,
Chatree Srichart

Reply via email to