What do you mean by "1".

Come on man, I don't want to sound like a troll, but this is the whole 
problem with AXIS2.  I'm not a lazy programmer.  I gave you a very 
specific question.  My problem is, all the documentation --including "1" 
on this page-- has such concise snippets, it assumes I know how to load 
the implied objects, that I don't.

Am I asking a question that's more complex than I realize?  I just want 
the code snippet for sending an attachment, but I feel like every time I 
see such info online (including your "1") it's a three line snapshot of a 
huge program that seems to have nothing in common with my code (e.g. its 
always some heavy awt client preparing stuff; why can't I just find how to 
send a jpg or text file via AXIS2?).

I don't feel I know enough about AXIS2 to realize the pertinent parts 
about "1".  And, by the way, I saw "1" when I did a google search.

Are there no new users to AXIS2?







prabath <[email protected]> 
08/27/2009 09:42 PM
Please respond to
[email protected]


To
[email protected]
cc

Subject
Re: send soap attachment via AXIS2






Please have a look at [1].

Thanks & regards.
-Prabath

[1]:
https://svn.apache.org/repos/asf/webservices/axis2/site/1_1/mtom-guide.html


[email protected] wrote:
>
> Hello,
>
> I'm struggling to send a soap attachment with AXIS2.
>
> Most of the documentation I'm finding online is on receiving, rather 
than
> sending attachments.  Here's the closest I've gathered to what the code
> should sort of look like (which is surely wrong):
>
>
> 
stub._getServiceClient().getOptions().setProperty(Constants.Configuration.ENABLE_MTOM,
>                                                 Constants.VALUE_TRUE);
>
>        FileDataSource dataSource =
>            new FileDataSource("c:\\myImageAttachment.jpg");
>        DataHandler dataHandler = new DataHandler(dataSource);
>
> MessageContext.getCurrentMessageContext().addAttachment(dataHandler);
>
>
>       stub.CreateIncident();
>
>
> But that code does not work since getCurrentMessageContext returns null.
>
> Outside of attachments, the rest of the functionality works fine.
>
> It looks, to me, like the old version of Axis had an addAttachment 
> method on the stub API, but I don't see anything comparable in 2.
>
>
> Any help would be appreciated.  Thanks.
>
> Sean
>
> This transmission is intended solely for the person or organization to 
> whom it is addressed and it may contain privileged and cofidential 
> information. If you are not the intended recipient you should not 
> copy, distribute or take any action in reliance on it. If you believe 
> you received this transmission in error please notify the sender.
> 222 Merchandise Mart Plaza, Suite 250, Chicago, IL 60654, USA
>



</PRE><p><span style="font-size:9.5pt;line-height:115%;font-family:Arial">This 
transmission is intended solely for the person or organization to whom it is 
addressed and it may contain privileged and cofidential information.  If you 
are not the intended recipient you should not copy, distribute or take any 
action in reliance on it.  If you believe you received this transmission in 
error please notify the sender.<br>222 Merchandise Mart Plaza, Suite 250, 
Chicago, IL  60654, USA</span></p>

Reply via email to