Re: [osgi-dev] Apache cxf: add authorization header in Client

2018-03-05 Thread Christian Schneider via osgi-dev
Pretty cool. If you have the chance, maybe you can make a little example as
a github project.

Christian

2018-03-05 15:37 GMT+01:00 Michael Wirth via osgi-dev <
osgi-dev@mail.osgi.org>:

> Now I made it. Here is what I did if someone is interested.
>
> In an IntentsProvider I return a List of Intents (before I implemented two
> IntentsProvider). The first Intent is the JacksonJsonProvider, the second
> implements org.apache.cxf.feature.Freature. In Feature#initialize I
> register a OutInterceptor and in his method handleMessage I add the
> Authorization header.
>
> Best regards and thanks for the tips.
> Michael
>
>
>
> Am 02.03.2018 um 07:26 schrieb Christian Schneider <
> ch...@die-schneider.net>:
>
> The cleanest way to add authorization or any other technical capability
> like logging is to add a CXF feature to the client. If you are lucky then
> there is already a suitable feature. If not then you have to create your
> own feature and interceptor for adding the header.
>
> How do you create the client?
>
> Christian
>
> 2018-03-01 19:43 GMT+01:00 Michael Wirth via osgi-dev <
> osgi-dev@mail.osgi.org>:
>
>> I’m using Apache CXF in an OSGi-Application to call REST-Services
>> provided from another (spring) application.
>> I give the path-interface (generated with swagger) to my
>> osgi-client-appliation. While runtime, Apache CXF generates the client
>> proxy interface, calls the REST-Service and deserialize the returned json
>> to the swagger generated objects. All works fine :-)
>> Now I miss one thing. For Authorization I have to add a header. Because I
>> do not have the ‚Client‘-Instanze (WebTarget for instance) I’m not able to
>> add an header. Is there some property, configuration or a service which can
>> be used?
>>
>> Best Regards,
>> Michael
>> ___
>> OSGi Developer Mail List
>> osgi-dev@mail.osgi.org
>> https://mail.osgi.org/mailman/listinfo/osgi-dev
>
>
>
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Computer Scientist
> http://www.adobe.com
>
>
>
> ___
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev
>



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

Computer Scientist
http://www.adobe.com
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Script for auto-generations standalone enRoute application executable

2018-03-05 Thread Raymond Auge via osgi-dev
1) if you are in a bndtools workspace:

say you have a project with a bndrun file like so:

workspace-root/projectA/my.bndrun

then execute the gradle command:

cd workspace-root
./gradlew :projectA:export.my

2) if you are in a maven project using the bnd-export-maven-plugin [1]:

then execute the following:

mvn bnd-export:export

3) if you are in a gradle project using the none-workspace bnd gradle
plugin [2]:

Create and execute an export [3] task

Sincerely,
- Ray

[1]
https://github.com/bndtools/bnd/blob/master/maven/bnd-export-maven-plugin/README.md
[2]
https://github.com/bndtools/bnd/tree/master/biz.aQute.bnd.gradle#gradle-plugin-for-non-workspace-builds
[3]
https://github.com/bndtools/bnd/tree/master/biz.aQute.bnd.gradle#create-a-task-of-the-export-type


On Mon, Mar 5, 2018 at 12:49 PM, Randy Leonard via osgi-dev <
osgi-dev@mail.osgi.org> wrote:

> To all:
>
> Regarding the creation of standalone executables for enRoute projects:
>
>- Documentation is given here: http://enroute.osgi.org/
>tutorial_base/700-deploy.html
>- Unfortunately, these are manual instructions for exporting from
>within Eclipse
>
>
> My request is for instructions to generate standalone executables via
> command line script.  It would be great to automate this task.
>
> Thanks in advance
> Randy
>
> ___
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev
>



-- 
*Raymond Augé* 
 (@rotty3000)
Senior Software Architect *Liferay, Inc.* 
 (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance  (@OSGiAlliance)
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

[osgi-dev] Script for auto-generations standalone enRoute application executable

2018-03-05 Thread Randy Leonard via osgi-dev
To all:

Regarding the creation of standalone executables for enRoute projects:
Documentation is given here: 
http://enroute.osgi.org/tutorial_base/700-deploy.html 

Unfortunately, these are manual instructions for exporting from within Eclipse

My request is for instructions to generate standalone executables via command 
line script.  It would be great to automate this task.

Thanks in advance
Randy___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Apache cxf: add authorization header in Client

2018-03-05 Thread Michael Wirth via osgi-dev
Now I made it. Here is what I did if someone is interested.

In an IntentsProvider I return a List of Intents (before I implemented two 
IntentsProvider). The first Intent is the JacksonJsonProvider, the second 
implements org.apache.cxf.feature.Freature. In Feature#initialize I register a 
OutInterceptor and in his method handleMessage I add the Authorization header.

Best regards and thanks for the tips.
Michael



Am 02.03.2018 um 07:26 schrieb Christian Schneider 
>:

The cleanest way to add authorization or any other technical capability like 
logging is to add a CXF feature to the client. If you are lucky then there is 
already a suitable feature. If not then you have to create your own feature and 
interceptor for adding the header.

How do you create the client?

Christian

2018-03-01 19:43 GMT+01:00 Michael Wirth via osgi-dev 
>:
I’m using Apache CXF in an OSGi-Application to call REST-Services provided from 
another (spring) application.
I give the path-interface (generated with swagger) to my 
osgi-client-appliation. While runtime, Apache CXF generates the client proxy 
interface, calls the REST-Service and deserialize the returned json to the 
swagger generated objects. All works fine :-)
Now I miss one thing. For Authorization I have to add a header. Because I do 
not have the ‚Client‘-Instanze (WebTarget for instance) I’m not able to add an 
header. Is there some property, configuration or a service which can be used?

Best Regards,
Michael
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev



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

Computer Scientist
http://www.adobe.com


___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev