Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7882361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:15:57+00:00 2026-06-03T04:15:57+00:00

I am trying to build a web service. Here is my code for a

  • 0

I am trying to build a web service. Here is my code for a simple web service which returns a string.
At the beginning i inserted some code from ben nadel
It refreshes the stubfile automatically because otherwise you get errors while passing parameters.

<cfcomponent 
    displayname="BaseWebService"
    output = "false"
    hint="This handles core web service features">


    <cffunction
        name="Init"
        access="public"
        returntype="any"
        output="false"
        hint="Returns an initialized web service instance.">

        <cfreturn THIS />
    </cffunction>

    <cffunction
        name="RebuildStubFile"
        access="remote"
        returntype="void"
        output="false"
        hint="Rebuilds the WSDL file at the given url.">

        <cfargument name="Password" type="string" required="true" default="" />

        <cfif NOT Compare(ARGUMENTS.Password, "sweetlegs!")>
            <cfset CreateObject("java", "coldfusion.server.ServiceFactory"
                    ).XmlRpcService.RefreshWebService(
                        GetPageContext().GetRequest().GetRequestUrl().Append("?wsdl").ToString()) />
        </cfif>

        <cfreturn />
    </cffunction>

    <cffunction 
        name="easyService"
        access="remote"
        returntype="any"
        output="false">

        <cfargument name="anyOutput" type="string" default="this and that" />
        <cfargument name="xtype" type="string" required="yes" default="1" />        

            <cfif Compare(xtype, "1") EQ 0>
                <cfset anyVar = "one" />
            <cfelse>
                <cfset anyVar = "two" />

            </cfif>
        <cfreturn anyVar>       
    </cffunction>
</cfcomponent>

Here I am trying to invoke the webservice.

<cfinvoke
    webservice="https://[...]/Components/Webservice.cfc?wsdl"
    method="RebuildStubFile">

    <cfinvokeargument 
        name="Password" 
        value="sweetlegs!" />
</cfinvoke>
<cfinvoke
    webservice="[...]/Components/Webservice.cfc?wsdl"
    method="easyService"
    returnVariable="anyVar" >

    <cfinvokeargument
        name="xtype"
        value="2" 
        omit="true">
</cfinvoke>

<cfdump var="#anyVar#">

The first method of my web service component can be invoked but the second one always returns this error message:

coldfusion.xml.rpc.ServiceProxy$ServiceMethodNotFoundException: Web service operation     easyService with parameters {xtype={2}} cannot be found.
    at coldfusion.xml.rpc.ServiceProxy.invoke(ServiceProxy.java:149)
    at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2301)
    at coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:454)

If i type in the url of the webservice, by adding

?method=easyService&xtype=2

it returns the right value. but this is like passing values with a GET method.

i have been searching for hours and don’t know where the problem occures.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:15:59+00:00Added an answer on June 3, 2026 at 4:15 am

    I think when using WebService call you need to specify all arguments and use omit=”true” on the proper one (not on xtype).

    <cfinvoke
        webservice="[...]/Components/Webservice.cfc?wsdl"
        method="easyService"
        returnVariable="anyVar" >
    
        <cfinvokeargument
            name="anyOutput"
            value=""
            omit="true">
    
        <cfinvokeargument
            name="xtype"
            value="2">
    </cfinvoke>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to build a web-service, which will receive large files and save them
I am trying to build a web service in .NET, which will retrieve data
I'm trying to build a generic web service interface using WCF, to allow 3rd
I'm trying to build the proxy class for a web service using the wsdl
I am trying to use a web service built on asp.net wcf from iPhone
I'm trying to build a visual web part for SharePoint 2010 which should connect
I am trying to call some web services written in Java from my asp.net
I'm trying to build a web service using Ruby on Rails. Users authenticate themselves
I am trying build an automated testing framework for some of our internal web
I am trying to build a restful web service for my website. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.