Link to home
Start Free TrialLog in
Avatar of nmarano
nmarano

asked on

Web Service Error

Hello Experts-

I am using the attached cfc as a web service.  When I pass this single argument,
<cfinvoke
   method="landingPageAssets"
   returnvariable="CampaignInfo"
   webservice="http://admin.keywordconnects.com/webServices/ionCampaignDataDEV.cfc?wsdl">

   <cfinvokeargument name="cid" value="6">
   <!---  
    <cfinvokeargument name="ccid" value="1014684">
--->
 
      
</cfinvoke>

Everything works fine and I receive the XML packet back.  When I add other argument that is commented out in the code above, I get the following error message....

"Web service operation landingPageAssets with parameters {ccid={1014684},cid={6}} cannot be found."

Can someone tell me what I am doing wrong here?  Any help would be appreciated.  I've attached the cfc below...

Thanks
Nick

<cfcomponent>
  <cffunction name="landingPageAssets"
    access="remote"
    returntype="string"
    output="no">

    
    <cfargument name="cid"
    type="numeric"
      required="no">
      
          <cfargument name="ccid"
    type="numeric"
      required="no">

    <cfset Var campaignInfo = "">
    <cfset Var getCampaignInfo = "">
    <cfquery name="getCampaignInfo" datasource="#application.dsn#">
       select ct.id as ct_id
            ,ct.name as ct_name
            ,ct.location as ct_location
            ,ct.offer as ct_offer
            ,ct.headline as ct_headline
            ,ct.defaultState as ct_state
            ,ct.content1 as ct_content1
            ,ct.content2 as ct_content2
            ,ct.image1 as ct_image1
            ,ct.isAllowAppointment as ct_isAllowAppointment
            ,cy.cityID as googlecityid
      		,cy.cityName as googlecityname
      		,cy.state as googlestate
      		,cy.cityAbb as googlecityabb
      		,cy.active    as googleactive          
            from clients ct, google_cityID cy
            where ct.id = #arguments.cid#
            and cy.cityID =  #arguments.ccid#
    </cfquery>

    <cfsavecontent variable="CampaignInfo">
      <campaigns>
        <cfoutput query="getCampaignInfo">
          <campaign id="#ct_id#">
            <offer>#XMLFormat(ct_offer)#</offer>
            <campaignname>#XMLFormat(ct_name)#</campaignname>
            <location>#XMLFormat(ct_location)#</location>
            <headline>#XMLFormat(ct_headline)#</headline>
            <state>#XMLFormat(ct_state)#</state>
            <content1>#XMLFormat(ct_content1)#</content1>
            <!---
            <content2>#XMLFormat(ct_content2)#</content2>
			--->
            <isAllowAppointment>#XMLFormat(ct_isAllowAppointment)#</isAllowAppointment>
            <googlecityname>#XMLFormat(googlecityname)#</googlecityname>
            <googlestate>#XMLFormat(googlestate)#</googlestate>
            <googlecityabb>#XMLFormat(googlecityabb)#</googlecityabb>
          </campaign>
        </cfoutput>
      </campaigns>
    </cfsavecontent>

    <cfreturn campaignInfo>
  </cffunction>
</cfcomponent>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of _agx_
_agx_
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nmarano
nmarano

ASKER

let me try refreshing....
Avatar of nmarano

ASKER

Thank you sir!  Haven't had much exposure to wsdl and web services.  Thanks again for the refresh!

Thanks
Nick
Avatar of nmarano

ASKER

agx-

Can I ask one more question.  The person calling this is asking me to send well formed XML...now I read a few things and noticed things like adding
<?xml version="1.0" encoding="ISO-8859-1"?>
to the XML, but where I have it in the cfc, is there a way for me to make this well formed?

Thanks
nick
(Edit) You could either use <cfxml>, which adds the headers you IIRC - OR- add it at the top of the cfsavecontent - before the opening campaigns element.