BizTalk Server General - Re: SubmitDirect from web service gets Exception from HRESULT: 0xC

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > March 2006 > Re: SubmitDirect from web service gets Exception from HRESULT: 0xC





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: SubmitDirect from web service gets Exception from HRESULT: 0xC
Tomas Restrepo \(MVP\)

2006-03-25, 11:37 am

> Well, here's an interesting twist to the story :-)
> I changed the parameter to the webservice from XmlDocument to "string".
> And
> instead of doing --> XmlDocObj.Save(streamObj),
> I'm using -->
> MemoryStream fileStream = new
> MemoryStream(System.Text.Encoding.UTF8.GetBytes(strDocContent));
>
> And that solved it and its now working! I checked for a UTF-16 encoding
> and
> I didn't find any property for UTF-16 in Encoding class.


It's actually Encoding.Unicode

Now that I think about it, the problem might just be that you were not
rewinding the stream after writing to it!
MemoryStream fileStream = new MemoryStream();
doc.Save(fileStream);
fileStream.Position = 0;


--
Tomas Restrepo
tomasr@mvps.org
http://www.winterdom.com/


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com