Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Juggernaut

Implementing Shipping Web Services

Featured Replies

  • Newbies

I have to develop a FM solution that uses the online services of UPS and FedEx to validate addresses, calculate shipping costs, submit shipments, and track packages. I am well versed in PHP and have worked with FM for a few years now. I am new to using online web services, however, and I could use a few pointers to get started. I would imagine that others have tried to do this already and would like to learn from them.

Thanks for any help you can provide.

-matt

  • Author
  • Newbies

I have been using the smartpill plugin from Scodigo.com to directly call php functions within FileMaker with some amount of success. I can generate the xml with the simplexml function and have been calling the UPS url ('https://wwwcie.ups.com/webservices/XAV') with the curl object functions. I can't seem to get a valid xml to the service, however, and keep getting a "10001" error.

Any ideas?

//////////////// XML Request ////////////////

<?xml version="1.0"?>

<AccessRequest>

<AccessLicenseNumber>$accessLicenseNumber</AccessLicenseNumber>

<UserId>$userName</UserId>

<Password>$passwd</Password>

</AccessRequest>

<?xml version="1.0"?>

<AddressValidationRequest xml:lang="en-US">

<Request>

<TransactionReference>

<CustomerContext>Customer Data</CustomerContext>

<XpciVersion>1.0001</XpciVersion>

</TransactionReference>

<RequestAction>AV</RequestAction>

</Request>

<Address>

<City>MIAMI</City>

<StateProvinceCode>FL</StateProvinceCode>

</Address>

</AddressValidationRequest>





Which is the example XML from the UPS Address Validation.zip from their developer's website.  I get the following response back



///////////////  Response  ////////////////




HTTP/1.1 200 OK



Server: Apache



Content-Length: 660



X-Powered-By: Servlet/2.5 JSP/2.1



Content-Type: text/xml



Expires: Wed, 06 Apr 2011 20:38:57 GMT



Cache-Control: max-age=0, no-cache, no-store



Pragma: no-cache



Date: Wed, 06 Apr 2011 20:38:57 GMT



Connection: keep-alive







<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header/><soapenv:Body><soapenv:Fault><faultcode>Client</faultcode><faultstring>An exception has been raised as a result of client data.</faultstring><detail><err:Errors xmlns:err="http://www.ups.com/schema/xpci/1.0/error"><err:ErrorDetail><err:Severity>Hard</err:Severity><err:PrimaryErrorCode><err:Code>10001</err:Code><err:Description>The XML document is not well formed</err:Description><err:Digest>Unexpected element: XML_DOC_DECL</err:Digest></err:PrimaryErrorCode><err:Location/></err:ErrorDetail></err:Errors></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>

Any ideas?

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.