# REQUEST DOCUMENT with Proxy

**URL:** <https://techcommunity.softwareag.com/t/request-document-with-proxy/76570>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-Web-and-XML-Technology\
**Created:** [April 18, 2008, 2:06am UTC](https://techcommunity.softwareag.com/t/request-document-with-proxy/76570 "2008-04-18T02:06:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andy\_Engels](https://avatars.discourse-cdn.com/v4/letter/a/3bc359/32.png) [@Andy\_Engels](https://techcommunity.softwareag.com/u/Andy_Engels)\
**Post date:** [April 18, 2008, 2:06am UTC](https://techcommunity.softwareag.com/t/request-document-with-proxy/76570/1 "2008-04-18T02:06:35Z")

</div>

We are attempting to access the web from NAT 4.2.4 PL1 on a mainframe. We can see internal services but as soon as we need to go outside, we hit proxy problems. We cannot figure out how to log on to the proxy server so we can get out.  
We have tried logging on with various credentials:  
REQUEST DOCUMENT FROM #alice-uri  
WITH  
HEADER  
NAME ‘Proxy-Authorization’ VALUE #credentials  
RETURN  
HEADER ALL #HDR  
PAGE #A  
ENCODED IN CODEPAGE ‘UTF-8’  
RESPONSE #RESP

Where #alice-uri is “[http://IP](http://IP) of our proxy:port” and #credentials is “userid,password”.

This gets HTTP 400, bad request, from Alice.

We have also tried just going to a web site with the user and password in the header:  
#XMLURI := ‘[HTTP://www.imrf.org](HTTP://www.imrf.org)’

- request the html page  
REQUEST DOCUMENT FROM #XMLURI  
WITH USER ‘andy-e’  
PASSWORD #password  
RETURN  
PAGE XMLDATA ENCODED CODEPAGE ’ ’  
RESPONSE #RC  
This gets HTTP 403 from Alice (our proxy server)

Does anyone else have this working? Cross-posting on SAG-L

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [April 18, 2008, 11:03pm UTC](https://techcommunity.softwareag.com/t/request-document-with-proxy/76570/2 "2008-04-18T23:03:21Z")

</div>

what is your XML parameter (either dynamically or in NATPARM) set to - do you have RDP, RDPPORT and RDNOP set?

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [April 18, 2008, 11:39pm UTC](https://techcommunity.softwareag.com/t/request-document-with-proxy/76570/3 "2008-04-18T23:39:15Z")

</div>

Also, have you tried:

```auto
 
REQUEST DOCUMENT FROM #XMLURI
WITH HEADER
   NAME 'Proxy-Authorization' VALUE #credentials
RETURN
  PAGE XMLDATA ENCODED CODEPAGE ' '
  RESPONSE #RC 
```

---

<div class="post-metadata">

**Author:** ![Andy\_Engels](https://avatars.discourse-cdn.com/v4/letter/a/3bc359/32.png) [@Andy\_Engels](https://techcommunity.softwareag.com/u/Andy_Engels)\
**Post date:** [April 19, 2008, 1:01am UTC](https://techcommunity.softwareag.com/t/request-document-with-proxy/76570/4 "2008-04-19T01:01:39Z")

</div>

If you look at my example, yes, we tried that format of RD several times and several ways calling the proxy directly with credentials.

This is how I’m starting NATURAL under CICS:natl XML=(ON,RDP=‘10.50.1.2’,RDPPORT=8080,RDNOP=‘\*.imrf.org’,RDOC=ON,PARSE=ON)

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [April 19, 2008, 1:28am UTC](https://techcommunity.softwareag.com/t/request-document-with-proxy/76570/5 "2008-04-19T01:28:33Z")

</div>

Yes, but your examples don’t show calling the external address with Proxy-Authorization header. Your RDNOP will exclude passing addresses to \*.imrf.org by the proxy server, so if your “external” address is “[www.imrf.org](http://www.imrf.org)”, then your RDNOP says not to send it via the proxy server.

With sites specified by RDNOP, you shouldn’t have to log on to the proxy server; to get to other sites (not included in the RDNOP mask) will have to use Proxy-Authorization. If you have to log on to the proxy server in all cases, then don’t specify RDNOP.

---

<div class="post-metadata">

**Author:** ![Andy\_Engels](https://avatars.discourse-cdn.com/v4/letter/a/3bc359/32.png) [@Andy\_Engels](https://techcommunity.softwareag.com/u/Andy_Engels)\
**Post date:** [April 19, 2008, 3:01am UTC](https://techcommunity.softwareag.com/t/request-document-with-proxy/76570/6 "2008-04-19T03:01:51Z")

</div>

Except it doesn’t. If I have the RDNOP stuff specified, I can’t access anything without authenticating against the proxy.  
It did not occur to me to combine the header information into one call. I did and now I get a 407:  
#RESP: 407  
#HDR: HTTP/1.0 407 Proxy Authentication Required?Server: Squid/2.4.STABLE6?  
Mime-Version: 1.0?Date: Fri, 18 Apr 2008 21:37:58 GMT?Content-Type: text/html?  
Content-Length: 955?Expires: Fri, 18 Apr 2008 21:37:58 GMT?X-Squid-Error: ERR\_  
CACHE\_ACCESS\_DENIED 0?Proxy-Authenticate: Basic realm=“Squid proxy-caching web  
server”?X-Cache: MISS from [alice.imrf.org?Proxy-Connection:](http://alice.imrf.org?Proxy-Connection:) close??

?ERROR: Cache Access Denied???
# ERROR
?
## Cache Access Denied
?
* * *
?

?While trying to retrieve the URL:?http://www.aje826.net?

?The following error was encountered:?

?- ? **?Cache Access Denied.?\</** 

**THIS IS THE CODE:**

 
  **- build authentication information  
compress ‘andy-e,’ #password into #credentials leaving no space  
\*\*  
REQUEST DOCUMENT FROM #URI  
WITH  
HEADER  
NAME ‘Proxy-Authorization’ VALUE #credentials  
NAME ‘Request-Method’ VALUE ‘POST’  
DATA  
NAME ‘StockSymbol’ VALUE ‘MSFT’  
NAME ‘LicenseKey’ VALUE ‘0’  
RETURN  
HEADER ALL #HDR  
PAGE #A  
ENCODED IN CODEPAGE ‘ISO-8859-1’  
RESPONSE #RESP**

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [April 19, 2008, 4:16am UTC](https://techcommunity.softwareag.com/t/request-document-with-proxy/76570/7 "2008-04-19T04:16:44Z")

</div>

hmm - just to cross off the obvious item: the password is probably case sensitive, so you are inputting it in lower case, yes?

Since you are now getting a response from the proxy server, can you check on the proxy logs to see why it didn’t let you through?

also - try a colon “:” as the credentials separator (between userid and password) instead of a comma.

---

<div class="post-metadata">

**Author:** ![Andy\_Engels](https://avatars.discourse-cdn.com/v4/letter/a/3bc359/32.png) [@Andy\_Engels](https://techcommunity.softwareag.com/u/Andy_Engels)\
**Post date:** [May 16, 2008, 9:42pm UTC](https://techcommunity.softwareag.com/t/request-document-with-proxy/76570/8 "2008-05-16T21:42:28Z")

</div>

We tried to capture some information in the proxy logs but couldn’t find anything. I’m not sure why. I think they have some of the logging turned off. I got sidetracked by NATURAL for Eclipse so I haven’t been pressing this one. The person I need to get involved is busy through next week so I’m thinking right after Memorial Day we’ll be trying this again.  
Thanks…

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:49pm UTC](https://techcommunity.softwareag.com/t/request-document-with-proxy/76570/9 "2021-04-02T14:49:22Z")

</div>


