× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I am trying to get my first web service program going using the ISOCKETS library. When I run my program, I get this error:
The XML document does not match the RPG variable; reason code 1. (RNX0353)

1. The specified path to the XML element was not found in the XML document.
I wanted to make sure it was not being caused by the URL I am using, so I put the code in that I found on the internet to hit w3schools.
Same results.

I cannot find any documentation on the ISOCKETS library, or on this error. Any help would be appreciated.
Having a meeting today on this, if you help me get it working, I promise I will take all the credit.

Code:
C eval szFormData = szFormData + %char(nCelsius)
C eval nBytes=PostUrldata(szDomain:
C WebService : szFormData :
C %addr(szHtml) : %size(szHtml))
C if nBytes > 0
C eval nDataPos = ParseHTTPReply(pHTML:nBytes)
C eval nLen = nBytes-(nDataPos-1)
C callp Joblog(%subst(szHtml:nDataPos:nLen))
C endif
C XML-INTO nFahren %xml(%subst(szHtml:nDataPos: nLen):
C 'path=short allowextra=yes')
C callp joblog('%s Fahrenheit is %s Celsius':
C %char(nFahren) : %char(nCelsius))

Job log:
ParseURL Domain() Port(0)
OpenURL(www.w3schools.com:80<http://www.w3schools.com:80>)
gethostbyname(www.w3schools.com<http://www.w3schools.com>) returned 192.229.173.207
Connecting to www.w3schools.com<http://www.w3schools.com> on port 80...
SendUrlData sent 65 bytes.
SendUrlData sent 25 bytes.
SendUrlData sent 49 bytes.
SendUrlData sent 20 bytes.
SendUrlData sent 2 bytes.
SendUrlData sent 10 bytes.
HTTP/1.0 301 Moved Permanently
Closing socket 0
<html>██<head><title>301 Moved
Permanently</title></head>██<body>██<center><h1>301 Moved
Permanently</h1></center>██</body>██</html>█
The XML document does not match the RPG variable; reason code 1.
XML document does not match RPG variable (C G D F).
C


Tom Deskevich
Programmer/Analyst
P: 814-472-6066 x201134
F: 814-472-5019
E: TDeskevich@xxxxxxxxxxxxxxxxxx
172 Gateway Road PO Box 568
Ebensburg, Pennsylvania
15931
www.harrislocalgov.com
This message has been sent on behalf of a company that is part of the Harris Operating Group of Constellation Software Inc.
If you prefer not to be contacted by Harris Operating Group please notify us.

​This message is intended exclusively for the individual or entity to which it is addressed. This communication may contain information that is proprietary, privileged or confidential or otherwise legally exempt from disclosure. If you are not the named addressee, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this message in error, please notify the sender immediately by e-mail and delete all copies of the message.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.