Java 8 WebServiceContext - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 WebServiceContext class.

This code example shows how to use the following methods:getMessageContext
    @Oneway 
    public void completeOperation( 
        @WebParam(name = "Complete", targetNamespace = "http://schemas.arjuna.com/ws/2005/10/wsarjtx", partName = "parameters") 
        NotificationType parameters)
    { 
        MessageContext ctx = webServiceCtx.getMessageContext();
        HttpServletRequest request = (HttpServletRequest)ctx.get(MessageContext.SERVLET_REQUEST);
        final NotificationType complete = parameters;
        final MAP inboundMap = AddressingHelper.inboundMap(ctx);
        final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
 
        TaskManager.getManager().queueTask(new Task() { 
            public void executeTask() { 
                TerminationCoordinatorProcessor.getProcessor().complete(complete, inboundMap, arjunaContext) ;
            } 
        }) ; 
    } 
 
    /** 
     * 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getMessageContext
    @Oneway 
    @Action(input="http://fabrikam123.com/Response") 
    @RequestWrapper(localName = "Response", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType") 
    public void response() 
    { 
        MessageContext ctx = webServiceCtx.getMessageContext();
        MAP inboundMap = AddressingHelper.inboundMap(ctx);
 
        ATInitiatorProcessor.getInitiator().handleResponse(inboundMap) ;
    } 
 
    @WebMethod(operationName = "SoapFault", action = "http://fabrikam123.com/SoapFault") 
    @Oneway 
    @Action(input="http://fabrikam123.com/SoapFault") 
    @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
    public void soapFault( 
            @WebParam(name = "Fault", targetNamespace = "http://schemas.xmlsoap.org/soap/envelope/", partName = "parameters") 
            Fault fault)
    { 
        MessageContext ctx = webServiceCtx.getMessageContext();
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getMessageContext
    @Oneway 
    @Action(input="http://www.wstf.org/docs/scenarios/sc007/Response") 
    @RequestWrapper(localName = "Response", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.wstf.webservices.sc007.generated.TestMessageType") 
    public void response() 
    { 
        MessageContext ctx = webServiceCtx.getMessageContext();
        MAP inboundMap = AddressingHelper.inboundMap(ctx);
 
        InitiatorProcessor.getInitiator().handleResponse(inboundMap) ;
    } 
 
    @WebMethod(operationName = "SoapFault", action = "http://www.wstf.org/docs/scenarios/sc007/SoapFault") 
    @Oneway 
    @Action(input="http://www.wstf.org/docs/scenarios/sc007/SoapFault") 
    @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
    public void soapFault( 
            @WebParam(name = "Fault", targetNamespace = "http://schemas.xmlsoap.org/soap/envelope/", partName = "parameters") 
            Fault fault)
    { 
        MessageContext ctx = webServiceCtx.getMessageContext();
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getMessageContext
    @Oneway 
    @Action(input="http://fabrikam123.com/wsba/Response") 
    @RequestWrapper(localName = "Response", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType") 
    public void response() 
    { 
        MessageContext ctx = webServiceCtx.getMessageContext();
        MAP inboundMap = AddressingHelper.inboundMap(ctx);
 
        BAInitiatorProcessor.getInitiator().handleResponse(inboundMap) ;
    } 
 
    public void soapFault( 
            @WebParam(name = "Fault", targetNamespace = "http://schemas.xmlsoap.org/soap/envelope/", partName = "fault") 
            Fault fault)
    { 
        MessageContext ctx = webServiceCtx.getMessageContext();
        MAP inboundMap = AddressingHelper.inboundMap(ctx);
 
        SoapFault11 soapFaultInternal = SoapFault11.fromFault(fault);
        BAInitiatorProcessor.getInitiator().handleSoapFault(soapFaultInternal, inboundMap) ;
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getMessageContext
    @Action(input="http://docs.oasis-open.org/ws-tx/wsat/2006/06/Commit") 
    public void commitOperation( 
        @WebParam(name = "Commit", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "parameters") 
        Notification parameters) 
    { 
        MessageContext ctx = webServiceCtx.getMessageContext();
        final Notification commit = parameters; 
        final MAP inboundMap = AddressingHelper.inboundMap(ctx);
        final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
 
        TaskManager.getManager().queueTask(new Task() { 
            public void executeTask() { 
                CompletionCoordinatorProcessor.getProcessor().commit(commit, inboundMap, arjunaContext) ;
            } 
        }) ; 
    } 
 
    /** 
     * 
     * @param parameters 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getMessageContext
    public NotificationType cancelOperation( 
        @WebParam(partName = "parameters", name = "Cancel", targetNamespace = "http://schemas.arjuna.com/ws/2005/10/wsarjtx") 
        NotificationType parameters
    ) 
    { 
        MessageContext ctx = webServiceCtx.getMessageContext();
        final NotificationType cancel = parameters;
        final MAP inboundMap = AddressingHelper.inboundMap(ctx);
        final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
 
        TerminationCoordinatorRPCProcessor.getProcessor().cancel(cancel, inboundMap, arjunaContext) ;
        return new NotificationType(); 
    } 
 
    @WebResult(name = "Closed", targetNamespace = "http://schemas.arjuna.com/ws/2005/10/wsarjtx", partName = "parameters") 
    @WebMethod(operationName = "CloseOperation", action = "http://schemas.arjuna.com/ws/2005/10/wsarjtx/Close") 
    public NotificationType closeOperation( 
        @WebParam(partName = "parameters", name = "Close", targetNamespace = "http://schemas.arjuna.com/ws/2005/10/wsarjtx") 
        NotificationType parameters
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getMessageContext
    @WebResult(name = "Result", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "result") 
    public boolean commitOperation( 
        @WebParam(name = "Commit", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "parameters") 
        Notification parameters) 
    { 
        MessageContext ctx = webServiceCtx.getMessageContext();
        final Notification commit = parameters; 
        final MAP inboundMap = AddressingHelper.inboundMap(ctx);
        final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
 
        return CompletionCoordinatorRPCProcessor.getProcessor().commit(commit, inboundMap, arjunaContext) ;
    } 
 
    /** 
     * 
     * @param parameters 
     */ 
    @WebMethod(operationName = "RollbackOperation", action = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/Rollback") 
    @WebResult(name = "Result", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "result") 
    public boolean rollbackOperation( 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getMessageContext
    public org.oasis_open.docs.ws_tx.wscoor._2006._06.RegisterResponseType registerOperation( 
        @WebParam(targetNamespace = "http://docs.oasis-open.org/ws-tx/wscoor/2006/06", partName = "parameters", name = "Register") 
        org.oasis_open.docs.ws_tx.wscoor._2006._06.RegisterType parameters
    ) 
    { 
        MessageContext ctx = webServiceCtx.getMessageContext();
        HttpServletRequest request = (HttpServletRequest)ctx.get(MessageContext.SERVLET_REQUEST);
        boolean isSecure = "https".equals(request.getScheme());
        MAP inboundMap = AddressingHelper.inboundMap(ctx);
        final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx) ;
 
        return RegistrationCoordinatorProcessor.getCoordinator().register(parameters, inboundMap, arjunaContext, isSecure);
 
    } 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getMessageContext
    @Action(input="http://docs.oasis-open.org/ws-tx/wscoor/2006/06/CreateCoordinationContext", output="http://docs.oasis-open.org/ws-tx/wscoor/2006/06/CreateCoordinationContextResponse") 
    public CreateCoordinationContextResponseType createCoordinationContextOperation( 
        @WebParam(name = "CreateCoordinationContext", targetNamespace = "http://docs.oasis-open.org/ws-tx/wscoor/2006/06", partName = "parameters") 
        CreateCoordinationContextType parameters)
    { 
        MessageContext ctx = webServiceCtx.getMessageContext();
        HttpServletRequest request = (HttpServletRequest)ctx.get(MessageContext.SERVLET_REQUEST);
        boolean isSecure = "https".equals(request.getScheme());
        MAP inboundMAP = AddressingHelper.inboundMap(ctx);
        return ActivationCoordinatorProcessor.getCoordinator().createCoordinationContext(parameters, inboundMAP, isSecure);
   } 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getMessageContext
	        throw new RuntimeException("getHeaders() was not called on the handler"); 
	    } 
         */ 
 
        // for these properties tests to always pass, an inbound server-side handler must "put" them 
        MessageContext mc = ctx.getMessageContext();
        String propKey1 = "AddNumbersLogicalHandlerInboundAppScopedProperty";
        String propKey2 = "AddNumbersLogicalHandlerInboundHandlerScopedProperty";
        String value = (String)mc.get(propKey1);
        if (value == null)
            throw new RuntimeException("Property value for key \"" + propKey1 + "\" was null, but is APPLICATION scoped and should be accessible by the endpoint");
        if (mc.containsKey(propKey2))  // instead of "get", use "containsKey" to be a little more robust in testing
            throw new RuntimeException("MessageContext.containsKey reported true for key \"" + propKey2 + "\" was not null.  This property is HANDLER scoped and should not be accessible by the endpoint");
        TestLogger.logger.debug(">> Received addNumbersHandler request for " + arg0 + " and " + arg1);
        if (arg0 == 101) {
            throw new RuntimeException("Got value 101.  " +
                        "AddNumbersHandlerPortTypeImpl.addNumbersHandler method is " + 
                        "correctly throwing this exception as part of testing"); 
        } 
         
4
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Java 8 WebServiceContext Methods: