If you're unable to get this working using the native UD method you can
probably do it via the cURL program at the OS level.  It's available for
a wide variety of platforms and should already be installed if you're on
linux:

http://curl.haxx.se/download.html

I've used cURL to interact with many web services from within UV
including an SSL SOAP service.  You specify the SSL header data for cURL
with an individual -H option for each line in the header.  Here's some
example code from a program that validates international addresses:

0053:       URL =
'https://validator2.addressdoctor.com/addInteractive/Interact
 ive.asmx?WSDL'
0054:       HDR = 'POST /addInteractive/Interactive.asmx HTTP/1.1'
0055:       HDR<-1> = 'Host: validator2.addressdoctor.com'
0056:       HDR<-1> = 'Content-Type: text/xml; charset=utf-8'
0057:       HDR<-1> = 'Content-Length: '
0058:       HDR<-1> = 'SOAPAction:
\"http://validator2.AddressDoctor.com/addInt
 eractive/Interactive/Validate\"'
0059:       XML.REQ = "<?xml version='1.0' encoding='utf-8'?>"
0060:       XML.REQ := "<soap:Envelope
xmlns:xsi='http://www.w3.org/2001/XMLSch
 ema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:soap='ht
 tp://schemas.xmlsoap.org/soap/envelope/'>"
0061:       XML.REQ := "<soap:Body>"
0062:       XML.REQ := "<Validate
xmlns='http://validator2.AddressDoctor.com/ad
 dInteractive/Interactive'>"

etc., etc.

0123:          WRITE XML.REQ ON FILE.TMP, REQ.ID
0124:          EXEC.STR = 'LANG=en_US.UTF-8; LANGUAGE=en_US.UTF-8;'
0125:          EXEC.STR := 'export LANG LANGUAGE; '
0126:          EXEC.STR := 'curl --connect-timeout 10'
0127:          EXEC.STR := ' --max-time 10'
0128:          FOR I = 1 TO DCOUNT(HDR, @AM)
0129:             IF INDEX(HDR<I>,'Content-Length:',1) THEN
0130:                HDR<I> := LEN(XML.REQ)
0131:             END
0132:             EXEC.STR := ' -H "':HDR<I>:'"'
0133:          NEXT I
0139:          EXEC.STR := ' --silent'
0140:          EXEC.STR := ' -d @/tmp/':REQ.ID:' -k ':URL
0141:          EXECUTE "SH -c '":EXEC.STR:"'", OUT > XML.RESP
0142:          DELETE FILE.TMP, REQ.ID

-John

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Steve Long
Sent: Wednesday, July 27, 2011 9:05 AM
To: U2 Users List
Subject: [U2] SOAP Header

Hi All -

 

I am using the Unidata functionality to do SOAP calls and I now need to
specify header information to call a SSL page.  It is failing because
there is not info in the header.  The documentation is very sparse on
this, as you all know.  Anyone have any insight on how to specify header
info using the SOAPSetRequestHeader function?
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to