Martin,
I am facing one more challenge in this. Please advise.
My requirement is I am trying to display document page using URL thru web browser.. My authenticate token is correct. but, i am getting XML output as "bad request"
my Acu cobol program
Identification division.
Program-id. avcm-program1.
Data division.
Working-storage section.
01 CMD-LINE pic X(300).
01 EXIT-STATUS pic x(2).
01 request-payload usage pointer.
01 response-payload usage pointer.
01 response-status pic 9(3) value zero.
01 response-status-2 pic 9(3) value zero.
01 response-len pic s9(4).
01 request-len pic s9(4).
01 a-single-char pic x.
copy "lixmlall.cpy".
01 Desired-SOAP-Action.
05 FILLER PIC X(10) VALUE 'SOAPAction'.
05 FILLER PIC X VALUE x"00".
05 FILLER PIC X(56) VALUE
"">harlandfs/.../GetURLByDocumentIDs".
05 FILLER PIC X VALUE x"00".
78 Post-Address VALUE
"https://px-demo.avcm.esvccenter.com/services/wse/delivery.a
- "smx".
78 Content-Type value "text/xml; charset=utf-8".
linkage section.
01 http-response pic x(100).
procedure division.
main.
XML INITIALIZE
if not XML-OK go to z.
XML GET TEXT
request-payload
request-len
"avcm-request-frm-cobol1.xml"
IF NOT XML-OK GO TO Z.
call "NetInit"
giving
response-status.
CALL "NetSSLVerifyPeer" USING 0
call "HttpPost"
using
Post-Address
Content-Type
request-payload
request-len
response-payload
response-len
Desired-SOAP-Action
giving
response-status.
set address of http-response to response-payload.
display "Response: ", response-status.
if not response-status = 0
call "NetGetError" using response-payload response-len
giving response-status-2
set address of http-response to response-payload
display "Error! ", response-status
display "Error message: ", http-response(1:response-len)
call "NetFree" using response-payload
go to z
end-if.
XML FREE TEXT
request-payload.
if response-payload = NULL
display "Error: NULL pointer returned", line 10, blink
accept a-single-char prompt
go to z
end-if.
XML PUT TEXT
response-payload
response-len
"CMD-LINE"
if not XML-OK go to z.
CALL "C$SYSTEM"
USING CMD-LINE
GIVING EXIT-STATUS.
call "NetFree"
using
response-payload.
call "NetCleanup"
GOBACK.
z.
copy "lixmltrm.cpy".
display "finished.", line 20 position 5.
accept a-single-char prompt tab.
stop run.
copy "lixmldsp.cpy".
=============
=============
=============
my Input xml file
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sear="">harlandfs/.../">
<soapenv:Header>
<sear:AuthTicket>
<!--Optional:-->
<sear:AuthenticatedTicket>29cc8928-feb6-4f7f-8e70-ed56153d80f2</sear:AuthenticatedTicket>
</sear:AuthTicket>
</soapenv:Header>
<soapenv:Body>
<sear:GetURLByDocumentIDs>
<!--Optional:-->
<sear:DocumentIds>
<!--Zero or more repetitions:-->
<sear:int>658405</sear:int>
</sear:DocumentIds>
<!--Optional:-->
<sear:DocumentRequest>
<!--Optional:-->
<sear:Parameters>
<!--Zero or more repetitions:-->
<sear:DeliveryParameter>
<!--Optional:-->
<sear:Section>Format</sear:Section>
<!--Optional:-->
<sear:Name>Description</sear:Name>
<!--Optional:-->
<sear:Value>PDF</sear:Value>
</sear:DeliveryParameter>
</sear:Parameters>
</sear:DocumentRequest>
</sear:GetURLByDocumentIDs>
</soapenv:Body>
</soapenv:Envelope>
my output is below.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request</h2>
<hr><p>HTTP Error 400. The request is badly formed.</p>
</BODY></HTML>