473,386 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

UPS XML Module Erroe..1001

123 100+
Hi all ,
That is the XML part for the UPS shipping module , which i have made..
IThe code is ,

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0"?>
  2. <AccessRequest xml:lang="en-US">
  3.    <AccessLicenseNumber>{$this->_access_key}</AccessLicenseNumber>
  4.    <UserId>{$this->_username}</UserId>
  5.    <Password>{$this->_password}</Password>
  6. </AccessRequest>
  7. <?xml version="1.0"?>
  8. <RatingServiceSelectionRequest xml:lang="en-US">
  9.    <Request>
  10.       <TransactionReference>
  11.          <CustomerContext></CustomerContext>
  12.          <XpciVersion>1.0001</XpciVersion>
  13.       </TransactionReference>
  14.       <RequestAction>{$this->_request_option}</RequestAction>
  15.       <RequestOption>{$this->_request_option}</RequestOption>
  16.    </Request>
  17.    <PickupType>
  18.       <Code>01</Code>
  19.    </PickupType>
  20.    <Shipment>
  21.       <Shipper>
  22.         <shipperNumber>66V7R5</shipperNumber>
  23.         <Adress>
  24.         <City></City>
  25.         <StateProvinceCode><StateProvinceCode>
  26.          <PostalCode></PostalCode>
  27.          <CountryCode>US<CountryCode>
  28.          </Address>
  29.       </Shipper>
  30.       <ShipTo>
  31.          <Address>
  32.             <StateProvinceCode></StateProvinceCode>
  33.             <PostalCode></PostalCode>
  34.             <CountryCode></CountryCode>
  35.          </Address>
  36.       </ShipTo>
  37.       <ShipFrom>
  38.          <Address>
  39.                 <StateProvinceCode>...</StateProvinceCode >
  40.                 <PostalCode>...</PostalCode>
  41.                 <CountryCode>...</CountryCode>
  42.          </Address>
  43.       </ShipFrom>
  44.       <Service>
  45.          <Code>{$service_code}</Code>
  46.       </Service>
  47.       <Package>
  48.          <PackagingType>
  49.             <Code>02</Code>
  50.          </PackagingType>
  51.          <PackageWeight>
  52.             <UnitOfMeasurement>
  53.                <Code>LBS</Code>
  54.             </UnitOfMeasurement>
  55.             <Weight>{$package_weight}</Weight>
  56.          </PackageWeight>
  57.       </Package>
  58.       <RateInformation>
  59.   <NegotiatedRatesIndicator/>
  60.       </RateInformation>
  61.    </Shipment>
  62. </RatingServiceSelectionRequest>
  63. XML;
  64.  

What I got as error is ,
Array ( [RatingServiceSelectionResponse] => Array ( [Response] => Array ( [TransactionReference] => Array ( [CustomerContext] => Shipping [XpciVersion] => 1.0001 ) [ResponseStatusCode] => 0 [ResponseStatusDescription] => Failure [Error] => Array ( [ErrorSeverity] => Hard [ErrorCode] => 10001 [ErrorDescription] => The XML document is not well formed ) ) ) )

What can be the possible solution to that : 10001 - XML doc is not well Formed.
Jun 6 '08 #1
5 3101
jkmyoung
2,057 Expert 2GB
Seems you have 2 files there:
You're not allowed to have the xml processing instruction twice. It's only supposed to be at the beginning of the file before anything else.
<?xml version="1.0"?>

Missing Close of elements:
Some of your closing tags are misrepresented as open tags.
<StateProvinceCode>
<CountryCode>


Mispelled elements
<Adress>

What's the XML; at the end?
Jun 6 '08 #2
ajd335
123 100+
Seems you have 2 files there:
You're not allowed to have the xml processing instruction twice. It's only supposed to be at the beginning of the file before anything else.
<?xml version="1.0"?>

Missing Close of elements:
Some of your closing tags are misrepresented as open tags.
<StateProvinceCode>
<CountryCode>


Mispelled elements
<Adress>

What's the XML; at the end?




Hi...
I have removed the second definition from the document and I am getting
FailureHard250000Missing XML declaration in the XML document error.
Why I am getting that error?

That XML ; at last is reference to the $this->_xml_request =<<<XML before the XML code...
Jun 6 '08 #3
ajd335
123 100+
And further IF i made the changes of the closing formates and have the XML declaration twice , then I am getting

Shipping1.00010FailureHard110122Missing/Invalid Shipper/ShipperNumber..

which i have already given...What should be done here ?
Jun 6 '08 #4
jkmyoung
2,057 Expert 2GB
Do you have a schema for this xml? If so could you post it?
Jun 9 '08 #5
ajd335
123 100+
Do you have a schema for this xml? If so could you post it?
Hey Jkmyoung ,
The error was due to a tag with small letters. :)...So got solved..
Thanks.
Jun 9 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Bo Peng | last post by:
Dear list, I am writing a Python extension module that needs a way to expose pieces of a big C array to python. Currently, I am using NumPy like the following: PyObject* res =...
5
by: dody suria wijaya | last post by:
I found this problem when trying to split a module into two. Here's an example: ============== #Module a (a.py): from b import * class Main: pass ============== ==============
9
by: Murat Kelleci | last post by:
How do i reach a listbox in form1 from a module? i thinks it is not so easy as it seems, i tried such like : dim myform as new form1 form1.listbox1. and dim myform as form1
3
by: David T. Ashley | last post by:
Hi, Red Hat Enterprise Linux 4.X. I'm writing command-line PHP scripts for the first time. I get the messages below. What do they mean? Are these operating system library modules, or...
1
by: zxo102 | last post by:
Hi everyone, I need your help for using python odbc module. I have a simple table defined as create table A ( userId char(10), courseid char(10), grade integer, primary key(userId,courseId)...
10
by: Bonzol | last post by:
vb.net Hey there, could someone just tell me what the differnce is between classes and modules and when each one would be used compared to the other? Any help would be great Thanx in...
1
by: Olivier Langlois | last post by:
Hi, I have the following statement in my test : self.assertRaises(CDKeyException, ValidationObject.Validate, 1001,'NonExistantKey') and the test fails as if assertRaises was not catching...
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
0
by: Monty | last post by:
I have an installation package for my web application which has worked well. After rebuilding the package and running install, I began receiving this error message: Error 1001. Unable to get...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.