that struct is building up the parameters to send to the SOAP Request. So, if the API requires the following parameters:
<version /> <CategoryID /> <ItemName /> Then in your struct you have: <cfscript> myRequest = structNew(); myRequest.version = "623"; myRequest.CategoryID = 20; myRequest.ItemName = "Some Item Name"; </cfscript> Now when you use the cfinvoke tag and pass the argument to it as a struct, the Soap Request takes those parameters one by one as if you were creating the elements individually. I ran into serious issues because a lot of these parameters are complex types that map to a custom Object. Even when I would try to set the parameters to be of the Object type it expected the whole thing went south. I was going to try and go the route of creating my soap requests in xml format using cfsavecontent then just use cfhttp to pass the soap requests in but I ran out of time. If you have any other questions I can try and help you out with what I know, which isn't a whole lot. Thanks, Ben On Thu, Jul 2, 2009 at 1:02 PM, Phillip Vector <[email protected]>wrote: > > So I downloaded some sample code for sending a SOAP command to the > servers and I get back a response (the time).. So it works in that > sense. But all it gives me in the time.. > > Code is as follows... > ========================================================= > <cfset ebayXMLObj = xmlparse(ebayHeaderXML)> > > <cfscript> > // set the header using addSOAPRequestHeader.. an added function to CF MX > 7.0 > addSOAPRequestHeader(ebayWS, "urn:ebay:apis:eBLBaseComponents", > "RequesterCredentials", "#ebayXMLObj#", false); > </cfscript> > > <cfscript> > // set the end point using javas _setProperty > ebayWS._setProperty("javax.xml.rpc.service.endpoint.address"," > https://api.sandbox.ebay.com/wsapi?callname=#methodToCall#&siteid=#SiteID#&appid=#AppID#&version=#version#&Routing=#routing# > "); > > // build geteBayOfficialTimeRequest.. > timeRequest = StructNew(); > timeRequest.version = variables.version; > </cfscript> > > <!--- call the webservice ---> > <cfinvoke webservice="#ebayWS#" method="#methodToCall#" > returnvariable="time"> > <cfinvokeargument name="geteBayOfficialTimeRequest" > value="#timeRequest#"> > </cfinvoke> > > <!--- save the output //---> > <cfset eBayDateTime=time.getTimeStamp().getTime()> > > <p>Official eBay Date(dd.mm.yyyy)/Time(HH:mm:ss): > <cfoutput>#lsDateFormat(eBayDateTime,"dd.mm.yyyy")# > #lsTimeFormat(eBayDateTime,"HH:mm:ss")#</cfoutput></p> > > ========================================================= > > So I'm looking at this and I need to code it to add an item.. I got > how to set the methodtocall so that I can add items and such.. But > what I'm confused by is.. > > // build geteBayOfficialTimeRequest.. > timeRequest = StructNew(); > timeRequest.version = variables.version; > > Is this really nesserary? Is that setting up the variable that gets > returned or some such? > > Mainly, can someone show me a "soap light" version of what is > nesserary and what isn't when calling ebay? > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324160 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

