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

ColdFusion Language

Avatar of undefined
Last Comment
_agx_

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
_agx_

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
nmarano

let me try refreshing....
ASKER
nmarano

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

Thanks
Nick
ASKER
nmarano

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
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
_agx_

(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.