Hello,

I'm starting to play with web services and i would like to publish
a web service with a custom XSD with a few complex types. I've been
looking at OpenBD doc + Adobe's doc regarding web services. Seems
CFML creates automatically the WSDL file and have the following mapping
for complex types:

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=webservices_25.html#1168427

After playing with it i've got the following questions:

1) What should i put as cfargument and/or cfreturn type= when i want
to use a custom complex type?

I tried setting struct, but for example, this code doesn't generate
what i would expect of it:

    <cffunction name="testfnc" returnType="struct" access="remote"
output="no">
        <cfargument name="input" type="string">
        <cfset test=StructNew()/>
        <cfset test.str="hola"/>
        <cfset test.flt=20.40/>
        <cfreturn #test#>
    </cffunction>

WSDL relevant parts:

<wsdl:message name="testfncResponse">
<wsdl:part name="testfncReturn" type="tns1:StructMap"/>
</wsdl:message>


types part:

<complexType name="StructMap">
-
<sequence>
<element name="item" nillable="true"
type="impl:ArrayOf_tns1_StructMapItem"/>
</sequence>
</complexType>
<complexType name="ArrayOf_tns1_StructMapItem">
-
<complexContent>
-
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType"
wsdl:arrayType="tns1:StructMapItem[]"/>
</restriction>
</complexContent>
</complexType>

Ie: it doesn't seem easy for me to use this outside of maybe other
OpenBD implementation and i would like to be able to use this WS from
other languages. I would prefer if str is a xsd:string and flt is an
xsd:float, but i just don't know how to do that from OpenBD. Is there
maybe any way to create parts of the WSDL file and mappings by hand?


2) How do i create a restriction, for example:

<xs:simpleType>
  <xs:restriction base="xs:string">
    <xs:enumeration value="R" />
    <xs:enumeration value="L" />
  </xs:restriction>
</xs:simpleType>


My OpenBD version in case it does matter is 1.2. We could update to
other version if needed.

Thanks a lot.
Regards.

-- 
Open BlueDragon Public Mailing List
 http://www.openbluedragon.org/   http://twitter.com/OpenBlueDragon
 official manual: http://www.openbluedragon.org/manual/
 Ready2Run CFML http://www.openbluedragon.org/openbdjam/

 mailing list - http://groups.google.com/group/openbd?hl=en

Reply via email to