473,372 Members | 804 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,372 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 3100
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.