tag:blogger.com,1999:blog-5824660313967021040.post1532106608526860176..comments2022-03-26T08:56:28.677-07:00Comments on cfSearching: How the heck do you use the FedEx Rate web service?Unknownnoreply@blogger.comBlogger37125tag:blogger.com,1999:blog-5824660313967021040.post-58868011047780690052009-12-10T10:04:29.858-08:002009-12-10T10:04:29.858-08:00Hi,
Does anyone have any experience printing ship...Hi,<br /><br />Does anyone have any experience printing shipping labels from fedex using cfprint to zebra direct thermal printers? <br /><br />I set up my shipRequest to output labels in pdf and PAPER_4X6 format. I then send this output to my zebra direct thermal printer using cfprint. However, the resulting label printout is shrunk eventhough the I am using 4x6 labels. <br /><br />I am guessing that this is because while the shipping label that fedex returns is 4x6, the pdf itself is letter size. So the zebra printer resizes this into 4x6, resulting in a shrunken label.<br /><br />Anyone has any idea what to do to print shipping labels directly to zebra printer?<br /><br />Thanks,<br />UlyUnknownhttps://www.blogger.com/profile/12927929289588328295noreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-89184862366943102162009-12-02T15:33:16.051-08:002009-12-02T15:33:16.051-08:00it's the shipService_v7.wsdl and I have downlo...it's the shipService_v7.wsdl and I have downloaded it to my local system from the fedex site.deepahttps://www.blogger.com/profile/13682824763058952481noreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-62207727022700461722009-12-02T15:23:46.958-08:002009-12-02T15:23:46.958-08:00@deepa,
ColdFusion / Axis is using the PositiveIn...@deepa,<br /><br />ColdFusion / Axis is using the PositiveInteger internally for one of the values you are passing. Can you post a link to the wsdl on your houseoffusion post?<br /><br />-LeighcfSearchinghttps://www.blogger.com/profile/11564374520734454860noreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-86776998299295014412009-12-02T15:15:52.258-08:002009-12-02T15:15:52.258-08:00I am not using the positive integer class.
I have...I am not using the positive integer class. <br />I have used almost similar code as your's for rate services and that works but the ship service does not.<br /><br />Here's my code. <br />http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:60544deepahttps://www.blogger.com/profile/13682824763058952481noreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-82094085734457553472009-12-02T15:09:18.308-08:002009-12-02T15:09:18.308-08:00@Deepa,
The PositiveInteger class does not accept...@Deepa,<br /><br />The PositiveInteger class does not accept zeros. As the name implies, the value has to be positive (ie greater than zero) ;). NonNegativeInteger does accept zeros.<br /><br />-LeighcfSearchinghttps://www.blogger.com/profile/11564374520734454860noreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-62653585623479627882009-12-02T14:45:18.662-08:002009-12-02T14:45:18.662-08:00I am trying to use the callTag fedex webservices a...I am trying to use the callTag fedex webservices and keep getting <br /><br />Cannot perform web service invocation processTag. <br /><br />java.lang.NumberFormatException: Invalid positiveInteger: 0deepahttps://www.blogger.com/profile/13682824763058952481noreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-18067984931669207302009-10-21T09:33:41.182-07:002009-10-21T09:33:41.182-07:00@Uly,
Glad to hear you are making progress at las...@Uly,<br /><br />Glad to hear you are making progress at last!<br /><br />@Russ S,<br /><br />You are welcome. It is always good hear code was helpful :) I totally agree about implicit notation being more readable. Though given the date of this entry, I probably avoided it for MX7 compatibility (Yes, that entry is that old ;-)<br /><br />-LeighcfSearchinghttps://www.blogger.com/profile/11564374520734454860noreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-54960656338992450892009-10-20T15:00:00.278-07:002009-10-20T15:00:00.278-07:00Thank you very much!
I was able to rewrite this ...Thank you very much! <br /><br />I was able to rewrite this code using implicit structs and arrays in CFScript so that the data is much easier to read. <br /><br />I'm glad you made this post, it has saved me hours of time!Russ S.http://cfruss.blogspot.comnoreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-30418884674023379242009-10-20T12:38:35.829-07:002009-10-20T12:38:35.829-07:00Hi Leigh,
Thank you so much for your suggestion. ...Hi Leigh,<br /><br />Thank you so much for your suggestion. I tried doing direct cfhttp with a pre-formatted xml, and while I am still occasionally having trouble figuring out which input data are required, and I am making progress. <br /><br />I absolutely agree that doing it this way is much easier than doing the web service. It's too hard to figure out all the nesting complex types, and there is no debugging help.<br /><br />Thanks again!<br /><br />UlyUnknownhttps://www.blogger.com/profile/12927929289588328295noreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-43014877371425670782009-10-18T21:19:29.269-07:002009-10-18T21:19:29.269-07:00@Uly & @Jordan,
It seems one change in versio...@Uly & @Jordan,<br /><br />It seems one change in version 7 that broke the example was the property requestedShipment.RequestedPackages was replaced with requestedShipment.RequestedPackageLineItems. Though there may be other changes. I have updated the entry with a rough example for version 7.<br /><br />Also, given all the nesting in this particular webservice I would consider going the SOAP/cfhttp route, like in the CFFedexRates project. It is easier to debug. Plus the version 7 files even include a working SOAP sample.<br /><br />HTH<br />-LeighcfSearchinghttps://www.blogger.com/profile/11564374520734454860noreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-46914110496744923882009-10-16T16:04:17.714-07:002009-10-16T16:04:17.714-07:00@Uly,
Yes, since you are only dumping a instance ...@Uly,<br /><br />Yes, since you are only dumping a instance of the webservice, only its methods are shown. In this case: getRate(). For other object types, you would have to a) create an instance or b) look at the api or the java stubs. IMO, viewing the wsdl is easier.<br /><br /><i>I really wish CF gives more specific error messages. Is this weakness a CF thing or true with other languages?</i><br /><br />You are not alone there. The issue of having to get the data types just right is simply the nature of working with webservices. But having said that, IMO the error messages could be more informative. That is often the price you pay when working with what is essentially a simplified wrapper of a more complex interface. Things work swimmingly in most cases, but once you pass a certain level of complexity it can turn into a nightmare. Consuming webservices in CF is certainly a lot easier than in some other languages. But that simplicity sometimes comes at the cost of clear debugging information. Unfortunately, that is a common problem in any language. <br /><br />Have you considered trying to submit the information via a regular cfhttp post? Given the complexity of the FedEx webservices and how frequently they seem to update them, that approach might be simpler.<br /><br />http://russ.michaels.me.uk/index.cfm/2007/5/18/ColdFusion-Web-Services-and-SOAP<br /><br />-LeighcfSearchinghttps://www.blogger.com/profile/11564374520734454860noreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-71226193733450103252009-10-16T13:18:05.993-07:002009-10-16T13:18:05.993-07:00Jordan:
At this point, I am really considering swi...Jordan:<br />At this point, I am really considering switching to UPS. I figured there are more sample/ready made codes available out there in CF.<br /><br />We've been using Fedex Ship Manager Direct for the last few years. It's working out well, but they told us that they are discontinuing it in favour of the web service. From my point of view as a novice, I am not quite sure what the big deal about web service is. The FSM Direct looks just like the non-soap version of the web service (ie. do a direct http with a pre-filled xml)<br /><br />cfsearching:<br /><br />Thanks for the advice and the link. I checked it out but it only has the getrate function. I'd need to implement the other functions as well. I did try to go through the cfdump variable, but the length of it makes my head spin.<br /><br />I really wish CF gives more specific error messages. Is this weakness a CF thing or true with other languages?<br /><br />Thanks again,<br />UlyUnknownhttps://www.blogger.com/profile/12927929289588328295noreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-5199976456034112302009-10-16T11:12:38.264-07:002009-10-16T11:12:38.264-07:00@Jordan,
But CF will never tell you [variable X i...@Jordan,<br /><br /><i>But CF will never tell you [variable X is missing]. You either get it entirely right or entirely wrong. Making this tag work with v3 almost cost me my sanity.</i><br /><br />Truer words were never spoken. The whole endeavor was challenging. Plus v3 was pretty bad IMO. Even the java examples did not work at first. <br /><br />-LeighcfSearchinghttps://www.blogger.com/profile/11564374520734454860noreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-39385987356839440572009-10-16T11:04:04.047-07:002009-10-16T11:04:04.047-07:00@Uly,
A quick way to view the methods is to creat...@Uly,<br /><br />A quick way to view the methods is to create an instance of the webservice. Then do a cfdump <br /><br />ie <br /><cfset ws = createObject("webservice", "http://127.0.0.1:8501/FedEx/RateService_v2.wsdl")><br /><cfdump var="#ws#"><br /><br />There may be easier methods, but IIRC I used the fedex java API and the .wsdl file to figure out the input arguments, data types, etcetera. I had never used a wdsl before this. But once I got used to reading the xml, it was pretty easy to understand. (I will update the entry and post an example, when I get a chance).<br /><br /><br /><br />BTW: I have seen a few CF/fedex projects out there. Jordan posted a link to one of them above and here is another one I found via a quick google search:<br /><br />http://code.google.com/p/cffedexrates/<br /><br />-LeighcfSearchinghttps://www.blogger.com/profile/11564374520734454860noreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-78798383594822400242009-10-16T11:02:03.290-07:002009-10-16T11:02:03.290-07:00Uly,
That error message means you've sent in ...Uly,<br /><br />That error message means you've sent in the wrong set of parameters for that function. How do you know which ones to send in? Ah ha ha.<br /><br />Theoretically you can read the WSDL file, look at the .java version, and piece it together. You have to pay very close attention to what fields are requires and exactly what type they are. But CF will never tell you [variable X is missing]. You either get it entirely right or entirely wrong. Making this tag work with v3 almost cost me my sanity.<br /><br />Hmm, that's no help to you, is it? Um. Try UPS?Unknownhttps://www.blogger.com/profile/12252403183114591847noreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-28608757642955660762009-10-16T08:00:42.984-07:002009-10-16T08:00:42.984-07:00Hi,
Thank you for the example you provided. It&#...Hi,<br /><br />Thank you for the example you provided. It's the only one I can find on the net. <br /><br />Unfortunately, it's not working for me with v7. Same problem that Ranga above had: "Web service operation "getRate" with parameters {PAYMENT={{PAYMENTTYPE={SENDER}}}, .... could not be found." error.<br /><br />I have never worked with SOAP before, so my question is: how do I see what functions are available in the web service, and more importantly how do I tell what input arguments are required?<br /><br />Thanks!<br /><br />UlyUnknownhttps://www.blogger.com/profile/12927929289588328295noreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-2506781518206977962009-07-23T09:18:13.050-07:002009-07-23T09:18:13.050-07:00One thing i noticed is you have to be careful that...One thing i noticed is you have to be careful that if the account gets a discount from fedex the function getTotalNetFedExCharge() returns the discounted amount.<br /><br />You have to get the effective net discount and add it to the Net FedEx charge.<br /><br />At least i have not found a way to get the Standard List Rate straight out of the returned object.Unknownhttps://www.blogger.com/profile/13877147965174159159noreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-65191001512091513342008-11-26T09:59:00.000-08:002008-11-26T09:59:00.000-08:00I had to make some tweaks for the new v5, but this...I had to make some tweaks for the new v5, but this blog post was a lifesaver. Thanks.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-41737973464536482822008-09-24T10:57:00.000-07:002008-09-24T10:57:00.000-07:00@Emanuel Costa,No I have not used Version 4. Thou...@Emanuel Costa,<BR/><BR/>No I have not used Version 4. Though I did try the java examples which _do_ work. Unlike the ones for version 3 ;)<BR/><BR/>I put up a quick and dirty CF example for version 4 above. Just in case it helps anyone get started.cfSearchinghttps://www.blogger.com/profile/11564374520734454860noreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-35332931478870008112008-09-15T11:40:00.000-07:002008-09-15T11:40:00.000-07:00Thanks a lot to everyone here for the clarificatio...Thanks a lot to everyone here for the clarifications about implementing Fedex API with Cold Fusion. Anyone was able to use the Version 4 of the WSDL file?! I was able to use the V2 listed here. I also could test using the PHP5 and Java examples they have at Fedex Developer site. But no luck using version 3 (it gives me an authentication error). Any help is very welcome!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-19063628579369670892008-08-11T13:43:00.000-07:002008-08-11T13:43:00.000-07:00Darn fat fingers!: "I AM thinking Jordan may have...Darn fat fingers!: <BR/> <BR/>"I AM thinking Jordan may have had to sacrifice larger animals to finally sate the Fedex devils ;-)"cfSearchinghttps://www.blogger.com/profile/11564374520734454860noreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-41387351205213187192008-08-11T13:41:00.000-07:002008-08-11T13:41:00.000-07:00@Rafael,LOL. I thinking Jordan may have had to sa...@Rafael,<BR/><BR/>LOL. I thinking Jordan may have had to sacrifice larger animals to finally sate the Fedex devils ;-)cfSearchinghttps://www.blogger.com/profile/11564374520734454860noreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-44517473843048710862008-08-08T22:32:00.000-07:002008-08-08T22:32:00.000-07:00Thank Goodness I found some CF related work with F...Thank Goodness I found some CF related work with FedEx. I was afraid I'd have to start sacrificing kittens in order to appease the FedEx gods.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-61946447051964930142008-06-23T13:29:00.000-07:002008-06-23T13:29:00.000-07:00After much sweat and tears I've finally got a cust...After much sweat and tears I've finally got a custom tag that works with the new (v3) rate services. It's open source and fairly well documented if I do say so myself. I'll be adding to it as time goes on. Hopefully someone will find it useful.<BR/><BR/><A HREF="http://www.corpdirect.com/fedex-tag" REL="nofollow">FedEx custom tag from CorpDirect Agents</A>Unknownhttps://www.blogger.com/profile/12252403183114591847noreply@blogger.comtag:blogger.com,1999:blog-5824660313967021040.post-41167509300794134842008-04-06T09:55:00.000-07:002008-04-06T09:55:00.000-07:00Has anyone gotten the v3 examples to work, either ...Has anyone gotten the v3 examples to work, either with JAVA or CF? If you have can you post the corrections you made to the code?<BR/><BR/>The web services were updated a few months ago (to version 3) and I suspect the code examples were not updated correctly. I tried v3 JAVA examples, and like @nick said, they do not work. There appear to be several errors in the code.cfSearchinghttps://www.blogger.com/profile/11564374520734454860noreply@blogger.com