Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jul 16, 2008 05:27 PM by sara55
Aug 21, 2007 04:34 PM|LINK
Ok, Great wether its on his side or the other side as you say the xmlreader reads the xml document weather its the UPS's reader or his xmlreader. The things that he should of got from what i was telling him to ask UPS company for a copy of a XML file giving
the elements that he needs to use. So the general idea atleast should be explained that he is using probably wrong xml elements the reader is not reading his xml because their xmlreader is probably trying to parse different named elements. So the whole focus
is This Exactly what I was explaining from the begining. re-read what I wrote it all there wether it his parsing error or theirs make no difference because it going to work the same way.
And another thing if he is tracking UPS shipments why in the world would he need to send and xml file to them.? The reason why I ask this question is they are supplying data through a webservice all he would really need to do is satisfy the web methods
(Requests) with a shipment number the data from the webservice thats in the UPS xml file that being service by UPS will return the valued information So you really do not need to be sending any xml document.
Aug 21, 2007 04:53 PM|LINK
Looking at the documentation you linked for us (thank you by the way) your XML looks fine. However in thier examples for sending the payload to them they are using the MSXML object for sending/receiving. Which is different than what we are working with
There is another thread where someone was needing to communicate with UPS and sending a similar payload to them. Take alook at this thread and see if this gets you any closer.
Aug 21, 2007 05:03 PM|LINK
hey, thats very good, the link you sent that is using xpaths seems more usuable but one thing
you need to put your xpath code in brackets like so:
Dim crmyxmlnodelist As XmlNodeList = myxmldoc.SelectNodes("RatingServiceSelectionResponse/Response")
Dim crmyxmlnodelist As XmlNodeList = myxmldoc.SelectNodes([RatingServiceSelectionResponse/Response])
im not exactly sure though if you use quotes but you may also need them but I know for a fact it will need brackets play around with it and you should get it with that
i have to check the code i did to remember but i know it needs brackets
Aug 29, 2007 09:47 AM|LINK
I think I got it!
Jul 14, 2008 03:12 PM|LINK
I have few question. Please help answer these.
What is the Internalkey here?
I have been getting the following error 'The XML document is well formed but the document is not valid'.
Any help appreciated. Please reply.
Jul 15, 2008 12:10 AM|LINK
The function below will generate the correct UPS traking xml. I am using it and it works. Fill out the fileds and check if this works for you. Just pass
"" in refNo. Let me know incase of problems.
I am posting this to the following URL (https://www.ups.com/ups.app/xml/Track)
Public Shared Function CreateUpsTrackingXML(ByVal trackingNo As String, ByVal refNo As String) As String
Dim strBuild As New StringBuilder()
Dim accessLicenseNumber As String = "XXXXXX"
Dim upsUserId As String = "XXXXX"
Dim upsUserPass As String = "XXXX"
Dim xpciVersion As String = "1.0001"
Dim requestOption As String = "1"
strBuild.Append("<AccessLicenseNumber>" + accessLicenseNumber + "</AccessLicenseNumber>")
strBuild.Append("<UserId>" + upsUserId + "</UserId>")
strBuild.Append("<Password>" + upsUserPass + "</Password>")
strBuild.Append("<CustomerContext>Nyk Ups Tracking</CustomerContext>")
strBuild.Append("<XpciVersion>" + xpciVersion + "</XpciVersion>")
strBuild.Append("<RequestOption>" + requestOption + "</RequestOption>")
If trackingNo <> String.Empty Then
strBuild.Append("<TrackingNumber>" + trackingNo + "</TrackingNumber>")
strBuild.Append("<ReferenceNumber><Value>" + refNo + "</Value></ReferenceNumber>")
Jul 16, 2008 05:27 PM|LINK
B/w have u tried serialise the Request string?