[5/6] webservices: Read message headers in read_envelope_start.

Hans Leidekker hans at codeweavers.com
Fri Apr 21 05:37:04 CDT 2017


Signed-off-by: Hans Leidekker <hans at codeweavers.com>
---
 dlls/webservices/msg.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/dlls/webservices/msg.c b/dlls/webservices/msg.c
index 9e94d7c763..ac955bd4f1 100644
--- a/dlls/webservices/msg.c
+++ b/dlls/webservices/msg.c
@@ -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 );
 }
-- 
2.11.0




More information about the wine-patches mailing list