Thanks for your help Larry! Thanks,
Steve Long Spyderweb Technical Services, Inc. (360) 687-8797 Washington (503) 406-8797 Oregon (866) 354-5913 Fax -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock Sent: Wednesday, July 27, 2011 12:21 PM To: 'U2 Users List' Subject: Re: [U2] SOAP Header It's been a while since I've created one, but IIRC, the easiest way is to use UniAdmin to create a CSR, then a self-signed certificate (or you can purchase a cert using the CSR) and the security context. Check out the UniData Security Features guide at http://www.rocketsoftware.com/u2/products/unidata/resources/manuals/secu rity -v7r2.pdf/view Larry Hiscock Western Computer Services -----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 11:57 AM To: U2 Users List Subject: Re: [U2] SOAP Header Thanks Larry. I think we need to try the secureRequest, but I haven't messed with the setup. I see you are doing loadSecurityContext. How did you create the context? Via the saveSecurityContext? Thanks, Steve Long Spyderweb Technical Services, Inc. (360) 687-8797 Washington (503) 406-8797 Oregon (866) 354-5913 Fax -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock Sent: Wednesday, July 27, 2011 11:47 AM To: 'U2 Users List' Subject: Re: [U2] SOAP Header Here's an example of one we're using to validate mailing addresses (the indentation is just for readability): * Build the SOAP request SoapBody = '<?xml version="1.0" encoding="UTF-8"?>' SoapBody := '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' SoapBody := ' xmlns:xsd="http://www.w3.org/2001/XMLSchema"' SoapBody := ' xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' SoapBody := ' <soap:Body>' SoapBody := ' <':Method:' xmlns="':NameSpace:'">' SoapBody := ' <request>' SoapBody := ' <Addresses>' SoapBody := ' <AddressRequest>' SoapBody := ' <Addressee>':ADDRESSEE:'</Addressee>' SoapBody := ' <Street>':ADDRESS:'</Street>' SoapBody := ' <Street2>':ADDRESS2:'</Street2>' SoapBody := ' <City>':CITY:'</City>' SoapBody := ' <State>':STATE:'</State>' SoapBody := ' <ZipCode>':ZIPCODE:'</ZipCode>' SoapBody := ' <LastLine>':LASTLINE:'</LastLine>' SoapBody := ' </AddressRequest>' SoapBody := ' </Addresses>' SoapBody := ' <Suggestions>':MaxSugg:'</Suggestions>' SoapBody := ' </request>' SoapBody := ' </':Method:'>' SoapBody := ' </soap:Body>' SoapBody := '</soap:Envelope>' * Load the security context RtnVal = loadSecurityContext(Context, "ContextName", "password") * Create the Request RtnVal = SOAPCreateSecureRequest(SoapURL, SoapAction, SoapReq, Context) * Set up the Request Content RtnVal = SOAPSetRequestContent(SoapReq, SoapBody, 1) * Submit the Request RtnVal = SOAPSubmitRequest(SoapReq, Timeout, RespHeaders, RespData, SoapStatus) There's obviously more error trapping in the live version, but I stripped it out for this example just to show the process flow. SoapURL contains the URL to the web service (https://.../VerifyService.asmx), and SoapAction, NameSpace and Method contain the appropriate data specified in the WSDL. The Response headers and data are returned in RespHeaders and RespData respectively. Hope this helps... Larry Hiscock Western Computer Services -----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 11:23 AM To: U2 Users List Subject: Re: [U2] SOAP Header Thanks Larry. They are on 7.2. Currently we are using the SOAPCreateRequest, SOAPSetRequestContent, and SOAPSubmitRequest functions only. I would like to avoid adding the header info to the SOAP body if possible, but if not, how did you do it? Did you surround it by the <Header> tags or did you just put the info at the beginning of the body? Thanks, Steve Long Spyderweb Technical Services, Inc. (360) 687-8797 Washington (503) 406-8797 Oregon (866) 354-5913 Fax -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock Sent: Wednesday, July 27, 2011 9:32 AM To: 'U2 Users List' Subject: Re: [U2] SOAP Header Hi Steve, What version of UD and on what platform? The reason I ask is that we have a client that is stuck on UD v6.1 for the time being (because they're on SCO OpenServer). At that rev and on that platform, we ran into issues using some of the SOAP functions. We were able to work around it, but only ended up using the SOAPCreateSecureRequest(), SOAPSetRequestContent() and SOAPSubmitRequest() functions. We built our own SOAP headers into the SOAP body that is passed to SOAPSetRequestContent(). You might also try turning on Protocol Logging. It does give some mostly useful information about exactly where your SOAP transaction is failing. VAR = protocolLogging("/path.../soapprotocol.log", "ON", 7) Larry Hiscock Western Computer Services PH: 661-255-0235 -----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? Thanks in advance! Thanks, Steve Long Spyderweb Technical Services, Inc. (360) 687-8797 Washington (503) 406-8797 Oregon (866) 354-5913 Fax _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users