webservices: Write the envelope in WsInitializeMessage.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hans Leidekker 2016-08-16 12:30:32 +02:00 committed by Alexandre Julliard
parent 17b4abf47f
commit 202bc2a77f
1 changed files with 24 additions and 24 deletions

View File

@ -197,30 +197,6 @@ HRESULT WINAPI WsCreateMessageForChannel( WS_CHANNEL *channel_handle, const WS_M
return create_msg( version_env, version_addr, properties, count, handle );
}
/**************************************************************************
* WsInitializeMessage [webservices.@]
*/
HRESULT WINAPI WsInitializeMessage( WS_MESSAGE *handle, WS_MESSAGE_INITIALIZATION init,
WS_MESSAGE *src_handle, WS_ERROR *error )
{
struct msg *msg = (struct msg *)handle;
TRACE( "%p %u %p %p\n", handle, init, src_handle, error );
if (error) FIXME( "ignoring error parameter\n" );
if (src_handle)
{
FIXME( "src message not supported\n" );
return E_NOTIMPL;
}
if (!handle || init > WS_FAULT_MESSAGE) return E_INVALIDARG;
if (msg->state >= WS_MESSAGE_STATE_INITIALIZED) return WS_E_INVALID_OPERATION;
msg->init = init;
msg->state = WS_MESSAGE_STATE_INITIALIZED;
return S_OK;
}
/**************************************************************************
* WsFreeMessage [webservices.@]
*/
@ -555,6 +531,30 @@ HRESULT WINAPI WsWriteBody( WS_MESSAGE *handle, const WS_ELEMENT_DESCRIPTION *de
return hr;
}
/**************************************************************************
* WsInitializeMessage [webservices.@]
*/
HRESULT WINAPI WsInitializeMessage( WS_MESSAGE *handle, WS_MESSAGE_INITIALIZATION init,
WS_MESSAGE *src_handle, WS_ERROR *error )
{
struct msg *msg = (struct msg *)handle;
TRACE( "%p %u %p %p\n", handle, init, src_handle, error );
if (error) FIXME( "ignoring error parameter\n" );
if (src_handle)
{
FIXME( "src message not supported\n" );
return E_NOTIMPL;
}
if (!handle || init > WS_FAULT_MESSAGE) return E_INVALIDARG;
if (msg->state >= WS_MESSAGE_STATE_INITIALIZED) return WS_E_INVALID_OPERATION;
msg->init = init;
msg->state = WS_MESSAGE_STATE_INITIALIZED;
return write_envelope( msg );
}
static inline void set_utf8_text( WS_XML_UTF8_TEXT *text, BYTE *bytes, ULONG len )
{
text->text.textType = WS_XML_TEXT_TYPE_UTF8;