You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Ma...@t-systems.com on 2008/08/14 15:18:24 UTC

Axis 1.4 and MTOM

Hi group,

 

I am currently trying to implement an axis 1.4 web service (with a
client) with attachments using MTOM.

 

Somewhere it was said, that this is also possible with axis 1.4. But
unfortunately I don't get it working. I'm sending the attachments from
the server side via MTOM, but I can't receive them on the client.

The problem seems to be on the client side. On the client I get this
error: [#text: Error in parsing mime data stream:  null

I included the stacktrace and the response message as attachments.

 

My questions:

*         Is it possible to implement a Web Service with Attachments
using MTOM and Axis 1.4?

*         Do I have to tell the client somehow that MTOM is being used?

*         Can you provide some help to my issue?

 

The future plan is to migrate to axis2, but this would take too long for
my current issue.

Hopefully waiting for your answers.

 

Matthias.


RE: Axis 1.4 and MTOM

Posted by Martin Gainty <mg...@hotmail.com>.
your webapp's  pom.xml build script should have this dependency
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-mtompolicy</artifactId>
            <version>${version}</version>
        </dependency>

startup axis2.xml
 <parameter name="enableMTOM">true</parameter>

$AXIS_HOME/lib should contain
axis2-mtompolicy-1.4.jar

from $AXIS_HOME/samples/mtom folloe these instructions from readme.txt

Prerequisites
=============
Apache Ant 1.6.2 or later


Running the Sample:
===================
1. Use ant generate.service or just the ant command alone in the Axis2_HOME/sample/mtom/ to build the service.
2. Generated service gets copied to the AXIS2_HOME/repository/services automatically.
3. Run the AXIS2_HOME/bin/axis2server.{sh/bat} to start the standalone axis2 server. (Alternatively
  you can drop the sample into the services directory of a Axis2 server running in a servlet container)
4. Use ant generate.client to build the client.
5. Use ant run.client -Dfile "file to be sent" -Ddest "destination file name" to run the client.


Note
==============
Sometimes, if you're having trouble running the client successfully, 
It may be necessary to clean the services repository before you generate the service, deploy it
and run the client. (i.e. delete services created from previous samples.)


HTH/
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 


> Date: Fri, 15 Aug 2008 14:53:44 +0200
> From: sapakiy@googlemail.com
> To: Matthias.Gaiser@t-systems.com
> Subject: Re: Axis 1.4 and MTOM
> CC: axis-user@ws.apache.org
> 
> Hi,
> I don't know how you captured the message (response.txt).
> The message seems to be corrupt with its MIME headers (there is no
> line delimiter in the first few lines).
> I don't know if there is some interoperability problem in the Axis 1.4
> implementation.
> Is it also not working if your client is talking to the Axis 1.4
> server talking MTOM?
> 
> We have some MTOM scenarios with Axis 1.4.
> 
> Regards, Aki
> 
> 2008/8/14  <Ma...@t-systems.com>:
> > Hi group,
> >
> >
> >
> > I am currently trying to implement an axis 1.4 web service (with a client)
> > with attachments using MTOM.
> >
> >
> >
> > Somewhere it was said, that this is also possible with axis 1.4. But
> > unfortunately I don't get it working. I'm sending the attachments from the
> > server side via MTOM, but I can't receive them on the client.
> >
> > The problem seems to be on the client side. On the client I get this error:
> > [#text: Error in parsing mime data stream:  null
> >
> > I included the stacktrace and the response message as attachments.
> >
> >
> >
> > My questions:
> >
> > ·         Is it possible to implement a Web Service with Attachments using
> > MTOM and Axis 1.4?
> >
> > ·         Do I have to tell the client somehow that MTOM is being used?
> >
> > ·         Can you provide some help to my issue?
> >
> >
> >
> > The future plan is to migrate to axis2, but this would take too long for my
> > current issue.
> >
> > Hopefully waiting for your answers.
> >
> >
> >
> > Matthias.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 

_________________________________________________________________
Talk to your Yahoo! Friends via Windows Live Messenger.  Find out how.
http://www.windowslive.com/explore/messenger?ocid=TXT_TAGLM_WL_messenger_yahoo_082008

AW: Axis 1.4 and MTOM

Posted by Ma...@t-systems.com.
Hi Aki,

I am using Axis 1.4 (not Axis2) for the client and the server and I am wondering if it is possible at all to implement the scenario to transmit attachments using MTOM? You said you have some scenarios.. could you point me to them?

> I don't know how you captured the message (response.txt).
> The message seems to be corrupt with its MIME headers (there is no
> line delimiter in the first few lines).
I captured the message using a TCP-monitor tool and I agree that the HTTP/MIME headers look quite odd.

> Is it also not working if your client is talking to the Axis 1.4
> server talking MTOM?
I did not really get that question. It is working when I transmit the attachments via MIME, but it does not work when I switch to MTOM on the server side. Is there maybe an option to switch the client to MTOM as well?

Thanks for your help,
Matthias.

> -----Ursprüngliche Nachricht-----
> Von: Akitoshi Yoshida [mailto:sapakiy@googlemail.com]
> Gesendet: Freitag, 15. August 2008 14:54
> An: Gaiser, Matthias
> Cc: axis-user@ws.apache.org
> Betreff: Re: Axis 1.4 and MTOM
> 
> Hi,
> I don't know how you captured the message (response.txt).
> The message seems to be corrupt with its MIME headers (there is no
> line delimiter in the first few lines).
> I don't know if there is some interoperability problem in the Axis 1.4
> implementation.
> Is it also not working if your client is talking to the Axis 1.4
> server talking MTOM?
> 
> We have some MTOM scenarios with Axis 1.4.
> 
> Regards, Aki
> 
> 2008/8/14  <Ma...@t-systems.com>:
> > Hi group,
> >
> >
> >
> > I am currently trying to implement an axis 1.4 web service (with a
> client)
> > with attachments using MTOM.
> >
> >
> >
> > Somewhere it was said, that this is also possible with axis 1.4. But
> > unfortunately I don't get it working. I'm sending the attachments
> from the
> > server side via MTOM, but I can't receive them on the client.
> >
> > The problem seems to be on the client side. On the client I get this
> error:
> > [#text: Error in parsing mime data stream:  null
> >
> > I included the stacktrace and the response message as attachments.
> >
> >
> >
> > My questions:
> >
> > ·         Is it possible to implement a Web Service with Attachments
> using
> > MTOM and Axis 1.4?
> >
> > ·         Do I have to tell the client somehow that MTOM is being
> used?
> >
> > ·         Can you provide some help to my issue?
> >
> >
> >
> > The future plan is to migrate to axis2, but this would take too long
> for my
> > current issue.
> >
> > Hopefully waiting for your answers.
> >
> >
> >
> > Matthias.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Axis 1.4 and MTOM

Posted by Akitoshi Yoshida <sa...@googlemail.com>.
Hi,
I don't know how you captured the message (response.txt).
The message seems to be corrupt with its MIME headers (there is no
line delimiter in the first few lines).
I don't know if there is some interoperability problem in the Axis 1.4
implementation.
Is it also not working if your client is talking to the Axis 1.4
server talking MTOM?

We have some MTOM scenarios with Axis 1.4.

Regards, Aki

2008/8/14  <Ma...@t-systems.com>:
> Hi group,
>
>
>
> I am currently trying to implement an axis 1.4 web service (with a client)
> with attachments using MTOM.
>
>
>
> Somewhere it was said, that this is also possible with axis 1.4. But
> unfortunately I don't get it working. I'm sending the attachments from the
> server side via MTOM, but I can't receive them on the client.
>
> The problem seems to be on the client side. On the client I get this error:
> [#text: Error in parsing mime data stream:  null
>
> I included the stacktrace and the response message as attachments.
>
>
>
> My questions:
>
> ·         Is it possible to implement a Web Service with Attachments using
> MTOM and Axis 1.4?
>
> ·         Do I have to tell the client somehow that MTOM is being used?
>
> ·         Can you provide some help to my issue?
>
>
>
> The future plan is to migrate to axis2, but this would take too long for my
> current issue.
>
> Hopefully waiting for your answers.
>
>
>
> Matthias.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Axis 1.4 and MTOM

Posted by WJ Krpelan <kr...@yahoo.com>.
Hi,
I'd say dont do it this way
AXIS 1.4 is no longer being maintained
you could use base64 encoding with axis 1.4
Cheers,
Wolfgang


--- On Thu, 8/14/08, Matthias.Gaiser@t-systems.com <Ma...@t-systems.com> wrote:

> From: Matthias.Gaiser@t-systems.com <Ma...@t-systems.com>
> Subject: Axis 1.4 and MTOM
> To: axis-dev@ws.apache.org
> Date: Thursday, August 14, 2008, 3:18 PM
> Hi group,
> 
>  
> 
> I am currently trying to implement an axis 1.4 web service
> (with a
> client) with attachments using MTOM.
> 
>  
> 
> Somewhere it was said, that this is also possible with axis
> 1.4. But
> unfortunately I don't get it working. I'm sending
> the attachments from
> the server side via MTOM, but I can't receive them on
> the client.
> 
> The problem seems to be on the client side. On the client I
> get this
> error: [#text: Error in parsing mime data stream:  null
> 
> I included the stacktrace and the response message as
> attachments.
> 
>  
> 
> My questions:
> 
> *         Is it possible to implement a Web Service with
> Attachments
> using MTOM and Axis 1.4?
> 
> *         Do I have to tell the client somehow that MTOM is
> being used?
> 
> *         Can you provide some help to my issue?
> 
>  
> 
> The future plan is to migrate to axis2, but this would take
> too long for
> my current issue.
> 
> Hopefully waiting for your answers.
> 
>  
> 
> Matthias.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail:
> axis-dev-help@ws.apache.org


      

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org