• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Publish webservice with complex Data Type

New Here ,
Sep 17, 2013 Sep 17, 2013

Copy link to clipboard

Copied

We're using CF7 (still) and needs to publish a webservice which takes as input a complex request with a struct of array of struct of array of struct......etc. From what I can see itcan't be done in CF7. Can it be done in CF10?

Sample desired input to webservice .  

=======================================================================================================

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ther="http://hi/there" xmlns:web="http://webservice.cfcs.common.things">

   <soapenv:Header/>

   <soapenv:Body>

      <ther:savethings>

         <ther:Thing>

            <web:EDate>?</web:EDate>

            <web:Id>?</web:Id>

            <web:Thingy>

               <web:EType>?1</web:EType>

               <web:Value>?1</web:Value>

            </web:Thingy>

            <web:Thingy>

               <web:EType>?2</web:EType>

               <web:Value>?2</web:Value>

            </web:Thingy>

          </ther:Thing>

      </ther:savethings>

   </soapenv:Body>

</soapenv:Envelope>

Sample CFCs

===============

<cfcomponent namespace="http://hi/there" style="document">

           <cffunction name="savethings" displayname="Save data" returnType="numeric" output="false" access="remote">

                    <cfargument name="Thing" type="Thing_Type" required="true">

       <cfset var tmpVal="">

                     <cfreturn 1/>

          </cffunction>

</cfcomponent>

Thing_Type.cfc

================

<cfcomponent>

     <cfproperty name="Id" type="string">

      <cfproperty name="EDate" type="date">

        <cfproperty name="Thingy" type="Thingy_Type" hint="">

</cfcomponent>

Thingy_Type.cfc

================

<cfcomponent>

          <cfproperty name="Value" type="string" hint="">

          <cfproperty name="EType" type="string" hint="">

</cfcomponent>

<cfproperty name="Thingy" type="Thingy_Type[]" hint="">  doesn't work in CF7 , does it work in CF10? Or does something else work?

TOPICS
Advanced techniques

Views

371

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

New Here , Sep 18, 2013 Sep 18, 2013

It works on CF10.

Votes

Translate

Translate
New Here ,
Sep 18, 2013 Sep 18, 2013

Copy link to clipboard

Copied

LATEST

It works on CF10.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation