macromedia.coldfusion.cfml_general_discussion
[Top] [All Lists]

MX 6.1

Subject: MX 6.1
From: "RyanKreator"
Date: Tue, 28 Aug 2007 18:54:07 +0000 UTC
Newsgroups: macromedia.coldfusion.cfml_general_discussion
Im having a very strange problem.  I have a CF web service I am invoking and 
sending it several arguments.  In one web service method it works fine and Im 
only sending 3 arguments.  The other I am sending 6 and when I dump the 
ARGUMENTS arrary the values are with the wrong name.  Below is some sample code 
and what my dump looks like.  Any ideas?

 The dump for Start (which is correct) looks like this

 struct 
 GUIDCOURSEID 5d74631f-2db8-4755-b465-180dbb4136a2 <!--- correct--->
 GUIDORGANIZATIONID cee8a216-64f2-4703-9b44-dec4a478ddc7 <!--- correct--->
 INTLEARNERID 999999 <!--- correct--->


 The dump the SCORMInitialize looks like this (shuffles the ARGUMENTS)

 struct 
 GUIDCOURSEID normal <!---wrong --->
 GUIDORGANIZATIONID credit  <!--- wrong --->
 INTLEARNERID cee8a216-64f2-4703-9b44-dec4a478ddc7 <!--- wrong --->
 STRCREDIT 5d74631f-2db8-4755-b465-180dbb4136a2 <!--- wrong --->
 STRMODE 999999 <!--- wrong --->
 STRSCOID lesson01 <!--- correct--->

 Any help would be greatly appreciated.  Im pretty much stuck.  The shuffling 
is always the same, so I could code around it but Id prefer to know why its 
doing it so I dont have to bandaid it.

 TIA

 ***************
 **** test.cfm **** (invokes the web service)
 ***************
 <cfinvoke 
         
webservice="http://mysite.com/webservices/apps/services/eLearning/LMS/Main.cfc?w
sdl"
         method="Start"  returnvariable="StartMessage">
         <cfinvokeargument name="guidCourseId" 
value="5d74631f-2db8-4755-b465-180dbb4136a2" />
         <cfinvokeargument name="guidOrganizationId" 
value="cee8a216-64f2-4703-9b44-dec4a478ddc7" />
         <cfinvokeargument name="intLearnerId" value="999999" />
 </cfinvoke>

 <cfdump var="#StartMessage#">
 <br><br>
 <cfinvoke
         
webservice="http://mysite.com/webservices/apps/services/eLearning/LMS/Main.cfc?w
sdl"
         method="SCORMInitialize" returnvariable="InitMessage">
         <cfinvokeargument name="guidCourseId" 
value="5d74631f-2db8-4755-b465-180dbb4136a2" />
         <cfinvokeargument name="guidOrganizationId" 
value="cee8a216-64f2-4703-9b44-dec4a478ddc7" />
         <cfinvokeargument name="strSCOId" value="lesson01" />  
         <cfinvokeargument name="intLearnerId" value="999999" />
         <cfinvokeargument name="strMode" value="normal" />     
         <cfinvokeargument name="strCredit" value="credit" />   
 </cfinvoke>
 <cfdump var="#InitMessage#">
 <br><br>
 <cfinvoke 
         
webservice="http://igate-dev.inside.ups.com/webservices/apps/services/eLearning/
LMS/Main.cfc?wsdl"
         method="Terminate"
         returnvariable="TermMessage">
 </cfinvoke>

 <cfdump var="#TermMessage#">
 <br><br>
 ******************
 **** end:test.cfm ****
 ******************

 ****************
 **** Main.cfc **** (The Hub of the web service)
 ****************

      <cfset VARIABLES.StartMe = CreateObject("Component", 
"WebServices.Apps.Services.eLearning.LMS.SCORMStart").init(APPLICATION.eLearning
System.Config) />
      <cfset VARIABLES.InitializeMe = CreateObject("Component", 
"WebServices.Apps.Services.eLearning.LMS.SCORMInit").init(APPLICATION.eLearningS
ystem.Config) />
      <cfset VARIABLES.Terminate = CreateObject("Component", 
"WebServices.Apps.Services.eLearning.LMS.Terminate").init(APPLICATION.eLearningS
ystem.Config) /> 

         <cffunction access="remote" name="Start" returntype="any">
                 <cfargument name="guidCourseId" type="string" required="yes" 
displayname="guidCourseId" />
                 <cfargument name="guidOrganizationId" type="string" 
required="yes" displayname="guidOrganizationId" />
                 <cfargument name="intLearnerId" type="numeric" required="yes" 
displayname="intLearnerId" />

                 <cfreturn VARIABLES.StartMe.SCORMStart(ARGUMENTS.guidCourseId, 
ARGUMENTS.guidOrganizationId, ARGUMENTS.intLearnerId) />        
         </cffunction>
        
         <cffunction access="remote" name="SCORMInitialize" returntype="any">
                 <cfargument name="guidCourseId" type="string" required="yes" 
displayname="guidCourseId" />
                 <cfargument name="guidOrganizationId" type="string" 
required="yes" displayname="guidOrganizationId" />
                 <cfargument name="strSCOId" type="string" required="yes" 
displayname="strSCOId" />                     
                 <cfargument name="intLearnerId" type="string" required="yes" 
displayname="intLearnerId"/>
                 <cfargument name="strMode" type="string" required="yes" 
displayname="strMode"/>
                 <cfargument name="strCredit" type="string" required="yes" 
displayname="strCredit" />   
        
                 <cfreturn 
VARIABLES.InitializeMe.SCORMInit(ARGUMENTS.guidCourseId, 
ARGUMENTS.guidOrganizationId, ARGUMENTS.strSCOID, ARGUMENTS.intLearnerId, 
ARGUMENTS.strMode, ARGUMENTS.strCredit ) />
         </cffunction>

         <cffunction access="remote" name="Terminate" returntype="string">
                 <cfreturn VARIABLES.Terminate.Go() />
         </cffunction>
 *******************
 **** end:Main.cfc ****
 *******************

  
 **********************
 **** SCORMStart.cfc **** (this one works as expected)
 **********************
  <cffunction name="SCORMStart" access="public" returntype="any"
   hint="Starting point for the Start and Initialize functions"
  >
   <cfargument name="guidCourseId" type="string" required="yes" 
displayname="guidCourseId" />
   <cfargument name="guidOrganizationId" type="string" required="yes" 
displayname="guidOrganizationId" />
   <cfargument name="intLearnerId" type="numeric" required="yes" 
displayname="intLearnerId" />
  
 ...
  
   <cfreturn ARGUMENTS />
  
  </cffunction>
 **************************
 **** end:SCORMStart.cfc ****
 **************************
  
 **********************
 **** SCORMInit.cfc **** (this one shuffles the ARGUMENTS (img below))
 **********************
  <cffunction name="SCORMInit" access="public" returntype="any"
   hint="Starting point for the Start and Initialize functions"
  >
   <cfargument name="guidCourseId" type="string" required="yes" 
displayname="guidCourseId" />
   <cfargument name="guidOrganizationId" type="string" required="yes" 
displayname="guidOrganizationId" />
   <cfargument name="strSCOId" type="string" required="yes" 
displayname="strSCOId" />   
   <cfargument name="intLearnerId" type="string" required="yes" 
displayname="intLearnerId"/>
   <cfargument name="strMode" type="string" required="yes" 
displayname="strMode"/> 
   <cfargument name="strCredit" type="string" required="yes" 
displayname="strCredit" />
  
 ...
  
   <cfreturn ARGUMENTS />
  
  </cffunction>
 **************************
 **** end:SCORMInit.cfc ****
 **************************


<Prev in Thread] Current Thread [Next in Thread>