Cfinvoke error
Here is the code from the .cfm page
<cfinvoke component="Checkout" method="purchaseAudio"
returnvariable="PurchaseAudioResults" > </cfinvoke>
Here is the error that comes up. as you can see there is a
method on the cfinvoke call, and there is a method called
purechaseAudio in the Checkout.cfc file. Why do I get this error?
Error Message:
Attribute validation error for tag CFINVOKE.
The tag requires the attribute(s): METHOD .
The error occurred in C:\Inetpub\wwwroot\Audio
Silo\CheckOut.cfm: line 188
186 : </cfinvoke> --------------->
187 :
188 : <cfinvoke component="Checkout"
method="purchaseAudio" returnvariable="PurchaseAudioResults" >
189 : </cfinvoke>
190 :
Robert-Flash wrote:
> Here is the code from the .cfm page
>
> <cfinvoke component="Checkout" method="purchaseAudio"
> returnvariable="PurchaseAudioResults" >
</cfinvoke>
>
> Here is the error that comes up. as you can see there is
a method on the
> cfinvoke call, and there is a method called
purechaseAudio in the Checkout.cfc
> file. Why do I get this error?
>
> Error Message:
>
> Attribute validation error for tag CFINVOKE.
> The tag requires the attribute(s): METHOD .
>
> The error occurred in C:\Inetpub\wwwroot\Audio
Silo\CheckOut.cfm: line 188
>
> 186 : </cfinvoke> --------------->
> 187 :
> 188 : <cfinvoke component="Checkout"
method="purchaseAudio"
> returnvariable="PurchaseAudioResults" >
> 189 : </cfinvoke>
> 190 :
>
>
strange....
- does the purchaseAudio method in your Checkout.cfc invoke
any other
components using <cfinvoke>? are the tags properly
formed there?
- try removing the closing </cfinvoke> - you really
only need it when
you have <cfinvokeargument>
hth
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com
Similar Messages
-
CFINVOKE syntax causing error - STUB OBJECTS??
When I run the code below I get this error :
"Could not generate stub objects for web service invocation.
Name:
http://app.campaignmonitor.com/api/api.asmx?WSDL.
WSDL:
http://app.campaignmonitor.com/api/api.asmx?WSDL.
org.apache.axis.wsdl.toJava.DuplicateFileException: Duplicate file
name:
C:\CFusionMX7\stubs\WS1938286156\com\campaignmonitor\app\api\SubscriberUnsubscribe.java.
Hint: you may have mapped two namespaces with elements of the same
name to the same package name. "
I
have run other simple cfinvoke tags - like to get weather
for a zipcode - without error... what does this error mean & is
the problem on my hosts server, in my code or on the webservice
server?
Thanks!!> Well, I answered those questions already, I can't post
the code, but the error
> is clearly defined in my post, as is my OS.
Talking like that to someone who's trying to help you is not
going to win
you any friends. And probably very little help.
> I dont understand why I get that error. I can view the
WSDL file just fine,
> but always get this error.
I have sometimes found this to happen when I have executed a
WS once, and
then changed some of its input/output data types. I'm not
entirely sure
what's going on, but deleting any files created in (I think)
WEB-INF\cfc-skeletons seemed to allow it to regenerate the
stub files.
I would do what BSterner suggests... create another very
simple WS (one
that takes a string arg, and returns a boolean, or
something), and try
that: just to test if you can get ANY WSs working.
I have found that CF struggles with queries as datatypes in
WSs, I guess
because it's not a supported datatype for WSs in general,
being specific to
CF. I have not really looked at this since 6.1, though (I'm
not really a
developer any more, so don't get to keep up to date with this
stuff).
Adam -
CFinvoke returned error...anyone know why?
I am trying to connect to SAP using cfinvoke and I get the error msg below. Anyone know what is the error in my code or setting?
Cannot locate an API in the generated service class that returned the right interface for web service invocation.
Name: http://xxx.xx.com.my:8000/sap/bc/srt/rfc/sap/z_voucher_upload/400/z_voucher_upload?sap-cli ent=400&wsdl=1.1. WSDL: http://xxx.xx.com.my:8000/sap/bc/srt/rfc/sap/z_voucher_upload/400/z_voucher_upload?sap-cli ent=400&wsdl=1.1. It is recommended that you use a web browser to retrieve and examine the requested WSDL document for correctness, including a missing service element.
below is my code : -
<cfinvoke
webservice="http://xxx.xx.com.my:8000/sap/bc/srt/rfc/sap/z_voucher_upload/400/z_voucher_upload?sap-cli ent=400&wsdl=1.1"
method="Z_VOUCHER_UPLOAD"
refreshWSDL="yes"
returnvariable="aString"
username = "xxxx"
password = "xxxxx"
Lifnr = "30086"
Sort1 = "A106"
Bldat = "23082010"
Budat = "23082010"
Bktxt = "T03"
Xblnr = "T04"
Dmbtr = "55.55"
Kostl = "8033"
Hkont = "1234567"
Zuonr = "45333"
Xref3 = "CHASSIS99999"
Xref2 = "ABC1234"
Xref1 = "850412122121">
</cfinvoke>
<cfoutput>
#aString#
</cfoutput>below is the WSDL file : - I still facing the same problem without knowing the reason. Thanks for helping.
<?xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:n1="urn:sap-com:document:sap:rfc:functions">
- <wsdl:documentation>
<sidl:sidl xmlns:sidl="http://www.sap.com/2007/03/sidl" />
</wsdl:documentation>
<wsp:UsingPolicy wsdl:required="true" />
- <wsp:Policy wsu:Id="IF_Z_VOUCHER_UPLOAD">
- <sapsession:Session xmlns:sapsession="http://www.sap.com/webas/630/soap/features/session/">
<sapsession:enableSession>false</sapsession:enableSession>
</sapsession:Session>
</wsp:Policy>
- <wsp:Policy wsu:Id="OP_ZVoucherUpload">
<sapblock:enableBlocking xmlns:sapblock="http://www.sap.com/NW05/soap/features/blocking/">true</sapblock:enableBlocking>
<sapcomhnd:enableCommit xmlns:sapcomhnd="http://www.sap.com/NW05/soap/features/commit/">false</sapcomhnd:enableCommit>
<saptrhnw05:required xmlns:saptrhnw05="http://www.sap.com/NW05/soap/features/transaction/">no</saptrhnw05:required>
<saprmnw05:enableWSRM xmlns:saprmnw05="http://www.sap.com/NW05/soap/features/wsrm/">false</saprmnw05:enableWSRM>
</wsp:Policy>
- <wsdl:types>
- <xsd:schema attributeFormDefault="qualified" targetNamespace="urn:sap-com:document:sap:rfc:functions">
- <xsd:simpleType name="char1">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="1" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char10">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="10" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char12">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="12" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char16">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="16" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char18">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="18" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char20">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="20" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char220">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="220" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char25">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="25" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char30">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="30" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char32">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="32" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char50">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="50" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="curr13.2">
- <xsd:restriction base="xsd:decimal">
<xsd:totalDigits value="13" />
<xsd:fractionDigits value="2" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="date">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="10" />
<xsd:pattern value="\d\d\d\d-\d\d-\d\d" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="numeric3">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="3" />
<xsd:pattern value="\d*" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="numeric6">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="6" />
<xsd:pattern value="\d*" />
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
- <xsd:schema attributeFormDefault="qualified" targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:n0="urn:sap-com:document:sap:rfc:functions">
<xsd:import namespace="urn:sap-com:document:sap:rfc:functions" />
- <xsd:complexType name="Zvoucher">
- <xsd:sequence>
<xsd:element name="Lifnr" type="n0:char10" />
<xsd:element name="Sort1" type="n0:char20" />
<xsd:element name="Bldat" type="n0:date" />
<xsd:element name="Budat" type="n0:date" />
<xsd:element name="Bktxt" type="n0:char25" />
<xsd:element name="Xblnr" type="n0:char16" />
<xsd:element name="Dmbtr" type="n0:curr13.2" />
<xsd:element name="Kostl" type="n0:char10" />
<xsd:element name="Hkont" type="n0:char10" />
<xsd:element name="Zuonr" type="n0:char18" />
<xsd:element name="Xref3" type="n0:char20" />
<xsd:element name="Xref2" type="n0:char12" />
<xsd:element name="Xref1" type="n0:char12" />
</xsd:sequence>
</xsd:complexType>
- <xsd:complexType name="Bapiret2">
- <xsd:sequence>
<xsd:element name="Type" type="n0:char1" />
<xsd:element name="Id" type="n0:char20" />
<xsd:element name="Number" type="n0:numeric3" />
<xsd:element name="Message" type="n0:char220" />
<xsd:element name="LogNo" type="n0:char20" />
<xsd:element name="LogMsgNo" type="n0:numeric6" />
<xsd:element name="MessageV1" type="n0:char50" />
<xsd:element name="MessageV2" type="n0:char50" />
<xsd:element name="MessageV3" type="n0:char50" />
<xsd:element name="MessageV4" type="n0:char50" />
<xsd:element name="Parameter" type="n0:char32" />
<xsd:element name="Row" type="xsd:int" />
<xsd:element name="Field" type="n0:char30" />
<xsd:element name="System" type="n0:char10" />
</xsd:sequence>
</xsd:complexType>
- <xsd:complexType name="TableOfZvoucher">
- <xsd:sequence>
<xsd:element name="item" type="tns:Zvoucher" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
- <xsd:complexType name="TableOfBapiret2">
- <xsd:sequence>
<xsd:element name="item" type="tns:Bapiret2" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
- <xsd:element name="ZVoucherUpload">
- <xsd:complexType>
- <xsd:sequence>
<xsd:element name="Msg" type="tns:TableOfBapiret2" />
<xsd:element name="Zvoucher" type="tns:TableOfZvoucher" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
- <xsd:element name="ZVoucherUploadResponse">
- <xsd:complexType>
- <xsd:sequence>
<xsd:element name="Msg" type="tns:TableOfBapiret2" />
<xsd:element name="Zvoucher" type="tns:TableOfZvoucher" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
- <wsdl:message name="ZVoucherUpload">
<wsdl:part name="parameters" element="tns:ZVoucherUpload" />
</wsdl:message>
- <wsdl:message name="ZVoucherUploadResponse">
<wsdl:part name="parameter" element="tns:ZVoucherUploadResponse" />
</wsdl:message>
- <wsdl:portType name="Z_VOUCHER_UPLOAD">
- <wsp:Policy>
<wsp:PolicyReference URI="#IF_Z_VOUCHER_UPLOAD" />
</wsp:Policy>
- <wsdl:operation name="ZVoucherUpload">
- <wsp:Policy>
<wsp:PolicyReference URI="#OP_ZVoucherUpload" />
</wsp:Policy>
<wsdl:input message="tns:ZVoucherUpload" />
<wsdl:output message="tns:ZVoucherUploadResponse" />
</wsdl:operation>
</wsdl:portType>
</wsdl:definitions> -
CFINVOKE web services woes - semantic compiling errors
I'm getting the error below when trying to invoke an .asmx
web service. I've gotten the same error on 3 different servers
running CF6.1 and 7.
I posted the WSDL on an online validator and it worked ok. I
suspect this is a specific issue with coldfusion only. I
unfortunately can't post the WS address here.
Any suggestions would be much appreciated.
coldfusion.jsp.CompilationFailedException: Errors reported by
Java compiler:
Found 3 semantic errors compiling
"C:/CFusionMX7/stubs/WS-138965517/Patient/NeoRecormon/Saatchi/PatientSoapStub.java":
10. public class PatientSoapStub extends
org.apache.axis.client.Stub implements
Patient.NeoRecormon.Saatchi.PatientSoap {
<--------->
*** Error: Type
Patient/NeoRecormon/Saatchi/Patient$NeoRecormon was not found.
10. public class PatientSoapStub extends
org.apache.axis.client.Stub implements
Patient.NeoRecormon.Saatchi.PatientSoap {
<----->
*** Error: Type
Patient/NeoRecormon/Saatchi/Patient$NeoRecormon$Saatchi was not
found.
10. public class PatientSoapStub extends
org.apache.axis.client.Stub implements
Patient.NeoRecormon.Saatchi.PatientSoap {
<--------->
*** Error: Type....After investigation it turned out that one of the libraries
was using java.rmi.RemoteException.class which was quite old.
Apparently when the servers were starting they were launching
the libraries in different order. So some of them were using old
version of java.rmi.RemoteException.class and the AxisFault.class
that inherited from it couldn't compile. -
Deleting a Record in Database - Error Message
Hello.
I have made a database, where i can view, edit, add new
records and its all working fine. I am trying to also have a delete
feature on it. I have created the link for it to delete, and added
the commands but im getting an error message when i hit delete
saying :
"The web site you are accessing has experienced an unexpected
error.
Please contact the website administrator.
The following information is meant for the website developer
for debugging purposes.
Error Occurred While Processing Request
Element DEPART is undefined in QARTIST.
i have looked through my coldfusion pages over and over but i
cant see anything which is wrong and i cant figure out what line
there might be a mistake on! could someone inform me what this
error message is saying to me please?
Thanks very very very very much in advanceHello.
Thanks very much for the response!
I have searched more on the missing variable but still cant
work out whats wrong.
Not sure why its saying 'depart' specfically as that is the
3rd row in the table.
Not too sure on where to go frm here. Could i ask for a bit
more specific help?
I have 3 an index page which displays the 7 rows + a link to
edit any of the returned data :
<td>#qArtists.CurrentRow#</td>
<td>#qArtists.FirstName#</td>
<td>#qArtists.LastName#</td>
<td>#qArtists.Depart#</td>
<td>#qArtists.Hotel#</td>
<td>#qArtists.Board#</td>
<td>#qArtists.Price#</td>
<td><a
href="updateartist.cfm?artistid=#qArtists.ArtistID#">Edit</a></td>
Then i have a :
artist.cfc which i added the delete code to :
<cffunction name="deleteArtist" access="public"
returntype="void">
<cfargument name="artistid" type="numeric"
required="yes">
<cfquery datasource="#application.datasource#">
DELETE FROM artists
WHERE ArtistID = #arguments.artistid#
</cfquery>
</cffunction>
then i have a delete.cfm file
<cfif IsDefined("form.artistid")>
<cfinvoke
component="cf8essentials.cfc.Artist"
method="deleteArtist">
<cfinvokeargument name="artistid"
value="#form.artistid#"/>
</cfinvoke>
<cflocation url="/cf8essentials/artists/index.cfm"
addtoken="no">
</cfif>
<cfform>
<cfinput type="submit" name="submit" value="Delete">
<cfinput type="button" name="cancel" value="Cancel"
onclick="history.back()">
<cfinput type="hidden" name="artistid"
value="#url.artistid#">
</cfform>
really not sure what part im doing wrong as i have fllowed
two different tutorials which do it different and both of theirs
work but im not sure what ive done wrong. Could you advise further
has ive been pulling my hair out over this for the past couple of
days now! thanks very much in advance again! -
401 Unauthorized error when calling a webservice
Have ColdFusion 11 installed, I have created a hello web service and I am trying to call it. Each time I try to call the web service I get an error 401 Unauthorized. I am not sure if I need to configure something more on the ColdFusion server, IIS or something else.
<cfcomponent displayname="Hello">
<cffunction name="helloWorld" returntype="string" access="remote">
<cfreturn "Hello World!">
</cffunction>
</cfcomponent>
<cfinvoke
webservice="http://MyServer/Hello.cfc?wsdl"
method="helloWorld"
returnvariable="ws" refreshwsdl="yes">
</cfinvoke>
<cfdump var="#ws#">It appears that you have inadvertently enforced HTTP authentication. If so, you will have to include the attributes, username="your_username" and password="your_password" in the cfinvoke tag.
-
Error message when trying to connect to a web service
Hi all,
I am trying to consume a third party web service using the
attached code and i get this big massive error about complex types:
[The following information is meant for the website developer
for debugging purposes.
Error Occurred While Processing Request
Complex object types cannot be converted to simple values.
The expression has requested a variable or an intermediate
expression result as a simple value, however, the result cannot be
converted to a simple value. Simple values are strings, numbers,
boolean values, and date/time values. Queries, arrays, and COM
objects are examples of complex values.
The most likely cause of the error is that you are trying to
use a complex value as a simple one. For example, you might be
trying to use a query variable in a <CFIF> tag. This was
possible in ColdFusion 2.0 but creates an error in later versions.
Has anyone encountered this before or what this may
mean....thanks
Code:What kind of data is returned by your callcredit webservice?
Try performing a cfdump on "io".
Also, the cfinvoke/webservice method usually generates the
SOAP wrapper around your webservice arguments. You may want to try
just passing the XML expected by Job5314 (unless, of course, the
method is expecting a full SOAP message as a parameter).
i.e.
<cfsavecontent variable="strpost2">
<pwdchangerequest>
<oldpwd>oldpassword</oldpwd>
<newpwd>newpass</newpwd>
<confirmpwd>newpass</confirmpwd>
</pwdchangerequest>
</cfsavecontent>
<cfinvoke
webservice="
http://localhost/callcredit.wsdl"
method="Job5314"
returnvariable="io">
<cfinvokeargument name="io" value="#strpost2#"/>
</cfinvoke>
<cfdump var="#io#"> -
Validation error for tag cfloop
Hi All,
Complete newbie to CF here. I've inherited (or bought) an online business which has its site written in CF. I haven't done this sort of stuff before but do work SQL for a living and object oriented stuff plus have done a bit of html and php so CF isn't mind blowing to me (in its simple form).
I've downloaded my site on to my computer to run a local copy that I can hack to pieces if needs be. For some reason, I have a few problems with the site running locally. The first error I'm getting is a Attribute validation error for tag cfloop.
Basically, index.cfm has this bit of code in it:
<cfinvoke component="#datasets#" method="storedProcedure" returnvariable="getFeaturedWineries_qry">
<cfinvokeargument name="storedProcedure" value="usp_GetFeaturedWineries">
</cfinvoke>
Ok, easy enough. Anyway, there's a call down the page to:
<cfinclude template = "#REQUEST.CFMPath#includes/displayFeaturedWineries.cfm">
Within displayFeaturedWineries.cfm is the code that calls the stored proc invoked above:
<cfloop query="getFeaturedWineries_qry" startrow="1" endrow="2">
Bam, that's where the error occurs. "The value of the attribute query, which is currently getFeaturedWineries_qry, is invalid.
What??? The stored proc exists and it only returns two records (which begs me to wonder why you would have startrow and endrow but anyway, it doesn't work with or without it).
The other interesting thing is that this works on production, NO PROBLEM!!! WTF? How can it work on production but not locally.
The only thing I'm starting to think is:
a) I've missed a setting somewhere in CF or
b) I'm running Apache as compared to IIS or
c) I'm running SQL 2008 and CF 9 which will no doubt be different to the production host server.
Should B or C be causing THAT type of problem??
Thanks,
MattI'm not sure what code apart from the above is going to show you what you could possibly need to solve this, but here goes. The following is only snippets of the code, but they are the relavant snippets. Other stored procs work. The cfdump for getFeaturedWineries_qry shows 'usp_getFeaturedWineries'. I know its there because I've been unable to run "EXEC usp_getFeaturedWineries" after copying it straight out of the code. As previously stated, there are other stored procs which are running fine.
datasets.cfc
<cffunction name="storedProcedure">
<cfargument name="storedProcedure" required="Yes" type="string">
<cfstoredproc procedure = "#ARGUMENTS.storedProcedure#"
datasource = "#REQUEST.DSN_NAME#"
username = "#REQUEST.DSN_USER#"
password = "#REQUEST.DSN_PASS#"
returncode = "Yes">
<cfprocresult name="storedProcedure" resultset="1">
</cfstoredproc>
<cfreturn storedProcedure>
</cffunction>
application.cfm
<!--- DATA SOURCE VARIABLES --->
<cfset DSN_NAME = "boutiqueWineriesTest">
<cfset DSN_USER = "coldfusion">
<cfset DSN_PASS = "coldfusion">
index.cfm
<cfobject component="#COMP_REF#.datasets" name="datasets">
<cfinvoke component="#datasets#" method="storedProcedure" returnvariable="getFeaturedWineries_qry">
<cfinvokeargument name="storedProcedure" value="usp_getFeaturedWineries">
</cfinvoke>
<cfinclude template = "#REQUEST.CFMPath#includes/displayFeaturedWineries.cfm">
displayFeaturedWineries.cfm
<cfloop query="getFeaturedWineries_qry" startrow="1" endrow="2">
Attribute validation error for tag cfloop.
The value of the attribute query, which is currently getFeaturedWineries_qry, is invalid. The error occurred in C:\apps\iishome\includes\displayFeaturedWineries.cfm: line 33
Called from C:\apps\iishome\index.cfm: line 399
Called from C:\apps\iishome\index.cfm: line 79
Called from C:\apps\iishome\index.cfm: line 1
31 : <tr>
32 : <td width="626" colspan="3" class="productCenter_bg2">
33 : <cfloop query="getFeaturedWineries_qry" startrow="1" endrow="2">
34 : <div class="productCennews">
35 : <table border="0" cellspacing="0" cellpadding="0"> -
ColdFusion cannot determine how to process the tag
<CFINVOKE>. The tag name may be misspelled.
If you are using tags whose names begin with CF but are not
ColdFusion tags you should contact Allaire Support.
The error occurred while processing an element with a general
identifier of (CFINVOKE), occupying document position (8:1) to
(8:104).
This is a super simply first time application from Forta's
book. Don't know where to go.
PLEASE HELP.
thanks
BuckThis is a super simply first time
Then I would grab the bull by the horn. Install Coldfusion
MX7.0.2. The developer edition is free. -
Error Invoking CFC... but it's there! I see it!
Greetings all -
I'm hoping someone can help explain why this following attempt at binding a CFC is not working:
1. I set up a CF Server Mapping to my cfc folder:
Logical path = /testcfc
Physical path = E:\ColdFusion8\Components\testcfc
2. I set up a virtual directory to my cfc folder:
Virtual path: /testcfc
Physical path: E:\ColdFusion8\Components\testcfc
3. If I use CFINVOKE to call the CFC, it works as expected.
<cfinvoke component="testcfc.testRequests" method="get_Clients" returnvariable="var">
<cfinvokeargument name="fiscal_year" value="#year(now())#">
</cfinvoke>
<cfdump var="#var#">
4. If I attempt to bind the CFC, I get the error "Error Invoke CFC /testResults.cfc: Not Found"
<cfselect name="tstClientID" id="tstClientID" bind="cfc:testcfc.tstRequests.get_Clients('#year(now())#')" bindonload="true" value="client_id" display="client_name" />
Debugging the error, I see that CF is attempting to find the CFC in the root directory of the app... it is disregarding the directory path ("testcfc") specified entirely. Why??
The bizarre thing is, I've set up the same structure on my PC/dev environment, and it works fine.
How can I further debug this issue? It's got to be a mapping problem, but can;t see what I've done wrong. Any help truly appreciated!
DougI recently stumbled upon this post:
http://www.codersrevolution.com/index.cfm/2008/9/10/ColdFusion-CFC-Binding-Ajax-Proxy-and- Updater-1#comments
Sure enough, my prod environment is running 8.0.0. I'm going to apply to apply the patch to 8.0.1 and see if that corrects the issue. I hope.
Doug -
Anyone know whay I am getting this error?
Variable qUpdateVersion is undefined.
Here is my function:
<cffunction name="UpdateVersion" access="public" returntype="query">
<cfquery name="qUpdateVersion" datasource="ProjectMatrix">
UPDATE tblProjectTracking
SET dateRemoved=#form.dateRemoved#,dateToTakeDown=#form.dateToTakeDown#
WHERE ID = #form.ID#
</cfquery>
<cfreturn qUpdateVersion>
</cffunction>
Here is my Invoke:
<cfinvoke
component="hardy.Operations.components.Query"
method="UpdateVersion"
returnVariable="qUpdateVersion">
</cfinvoke>
I don't understand the error. My query looks good as it is just pulling 2 items from the previous pages form. I ran a CFDUMP and verified that the variables needed are being passed. When I remove the cfdump, I get this error and it is driving me mad. I am using coldfusion 8. I am missing something that is obviously going right over my head.
It would also be a good idea to pass in the id value, rather then relying on the component function to get the data from the form scope outside of itself.
Depending on where the component is coming from, it may or may not have access to the form scope.
<cffunction name="UpdateVersion" access="public" returntype="query">
<cfargument name="id" type="numeric">
<cfset var qUpdateVersion = "">
<cfquery name="qUpdateVersion" datasource="ProjectMatrix">
UPDATE tblProjectTracking
SET dateRemoved=#form.dateRemoved#,dateToTakeDown=#form.dateToTakeDown#
WHERE ID = #arguments.ID#
</cfquery>
<cfreturn qUpdateVersion>
</cffunction>
<cfinvoke
component="hardy.Operations.components.Query"
method="UpdateVersion"
id="#form.id#"
returnVariable="qUpdateVersion">
</cfinvoke> -
I ran into a really odd behavior using cfinvoke in CF9. This came up for an application that has run fine on earlier version of CF and then broke on CF9.
The basic error comes up when we do something like (not actual code, but what seems to cause the problem):
<cfset stObject = structnew() />
<cfinvoke component="...."
method="get"
returnVariable="stObject" />
In this case where stObject is defined prior to running the cfinvoke, the get() method won't populate stObject.
However, if we do the same thing using the following:
<cfset stObject = createObject(....).get() />
then stObject is properly populated.
To make the older application work, we've had to go through the code and rewrite the cfinvoke's into CreateObject(...).method(). That gets past the errors but doesn't make any sense.
Has anyone else seen anything like this?
dI have not experienced this, no. However I have to say I very seldom use <cfinvoke>.
Can you contrive a stand-alone / simple reproduction case of this?
Adam -
Hi All,
I'm using CFINVOKE to consume an enterprise web service. Now, I'm not well versed in web services. But, from reading the CF documentation on them, you're supposed to be able to use <CFINVOKE...> to access them. So, on my test page I have:
<cfinvoke webservice="http://domain.xxx/webservice/EnterpriseWebService?WSDL" method="neededMethod" returnVariable="theOutput"> <cfinvokeargument name="input1" value="#myInput#" />
</cfinvoke>
I'm trying to use a method called "neededMethod". When the <cfinvoke...> tag is reached, I get the following error: coldfusion.jsp.CompilationFailedException: Errors reported by Java compiler: Found 2 semantic errors compiling "/export/jrun4/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/stubs/WS-147004589 /EnterpriseWebService/webservice/xxx/gov/us/EnterpriseWebService.java: 13. public EnterpriseWebService.webservice.xxx.gov.us.EnterpriseWebServicePort getEnterpriseWebServicePort() throws javax.xml.rpc.ServiceException; ^--------^ *** Semantic Error: Type "EnterpriseWebService.webservice.xxx.gov.us.EnterpriseWebService$webservice" was not found. 15. public EnterpriseWebService.webservice.xxx.gov.us.EnterpriseWebServicePort getEnterpriseWebServicePort(java.net.URLportAddress) throws javax.xml.rpc.ServiceException; ^--------^ *** Semantic Error: Type "EnterpriseWebService.webservice.xxx.gov.us.EnterpriseWebService$webservice" was not found 8 semantic errors compiling "/export/jrun4/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/stubs/WS-147004589 /EnterpriseWebService....
I looked at the Java files in the referenced directories. They seem to be generated by something called Axis. But, compiling these fail. Is there something in the CF admin that I can tweak?Place your wsdl on your URL browser, and at the bottom of the output, there should be a an http pointing to your webserver. Make sure that your server domain or IP address is listed on the http pointer. If not, then correct and run.
Try that, and see how it goes.
HTH.
Melvin T. -
Anyone know why my feed is not showing online? It works
locally and it used to work online. I didn't change any code and
all of sudden its giving me this error.
MM_XSLTransform error.
Transformation Error.
Security
access denied (coldfusion.runtime.FunctionPermission
createobject(java))
my code:
<span class="resheader">Adobe Flash Design
Center</span>
<cfinvoke
component="includes/MM_XSLTransform.MM_XSLTransform"
method="transform"
returnvariable="mm_xsl_output">
<!--- XSL Transformation --->
<cfinvokeargument name="xml" value="
http://rss.adobe.com/en/design_center_flash_tutorials.rss">
<cfinvokeargument name="xsl" value="headlines.xsl">
<cfinvokeargument name="ItemsPerPage" value="3">
</cfinvoke>Bloke wrote:
> Anyone know why my feed is not showing online? It works
locally and it used to
> work online. I didn't change any code and all of sudden
its giving me this
> error.
>
> MM_XSLTransform error.
> Transformation Error.
> Security
> access denied (coldfusion.runtime.FunctionPermission
createobject(java))
>
> my code:
> <span class="resheader">Adobe Flash Design
Center</span>
> <cfinvoke
> component="includes/MM_XSLTransform.MM_XSLTransform"
> method="transform"
> returnvariable="mm_xsl_output">
> <!--- XSL Transformation --->
> <cfinvokeargument name="xml"
> value="
http://rss.adobe.com/en/design_center_flash_tutorials.rss">
> <cfinvokeargument name="xsl"
value="headlines.xsl">
> <cfinvokeargument name="ItemsPerPage" value="3">
> </cfinvoke>
>
Looks like the security settings have changed and your being
denied
access to either the feed or the component that pulls in the
feed.
Steve -
Cfobject / cfinvoke problem in my application.cfc
Hello;
I am trying to use cfobject in my onsessionstart function in my application.cfc file. The cfobject is another application.cfc file I have in a sub directory in the web site, it runs the shopping cart. I am not firing this off properly and I was hoping someone could help me fix my code so it will operate properly.This is my invoke statement:
<cfobject name="SESSION.myShoppingCart" component="ShoppingCart">
<cfinvoke component="#SESSION.myShoppingCart#" method="getShoppingCart">
This is my whole argument statement for on session start:
<cffunction name="onSessionStart" returntype="any" output="true">
<cfset SESSION.created = now()> <!--- This sets off another session in the site --->
<cfobject name="SESSION.myShoppingCart" component="ShoppingCart">
<cfinvoke component="#SESSION.myShoppingCart#" method="getShoppingCart">
</cffunction>
this is my error:
Context validation error for tag cffunction.
The end tag </cffunction> encountered on line 80 at column 11 requires a matching start tag.
The error occurred in C:\website\Application.cfc: line 28
26 : <cffunction name="onSessionStart" returntype="any" output="true">
27 : <cfset SESSION.created = now()>
28 : <cfobject name="SESSION.myShoppingCart" component="ShoppingCart">
29 : <cfinvoke component="#SESSION.myShoppingCart#" method="getShoppingCart">
Can anyone help me? What do I need to do to set off my shopping cart functions on the cfc I am trying to invoke?
Thank You
CFmongerthis is what I am supposed to put in the on sessionstart function:
<cfobject name="SESSION.myShoppingCart" component="ShoppingCart">
But this throws the same error. I am reading this off of instructions from a book. Obviously the book is wrong. Is there a way to make that cfobject statement work? I don't want a return variable. I want the ShoppingCart.cfc that resides in the sub directory /donation/ShoppingCart.cfc to go into client memory, I don't need a return value, I need the shoppong cart application portion fired when they hit the web site, creating a "shopping cart" in session / client variables.
How would I do that using this tag? Thanks.
CFmonger
Maybe you are looking for
-
TS1424 "Unable to Download Song" message in iTunes app on iPod Touch?
I did look to see if this question was posted anywhere else, but did not see it. So if it has already been answered, my apologies. I am hooked up to the wireless, logged into iTunes, credit card good to go. Every time I go to download a song, it stop
-
IMovie continually crashes when trying to upload to You Tube
I cannot get iMovie to upload to You tube. It keep crashing.
-
HT201413 error -1 trying to update ipod 8g
i got the error (-1) when trying to update and 8g ipod touch. help
-
Does anyone know anything about CSCsl34076? I found it mentioned in the release notes for WLC code 4.2.99, but other than that it's like it doesn't exist. The description of the bug in the release notes state "Controllers cache only one PMK per clien
-
Liebes Apple Team, ich fasse mich kurz und komm am besten gleich zur Sache... Der Akku von meinem iPhone 3 GS ist defekt. Was kann man machen? :)