Guest tkhspro Posted September 23, 2005 Share Posted September 23, 2005 <RateV2Request USERID="*******" PASSWORD="********"><Package ID="0"><Service>PRIORITY</Service><ZipOrigination>95823</ZipOrigination><ZipDestination>95823</ZipDestination><Pounds>1</Pounds><Ounces>0</Ounces><Container>Flat Rate Envelope</Container><Size>Regular</Size></Package></RateV2Request> <?xml version="1.0"?> <Error><Number>-2147219490</Number><Source>Rate_Respond;SolServerRatesTest.RateV2_Respond</Source><Description>Invalid value for origin ZIP Code.</Description><HelpFile></HelpFile><HelpContext>1000440</HelpContext></Error> I tried to test USPS shipping but I got the above error code. Already got the USER ID & PASSWORD from USPS. Lee Quote Link to comment Share on other sites More sharing options...
Guest notti Posted September 23, 2005 Share Posted September 23, 2005 Im having the same problem as well....! Quote Link to comment Share on other sites More sharing options...
Guest keiichi000 Posted September 23, 2005 Share Posted September 23, 2005 http://www.usps.com/webtools/htm/Rates-Cal...tm#_Toc87669069 USPS wants VERY specific information when you are sending your test transactions, which are illistrated here. Perhaps we can get a button setup in the USPS setup area that will go ahead and send those test transactions that they are wanting? ~k1 Quote Link to comment Share on other sites More sharing options...
Guest keiichi000 Posted September 23, 2005 Share Posted September 23, 2005 Copy / Pasted from USPS Website 3.3 Run Scripted Test Step 1: Build the XML Request For testing purposes, the only values in the test code in this section that you should change are the user ID and password. Enter the user ID and password you received in the registration e-mail for testing. All remaining code in the test scripts provided below must remain unchanged. Testing URL To make test calls to the Domestic Rates Calculator server, use the Testing URL provided in the registration e-mail. Scripted Test Requests There are two test requests included in this procedure. All of the test script code contained in this document can be cut and pasted for your use in testing the software. Be sure to note the request numbers so you can match up the responses you will receive as provided in the Successful Test Responses section. Test Request #1 <RateV2Request USERID="xxxxxx" PASSWORD="xxxxxxx"> <Package ID="0"> <Service>PRIORITY</Service> <ZipOrigination>10022</ZipOrigination> <ZipDestination>20008</ZipDestination> <Pounds>10</Pounds> <Ounces>5</Ounces> <Container>Flat Rate Box</Container> <Size>REGULAR</Size> </Package> </RateV2Request> Test Request #2 <RateV2Request USERID="xxxxxx" PASSWORD="xxxxxxx"> <Package ID="0"> <Service>All</Service> <ZipOrigination>10022</ZipOrigination> <ZipDestination>20008</ZipDestination> <Pounds>10</Pounds> <Ounces>5</Ounces> <Size>LARGE</Size> <Machinable>TRUE</Machinable> </Package> </RateV2Request> Step 2: Make the Internet Connection & Send the XML Request This step involves four separate functions: Making the connection to the USPS Shipping Web Tools server. Sending the request (whether Visual Basic, Perl, ASP, or any other language). Receiving the response from the Web Tools server. Closing the Internet connection. If you have recently registered, the registration e-mail will have the name of the server. If you are an existing user and do not have the name of the server, please contact the ICCC. When sending the XML request, the Web Tool name must be specified. The server name can be found in your Web Tools registration e-mail. The Web Tool name is RateV2. The format of the XML transaction is: http://servername/ShippingAPITest.dll?API=...t;RateV2Request USERID="username" PASSWORD="password">…….</RateV2Request> There are several ways to make the Internet connection and send the XML request. Please contact the ICCC for code examples. Step 3: Unpack the XML Response When the USPS Shipping Web Tools returns a response, it will either return a successful response document or an error document. If you need software to unpack the response, contact the ICCC for sample code you can use. Successful Test Responses For your test to be successful, the following responses to the scripted test requests should be returned verbatim. Response to Test Request #1 <?xml version="1.0" ?> <RateV2Response> <Package ID="0"> <ZipOrigination>10022</ZipOrigination> <ZipDestination>20008</ZipDestination> <Pounds>10</Pounds> <Ounces>5</Ounces> <Container>Flat Rate Box</Container> <Size>REGULAR</Size> <Zone>3</Zone> <Postage> <MailService>Priority Mail Flat Rate Box (11.25" x 8.75" x 6")</MailService> <Rate>7.70</Rate> </Postage> <Postage> <MailService>Priority Mail Flat Rate Box (14" x 12" x 3.5")</MailService> <Rate>7.70</Rate> </Postage> </Package> </RateV2Response> Response to Test Request #2 <?xml version="1.0" ?> <RateV2Response> <Package ID="0"> <ZipOrigination>10022</ZipOrigination> <ZipDestination>20008</ZipDestination> <Pounds>10</Pounds> <Ounces>5</Ounces> <Size>LARGE</Size> <Machinable>TRUE</Machinable> <Zone>3</Zone> <Postage> <MailService>Express Mail PO to Addressee</MailService> <Rate>39.20</Rate> </Postage> <Postage> <MailService>Priority Mail</MailService> <Rate>11.05</Rate> </Postage> <Postage> <MailService>Parcel Post</MailService> <Rate>8.61</Rate> </Postage> <Postage> <MailService>Bound Printed Matter</MailService> <Rate>3.53</Rate> </Postage> <Postage> <MailService>Media Mail</MailService> <Rate>5.14</Rate> </Postage> <Postage> <MailService>Library Mail</MailService> <Rate>4.91</Rate> </Postage> </Package> </RateV2Response> Scripted Test Error Responses If any values were changed in your request, the following is an example of an error that can occur. The following error shows an example of using Test #2 with an invalid container value. <?xml version="1.0" ?> <Error> <Number>-2147219488</Number> <Source>Rate_Respond;SolServerRatesTest.RateV2_Respond </Source> <Description>Invalid value for container.</Description> <HelpFile /> <HelpContext>1000440</HelpContext> </Error> Although the input may be valid, the response will still raise this error, because those particular values have not been included in this test server. Refer to the Error Responses section for an explanation of any other returned errors. Upon successful completion of the scripted test phase, call the ICCC. The ICCC will verify your test results and provide you with privileges necessary to proceed to the next step-running Live requests ~k1 Quote Link to comment Share on other sites More sharing options...
Guest agent Posted September 27, 2005 Share Posted September 27, 2005 same problem here. Anyone find a resolution? TIA Peace Quote Link to comment Share on other sites More sharing options...
Guest keiichi000 Posted September 27, 2005 Share Posted September 27, 2005 Best thing to do is email USPS and tell them you are using an out of the box store system that has a module for USPS. They activated my account for me Now I'm getting another strange error, but at least I'm on the production server now. ~k1 Quote Link to comment Share on other sites More sharing options...
Guest moxie Posted September 27, 2005 Share Posted September 27, 2005 dbl post Quote Link to comment Share on other sites More sharing options...
Guest moxie Posted September 27, 2005 Share Posted September 27, 2005 USPS::submit_request: domxml_open_mem is uncallable Anyone getting that? Makes it kinda hard to sell stuff. In terms of testing. http://testing.shippingapis.com/ShippingAPITest.dll?API=RateV2&XML=<RateV2Request USERID="XXXXXXX" PASSWORD="XXXXXXX"><Package ID="0"><Service>PRIORITY</Service><ZipOrigination>10022</ZipOrigination><ZipDestination>20008</ZipDestination><Pounds>10</Pounds><Ounces>5</Ounces><Container>Flat Rate Box</Container><Size>REGULAR</Size></Package></RateV2Request> http://testing.shippingapis.com/ShippingAPITest.dll?API=RateV2&XML=<RateV2Request USERID="XXXXXXX" PASSWORD="XXXXXXX"><Package ID="0"><Service>All</Service><ZipOrigination>10022</ZipOrigination><ZipDestination>20008</ZipDestination><Pounds>10</Pounds><Ounces>5</Ounces><Size>LARGE</Size><Machinable>TRUE</Machinable></Package></RateV2Request> You can "test" your account by putting your userid and password in those urls, and just putting them in the address bar. The testing process is really in place to test your parsing of the XML return, since this doesn't test much about your store. Quote Link to comment Share on other sites More sharing options...
Guest keiichi000 Posted September 27, 2005 Share Posted September 27, 2005 Moxie, I am getting that error now that my account has been activated by USPS. Any clues what's causing it? ~k1 Quote Link to comment Share on other sites More sharing options...
Guest agent Posted September 27, 2005 Share Posted September 27, 2005 Best thing to do is email USPS and tell them you are using an out of the box store system that has a module for USPS. They activated my account for me Now I'm getting another strange error, but at least I'm on the production server now. ~k1 Do you have to let them know your user and/or pass ? TIA Quote Link to comment Share on other sites More sharing options...
Guest keiichi000 Posted September 28, 2005 Share Posted September 28, 2005 Yes and Yes. ~k1 Quote Link to comment Share on other sites More sharing options...
Guest rolsmar Posted September 28, 2005 Share Posted September 28, 2005 I too have encountered the "USPS::submit_request: domxml_open_mem is uncallable" error. I assume it is a configuration issue on the server. If you look at http://us3.php.net/domxml, you'll see that you need to have access to the Gnome XML library to use the functions that parse the XML response from USPS. You may want to check with your hosting provider to see if you have access to this library on your server. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.