Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Need help for WSE 3.0 exception WSE839

605 views
Skip to first unread message

my name

unread,
Jun 20, 2006, 4:39:10 AM6/20/06
to
I'm using MS WSE 3.0. I'm unable to call my webservices because I get
the folllowing exception:

System.FormatException : WSE839: An HTTP response was received that used
the following content type: text/xml; charset=utf-8. The following
content type was expected: multipart/related; type=application/xop+xml.

I'm not able to interpret the error. Has anyone an idea?


*** Sent via Developersdex http://www.developersdex.com ***

Martin Kulov [MVP]

unread,
Jun 20, 2006, 6:44:22 PM6/20/06
to
"my name" <schmi...@web.de> wrote in message
news:%23HdgBUE...@TK2MSFTNGP03.phx.gbl...

> I'm using MS WSE 3.0. I'm unable to call my webservices because I get
> the folllowing exception:
>
> System.FormatException : WSE839: An HTTP response was received that used
> the following content type: text/xml; charset=utf-8. The following
> content type was expected: multipart/related; type=application/xop+xml.
>
> I'm not able to interpret the error. Has anyone an idea?
>

I think your service is set to use MTOM encoding (MTOM is set to Always)
while the client is set to Optional. Since it is the client that makes the
first request it does not optionally turns on the MTOM encoding but your
service method requires it. You can programatically set MTOM enconding to On
when you call this particular method.

Look here:
http://www.ftponline.com/vsm/2006_05/magazine/columns/gettingstarted

HTH,

--
Martin Kulov
http://www.codeattest.com/blogs/martin

MVP, MCT, MCSD, MCPD

patro

unread,
Feb 14, 2009, 10:33:14 AM2/14/09
to
i,

I am struggling invoke an Axis2 Web Service with MTOM implementation. The service replies with plain (NO MTOM) responses. When i tried to invoke the service with .NET 2.0 client With WSE 3.0 client .
I get the Exception." WSE839: An HTTP response was received that used the following content type: application/soap+xml; charset="utf-8". The following content type was expected: multipart/related; type=application/xop+xml."
It seems .net client unable to understand the response.Though i googled a lot i am not finding any useful.
Please anybody help me.

NOTE:We can use some wrapper classes to convert the response.could you please the wrapper class.


Thanks,
Patro

From http://www.google.com/custom?hl=en&client=pub-2808051115066427&cof=FORID:11;AH:left;CX:IE7Pro%2520Start%2520page%2520for%2520Google;L:http://www.google.com/coop/intl/en-US/images/custom_search_sm.gif;LH:65;LP:1;VLC:%23551A8B;DIV:%23EEEEEE;&ad=w9&cx=008447228955881904796:lhebs1be2x4&adkw=AELymgWe4HXwuozD9uNzu67ACOpEdh4U8H9DhwiPrStHFdcShaPMdkMOTg4FB3vaOvwuvMAzNheFZpYdassdrf-bjdIaUnwlRSKHpJDe4Ho02lPKZz1VDPU&rurl=http://search.orbitdownloader.com/result.php?type=1&cx=008447228955881904796%253Alhebs1be2x4&cof=FORID%253A11&ie=UTF-8&q=mtom%252Bwse3%252Bwse839&sa=Search&google_rsg=__OjX-k-Y-dFERsvtTb715Lo4F_NU=&q=mtom+wse3+wse839&start=10&sa=N

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/

Darren DeLoach

unread,
Dec 4, 2009, 7:29:15 PM12/4/09
to
Found a simple workaround for this problem today. Define a new class that inherits from your WSE3 proxy object with a single override method:

using System.Net;
class MyNewWebServiceProxy : MyWSE3GeneratedProxyClass
{
protected override WebResponse GetWebResponse(WebRequest request)
{
WebResponse response = base.GetWebResponse(request);
// if the response is non-MTOM like a SOAP fault, tell the proxy
// we don't really need MTOM
if (response.Headers[HttpResponseHeader.ContentType].ToLower().StartsWith("text/xml"))
{
this.RequireMtom = false;
}

return response;
}
}

The gotcha is you need to remember to reset the RequireMtom on the proxy before making another call on the same instance back to true if the method needs MTOM.

From http://www.developmentnow.com/g/28_2009_2_0_0_774961/Need-help-for-WSE-3-0-exception-WSE839.htm

Alessandro

unread,
Feb 19, 2010, 8:11:43 AM2/19/10
to
It works...thank you!

Jon T

unread,
Jul 20, 2010, 2:33:44 PM7/20/10
to
You are the Man !!!!!!!!!! Many Thanks
0 new messages