Package javax.xml.ws

Examples of javax.xml.ws.WebServiceContext


        if (this.annotationProcessor != null) {
            // assume injection was already done
            return;
        }

        WebServiceContext wsContext = null;
        try {
            InitialContext ctx = new InitialContext();
            wsContext = (WebServiceContext) ctx.lookup("java:comp/WebServiceContext");
        } catch (NamingException e) {
            throw new WebServiceException("Failed to lookup WebServiceContext", e);
View Full Code Here


        if (this.annotationProcessor != null) {
            // assume injection was already done
            return;
        }

        WebServiceContext wsContext = null;
        try {
            InitialContext ctx = new InitialContext();
            wsContext = (WebServiceContext) ctx.lookup("java:comp/WebServiceContext");
        } catch (NamingException e) {
            throw new WebServiceException("Failed to lookup WebServiceContext", e);
View Full Code Here

                    callContext.setCurrentOperation(Operation.INJECTION);
                    callContext.setCurrentAllowedStates(StatelessContext.getStates());                   
                    objectRecipe.setProperty("sessionContext", new StaticRecipe(sessionContext));
                }    
               
                WebServiceContext wsContext;
                // This is a fix for GERONIMO-3444
                synchronized(this){
                    try {
                        wsContext = (WebServiceContext) ctx.lookup("java:comp/WebServiceContext");
                    } catch (NamingException e) {
View Full Code Here

        if (this.annotationProcessor != null) {
            // assume injection was already done
            return;
        }
       
        WebServiceContext wsContext = null;
        try {
            InitialContext ctx = new InitialContext();
            wsContext = (WebServiceContext) ctx.lookup("java:comp/WebServiceContext");
        } catch (NamingException e) {
            throw new WebServiceException("Failed to lookup WebServiceContext", e);
View Full Code Here

      try
      {
         Object targetBean = getTargetBean(ep, epInv);

         InvocationContext invContext = epInv.getInvocationContext();
         WebServiceContext wsContext = invContext.getAttachment(WebServiceContext.class);
         if (wsContext != null)
         {
            ResourceInjector injector = resourceInjectorFactory.newResourceInjector();
            injector.inject(targetBean, wsContext);
         }
View Full Code Here

        if (this.annotationProcessor != null) {
            // assume injection was already done
            return;
        }

        WebServiceContext wsContext = null;
        try {
            InitialContext ctx = new InitialContext();
            wsContext = (WebServiceContext) ctx.lookup("java:comp/WebServiceContext");
        } catch (NamingException e) {
            throw new WebServiceException("Failed to lookup WebServiceContext", e);
View Full Code Here

    public static Principal getUser() {
        return user;
    }

    public String greetMe(String me) {
        WebServiceContext ctx = super.getContext();
        Principal p = ctx.getUserPrincipal();
        if (p != null) {
            user = p;
        }       
       
        //System.out.println("\n\n*** GreetMe called with: " + me + "***\n\n");
 
View Full Code Here

        //System.out.println("\n\n*** GreetMe called with: " + me + "***\n\n");
        return "Hello " + me;
    }
   
    public String sayHi() {
        WebServiceContext ctx = super.getContext();
        Principal p = ctx.getUserPrincipal();
        if (p != null) {
            user = p;
        }
        return super.sayHi();
    }
View Full Code Here

    }

    @Test
    public void testIssueDelegate() {
       
        WebServiceContext context = EasyMock.createNiceMock(WebServiceContext.class);
        MessageContext ctx2 = EasyMock.createNiceMock(MessageContext.class);
        EasyMock.expect(context.getMessageContext()).andReturn(ctx2).anyTimes();
        UsernameToken token = new UsernameToken("joe", null, null, false, null, null);
        EasyMock.expect(ctx2.get(SecurityToken.class.getName())).andReturn(token).anyTimes();

       
        SAMLTokenIssueOperation id = new SAMLTokenIssueOperation();
View Full Code Here

        String address = "http://localhost:8080/test";
       
        GreeterImpl greeter = new GreeterImpl();
        EndpointImpl endpoint = new EndpointImpl(getBus(), greeter, (String)null);
        WebServiceContext ctx = greeter.getContext();
        assertNull(ctx);
        try {
            endpoint.publish(address);
        } catch (IllegalArgumentException ex) {
            assertTrue(ex.getCause() instanceof BusException);
View Full Code Here

TOP

Related Classes of javax.xml.ws.WebServiceContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.