You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Hämäläinen Panu <pa...@insta.fi> on 2017/01/23 06:59:06 UTC

MTOM with DOSGi

Hi folks,

Is there any guidance available for using MTOM with DOSGi? Or is it supported?

Looking at the page http://cxf.apache.org/docs/mtom.html and the documentation/samples of the newest DOSGi 2.0.0 (JAX-WS enabled with the @WebService annotation), it seems that the Java first approach (DataHandler annotated with @XmlMimeType) on the CXF page might be supported.

For the "enabling MTOM" part, how to do it with DOSGi? I would need a handle to the binding instance or its configuration (on client and service sides) and enable MTOM (e.g. by calling setMTOMEnabled(true)).

Regards,
Panu


RE: MTOM with DOSGi

Posted by Hämäläinen Panu <pa...@insta.fi>.
Hi Christian,

MTOM seems to work as you described. It just took me some time to upgrade to DOSGi 2.0.0.

Thanks,
Panu


-----Original Message-----
From: Hämäläinen Panu
Sent: 24. tammikuuta 2017 9:29
Subject: RE: MTOM with DOSGi

Thanks Christian,

I just quickly tried to enable MTOM with DOSGi 1.7.0 which I am using at the moment. Looking at the logs, it seems that on the server side the MTOM-enabled binding gets selected and the binding reference (i.e. service.intents property) gets transferred to the client side through Zookeeper as expected. However, the client-side IntentManager still seems to pick up the default binding (SOAP). Looks like it ignores the service.intents property of the imported service. 

I will update to DOSGi 2.0.0 before further experiments. IntentManager seems to have changed quite a lot and now it seems to process the service.intents property as well.

Regards,
Panu


-----Original Message-----
From: Christian Schneider 
Sent: 23. tammikuuta 2017 10:39
Subject: Re: MTOM with DOSGi

Hi Panu,

take a look at the DOSGi intents. See
https://github.com/apache/cxf-dosgi/tree/master/common

You should be able to create a
org.apache.cxf.binding.soap.SoapBindingConfiguration and set mtomEnabled in it. Export this as an OSGi service with intentName="mtom".
The easiest way to do this is a DS component.

Then add the intent to your service by adding the service property service.exported.intents=ssl This should make sure your service is using the intent. If you create your client automatically from e.g. zookeeper info then the intent should also be used on the client.
Just make sure the service with the SoapBindingConfiguration is also present on the client side.

If it does not work out of the box it would be great if you could create a small sample project on github so we can look into it together.

Christian

On 23.01.2017 07:59, Hämäläinen Panu wrote:
> Hi folks,
>
> Is there any guidance available for using MTOM with DOSGi? Or is it supported?
>
> Looking at the page http://cxf.apache.org/docs/mtom.html and the documentation/samples of the newest DOSGi 2.0.0 (JAX-WS enabled with the @WebService annotation), it seems that the Java first approach (DataHandler annotated with @XmlMimeType) on the CXF page might be supported.
>
> For the "enabling MTOM" part, how to do it with DOSGi? I would need a handle to the binding instance or its configuration (on client and service sides) and enable MTOM (e.g. by calling setMTOMEnabled(true)).
>
> Regards,
> Panu
>
>


RE: MTOM with DOSGi

Posted by Hämäläinen Panu <pa...@insta.fi>.
Thanks Christian,

I just quickly tried to enable MTOM with DOSGi 1.7.0 which I am using at the moment. Looking at the logs, it seems that on the server side the MTOM-enabled binding gets selected and the binding reference (i.e. service.intents property) gets transferred to the client side through Zookeeper as expected. However, the client-side IntentManager still seems to pick up the default binding (SOAP). Looks like it ignores the service.intents property of the imported service. 

I will update to DOSGi 2.0.0 before further experiments. IntentManager seems to have changed quite a lot and now it seems to process the service.intents property as well.

Regards,
Panu


-----Original Message-----
From: Christian Schneider [mailto:cschneider111@gmail.com] On Behalf Of Christian Schneider
Sent: 23. tammikuuta 2017 10:39
To: users@cxf.apache.org
Subject: Re: MTOM with DOSGi

Hi Panu,

take a look at the DOSGi intents. See
https://github.com/apache/cxf-dosgi/tree/master/common

You should be able to create a
org.apache.cxf.binding.soap.SoapBindingConfiguration and set mtomEnabled in it. Export this as an OSGi service with intentName="mtom".
The easiest way to do this is a DS component.

Then add the intent to your service by adding the service property service.exported.intents=ssl This should make sure your service is using the intent. If you create your client automatically from e.g. zookeeper info then the intent should also be used on the client.
Just make sure the service with the SoapBindingConfiguration is also present on the client side.

If it does not work out of the box it would be great if you could create a small sample project on github so we can look into it together.

Christian

On 23.01.2017 07:59, Hämäläinen Panu wrote:
> Hi folks,
>
> Is there any guidance available for using MTOM with DOSGi? Or is it supported?
>
> Looking at the page http://cxf.apache.org/docs/mtom.html and the documentation/samples of the newest DOSGi 2.0.0 (JAX-WS enabled with the @WebService annotation), it seems that the Java first approach (DataHandler annotated with @XmlMimeType) on the CXF page might be supported.
>
> For the "enabling MTOM" part, how to do it with DOSGi? I would need a handle to the binding instance or its configuration (on client and service sides) and enable MTOM (e.g. by calling setMTOMEnabled(true)).
>
> Regards,
> Panu
>
>


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: MTOM with DOSGi

Posted by Christian Schneider <ch...@die-schneider.net>.
Hi Panu,

take a look at the DOSGi intents. See 
https://github.com/apache/cxf-dosgi/tree/master/common

You should be able to create a 
org.apache.cxf.binding.soap.SoapBindingConfiguration and set mtomEnabled 
in it. Export this as an OSGi service with intentName="mtom".
The easiest way to do this is a DS component.

Then add the intent to your service by adding the service property 
service.exported.intents=ssl
This should make sure your service is using the intent. If you create 
your client automatically from e.g. zookeeper info then the intent 
should also be used on the client.
Just make sure the service with the SoapBindingConfiguration is also 
present on the client side.

If it does not work out of the box it would be great if you could create 
a small sample project on github so we can look into it together.

Christian

On 23.01.2017 07:59, Hmlinen Panu wrote:
> Hi folks,
>
> Is there any guidance available for using MTOM with DOSGi? Or is it supported?
>
> Looking at the page http://cxf.apache.org/docs/mtom.html and the documentation/samples of the newest DOSGi 2.0.0 (JAX-WS enabled with the @WebService annotation), it seems that the Java first approach (DataHandler annotated with @XmlMimeType) on the CXF page might be supported.
>
> For the "enabling MTOM" part, how to do it with DOSGi? I would need a handle to the binding instance or its configuration (on client and service sides) and enable MTOM (e.g. by calling setMTOMEnabled(true)).
>
> Regards,
> Panu
>
>


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com