how to work with Fedex xml request
Hi Developers,
In USPS I can send the xml request with http url in the browser and successfully getting the xml response. How can we achieve the same concept in FedEx?
Is this possible?
In FedEx site i downloaded the xml-transaction pdf, which contains the multiple xml request. I don't know how to test it with the browser.
Sample xml request for Fedex which i founded in the above mentioned pdf is shown below:
<?xml version="1.0" encoding="UTF-8" ?>
<FDXSubscriptionRequest xmlns:api="http://www.fedex.com/fsmapi" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance"
xsi:noNamespaceSchemaLocation="FDXSubscriptionRequest.xsd">
<RequestHeader>
<CustomerTransactionIdentifier>String</CustomerTransactionIdentifier>
<AccountNumber>123456789</AccountNumber>
</RequestHeader>
<Contact>
<PersonName>Jim Smith</PersonName>
<CompanyName>Creative Widgets</CompanyName>
<Department>Shipping</Department>
<PhoneNumber>5405559900</PhoneNumber>
<PagerNumber>9999999999</PagerNumber>
<FaxNumber>5405559901</FaxNumber>
<E-MailAddress>jim@abc.com</E-MailAddress>
</Contact>
<Address>
<Line1>123 Main Street</Line1>
<Line2>1st Floor</Line2>
<City>Anycity</City>
<StateOrProvinceCode>VA</StateOrProvinceCode>
<PostalCode>24060</PostalCode>
<CountryCode>US</CountryCode>
</Address>
</FDXSubscriptionRequest>
and they also provide the sample xml response which is given below:
<?xml version="1.0" encoding="UTF-8" ?>
<FDXSubscriptionReply xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="FDXSubscriptionReply.xsd">
<RequestHeader>
<CustomerTransactionIdentifier>String</CustomerTransactionIdentifier>
</RequestHeader>
<MeterNumber>1234567</MeterNumber>
<SubscribedService>FedEx Express Shipping</SubscribedService>
</FDXSubscriptionReply>
I want to know how to send the above mentioned FedEx xml request in the browser to reach the FedEx Server or how to achive the FedEx xml request using java
code.
But these concepts is possible in the USPS because we make a connection with http url(provided by usps) and then we will send the xml request, where as in FedEx the http url is inside the xml structure. So how can we achive this?
Please help me to come out from this problem
Thanks
Srinivasan