Hi Jason - I find the best way to debug these is to turn protocol logging on


At the top of the program put something like
res=protocolLogging("SymTest.log","ON",10)
and at the bottom
res=protocolLogging("SymTest.log","OFF",10)

The file SymTest.log will then contain detail of the connections and the
messages going back and forth.

FYI the recent https programs i have done have done the following :-

generateKey
createCertRequest
createCertificate
createSecurityContext
addCertificate
addAuthenticationRule
setAuthenticationDepth
createSecureRequest
setRequestHeader
submitRequest


On 10/01/07, Jason Lin <[EMAIL PROTECTED]> wrote:
>
> Hi all.
>
> Does anyone has a sample program that demonstrate how to
> submit a http request over secured connection?
>
> I was able to write a program to submit SOAP requests over regular HTTP
> connection but when I modify it to use secured connection it failed.
>
> Without going into the detail of the SOAP XML, below is a listing of
> functions calls used by my test programs:
>
> Program 1 for regular HTTP:
> Ret = setHTTPDefault("VERSION", "1.1")
> Ret = setHTTPDefault("HEADERS", '')
> Ret = createRequest(URL, "POST", HTTPReq)
> Ret = setRequestHeader(HTTPReq, 'Conten-Type', 'text/xml; charset=utf-8')
> Ret = setRequestHeader(HTTPReq, 'Content-Length', LEN(POST_DATA))
> Ret = setRequestHeader(HTTPReq, 'SOAPAction', QUOTE(SOAPAction))
> Ret = submitRequest(HTTPReq, Timeout, POST_DATA, RESPONSE_HEADER,
> RESPONSE_DATA, HTTP_STATUS)
>
> Program 2 for secured HTTP:
> Ret = setHTTPDefault("VERSION", "1.1")
> Ret = setHTTPDefault("HEADERS", '')
> Ret = createSecurityContext(SecurityContext, "TLSv1")
> Ret = createSecureRequest(URL, 'POST', HTTPReq, SecurityContext)
> Ret = setRequestHeader(HTTPReq, 'Conten-Type', 'text/xml; charset=utf-8')
> Ret = setRequestHeader(HTTPReq, 'Content-Length', LEN(POST_DATA))
> Ret = setRequestHeader(HTTPReq, 'SOAPAction', QUOTE(SOAPAction))
> Ret = submitRequest(HTTPReq, Timeout, POST_DATA, RESPONSE_HEADER,
> RESPONSE_DATA, HTTP_STATUS)
>
> As you can see, the second program for secured HTTP conection
> added a call to "createSecurityContext" and replaced "createRequest" with
> "createSecureRequest".   However, the first program works but the second
> program does not.  The "submitRequest" call in the second program returns
> status code 3 which indicates network error.
>
> I don't think I need to deal with security certificates or authentication
> rules because IBM Universe's documentation indicates that submiting
> requests
> as a client does not require certificate or authentication (unless the
> server requires certificates for handshakes) and the default setting has
> authentication set to off.
>
> It would be appreciated if anyone can point me in the right direction to
> get my program working.
>
> Thank you.
> Jason
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to