[Progress Communities] [Progress OpenEdge ABL] Forum Post: Problem with SOAP header for a Web Service

Status
Not open for further replies.
U

untipet

Guest
Good morning, I'm trying to consume a web service that is using SOAP as a protocol. I've created the documentation with Proenv>bprowsdldoc tool to get everything defined. Now I'm trying to make a request using the desired method. I connect to the ws correctly, and I'm just calling the method passing 2 datasets as parameters. And I get an error in the soap header because it can't find n element. It seems logical to me because the documentation says: The following XML elements may be sent as SOAP headers. These fragments are accessible through the SOAP header handle. A header defined as an ETGHeader element in the 'X' namespace. This header can also be represented as a ProDataSet (see below). If the ProDataSet has been defined, it can be serialized using the WRITE-XML() method on its handle. The resulting document can then be used to create the request header. So I try to create the SOAP header with the xml given for the company as example with my auth data. Try with SoapUI and it works fine, so there are no problems with the xml. Then I move the same xml to Progress: CREATE SOAP-HEADER hHeader. CREATE SOAP-HEADER-ENTRYREF hHeaderEntryref. hHeader:ADD-HEADER-ENTRY(hHeaderEntryref). hXDoc:LOAD('FILE', 'C:\Test\HEADER.XML', false). hXDoc:ENCODING= "UTF-8". hXDoc:SAVE('LONGCHAR', cLongChar). hHeaderEntryref:set-serialized(cLongChar). And set the header for the ws request: hPort:SET-CALLBACK-PROCEDURE ("REQUEST-HEADER", 'ReqHandler'). When call the mehod again, all I get is this error message that I don't know how to debug. I don't have access to the header that is being created so I can't check what I'm sending. I've tryed to create the header loading an xml as I wrote above, and filling a dataset structure and attaching it to the hHeaderEntryref element. In both cases I'm getting the error. Any idea about what is happening or how can I debug the header? Thanks in advance.

Continue reading...
 
Status
Not open for further replies.
Top