Hi Dan,

Thanks for your email.

I've managed to enable MTOM it in a dynamic client like this:

---
Service model = new ObjectServiceFactory().create(MyService.class);
MyService service = (MyService) new XFireProxyFactory().create(model,
"http://...";);

Client client = ((XFireProxy)
Proxy.getInvocationHandler(service)).getClient();
client.setProperty("mtom-enabled", "true"); 

Object result = service.invoke();
---

However, I still don't know how to enable it in a generated client.

I'm using XFire API 1.1-RC1 and there I can't find the static method
getInstance() in org.codehaus.xfire.client.Client that you described
(i.e. Client.getInstance(service))

Cheers,
patric





-----Original Message-----
From: Dan Diephouse [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 10 May 2006 10:18 PM
To: [email protected]
Subject: Re: [xfire-user] Enable MTOM in Client

Hi Patric,
How are you creating your client? Via XFireProxyFactory will look like
this:

MyService service = (MyService) new
XFireProxyFactory().create(serviceMode, "url"); Client client =
Client.getInstance(service); client.setProperty("mtom-enabled", "true");

If it is via a generated client:

MyService stub = new MyService();
MyServicePortType service = stub.getHttpPortType(); Client client =
Client.getInstance(service); client.setProperty("mtom-enabled", "true");

Also, I realized there weren't instructions on how to delete attachments
once you're done. I've added them here now and I recommend reading them:

http://xfire.codehaus.org/MTOM

Hope that helps.

- Dan

Patric Fornasier wrote:
> Hi,
>
> Anybody knows how to enable MTOM on the client side?
>
> I've looked at http://xfire.codehaus.org/MTOM but somehow don't get
it.
> I've generated my client classes from WSDL and somehow don't know on 
> which object to invoke 'setProperty("mtom-enabled", "true")'
>
> Any hints are greatly appreciated - code snippet would be great!
>
> Cheers,
> patric
>
> ----------------------------------------------------------------------
> ---- This email and any attachments may be confidential. They may 
> contain legally privileged information or copyright material. You 
> should not read, copy, use or disclose them without authorisation. If 
> you are not an intended recipient, please contact us at once by return

> email and then delete both messages. We do not accept liability in 
> connection with computer virus, data corruption, delay, interruption, 
> unauthorised access or unauthorised amendment. This notice should not 
> be removed.
>   


--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com
http://netzooid.com/blog


Reply via email to