webservices: Read message headers in read_envelope_start.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hans Leidekker 2017-04-21 12:37:04 +02:00 committed by Alexandre Julliard
parent 0ab53b3f91
commit 31b0d5fab8
1 changed files with 10 additions and 1 deletions

View File

@ -758,12 +758,21 @@ static BOOL match_current_element( WS_XML_READER *reader, const WS_XML_STRING *l
static HRESULT read_envelope_start( WS_XML_READER *reader )
{
static const WS_XML_STRING envelope = {8, (BYTE *)"Envelope"}, body = {4, (BYTE *)"Body"};
static const WS_XML_STRING header = {6, (BYTE *)"Header"};
HRESULT hr;
if ((hr = WsReadNode( reader, NULL )) != S_OK) return hr;
if (!match_current_element( reader, &envelope )) return WS_E_INVALID_FORMAT;
/* FIXME: read headers */
if ((hr = WsReadNode( reader, NULL )) != S_OK) return hr;
if (match_current_element( reader, &header ))
{
for (;;)
{
/* FIXME: store headers */
if ((hr = WsReadNode( reader, NULL )) != S_OK) return hr;
if (match_current_element( reader, &body )) break;
}
}
if (!match_current_element( reader, &body )) return WS_E_INVALID_FORMAT;
return WsReadNode( reader, NULL );
}