Package javax.xml.ws

Examples of javax.xml.ws.WebServiceContext


        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

        org.apache.axis2.context.MessageContext msgContext =
            jaxwsMessageContext.getAxisMessageContext();
        ServiceContext serviceContext = msgContext.getServiceContext();
        SOAPMessageContext soapMessageContext = null;
        if (serviceContext != null) {
            WebServiceContext wsc =
                (WebServiceContext)serviceContext.getProperty(EndpointLifecycleManagerImpl.WEBSERVICE_MESSAGE_CONTEXT);
            if (wsc != null) {
                soapMessageContext = (SOAPMessageContext)wsc.getMessageContext();
            }
        }
        return soapMessageContext;
    }
View Full Code Here

     */
    public static void releaseWebServiceContextResources(MessageContext mc) {
        if (log.isDebugEnabled()) {
            log.debug("Find and release WebServiceContext resources");
        }
        WebServiceContext wsc = null;
        // If a WebServiceContext was created, get it from the MessageContext
        if (mc != null) {
            wsc = (WebServiceContext) mc.getProperty(WEBSERVICE_MESSAGE_CONTEXT);
        }
       
View Full Code Here

        assertTrue("WebServiceContext did not expose " + propertyName.value, isFound.value);
       
        // Make sure that the WebServiceContext's contents don't persist after the
        // invocation.  This is necessary to ensure proper gc and avoid accidental misuse.
        WebServiceContext wsc = org.apache.axis2.jaxws.context.MessageContextImpl.webServiceContext;
       
        assertTrue("WebServiceContext resources were not freed",
                   wsc.getMessageContext() == null);

        if (exType != null)
            assertTrue("Type of " + propertyName.value + " does not match [" + type.value + ", " + exType + "]",
                    type.value != null && type.value.indexOf(exType) > -1);
View Full Code Here

     * This method will provide the necessary function in order to inject
     * a WebServiceContext instance on a member of the service implementation class.
     */
    protected void performWebServiceContextInjection(MessageContext mc, Object serviceImpl)
                                                                                           throws ResourceInjectionException {
        WebServiceContext wsContext = createWebServiceContext(mc);
        // Inject WebServiceContext
        injectWebServiceContext(mc, wsContext, serviceImpl);
        saveWebServiceContext(mc, wsContext);
    }
View Full Code Here

                                                                    throws ResourceInjectionException {
        javax.xml.ws.handler.MessageContext soapMessageContext = createSOAPMessageContext(mc);
        ServiceContext serviceContext = mc.getAxisMessageContext().getServiceContext();

        //Get WebServiceContext from ServiceContext
        WebServiceContext ws =
                (WebServiceContext) serviceContext.getProperty(WEBSERVICE_MESSAGE_CONTEXT);

        //Add the MessageContext for current invocation
        if (ws != null) {
            updateWebServiceContext(ws, soapMessageContext);
View Full Code Here

      {
         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

      {
         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

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.