I am developing in nopcommerce 3.5.I developed one plugin for shipping UPS and call TransitInTime API. Now I want to use UPS plugin because I want rates from UPS shipping Method with my TransitInTime API. but I am getting Error: error code 10001 and Description: XML Document is not well formed in responce. of XML.
In Request I passed:
<?xml version='1.0'?>
<AccessRequest xml:lang='en-US'>
<AccessLicenseNumber>CC....</AccessLicenseNumber>
<UserId>gi...</UserId>
<Password>Ch...</Password>
</AccessRequest>
<?xml version='1.0'?>
<RatingServiceSelectionRequest xml:lang='en-US'>
<Request>
<TransactionReference>
<CustomerContext>
Bare Bones Rate Request
</CustomerContext>
<XpciVersion>
1.0001
</XpciVersion>
</TransactionReference>
<RequestAction>
Rate
</RequestAction>
<RequestOption>
Shop
</RequestOption>
</Request>
<PickupType>
<Code>06</Code>
</PickupType>
<CustomerClassification>
<Code>04</Code>
</CustomerClassification>
<Shipment>
<Shipper>
<Address>
<PostalCode>35006</PostalCode>
<CountryCode>US</CountryCode>
</Address>
</Shipper>
<ShipTo>
<Address>
<ResidentialAddressIndicator/>
<PostalCode>35005</PostalCode>
<CountryCode>US</CountryCode>
</Address>
</ShipTo>
<ShipFrom>
<Address>
<PostalCode>35006</PostalCode>
<CountryCode>US</CountryCode>
</Address>
</ShipFrom>
<Service>
<Code>03</Code>
</Service>
<Package>
<PackagingType>
<Code>02</Code>
</PackagingType>
<Dimensions>
<Length>0</Length>
<Width>0</Width>
<Height>0</Height>
</Dimensions>
<PackageWeight>
<Weight>18</Weight>
</PackageWeight>
</Package>
</Shipment>
</RatingServiceSelectionRequest>
and In responce:
<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>
You are using
<?xml version='1.0'?>
twice. Remove the inner one and use XMl envelope---example