When I send a specific soap request with an added header I get
Error sending Web Service Request: HeaderEntry does not contain a local name or namespace URI (11767).
The knowledgebase doesn't say anything in perticular about this.
This is my code for adding the header:
PROCEDURE requestHeader:
DEFINE OUTPUT PARAMETER hSOAPHeader AS HANDLE.
DEFINE INPUT PARAMETER cOperationNamespace AS CHARACTER.
DEFINE INPUT PARAMETER cOperationLocalName AS CHARACTER.
DEFINE OUTPUT PARAMETER lDeleteOnDone AS LOGICAL.
DEFINE VARIABLE hTmpSoapHeader AS HANDLE NO-UNDO.
DEFINE VARIABLE hSoapHeaderRef AS HANDLE NO-UNDO.
DEFINE VARIABLE hSessionDoc AS HANDLE NO-UNDO.
DEFINE VARIABLE hSessionNode AS HANDLE NO-UNDO.
DEFINE VARIABLE hSessionValue AS HANDLE NO-UNDO.
CREATE SOAP-HEADER hTmpSoapHeader.
CREATE SOAP-HEADER-ENTRYREF hSoapHeaderRef.
CREATE X-DOCUMENT hSessionDoc .
CREATE X-NODEREF hSessionNode.
CREATE X-NODEREF hSessionValue.
hTmpSoapHeader:ADD-HEADER-ENTRY(hSoapHeaderRef).
hSessionDoc:CREATE-NODE(hSessionNode, "SessionID", "ELEMENT").
hSessionDoc:CREATE-NODE(hSessionValue, "", "TEXT").
hSessionValue:NODE-VALUE = cSessionID.
hSessionNode:APPEND-CHILD( hSessionValue ).
hSoapHeaderRef:SET-NODE(hSessionNode).
hSoapHeader = hTmpSoapHeader.
END PROCEDURE.
This is how the header should look:
As I understand this error the part xmlns="http://webservices.amadeus.com/definitions" is missing. And according to progress documentation the NAMESPACE-URI cannot be set but only read on soap-header-entryref object. What am I missing?
I've found out that replacing
hSessionDoc:CREATE-NODE(hSessionNode, "SessionID", "ELEMENT").
with
hSessionDoc:CREATE-NODE-NAMESPACE(hSessionNode, "http://webservices.amadeus.com/definitions", "SessionID", "ELEMENT").
takes away the error message but something is still wrong. How can I verify how the header really looks?
You can look at the SOAP messages using the SOAP Spy tool. Start the ABL client with -proxyhost localhost -proxyport 4444. Run SOAP Spy from a proenv session with the 'prosoapview' command then start spying with Spy->Start Spying. The SOAP messages will now go through SOAP Spy and get forwarded to the Web service.
Thanks a bunch!
I managed to work around this by getting the soap-header handle from the Signin response and just applying it to the following requests.
Nice to know that there's a SOAP Spy in progress though - I've been searching for one....
Hi,
Is it SOAP SPY or SPY SOAP, the software you mention in your reply? A Google search returns some untrusted Web sites plenty of Spy SOAP but none with the SOAP Spy. I just dodn't want to download the wrong software.
Thanks.
Salvo
Hi Salvatore,
I was referring to the SOAP Spy tool that comes with an OpenEdge installation. You can get to it with the 'prosoapview' command in a proenv window. I have also used the Trace utility from the Microsoft SOAP Toolkit 3.0, and colleagues of mine use TCPMonitor available for download from Apache.
Regards,
Robin
http://communities.progress.com/pcom/message/71459#71459
Thanks Robin.
I now understand. I don't have OpenEdge installed but I use wsi-test-tools, which I believe provides similar features. Anyway, good to know it.
Regards.
Salvo