Package javax.xml.ws

Examples of javax.xml.ws.WebServiceContext


        // This should be inject when the endpoing is published.
        //i.e in context of Endpoint.publish.
        //Such injection should not happen for Endpoint.create.
        //JAX_WS Spec 5.2.1.
       
        WebServiceContext ctx = servant.getContext();
        assertNull(ctx);
        try {
            String address = "http://localhost:8080/test";
            endpoint.publish(address);
        } catch (IllegalArgumentException ex) {
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

  private static final ThreadLocal<WebServiceContext> _localContext
    = new ThreadLocal<WebServiceContext>();
 
  public static WebServiceContext setContext(WebServiceContext context)
  {
    WebServiceContext oldContext = _localContext.get();
   
    _localContext.set(context);
   
    return oldContext;
  }
View Full Code Here

    return getContext().getEndpointReference(arg0, arg1);
  }
 
  private WebServiceContext getContext()
  {
    WebServiceContext context = _localContext.get();
   
    if (context != null)
      return context;
    else
      throw new IllegalStateException(L.l("WebServiceContext is not available here"));
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

        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

        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

                // 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

*/
final class InvocationHandlerEJB3 extends AbstractInvocationHandlerEJB {

   @Override
   public void onBeforeInvocation(final Invocation invocation) {
      final WebServiceContext wsContext = getWebServiceContext(invocation);
      ThreadLocalAwareWebServiceContext.getInstance().setMessageContext(wsContext);
   }
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.