FedEx Tracker Service

The FedEx service tracks a FedEx parcel or letter.

1 FedEx Tracker Service WSDL Interface

<?xml version="1.0"?>
<definitions name="FedExTrackerService" targetNamespace="http://www.xmethods.net/sd/FedExTrackerService.wsdl" xmlns:tns="http://www.xmethods.net/sd/FedExTrackerService.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
  <message name="statusRequest">
    <part name="trackingNumber" type="xsd:string"/>
  </message>
  <message name="statusResponse">
    <part name="return" type="xsd:string"/>
  </message>
  <portType name="FedExTrackerPortType">
    <operation name="getStatus">
      <input message="tns:statusRequest" />
      <output message="tns:statusResponse" />
    </operation>
  </portType>
  <binding name="FedExTrackerBinding" type="tns:FedExTrackerPortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="getStatus">
      <soap:operation soapAction="urn:xmethodsFedEx#getStatus"/>
      <input>
        <soap:body use="encoded" namespace="urn:xmethodsFedEx" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
      <output>
        <soap:body use="encoded" namespace="urn:xmethodsFedEx" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
    </operation>
  </binding>
  <service name="FedExTrackerService">
    <documentation>Provides access to a variety of FedEx delivery status information</documentation>
    <port name="FedExTrackerPort" binding="tns:FedExTrackerBinding">
      <soap:address location="http://services.xmethods.net:80/perl/soaplite.cgi"/>
    </port>
  </service>
</definitions>

2 FedEx Tracker Client

If you invoke wsdl2java on the above WSDL document, you can run this client to interact with the service:
package fedex;
                                                                           
import javax.naming.InitialContext;
                                                                           
public class Client
{
    public static void main(String[] args) throws Exception
    {
    |   String no = args.length > 0 ? args[0] : "1234";
    |   InitialContext ctx = new InitialContext();
    |   FedExTrackerService service = (FedExTrackerService)
    |       ctx.lookup("xmlrpc:soap:fedex.FedExTrackerService");
    |   FedExTrackerPortType fed = service.getFedExTrackerPort();
    |   System.out.println("status of " + fed.getStatus(no));
    }
}
Copyright © 2000-2003, Novell, Inc. All rights reserved.