You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by hiyer <iy...@hotmail.com> on 2006/09/13 17:25:16 UTC

Re: MTOM with XFire binding error

Hi,
I tried with the latest servicemix-3.0 distribution and still get the same
error.

org.codehaus.xfire.fault.XFireFault: Unexpected character '-' (code 45) in
prolog; expected '<'

Is this what an MTOM SOAP request looks like?

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body><getDocument
xmlns="http://webservices.sterling.com"><in0>abcd</in0></getDocument>
</soap:Body>
</soap:Envelope>
------=_Part_0_31063377.1158160888106--

Looks like the '------=_Part_0_31063377.1158160888106--' is the problem.
Cheers,

-- 
View this message in context: http://www.nabble.com/MTOM-with-XFire-binding-error-tf2142847.html#a6287819
Sent from the ServiceMix - User forum at Nabble.com.


Re: MTOM with XFire binding error

Posted by Guillaume Nodet <gn...@gmail.com>.
The XFireBinding does not support attachments, so
it can not work.

On 9/14/06, hiyer <iy...@hotmail.com> wrote:
>
> Hi,
> I am not using the jsr181 component (which uses xfire internally) but rather
> the direct servicemix xfire binding.
> So I am exposing an xfire service bean as:
>    <bean name="xfire.DocumentManagementService"
> class="org.codehaus.xfire.spring.ServiceBean">
>       <property name="xfire" ref="xfire"/>
>       <property name="serviceFactory"><ref
> bean="xfire.annotationServiceFactory"/></property>
>       <property
> name="name"><value>DocumentManagementService</value></property>
>       <property name="serviceBean" ref="documentManagementService"/>
>       <property name="properties">
>          <map>
>           <entry key="mtom-enabled" value="true"/>
>          </map>
>       </property>
>    </bean>
>
> Everything works (even xfire handlers which I use for ws-security) as long
> as I do not have mtom enabled.
> I assumed that once you can expose an xfire bean on servicemix everything
> that it supports should work.
> Is it that while xfire binding is supported on servicemix, mtom is not
> supported on this binding?
> Cheers,
> Hari.
> --
> View this message in context: http://www.nabble.com/MTOM-with-XFire-binding-error-tf2142847.html#a6309767
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: MTOM with XFire binding error

Posted by hiyer <iy...@hotmail.com>.
Hi,
I am not using the jsr181 component (which uses xfire internally) but rather
the direct servicemix xfire binding. 
So I am exposing an xfire service bean as: 
   <bean name="xfire.DocumentManagementService"
class="org.codehaus.xfire.spring.ServiceBean"> 
      <property name="xfire" ref="xfire"/> 
      <property name="serviceFactory"><ref
bean="xfire.annotationServiceFactory"/></property> 
      <property
name="name"><value>DocumentManagementService</value></property> 
      <property name="serviceBean" ref="documentManagementService"/> 
      <property name="properties"> 
         <map> 
          <entry key="mtom-enabled" value="true"/> 
         </map> 
      </property> 
   </bean> 

Everything works (even xfire handlers which I use for ws-security) as long
as I do not have mtom enabled. 
I assumed that once you can expose an xfire bean on servicemix everything
that it supports should work. 
Is it that while xfire binding is supported on servicemix, mtom is not
supported on this binding?
Cheers, 
Hari.
-- 
View this message in context: http://www.nabble.com/MTOM-with-XFire-binding-error-tf2142847.html#a6309767
Sent from the ServiceMix - User forum at Nabble.com.


Re: MTOM with XFire binding error

Posted by Guillaume Nodet <gn...@gmail.com>.
On the jsr181 SE side, MTOM is just a way to reference an attachment
in the NormalizedMessage.  Such attachments can be created from inside
the bus [1] or using servicemix-http by sending a MIME request [2]

[1] http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-jsr181/src/test/java/org/apache/servicemix/jsr181/Jsr181MTOMTest.java?view=markup
[2] http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-http/src/test/java/org/apache/servicemix/http/HttpSpringTest.java?view=markup

On 9/13/06, hiyer <iy...@hotmail.com> wrote:
>
> Hi,
> I tried with the latest servicemix-3.0 distribution and still get the same
> error.
>
> org.codehaus.xfire.fault.XFireFault: Unexpected character '-' (code 45) in
> prolog; expected '<'
>
> Is this what an MTOM SOAP request looks like?
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soap:Body><getDocument
> xmlns="http://webservices.sterling.com"><in0>abcd</in0></getDocument>
> </soap:Body>
> </soap:Envelope>
> ------=_Part_0_31063377.1158160888106--
>
> Looks like the '------=_Part_0_31063377.1158160888106--' is the problem.
> Cheers,
>
> --
> View this message in context: http://www.nabble.com/MTOM-with-XFire-binding-error-tf2142847.html#a6287819
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet