8 Replies - 9134 Views - Last Post: 02 February 2012 - 01:20 PM Rate Topic: -----

Topic Sponsor:

#1 vzk3r0  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 6
  • Joined: 26-November 08

FedEx Address Validation in Web Form

Posted 02 December 2008 - 02:14 PM

Hello World Experts,

I got the FedEx codes working in the Console Application from FedEx codes sample. Now, I want to integrate the FedEx wsdl into Web Form. Please see the codes and the notes below. Attached is the wsdl file.
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.Services.Protocols;
using AddressValidationServiceWebReference;  //<--- FedEx (wsdl)


	protected void Page_Load(object sender, EventArgs e)
	{
		AddressValidationRequest request = CreateAddressValidationRequest();  //<--- went through no error
		//
		AddressValidationService addressValidationService = new AddressValidationService(); //<--- causing error
	}


Unable to generate a temporary class (result=1).
error CS0029: Cannot implicitly convert type 'AddressValidationServiceWebReference.ParsedElement' to 'AddressValidationServiceWebReference.ParsedElement[]'

How do I integrate the existing FedEx Console Application Codes into Web Form?
Any help would be appreciated.

Thank you very much,

Is This A Good Question/Topic? 0
  • +

Replies To: FedEx Address Validation in Web Form

#2 tgk  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 11-December 08

Re: FedEx Address Validation in Web Form

Posted 11 December 2008 - 05:42 AM

The error you are getting is related to Visual Studio and the use of WSDL.exe. Try this fix:

This is an error generated by Web Services Description Language Tool (Wsdl.exe) to generate the client information. When you publish a schema that contains nested nodes that have the maxOccurs attribute set to the "unbounded" value, the Wsdl.exe tool creates multidimensional arrays in the generated code file. Therefore, the generated code contains incorrect types for the nested nodes. To solve modify the generated code by removing the bracket ([]) array characters from the data type delectation statements. For more information see http://support.micro...kb/326790/en-us and http://support.microsoft.com/kb/891386
Was This Post Helpful? 0
  • +
  • -

#3 vzk3r0  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 6
  • Joined: 26-November 08

Re: FedEx Address Validation in Web Form

Posted 19 December 2008 - 07:48 AM

Thank you for your information. It works well in the Console and Window Form ( by removing the bracket [] in Reference.cs file), but it does not work in the Web Form. I go and make changes in App_WebReferences.mkuj10va.0.cs, but no luck.

Thank you,
Was This Post Helpful? 0
  • +
  • -

#4 davidqc  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 06-January 09

Re: FedEx Address Validation in Web Form

Posted 06 January 2009 - 03:09 PM

Did you find an answer about this problem ? I have the same problem with my asp.net application using fedex address validation web service.

Thanks for your help!

David
Was This Post Helpful? 0
  • +
  • -

#5 vikas1985  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 08-May 09

Re: FedEx Address Validation in Web Form

Posted 08 May 2009 - 12:56 AM

copy your webreference folder with old one(what ever you used for) and paste into your application
Was This Post Helpful? 0
  • +
  • -

#6 windowsmaster22  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 2
  • Joined: 27-June 09

Re: FedEx Address Validation in Web Form

Posted 27 June 2009 - 09:04 PM

Would you be able to expand further on what you did to remedy the situation? I am receiving this error and am not sure which brackets to remove. The ones I do remove generate other issues (such as method...cannot be reflected). FedEx's FAQ is poorly worded and gives few details.

Thank You!
Was This Post Helpful? 0
  • +
  • -

#22 windowsmaster22  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 2
  • Joined: 27-June 09

Re: FedEx Address Validation in Web Form

Posted 29 June 2009 - 06:21 PM

I managed to figure it out.

For those who come across this thread in the future and are using C#, remove the double brackets ([][]) in the following declaration in references.cs:

private ParsedElement[][] parsedStreetLineField; 


It should read:
private ParsedElement[] parsedStreetLineField;


Then, update the setter/getter as necessary.


Good Luck!

This post has been edited by windowsmaster22: 29 June 2009 - 06:22 PM

Was This Post Helpful? 1

#23 niaz.a.ak  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 24-January 11

Re: FedEx Address Validation in Web Form

Posted 24 January 2011 - 03:22 PM

hai sir,
I worked to integrate fedex address validation code into my website .but it didnt work so sir how to solve this error. i thought that u find the solution tats y sir i asked to u .
my email address is <removed> .I add the address validation wsdl into my website but i didnt find any reference.cs file in my website .i found that in console application only .
pls reply urgent sir


my error is this the below one while executing the below line

 AddressValidationService addressValidationService = new AddressValidationService(); //<--- causing error 



Quote

Unable to generate a temporary class (result=1).
error CS0029: Cannot implicitly convert type 'AddressValidationServiceWebReference.ParsedElement' to 'AddressValidationServiceWebReference.ParsedElement[]'


edit: emails not allowed on the forums. Also:
:code:
--insertAlias

This post has been edited by insertAlias: 24 January 2011 - 03:26 PM

Was This Post Helpful? 0
  • +
  • -

#24 ice88  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 02-February 12

Re: FedEx Address Validation in Web Form

Posted 02 February 2012 - 01:20 PM

I am have the same issue implementing the FedEx webservices to a webform asp.net application. Did you ever get this working or know of an actually working download on the web somewhere?

Thanks!!!!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1