[JBossWS] - Re: Authentication problem.
by fdifonzo
Hi rukus,
here's the part of code of my pojo invoking EJB:
public class WEBServiceImpl implements WEBService, ServiceLifecycle, CodeControl {
| ...............
| ..............
|
| public void init(Object arg0) throws ServiceException {
| InitialContext initCtx = null;
|
| try{
|
| initCtx = new InitialContext();
|
| FastLaneHome home = (FastLaneHome) PortableRemoteObject.narrow(initCtx.lookup("FastLane"), FastLaneHome.class);
|
| fastlane = (FastLane) home.create();
|
| }
|
| catch (CreateException e) {
|
| log.error("Creation error.");
|
| throw new ServiceException(e);
|
| }
|
| catch(NamingException ne) {
|
| log.error("ejbCreate() UNABLE to get a connection from FastLane");
|
| throw new ServiceException(ne);
|
| }
|
|
| catch(RemoteException re) {
|
| log.error("UNABLE to get a connection from FastLane");
|
| throw new ServiceException(re);
|
| }
|
| ...........
| ...........
|
| }
|
| ...........
| ...........
|
| }
|
|
I'm using axis 1.4 to invoke the webservice. So the client looks like this:
ZTCServerWEBServiceLocator locator = new ZTCServerWEBServiceLocator();
| stub = (WEBServiceBindingStub)locator.getWEBServicePort();
|
| stub.setUsername("myuser");
| stub.setPassword("mypwd");
|
| stub.myMethod();
|
Consider that a similar approach worked fine with jboss-net. I'm indeed upgrading jboss 3.27 to jboss 4.2.2, thus I'm rewriting my old jboss-net based ws to jbossws.
Many thanks, Fabrizio
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120075#4120075
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120075
18 years, 5 months
[JBoss Seam] - Exceptions ending conversations
by alessandrolt
Hi !
I'm using exception handling (by annotation and / or pages.xml) of Seam, but when an exception is launched, the classes that are in long-running conversation are discarded.
Why this happens?
|
| /*
| * Exception class
| */
| @Redirect(viewId="/module/anypage.xhtml", message="Unexpected error")
| public class NoSelectionException extends RuntimeException{
|
|
| private static final String MESSAGE = "Nenhum dado foi selecionado";
| private String keyDefault = "error.nenhumDadoSelecionado";
|
| private ArrayList keys = new ArrayList();
|
|
| public NoSelectionException ()
| {
| super(MESSAGE);
|
| }
|
| //more codes
| ....
|
|
|
| /*
| * Service class
| */
|
| @Name("paService")
| @AutoCreate
| public class PaService {
|
| public String delete(List<Pa> pasSelecteds) {
|
| if (pasSelecteds == null || pasSelecteds.size() == 0)
| throw new NoSelectionException();
|
| paRepository.removePas(pasSelecteds);
|
| return "exibir";
| }
|
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120074#4120074
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120074
18 years, 5 months