Building a web service: can you pass in XML or should the arguments be data typed
Hi everyone I'm just checking over some code a developer wrote for me. The project was to build a web service interface to our application. He has programmed the web service component in a way that the methods only require one attribute - an XML packet (he has then defined the required XML packet in a document). I've never seen a web service component built like this. I've always used simple and complex data types as the required arguments for each method. Therefore when you call the WSDL URL you get a proper definition of the web service. Am I right or are both options correct? Here's a sample: cffunction name=getMatchingProducts access=remote output=true returntype=string cfargument name=xmlRequest type=String required=true/ /cffunction I thought it's meant to be like this: cffunction name=getMatchingProducts access=remote output=true returntype=string cfargument name=criteriaA type=String required=true/ cfargument name=criteriaB type=Numeric required=true/ cfargument name=criteriaC type=ComplexType required=true/ /cffunction The way I see it the client who consumes the webservice in whatever technology they use will have a web service decipherer which will convert all complex types into types that will suit them. Cheers Matthew ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315055 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
cfdocument issue - header / footer cutting off content
Hi I'm using cfdocument format=pdf to create a pdf version of a web page. I'm using cfdocumentitem type=header (as well as the footer) to show the logo, copyright etc. However when the content includes a table and the table wraps over 2 pages the table is being cropped by the header. It's as if when the table content is continued on the next page it is being started at the very top of the page rather than after the header! Does anyone know how to fix this? Cheers Matthew ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314636 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfdocument issue - header / footer cutting off content
Hi everyone, FYI here is the answer: You have to set your page size, top and bottom margins correctly? It's part of the CFDOCUMENT tag. Cheers Matthew ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314638 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
CF-Talk Digest email digest change
Hi everyone, Is it just me or does everyone agree that the CF-Talk digest email should NOT repeat the subject names at the top of the email so that it's easy to skim through to see if there is anything of interest? I like the way Google Groups digest comes through where you just get the subject name ONCE and then a number next to it so that you know how many new posts have been made. If you agree than please respond with a vote, and hopefully if we get enough votes perhaps we can persuade the administrator to make the small change. Oh, one last thing; I also vote that the subject name should be a link which you can click on and it goes through to the top of that particular thread. Cheers Matthew ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305293 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: SQL Select Question
Hi Dennis, This should be very easy: SELECT DISTING imageid, gameid FROMtblX ORDER BY imageid+Rand() LIMIT 6 By the way, the LIMIT 6 is MySQL. You'd need to use TOP 6 in SQL Server. Hope this helps. CHeers Matthew I am having a total mental block with this select query and I am hoping someone might be able to unstick my thought process; I have a table Looking something like this (abbreviated for the list) ImageID GameID ImageID is a unique ID number and there can be multiple images for each GameID. What I am trying to do is create a query where I can select 6 random imageID's each for a different GameID. Or another way, get one image from the many for six different gameID's Any help would be greatly appreciated. Best Regards, Dennis Powers UXB Internet - A website design and Hosting Company 690 Wolcott Road P.O. Box 6029 Wolcott, CT 06716 Tel: (203)879-2844 http://www.uxbinternet.com/ http://www.uxb.net/ ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290619 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Web Service question
Hi Eric, I had similar problem when I was first introduced to WS's. I've found that numerous problems can cause this but the most common cause is that you are not passing the parameters correctly. With some of the WS I've consumed I found that I had to pass almost all arguments even if they were empty strings. The main items you need to pass as empties/Nulls are Array's and Structs. I notice that you haven't passed the job_id. Even if it is not required try passing it as . On top of this you may find that you need to pass a NULL variable rather than a string. To do this you need to either use the JavaCast(null,) function in CFSCRIPT or use the omit=yes attribute on the cfinvokeargument tag. The other thing you may have to do is clear the existing WSDL in CF. So delete it from the web service list in CFADMIN and you may even find that a server restart resets everything back to normal and forces CF to go off and get a clean version of the WSDL. Sorry I can't be more specific but hope these ideas help. Cheers Matthew I am getting hte following error: Web service operation listPositions with parameters {client_id={xx},} could not be found. (x represents a number) I am calling a cfc (guts of query and datasource removed) that is on the same server, but in a different site: cfcomponent cffunction name=listPositions access=remote returntype=string cfargument name=client_id type=string required=yes cfargument name=job_id type=string required=no cfset var positionlist= cfset var get_positions= cfquery datasource=snipped name=getPositions maxrows=50 snipped for privacy /cfquery cfsavecontent variable=listPositions positions cfoutput query=getPositions position id=#client_no# client#XMLFormat(name)#/client position_name#XMLFormat(position)#/position_name /position /cfoutput /positions /cfsavecontent cfreturn positionlist /cffunction /cfcomponent It is called by: cffunction name=getJobListing access=public returntype=void output=false cfargument name=client_id type=any required=no default=xx cfinvoke method=listPositions returnvariable=rawXMLPostionlist webservice=listPositions cfinvokeargument name=client_id value=#arguments.client_id# /cfinvoke cfset arguments.event.trace(Job Details, rawXMLPositionList) cfset arguments.event.setValue(getJobDetails, rawXMLPositionList) / /cffunction Any ideas? Again...these both reside in different directorys (and different sites as far as the web server is concerned) on the same server. This server is in a trusted zone, so I am not sure how that is effecting this (am a noobie whe it comes to web services...lst time I did similar stuff was some WDDX packets many years ago) Any help is greatly appreciated! Eric ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288216 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfform stuck on loading 40%
Hi there, What do you mean by peg? If you mean crash or bottle neck than the answers no because this issue happens 24/7. Any other ideas would be great! Cheers Matthew Does your server peg temporarily around the same time? Respectfully, Adam Phillip Churvis Get advanced intensive Master-level training in C# ASP.NET 2.0 for ColdFusion Developers at ProductivityEnhancement.com Hi guys, Recently our flash forms stopped working, they keep getting stuck at Loading 40%. I've reversed all updates / changes which were made to the server when they stopped working. Anyone got any ideas? Cheers Matthew ~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finderproductID=1522loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287024 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
cfform stuck on loading 40%
Hi guys, Recently our flash forms stopped working, they keep getting stuck at Loading 40%. I've reversed all updates / changes which were made to the server when they stopped working. Anyone got any ideas? Cheers Matthew ~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287020 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
cfform stuck on loading 40%
Hi guys, Recently our flash forms stopped working, they keep getting stuck at Loading 40%. I've reversed all updates / changes which were made to the server when they stopped working. Anyone got any ideas? Cheers Matthew ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287021 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: How do you time out CFOBJECT?
Don't worry I've worked it out. FYI: you have to use the CFINVOKE tag with the timeout attribute (do not initialise with CFOBJECT). Cheers Matthew Howdy, Our CF server keeps crashing whenever a web service we are consuming falls over (infrequent and random). I have no control over the web service, so I am trying to find a way that I can timeout a WS call from CF. I'm using the CreateObject(webservice) function (same as CFOBJECT) to invoke the web service, however I've just found out the CFOBJECT doesn't adhere to the timeout settings in CFADMIN or the cfsetting tag (http://kb.adobe.com/selfservice/viewContent. do?externalId=tn_19438sliceId=2). How can I timeout the call? Someone must have ran into this problem! Cheers Matthew ~| CF 8 â Scorpio beta now available, easily build great internet experiences â Try it now on Labs http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_adobecf8_beta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283962 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
How do you time out CFOBJECT?
Howdy, Our CF server keeps crashing whenever a web service we are consuming falls over (infrequent and random). I have no control over the web service, so I am trying to find a way that I can timeout a WS call from CF. I'm using the CreateObject(webservice) function (same as CFOBJECT) to invoke the web service, however I've just found out the CFOBJECT doesn't adhere to the timeout settings in CFADMIN or the cfsetting tag (http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19438sliceId=2). How can I timeout the call? Someone must have ran into this problem! Cheers Matthew ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283960 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Correct locking / cftransaction
Hi guys, I'm trying to find some up to date (MX7) info on how to correctly use CFTRANSACTION when writing to a DB (MySQL). All I am doing is one CFQUERY for the INSERT statement and then a second CFQUERY for the last_insert_id(). I think MySQL v5 allows you to have more than one SQL statement per CFQUERY however I'm using v4. Cheers ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274058 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Correct locking / cftransaction
Ok, but what CFTRANSACTION type do I use? Cheers Matthew If msql4 supports transactions then you have no problems. That's what transactions is all about, multiple queries that rely on one or another failing, to summarise it up. On 3/29/07, Matthew Chambers [EMAIL PROTECTED] wrote: ~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade see new features. http://www.adobe.com/products/coldfusion?sdid=RVJR Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274153 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Correct locking / cftransaction
Hi James, I've just checked and the DB has been create with MyISAM. Am I in trouble? Out of interest: I've just been reading the CF livedocs and it says; serializable: places an exclusive lock on every data table in use for the duration of the transaction. Causes access to the database to be single-threaded and is therefore not recommended for normal database access. So would you still say that SERIALIZABLE is the way to go? I've been trying to encourage the guys to upgrade to SQLsever this will be a good argument!!! By the way: if we did upgrade to SQLserver would I still need to use SERIALIZABLE? Cheers Matthew If this DB defaults to read-committed, that's not always going to yield consistent results. Serializable is the only way to be sure. Of course, with MySQL, this all only applies if the table type is InnoDB, since MyISAM doesn't support transactions at all. On 3/30/07, Ken Wexel [EMAIL PROTECTED] wrote: ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274167 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Loading page
Hi, There is no need for the call to be truly asynchronous. The problem at the moment is that the call can sometimes take up to 40 seconds so the customer is not sure that something is happening. I would prefer if when the user hits submit button on the form I take them to a page that has a loading message and then forward them on to the result page once the page has loaded. Someone out there must have a rock solid solution to this! Most of the airlines have some sort of loading page! Cheers Matthew You can actually use specific AJAX status codes to determine the calls status (2,3,4... If I remember correctly). I think you will need to use AJAX if you want true loading status as the browsers spinning globe etc is supposed to be used to tell the user a page/request is loading.. Do you need the call to be truly asynchronous (so you can do other things?) This e-mail is from Reed Exhibitions (Gateway House, 28 The Quadrant, Richmond, Surrey, TW9 1DN, United Kingdom), a division of Reed Business, Registered in England, Number 678540. It contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender or call our switchboard on +44 (0) 20 89107910. The opinions expressed within this communication are not necessarily those expressed by Reed Exhibitions. Visit our website at http://www.reedexpo.com -Original Message- From: Jon Clausen To: CF-Talk Sent: Tue Nov 28 07:29:44 2006 Subject: Re: Loading page Matthew, Simple, but you can take it from there (if you're using AJAX to display the results of the call you can skip the show/hide of the div): script type=text/javascript language=javascript cfsilent cfsavecontent variable=message h2Thank You. We Are Processing the information you have requested/ h2 p class=noticePlease Stand By./p div align=centerimg src=loading.gif alt=loading//div /cfsavecontent /cfsilent cfwddx action=cfml2js input=#message# toplevelvariable=procmessage / function showProcess() { pcontent = document.getElementById(processing); fcontent = document.getElementById(yourForm); fcontent.style.display = none; pcontent.style.display = block; pcontent.innerHTML = procmessage; } /script div#processing is obviously set with style=display:none when the page loads. - Jon On Nov 27, 2006, at 11:57 PM, Matthew Chambers wrote: ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261963 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Loading page
Hi guys, Does anyone have some reliable code which can be used so that I can display a loading or searching message whilst I am waiting for a web service call to return data? Cheers Matthew ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261819 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Application scope problem
Hi guys, I think I'm getting a corrupt application scope problem. The CF error is: The element at position 3 cannot be found. LINE 411 LINE 411 is: #application.rews.timePeriods[X].name# (it's in a loop so X would have been equal to 3). Application.cfm code: application.rews.locale = en_US; application.rews.timePeriods= ArrayNew(1); application.rews.timePeriods[1] = StructNew(); application.rews.timePeriods[1].name= 00:00-06:00; application.rews.timePeriods[1].period.low = 00:00; application.rews.timePeriods[1].period.high = 06:00; application.rews.timePeriods[2] = StructNew(); application.rews.timePeriods[2].name= 06:00-08:00; application.rews.timePeriods[2].period.low = 06:00; application.rews.timePeriods[2].period.high = 08:00; application.rews.timePeriods[3] = StructNew(); application.rews.timePeriods[3].name= 08:00-10:00; application.rews.timePeriods[3].period.low = 08:00; application.rews.timePeriods[3].period.high = 10:00; application.rews.timePeriods[4] = StructNew(); application.rews.timePeriods[4].name= 10:00-13:00; application.rews.timePeriods[4].period.low = 10:00; application.rews.timePeriods[4].period.high = 13:00; application.rews.timePeriods[5] = StructNew(); application.rews.timePeriods[5].name= 13:00-17:00; application.rews.timePeriods[5].period.low = 13:00; application.rews.timePeriods[5].period.high = 17:00; application.rews.timePeriods[6] = StructNew(); application.rews.timePeriods[6].name= 17:00-21:00; application.rews.timePeriods[6].period.low = 17:00; application.rews.timePeriods[6].period.high = 21:00; application.rews.timePeriods[7] = StructNew(); application.rews.timePeriods[7].name= 21:00-24:00; application.rews.timePeriods[7].period.low = 21:00; application.rews.timePeriods[7].period.high = 23:59; application.rews.timePeriodsDefault.departOption = 3; application.rews.timePeriodsDefault.returnOption = 6; application.rews.paxMax = 9; I've just read this article (http://www.adobe.com/devnet/server_archive/articles/cf_locking_best_p...) on locking read/write to application scoop, however the article seems old, is this still relevant? Note: the project I'm working on does not use application.cfc. Do I need to put application scope locking in place? There are 2650 refernece to this scope throughout the website! Perhaps it's not a locking issue, can anyone see any probs with the code? Cheers ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261077 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
SQL Server 2005 vs MySQL 5?
Hi, I've been working on a website built using MySQL and have been frustraited by it on numerious occasions over the past 8 months. Admittedly we are running v4.1 however because I've got much more experience with SQL Server (and from what I've read it is the better choice) I'm looking for some feedback on MySQL 5 vs SQL Server 2005? Some of my frustrations with MySQL are: - Only 1 query per cfquery - Unable to handle complex join queries e.g. I ran a complex query in a trail version of SQL Server 2000 and it returned in 3 seconds, it took 33 mins in MySQL (this may be becuase we are using a non enterprise version - are there different versions???) - The server grinds to a holt with my complex queries which in turn kills the website. The same thing happens when I try to export a backup of the entire DB. I obviously have to justify the cost of SQL Server however would anyone argue the MySQL 5 enterprise would be better? By the way, I can't really understand the pricing structures of both products. We are only using the DB for the website, so does that mean we only need 1 liecence? If so does that mean I'm correct in saying that MySQL basic would be $595/year, where as SQL Server 2005 (5-Client) would be $1550 outright? Why does MySQL having an ongoing cost? Also, can anyone recommend MySQL Silver? Is the enterprise dashboard really worth it? Cheers Matthew ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:260133 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Server performance
Hi guys, I am getting random errors from CF along the lines of The request has exceeded the allowable time limit Tag: cfmail ... the error varies from CFMAIL, CFOUTPUT and CFQUERY tags and different pages. The queries are fine, because they work most of the time and I've run them through a DB client which returns the result set very fast. CFMAIL is fine as well. I think that there is something else going on because it's random, therefore I'm thinking that it's timing out when the server is overloaded. Can anyone suggest how I could find out more precisely why pages are timing out (the pages vary as well)? I guess I need to look at stress testing the server, so where on earth do I start? Also, is there any good resources with suggestion on how the CFADMIN settings can be optimised? At the moment CF is setup to receive 8 simultaneous connections. The server is Windows Server 2003, MySql 4.1, IIS Cheers Matthew ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259243 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Web services / parameter / headache
Hi Paul, Thanks for the tips. Unfortunately still no luck. I have investigated and messed around some more and I just can't figure this one out. If there are any web services experts out there please show yourself!!! Just to prove that the problem doesn't lie with the producer of the web service I've tried consuming a simple web service here's the code: --- cfscript ws = CreateObject(webservice,http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php?wsdl;); NDFDgenResponse = ws.NDFDgen(JavaCast('double',38.99),JavaCast('double',-77.99),JavaCast('string','time-series'),DateFormat('2004-01-01','mm/dd/ hh:ss'),DateFormat('2010-06-26','mm/dd/ hh:ss')); /cfscript cfdump var=#NDFDgenResponse# --- ANd here's the error: --- Web service operation NDFDgen with parameters {38.99,-77.99,time-series,01/01/2004 12:00,06/26/2010 12:00} could not be found. --- I'm certain that the problem here is how I'm passing in parameters. Weather it be a complex type or a date or whatever, I'm doing something wrong! Any ideas... anyone??!?!?!? Matthew Matthew Chambers wrote: String[] countriesCovered = null; Attribute[] attributes = null; it wants arrays of string Attribute. countriesCovered.France = JavaCast(string,FR); try making countriesCovered an array. countriesCovered=listToArray(FR); and maybe for good measure a java array: countriesCovered=countriesCovered.toArray(); ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244772 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Web services / parameter / headache
This is crazy! Someone must have come across this problem before. I've simplified my question and used a much simplier method from the web service, here goes! ::: Here's my code ::: cfscript webservice = CreateObject(webservice,dummy?wsdl); webservice.doBuildQuoteForItinerary(123456,en_US,,1113); /cfscript ::: Here's the error ::: Could not perform web service invocation doBuildQuoteForItinerary. Here is the fault returned when invoking the web service operation:br preAxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: com.raileurope.web.ngserver.InternalErrorException: java.lang.NullPointerException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}hostname:dummy /pre There must be something wrong with how I'm passing in the parameters. Is it the null string??!?!? Any help would be great! Hi Paul, Thanks for the tips. Unfortunately still no luck. I have investigated and messed around some more and I just can't figure this one out. If there are any web services experts out there please show yourself!!! Just to prove that the problem doesn't lie with the producer of the web service I've tried consuming a simple web service here's the code: --- cfscript ws = CreateObject(webservice,http://www.weather. gov/forecasts/xml/SOAP_server/ndfdXMLserver.php?wsdl); NDFDgenResponse = ws.NDFDgen(JavaCast('double',38.99), JavaCast('double',-77.99),JavaCast('string','time-series'), DateFormat('2004-01-01','mm/dd/ hh:ss'),DateFormat('2010-06-26', 'mm/dd/ hh:ss')); /cfscript cfdump var=#NDFDgenResponse# --- ANd here's the error: --- Web service operation NDFDgen with parameters {38.99,-77.99, time-series,01/01/2004 12:00,06/26/2010 12:00} could not be found. --- I'm certain that the problem here is how I'm passing in parameters. Weather it be a complex type or a date or whatever, I'm doing something wrong! Any ideas... anyone??!?!?!? Matthew Matthew Chambers wrote: String[] countriesCovered = null; Attribute[] attributes = null; it wants arrays of string Attribute. countriesCovered.France = JavaCast(string,FR); try making countriesCovered an array. countriesCovered=listToArray(FR); and maybe for good measure a java array: countriesCovered=countriesCovered. toArray(); ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244840 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Web services / parameter / headache
This is crazy! Someone must have come across this problem before. I've simplified my question and used a much simplier method from the web service, here goes! ::: Here's my code ::: cfscript webservice = CreateObject(webservice,dummy?wsdl); webservice.doBuildQuoteForItinerary(123456,en_US,,1113); /cfscript ::: Here's the error ::: Could not perform web service invocation doBuildQuoteForItinerary. Here is the fault returned when invoking the web service operation:br preAxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: com.raileurope.web.ngserver.InternalErrorException: java.lang.NullPointerException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}hostname:dummy /pre There must be something wrong with how I'm passing in the parameters. Is it the null string??!?!? Any help would be great! Hi Paul, Thanks for the tips. Unfortunately still no luck. I have investigated and messed around some more and I just can't figure this one out. If there are any web services experts out there please show yourself!!! Just to prove that the problem doesn't lie with the producer of the web service I've tried consuming a simple web service here's the code: --- cfscript ws = CreateObject(webservice,http://www.weather. gov/forecasts/xml/SOAP_server/ndfdXMLserver.php?wsdl); NDFDgenResponse = ws.NDFDgen(JavaCast('double',38.99), JavaCast('double',-77.99),JavaCast('string','time-series'), DateFormat('2004-01-01','mm/dd/ hh:ss'),DateFormat('2010-06-26', 'mm/dd/ hh:ss')); /cfscript cfdump var=#NDFDgenResponse# --- ANd here's the error: --- Web service operation NDFDgen with parameters {38.99,-77.99, time-series,01/01/2004 12:00,06/26/2010 12:00} could not be found. --- I'm certain that the problem here is how I'm passing in parameters. Weather it be a complex type or a date or whatever, I'm doing something wrong! Any ideas... anyone??!?!?!? Matthew Matthew Chambers wrote: String[] countriesCovered = null; Attribute[] attributes = null; it wants arrays of string Attribute. countriesCovered.France = JavaCast(string,FR); try making countriesCovered an array. countriesCovered=listToArray(FR); and maybe for good measure a java array: countriesCovered=countriesCovered. toArray(); ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244841 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Web services / parameter / headache
I've been on this one a while so any help would be kindly appreciated === QUICK QUESTION === How do I write the 2 lines of Java code below in CF to pass into a web service? --- String[] countriesCovered = null; Attribute[] attributes = null; - === LONG QUESTION === I'm having problems passing parameters into a web service (WS). Here is the latest error: -- :::Error::: Unable to create web service argument class [Ljava.lang.String;. Error: java.lang.InstantiationException: [Ljava.lang.String;. Often this is because the web service defines an iabstract/i complexType as an input to an operation. You must create an actual instance of this type in Java. :::Here's my code::: cfscript webservice = CreateObject(webservice,url?wsdl); countriesCovered.France = JavaCast(string,FR); result = webservice.doSearch(JavaCast(string,123456), JavaCast(null,), JavaCast(null,), countriesCovered, JavaCast(null,)); /cfscript I've tried so many options (it feels like I can see the top of the hill :)) but I just can't get doSearch method to work. FYI: I've had no problems getting strings returned from simple functions (where no input was required) but it's the complex functions which I can't get to work (like this doSearch method). Here's some snippets of the WSDL: -- :::Snippet 1::: wsdl:types schema targetNamespace=soap.ws.web.raileurope.com import namespace=http://schemas.xmlsoap.org/soap/encoding// complexType name=ArrayOf_xsd_string complexContent restriction base=soapenc:Array attribute ref=soapenc:arrayType wsdl:arrayType=xsd:string[]/ /restriction /complexContent /complexType complexType name=Attribute sequence element name=name nillable=true type=xsd:string/ element name=value nillable=true type=xsd:string/ /sequence /complexType complexType name=ArrayOfAttribute complexContent restriction base=soapenc:Array attribute ref=soapenc:arrayType wsdl:arrayType=impl:Attribute[]/ /restriction /complexContent /complexType Snippet 2 ::: wsdl:message name=doSearchResponse wsdl:part name=doSearchReturn type=impl:SearchResult/ /wsdl:message wsdl:message name=doSearchRequest wsdl:part name=key type=xsd:string/ wsdl:part name=locale type=xsd:string/ wsdl:part name=style type=xsd:string/ wsdl:part name=countriesCovered type=impl:ArrayOf_xsd_string/ wsdl:part name=attributes type=impl:ArrayOfAttribute/ /wsdl:message ::: Snippet 3 ::: wsdl:portType name=Test wsdl:operation name=doSearch parameterOrder=key locale style countriesCovered attributes wsdl:input message=impl:doSearchRequest name=doSearchRequest/ wsdl:output message=impl:doSearchResponse name=doSearchResponse/ /wsdl:operation ::: Snippet 4 ::: wsdl:binding name=TestWebServiceSoapBinding type=impl:Test wsdlsoap:binding style=rpc transport=http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=doSearch wsdlsoap:operation soapAction=/ wsdl:input name=doSearchRequest wsdlsoap:body encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; namespace=soap.ws.web.raileurope.com use=encoded/ /wsdl:input wsdl:output name=doSearchResponse wsdlsoap:body encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; namespace=soap.ws.web.raileurope.com use=encoded/ /wsdl:output /wsdl:operation I asked the programmer who wrote the WS to send some sample code. :::Here is his Java 5.0 code::: --- String key = null; String locale = null; String[] countriesCovered = null; Attribute[] attributes = null; key = 123456; countriesCovered = new String[1]; countriesCovered[0] = FR; TestService _service = new TestServiceLocator(); Test _ptr = _service.getRailEuropeWebService(); SearchResult result = _ptr.doSearch(key, locale, null, countriesCovered, attributes); --- I've thought about writting a wrapper Java class which I could use from my CF code to call the WS. Is this sensible? My thought was to use the function supplied above and just add an additional function which I would pass in the parameters from CF which would then convert all variables to the correct types and call the WS. I've not actually tested the supplied Java code yet so I'm not even sure it will work. I was hoping to get it working directly from CF. I'm off to find a Java book on WS! :) Hope someone can help! Cheers Matthew ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244768 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: datatypes, calculations and DB experts
Hmm, very interesting. So are you saying that I should never use floats (if so why are the even a data type)? I've used them in SQL server DBs in the past and never had this problem, is this just down to MySQL? Cheers I have recently found a bizarre situation where numbers are not calculating correctly when the values are stored in FLOAT data types. This is not just a database-related issue - it's found in computer systems in general. Floating point numbers are by definition approximations. This often surprises people. As you suggested, the DECIMAL type is provided by many DBMS to get around exactly this problem. DECIMAL numbers are not approximations. They take up much more space to represent very large or very small numbers and aren't directly supported in hardware, so they are less efficient. Nick ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240851 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: datatypes, calculations and DB experts
Hmm, very interesting. So are you saying that I should never use floats (if so why are the even a data type)? I've used them in SQL server DBs in the past and never had this problem, is this just down to MySQL? Cheers I have recently found a bizarre situation where numbers are not calculating correctly when the values are stored in FLOAT data types. This is not just a database-related issue - it's found in computer systems in general. Floating point numbers are by definition approximations. This often surprises people. As you suggested, the DECIMAL type is provided by many DBMS to get around exactly this problem. DECIMAL numbers are not approximations. They take up much more space to represent very large or very small numbers and aren't directly supported in hardware, so they are less efficient. Nick ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240852 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
datatypes, calculations and DB experts
MySQL: 4.1.14 CF: version irrelevant I have recently found a bizarre situation where numbers are not calculating correctly when the values are stored in FLOAT data types. The calculation was: 424/0.53 If you type this into any calculator or write it in an SQL query it always returns 800. However I had a DB query returning 800.43185. After some trail and error I thought the cause may be caused by the way the values were stored in the DB i.e. the data types. I duped the column which stored the 0.53 but this time saved it as a DECIMAL (length 10 with 3 decimals) instead of a FLOAT. When I ran the query again (this time from the new column) hey presto it return 800. All I want to discuss here is why the float was doing this. Please advise DB experts. Thanks ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240729 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
The IIf function
Hi all, Am I correct in saying that the IIf function and the cfif tag work differently on the following scenerio. In the CFIF tag, when the CFIF fails it will jump over the code which follows until a CFELSEIF, CFELSE or CFIF. Here's an example: -- CFIF The cfif failed so this text is not run. More to the point this code is not run, cfqueryKILL DATABASE/cfquery /CFIF --- Where as with the IIf function, CF will still test that the code for both the true and false cases will work? This is dumb, because the whole point for an IF is to check that you will have everything you need to run the code when it returns true. :::CFIF eg::: cfif IsDefined(foo cfset foo = foo+1 /cfif :::IIf eg::: Iif(IsDefined(foo),DE(foo=foo+1),DE('whatever')) Any thoughts? Cheers ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239205 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Verity searching errors
Hi All, I've set up a verity collection on a site that has been working fine up until recently. I got some errors when people typed in search strings with characters such as ()_ I checked some other sites which all have the same problem. Also if you type my search string AND the AND causes an error. I figure the reason for this is that there is nothing to the right of the AND. The same happens for OR Some else must have come across this same problem. Is there any info on all illegal keywords/characters so I can write a keyword cleaner function? Oh and at this point I'd like to avoid having to provide a complex search interface for explicit searching. NOTES: CFMX 6.1 Any help appreciated! ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225542 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Verity searching errors
Cheers! Yep, there is a CFLib function for it: http://www.cflib.org/udf.cfm?ID=760 On 11/29/05, Matthew Chambers [EMAIL PROTECTED] wrote: Hi All, I've set up a verity collection on a site that has been working fine up until recently. I got some errors when people typed in search strings with characters such as ()_ I checked some other sites which all have the same problem. -- == = Raymond Camden, Director of Development for Mindseye, Inc (www. mindseye.com) Member of Team Macromedia (http://www.macromedia. com/go/teammacromedia) Email: [EMAIL PROTECTED] Blog : ray.camdenfamily.com Yahoo IM : cfjedimaster My ally is the Force, and a powerful ally it is. - Yoda ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225556 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54