• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

FedEx Rate Available Services

New Here ,
Nov 16, 2007 Nov 16, 2007

Copy link to clipboard

Copied

I'm having trouble getting the RateAvailableServies working with the FedEx web services. I can make my call to the service and get information but when I try to add more specific information I get the following error:

Web service operation rateAvailableServices with parameters {...Displays all the parameters I pass...} cannot be found.

Here is what works:
<cfscript>
params = {};
(ALL MY ADDRESS AND USER CREDENTIALS REMOVED)
params.CurrencyType = "USD";
params.DropoffType = "REGULAR_PICKUP";
params.PackagingType = "YOUR_PACKAGING";
params.ShipDate = "2007-11-30";
params.RateRequestPackageSummary.TotalInsuredValue.Currency = "USD";
params.RateRequestPackageSummary.TotalInsuredValue.Amount = "10";
params.RateRequestPackageSummary.TotalWeight.Value = "20";
params.RateRequestPackageSummary.TotalWeight.Units = "LB";
</cfscript>

Now if I add any of the following lines I get the error above.
<cfscript>
params = {};
(ALL MY ADDRESS AND USER CREDENTIALS REMOVED)
params.CurrencyType = "USD";
params.DropoffType = "REGULAR_PICKUP";
params.PackagingType = "YOUR_PACKAGING";
params.ShipDate = "2007-11-30";
params.RateRequestTypes = "LIST"; // CAUSES ERROR
params.RateRequestPackageSummary.PieceCount = "1"; // CAUSES ERROR
params.RateRequestPackageSummary.TotalInsuredValue.Currency = "USD";
params.RateRequestPackageSummary.TotalInsuredValue.Amount = "10";
params.RateRequestPackageSummary.TotalWeight.Value = "20";
params.RateRequestPackageSummary.TotalWeight.Units = "LB";
params.RateRequestPackageSummary.PerPieceDimensions.Length = "20"; // CAUSES ERROR
params.RateRequestPackageSummary.PerPieceDimensions.Width = "20"; // CAUSES ERROR
params.RateRequestPackageSummary.PerPieceDimensions.Height = "20"; // CAUSES ERROR
params.RateRequestPackageSummary.PerPieceDimensions.Units = "IN"; // CAUSES ERROR
</cfscript>

I've tried combinations of them and nothing works. I don't need the PerPieceDimensions to work but theoretically it should.

Can someone please tell me what's going on?

Thanks
TOPICS
Advanced techniques

Views

1.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 19, 2007 Nov 19, 2007

Copy link to clipboard

Copied

Hi,

Are you passing values for all the required parameters?.

Also the value for the "DropoffType" should be "REGULARPICKUP" and not "REGULAR_PICKUP" is same is with the "packaging" field.

Though the CFM (Webservices) error never shows you the actual error, better you should write a small java program to post all your values to Fedex and then output the value returned from them.

Example for sending a POST Request,
http://www.exampledepot.com/egs/java.net/Post.html

HTH

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 28, 2007 Nov 28, 2007

Copy link to clipboard

Copied

I've talked to the fedex support people several times and i believe I have everything that is required. I can get values back for the shipping rates until I add any of the items that are indicated by "Causes Error" in the code above.

I'm not familiar with Java so I cannot use that as a solution.

If you look in the WSDL file you see the following for DropOffType

<xs:restriction base="xs:string">
<xs:enumeration value="BUSINESS_SERVICE_CENTER"/>
<xs:enumeration value="DROP_BOX"/>
<xs:enumeration value="REGULAR_PICKUP"/>
<xs:enumeration value="REQUEST_COURIER"/>
<xs:enumeration value="STATION"/>
</xs:restriction>

Same thing for packaging. It shows the _ in there.

Thank you so much for any other tips you can give me on this.

(computermark - php is not an option, that's why i'm posting in a CF forum)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 22, 2007 Nov 22, 2007

Copy link to clipboard

Copied

I recommend using PHP as your backend.

Example

http://www.mtheoryit.com/fedex.htm

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Dec 01, 2007 Dec 01, 2007

Copy link to clipboard

Copied

dbldutch

I was testing the Rate web service and had problems with those same values. One was solved by passing an array instead of a string. The other by passing a java object.

May not be the best way, but it worked for me. You can see the full code at the bottom here. Sorry for the crappy formatting.

http://cfsearching.blogspot.com/2007/12/how-heck-do-you-use-fedex-rate-web.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 03, 2007 Dec 03, 2007

Copy link to clipboard

Copied

THANK YOU CFSearching!

You got me on the right track, that's for sure. The RateRequestTypes thing worked but your code for forcing a java number did not. I'm going to go ahead and post a new topic to see if someone can help me with an alternate solution to get that working. My test server is Apache but my shared hosting is not.

Thanks again for helping me get on my way.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Dec 03, 2007 Dec 03, 2007

Copy link to clipboard

Copied

dbldutch,

What happened when you tried it, an error? What version are you using?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 03, 2007 Dec 03, 2007

Copy link to clipboard

Copied

Thanks again, I'm using version 2.0. Here is the error.

Code:
objPosInteger = createObject("java", "org.apache.axis.types.PositiveInteger");
params.RateRequestPackageSummary.PieceCount = objPosInteger.init(1);

Error:
Cannot perform web service invocation rateAvailableServices.
The fault returned when invoking the web service operation is:

AxisFault
faultCode: { http://schemas.xmlsoap.org/soap/envelope/}Server
faultSubcode:
faultString: BEA-382505: ALSB Validate action failed validation
faultActor:
faultNode:
faultDetail: { http://www.bea.com/wli/sb/context}fault:5Schema validation failed for request.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Dec 03, 2007 Dec 03, 2007

Copy link to clipboard

Copied

quote:


faultString: BEA-382505: ALSB Validate action failed validation
faultActor:
faultNode:
faultDetail: { http://www.bea.com/wli/sb/context}fault:5Schema validation failed for request.



It worked with Apache/2.0.54. If the error message is to be believed it has to do a BEA schema validation error. I do not know much about BEA. Have you encountered that error before with other web services?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 04, 2007 Dec 04, 2007

Copy link to clipboard

Copied

No, I've never run into that before. The main problem is I'm not going to be on an Apache server once I go into production so your code won't work anyway. I tried to start another post about it but haven't gotten any responces.

Thanks again!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Dec 04, 2007 Dec 04, 2007

Copy link to clipboard

Copied

LATEST
quote:

I'm not going to be on an Apache server once I go into production so your code won't work anyway.

No, the code is not Apache specific.

Are you using BEA? Given the error message it seems to be related to your problem.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation