Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FedEx xml or not ?
Message
De
06/03/2003 18:44:23
 
 
À
06/03/2003 18:36:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00760667
Message ID:
00762520
Vues:
24
>Dale, by all means, post it here if you can ,since I think a bunch of us will benefit with some of that code or else you can email me at

This is where I am right now by querying directly Fedex server.

The first XML string to send is to register and receive a meter number:
<?xml version="1.0" encoding="UTF-8"?>
<RegistrationRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:noNamespaceSchemaLocation="Register.xsd"  Version="1.0">
<CustomerInfo>
<AccountNumber>2222222222222</AccountNumber>
<Address>
<Street>7055 Bombardier, #305</Street>
<City>Anjou</City>
<StateOrProvinceCode>PQ</StateOrProvinceCode>
<PostalCode>H1J2X1</PostalCode>
<CountryCode>CA</CountryCode>
</Address>
<PhoneNumber>5143547474</PhoneNumber>
<ContactName>Michel Fournier</ContactName>
</CustomerInfo>
</RegistrationRequest>
Account number has been modified to hide the info. To send this XML string, you can issue something like this:
LOCAL lcUrl,loXML,lcXML,lcFile
lcUrl='...'
lcFile='d:\FedexRegister.xml'
lcXML=FILETOSTR(lcFile)
loXML=CREATEOBJECT('MSXML2.ServerXMLHTTP')
loXML.Open('Post',lcUrl,.F.)
loXML.SetRequestHeader('Referer','Fournier Transformation')
loXML.SetRequestHeader('Host','...')
loXML.SetRequestHeader('Accept','image.gif, image.jpeg, image/pjpeg, text/plain, text/html, */*')
loXML.SetRequestHeader('Content-Type','image/gif')
loXML.SetRequestHeader('Content-Length',ALLTRIM(STR(LEN(lcXML))))
loXML.Send(lcXML)
lcXMLResponse=loXML.ResponseBody
where d:\FedexRegister.xml is the above XML string. See in here that I can't paste the lcURL field value you need as this has to be given to you from Fedex. The same goes with the Host property.

But, doing all that works as it returns an XML string response. But, the content doesn't make sense as it says that the method is not implemented. I sent an email to Fedex to request support on the issue. Of course, this is much more to do than to get access to a Web Service which would work with three lines but once we find the situation here, it should work.

For the process to work, the registration is done once. Once the XML string sent, a response with a meter code will be received. Then, you can send a variety of XML strings, described in Fedex PDF doc file, to query for status and such. When doing so, the meter code will be used as the identifier.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform