You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by hwaastad <he...@waastad.org> on 2013/05/24 21:46:18 UTC

@stateless @webservice in war and ear packaging

Hi,
sorry if this is a "beginner" question...

I have a War with the simple-webservice implemented. Works as it should.
Then, I'm packaging this war in an EAR.
Is there any requirements for this kind of setup?
I've tried to add openejb-jar.xml also adding web service references, but it
does'nt seem to help.

If I remove @stateless, I can see the service is loaded in the logs as
normal.

Is this supposed to work?
(I need stateless for handling @rolesallowed on methods)

BTW, always running bleeding edge 1.6.0-SNAPSHOT :-)



--
View this message in context: http://openejb.979440.n4.nabble.com/stateless-webservice-in-war-and-ear-packaging-tp4663213.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: @stateless @webservice in war and ear packaging

Posted by hwaastad <he...@waastad.org>.
Ah,
thanks. Everything seems to be in order now.

My next step will be testing......


...and thanx again.

br hw



--
View this message in context: http://openejb.979440.n4.nabble.com/stateless-webservice-in-war-and-ear-packaging-tp4663213p4663260.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: @stateless @webservice in war and ear packaging

Posted by Romain Manni-Bucau <rm...@gmail.com>.
https://issues.apache.org/jira/browse/TOMEE-948 fixes it

Note: you didnt deployed the ejb but a simple pojo, that's why it was not
working.

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/5/25 hwaastad <he...@waastad.org>

> https://github.com/hwaastad/EarTest.git
>
> To test, I'm using a standard web service client (wsdl2java)
>
> best regards,
> hw
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/stateless-webservice-in-war-and-ear-packaging-tp4663213p4663230.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: @stateless @webservice in war and ear packaging

Posted by hwaastad <he...@waastad.org>.
https://github.com/hwaastad/EarTest.git

To test, I'm using a standard web service client (wsdl2java)

best regards,
hw



--
View this message in context: http://openejb.979440.n4.nabble.com/stateless-webservice-in-war-and-ear-packaging-tp4663213p4663230.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: @stateless @webservice in war and ear packaging

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

Any sample showing it?
Le 24 mai 2013 22:36, "hwaastad" <he...@waastad.org> a écrit :

> OK,
> I'll try to answer my own question :-)
>
> so I figured out that the web service has to be provided as a servlet in
> web.xml....
>
> However,
> is not $Rolesallowed supposed to work in an ejb-webservice?
> Right now, it seems that all authenticated user (in roles defined in
> security contraints in web.xml) are allowed to any method even if @Resource
> WebServiceContext context - isUserInRole shows the correct role (and the
> role is NOT in @RolesAllowed)
>
> br hw
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/stateless-webservice-in-war-and-ear-packaging-tp4663213p4663219.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: @stateless @webservice in war and ear packaging

Posted by hwaastad <he...@waastad.org>.
OK,
I'll try to answer my own question :-)

so I figured out that the web service has to be provided as a servlet in
web.xml....

However,
is not $Rolesallowed supposed to work in an ejb-webservice?
Right now, it seems that all authenticated user (in roles defined in
security contraints in web.xml) are allowed to any method even if @Resource
WebServiceContext context - isUserInRole shows the correct role (and the
role is NOT in @RolesAllowed)

br hw




--
View this message in context: http://openejb.979440.n4.nabble.com/stateless-webservice-in-war-and-ear-packaging-tp4663213p4663219.html
Sent from the OpenEJB User mailing list archive at Nabble.com.