public Packet getRequestPacket() { return this.jaxwsContextDelegate.getRequestPacket(); }
public EndpointReference getEndpointReference(Class clazz, org.w3c.dom.Element... params) { return this.jaxwsContextDelegate.getEndpointReference(clazz, params); }
public MessageContext getMessageContext() { return this.jaxwsContextDelegate.getMessageContext(); }
public Principal getUserPrincipal() { // This could be an EJB endpoint; check the threadlocal variable Principal p = (Principal) principal.get(); if (p != null) { return p; } // This is a servlet endpoint p = this.jaxwsContextDelegate.getUserPrincipal(); //handling for WebService with WS-Security if (p == null && secServ != null) { WebServiceContractImpl wscImpl = WebServiceContractImpl.getInstance(); InvocationManager mgr = wscImpl.getInvocationManager(); boolean isWeb = ComponentInvocation.ComponentInvocationType.SERVLET_INVOCATION. equals(mgr.getCurrentInvocation().getInvocationType()) ? true : false; p = secServ.getUserPrincipal(isWeb); } return p; }
public boolean isUserInRole(String role) { WebServiceContractImpl wscImpl = WebServiceContractImpl.getInstance(); InvocationManager mgr = wscImpl.getInvocationManager(); if (ComponentInvocation.ComponentInvocationType.EJB_INVOCATION.equals(mgr.getCurrentInvocation().getInvocationType())) { EJBInvocation inv = (EJBInvocation)mgr.getCurrentInvocation(); boolean res = inv.isCallerInRole(role); return res; } // This is a servlet endpoint boolean ret = this.jaxwsContextDelegate.isUserInRole(role); //handling for webservice with WS-Security if (!ret && secServ != null) { if (mgr != null && mgr.getCurrentInvocation() != null) { if (mgr.getCurrentInvocation().getContainer() instanceof WebModule) { Principal p = getUserPrincipal(); ret = secServ.isUserInRole((WebModule)mgr.getCurrentInvocation().getContainer(), p, servletName, role); } } } return ret; }
@NotNull @Override public <EPR extends EndpointReference> EPR export(Class<EPR> epr, WebServiceContext context, T o) { if (context instanceof WSWebServiceContext) { WSWebServiceContext wswsc = (WSWebServiceContext) context; return export(epr, wswsc.getRequestPacket(), o); } throw new WebServiceException(ServerMessages.STATEFUL_INVALID_WEBSERVICE_CONTEXT(context)); }
public EndpointReference getEndpointReference(org.w3c.dom.Element... params) { return this.jaxwsContextDelegate.getEndpointReference(params); }
@NotNull @Override public <EPR extends EndpointReference> EPR export(Class<EPR> epr, WebServiceContext context, T o) { if (context instanceof WSWebServiceContext) { WSWebServiceContext wswsc = (WSWebServiceContext) context; return export(epr, wswsc.getRequestPacket(), o); } throw new WebServiceException(ServerMessages.STATEFUL_INVALID_WEBSERVICE_CONTEXT(context)); }
@NotNull @Override public <EPR extends EndpointReference> EPR export(Class<EPR> epr, WebServiceContext context, T o) { if (context instanceof WSWebServiceContext) { WSWebServiceContext wswsc = (WSWebServiceContext) context; return export(epr, wswsc.getRequestPacket(), o); } throw new WebServiceException(ServerMessages.STATEFUL_INVALID_WEBSERVICE_CONTEXT(context)); }