You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by digibeb <er...@digitech.fr> on 2010/02/25 18:10:38 UTC
Force MTOM Fault
Hi,
I use CXF to provide web service and one of my class is MTOM enabled :
<jaxws:endpoint id="MyService"
implementor="beb.ws.provider.impl.MyService"
address="/MyService">
<jaxws:properties>
<entry key="mtom-enabled" value="true" />
</jaxws:properties>
</jaxws:endpoint>
All the soap response received from this web service has the following
content-type "application/xop+xml"
The problem is when i throw exception in my web method.
An exception is sent and transformed as Soap Fault but the soap response
doesn't have anymore MTOM content-type "application/xop+xml" but
"text/xml;charset=UTF-8"
The client which consume my webservice is coded in .NET (WSE 3) and display
an error because it expect "application/xop+xml" instead of
"text/xml;charset=UTF-8"
There is a solution with interceptor or something like that?
Thanks in advance
--
View this message in context: http://old.nabble.com/Force-MTOM-Fault-tp27714482p27714482.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Force MTOM Fault
Posted by Daniel Kulp <dk...@apache.org>.
You MAY be able to add the AttachmentOutInterceptor to the FaultOut chain as
well. I think it's normally just on the Out chain cause, as Glen said, it
shouldn't be required for faults.
Dan
On Thu February 25 2010 12:10:38 pm digibeb wrote:
> Hi,
>
> I use CXF to provide web service and one of my class is MTOM enabled :
>
> <jaxws:endpoint id="MyService"
> implementor="beb.ws.provider.impl.MyService"
> address="/MyService">
> <jaxws:properties>
> <entry key="mtom-enabled" value="true" />
> </jaxws:properties>
> </jaxws:endpoint>
>
> All the soap response received from this web service has the following
> content-type "application/xop+xml"
>
> The problem is when i throw exception in my web method.
> An exception is sent and transformed as Soap Fault but the soap response
> doesn't have anymore MTOM content-type "application/xop+xml" but
> "text/xml;charset=UTF-8"
>
> The client which consume my webservice is coded in .NET (WSE 3) and display
> an error because it expect "application/xop+xml" instead of
> "text/xml;charset=UTF-8"
>
> There is a solution with interceptor or something like that?
>
> Thanks in advance
--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog
Re: Force MTOM Fault
Posted by Glen Mazza <gl...@gmail.com>.
I'm unsure, but I think the web service provider is behaving correctly here
(per spec) in throwing SOAP faults with the text/xml MIME type. I would
think the SOAP client needs to trap such an "error", and once it gets it,
goes ahead and outputs/logs whatever the text/xml error message is.
Glen
digibeb wrote:
>
> Hi,
>
> I use CXF to provide web service and one of my class is MTOM enabled :
>
> <jaxws:endpoint id="MyService"
> implementor="beb.ws.provider.impl.MyService"
> address="/MyService">
> <jaxws:properties>
> <entry key="mtom-enabled" value="true" />
> </jaxws:properties>
> </jaxws:endpoint>
>
> All the soap response received from this web service has the following
> content-type "application/xop+xml"
>
> The problem is when i throw exception in my web method.
> An exception is sent and transformed as Soap Fault but the soap response
> doesn't have anymore MTOM content-type "application/xop+xml" but
> "text/xml;charset=UTF-8"
>
> The client which consume my webservice is coded in .NET (WSE 3) and
> display an error because it expect "application/xop+xml" instead of
> "text/xml;charset=UTF-8"
>
> There is a solution with interceptor or something like that?
>
> Thanks in advance
>
>
--
View this message in context: http://old.nabble.com/Force-MTOM-Fault-tp27714482p27715138.html
Sent from the cxf-user mailing list archive at Nabble.com.