ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Bakker <mailingl...@antwebsystems.com>
Subject Re: make soap webservices with descriptive input/output instead of hashmaps:extend service definition: correction
Date Thu, 01 Jul 2010 06:15:51 GMT
correction on the previous mail, the proposal should be:

So i would like to suggest for a list containing maps:
<service name="[serviceName]" engine="[engine]" location="[location]"
        invoke="[methodName]">
    <description>...</description>
    <attribute name="[attribute name 1]" type="List"
                                mode="[mode]" optional="[optional]">
       <attribute name="[attribute name 3]" type="Map">
           <attribute name="[attribute name 4]" type="String"/>
           <attribute name="[attribute name 5]" type="String"/>
       </attribute>
    </attribute>
</service>

regards,
Hans


On Thu, 2010-07-01 at 11:02 +0700, Hans Bakker wrote:
> Sure we need to extend the service definition to define what kind of
> data is inside the complex elements (list,map).
> 
> I would however also suggest to give this data also a name so it is not
> required to look in the actual implementation what the list or map
> contains.
> 
> 
> So i would like to suggest for a list containing maps:
> <service name="[serviceName]" engine="[engine]" location="[location]"
> 	invoke="[methodName]">
>     <description>...</description>
>     <attribute name="[attribute name 1]" type="List"
> 				mode="[mode]" optional="[optional]">
>        <attribute name="[attribute name 3]" type="Map">
>            <attribute name="[attribute name 4]" type="String">
>            <attribute name="[attribute name 5]" type="String">
>        </attribute>
>        <attribute name="[attribute name 3]" type="Map">
>            <attribute name="[attribute name 4]" type="String">
>            <attribute name="[attribute name 5]" type="String">
>        </attribute>
>     </attribute>
> </service>
> 
> Regards,
> Hans
> 
> 
> 
> 
> 
> 
> On Wed, 2010-06-30 at 10:14 +0300, Chatree Srichart wrote:
> > 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
> 

-- 
Ofbiz on twitter: http://twitter.com/apache_ofbiz
Myself on twitter: http://twitter.com/hansbak
Antwebsystems.com: Quality services for competitive rates.


Mime
View raw message