Package javax.xml.ws

Examples of javax.xml.ws.WebServiceContext


      {
         if (ep.getService().getDeployment().getType() == DeploymentType.JAXWS_JSE)
         {
            if (msgContext.get(MessageContext.SERVLET_REQUEST) != null)
            {
               WebServiceContext wsContext = contextFactory.newWebServiceContext(InvocationType.JAXWS_JSE, (SOAPMessageContextJAXWS)msgContext);
               invContext.addAttachment(WebServiceContext.class, wsContext);
            }
            else
            {
               log.warn("Cannot provide WebServiceContext, since the current MessageContext does not provide a ServletRequest");
View Full Code Here


    @Test
    public void testEndpoint() throws Exception {  
        GreeterImpl greeter = new GreeterImpl();
        EndpointImpl endpoint = new EndpointImpl(getBus(), greeter, (String)null);
        WebServiceContext ctx = greeter.getContext();
        assertNull(ctx);
        try {
            String address = "http://localhost:8080/test";
            endpoint.publish(address);
        } catch (IllegalArgumentException ex) {
View Full Code Here

    @Test
    public void testEndpointStop() throws Exception {  
        GreeterImpl greeter = new GreeterImpl();
        EndpointImpl endpoint = new EndpointImpl(getBus(), greeter, (String)null);
        WebServiceContext ctx = greeter.getContext();
        assertNull(ctx);
        try {
            String address = "http://localhost:8080/test";
            endpoint.publish(address);
        } catch (IllegalArgumentException ex) {
View Full Code Here

        serviceFactory.setServiceClass(GreeterImpl.class);
       
        EndpointImpl endpoint = new EndpointImpl(getBus(), greeter,
                                                 new JaxWsServerFactoryBean(serviceFactory));
        WebServiceContext ctx = greeter.getContext();
        assertNull(ctx);
        try {
            String address = "http://localhost:8080/test";
            endpoint.publish(address);
        } catch (IllegalArgumentException ex) {
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

                // This is a fix for GERONIMO-3444
                synchronized(this){
                    try {
                        ctx.lookup("java:comp/WebServiceContext");
                    } catch (NamingException e) {
                        WebServiceContext wsContext = new EjbWsContext(sessionContext);
                        ctx.bind("java:comp/WebServiceContext", wsContext);
                    }
                }

                fillInjectionProperties(objectRecipe, beanClass, deploymentInfo, ctx);
View Full Code Here

            // This is a fix for GERONIMO-3444
            synchronized(this){
                try {
                    ctx.lookup("java:comp/WebServiceContext");
                } catch (NamingException e) {
                    WebServiceContext wsContext;
                    wsContext = new EjbWsContext(sessionContext);
                    ctx.bind("java:comp/WebServiceContext", wsContext);
                }
            }
View Full Code Here

    *
    *  @param invocation current invocation
    */
   @Override
   public void onBeforeInvocation(final Invocation invocation) {
      final WebServiceContext wsContext = this.getWebServiceContext(invocation);
      ThreadLocalAwareWebServiceContext.getInstance().setMessageContext(wsContext);
   }
View Full Code Here

    public void testEndpoint() throws Exception {  
        GreeterImpl greeter = new GreeterImpl();
        EndpointImpl endpoint = new EndpointImpl(getBus(), greeter, "anyuri");
        WebServiceContext ctx = greeter.getContext();
        assertNull(ctx);
        try {
            String address = "http://localhost:8080/test";
            endpoint.publish(address);
        } catch (IllegalArgumentException ex) {
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.