Package org.apache.axis2.databinding

Examples of org.apache.axis2.databinding.DeserializationContext


            AnonymousServiceFactory.getAnonymousService(synapseOutMessageContext.getConfiguration(),
            axisCfg, wsAddressingEnabled, wsRMEnabled, wsSecurityEnabled);
        // mark the anon services created to be used in the client side of synapse as hidden
        // from the server side of synapse point of view
        anoymousService.getParent().addParameter(SynapseConstants.HIDDEN_SERVICE_PARAM, "true");
        ServiceGroupContext sgc = new ServiceGroupContext(
            axisCfgCtx, (AxisServiceGroup) anoymousService.getParent());
        ServiceContext serviceCtx = sgc.getServiceContext(anoymousService);

        boolean outOnlyMessage = "true".equals(synapseOutMessageContext.getProperty(
                SynapseConstants.OUT_ONLY)) || WSDL2Constants.MEP_URI_IN_ONLY.equals(
                originalInMsgCtx.getOperationContext()
                        .getAxisOperation().getMessageExchangePattern());
View Full Code Here


        SOAPEnvelope respEnv = resMsgCtx.getEnvelope();
        assertNotNull("No response envelope!", respEnv);

        RPCInOutMessageReceiver receiver = new RPCInOutMessageReceiver();
        // Got a response envelope, let's deserialize it back to Java
        DeserializationContext dserContext = new DeserializationContext();
        values = receiver.deserializeRPCElement(dserContext, method, respEnv.getBody().getFirstElement());

        Object ret = method.getResponseParameter().getValue(values);
        assertNotNull("No return parameter value", ret);
        assertTrue("Return wasn't a String []", ret instanceof String []);
View Full Code Here

        }

        Method javaMethod = method.getJavaMethod();
        Object [] arguments = null;
        Object targetObject = this.getTheImplementationObject(inMessage);
        DeserializationContext dserContext = new DeserializationContext();

        // Run each argument (sub-element) through the appropriate deser
        Iterator args = rpcElement.getChildElements();
        Map elementCounts = new HashMap();
        while (args.hasNext()) {
            OMElement arg = (OMElement) args.next();
            QName qname = arg.getQName();
            RPCParameter param = method.getParameter(qname);
            if (param == null) {
                // unknown parameter.  Fault or continue depending on
                // strictness configuration.
                continue;
            }
            Integer count = (Integer)elementCounts.get(qname);
            if (count == null) count = new Integer(0);
            elementCounts.put(qname, new Integer(count.intValue() + 1));
            Deserializer dser = param.getDeserializer(count.intValue());
            // Got a recognized param, so feed this through the deserializer
            try {
                dserContext.deserialize(arg.getXMLStreamReader(), dser);
            } catch (Exception e) {
                throw AxisFault.makeFault(e);
            }
        }

        // OK, now we're done with the children.  If this is SOAP 1.2, we're
        // finished.  If it's SOAP 1.1, there may be multirefs which still
        // need to be deserialized after the RPC element.
        if (dserContext.isIncomplete()) {
            try {
                dserContext.processRest(rpcElement);
            } catch (Exception e) {
                throw AxisFault.makeFault(e);
            }

            if (dserContext.isIncomplete()) {
                throw new AxisFault("Unresolved multirefs!");
            }
        }

        arguments = new Object [method.getNumInParams()];
View Full Code Here

       
        SOAPEnvelope respEnv = call.invokeBlocking("echoArray", env);
        assertNotNull("No response envelope!", respEnv);

        // Got a response envelope, let's deserialize it back to Java
        DeserializationContext dserContext = new DeserializationContext();
        values = dserContext.deserializeRPCElement(method, respEnv.getBody().getFirstElement());

        Object ret = method.getResponseParameter().getValue(values);
        assertNotNull("No return parameter value", ret);
        assertTrue("Return wasn't a String []", ret instanceof String []);
        String [] retArray = (String[])ret;
View Full Code Here

        Method javaMethod = method.getJavaMethod();
        Object [] arguments = null;
        Object targetObject = this.getTheImplementationObject(inMessage);

        DeserializationContext dserContext = new DeserializationContext();
        RPCValues values = null;
        try {
            values = dserContext.deserializeRPCElement(method, rpcElement);
        } catch (Exception e) {
            throw AxisFault.makeFault(e);
        }

        arguments = new Object [method.getNumInParams()];
View Full Code Here

        Method javaMethod = method.getJavaMethod();
        Object [] arguments = null;
        Object targetObject = this.getTheImplementationObject(inMessage);

        DeserializationContext dserContext = new DeserializationContext();
        RPCValues values = null;
        try {
            values = deserializeRPCElement(dserContext, method, rpcElement);
        } catch (Exception e) {
            throw AxisFault.makeFault(e);
View Full Code Here

            deploymentFileData.setClassLoader(isDirectory, getClass().getClassLoader(),
                    (File) cfgCtx.getAxisConfiguration().getParameterValue(
                            Constants.Configuration.ARTIFACTS_TEMP_DIR),
                    cfgCtx.getAxisConfiguration().isChildFirstClassLoading());

            DeploymentClassLoader urlCl
                = (DeploymentClassLoader)deploymentFileData.getClassLoader();
            Thread.currentThread().setContextClassLoader(urlCl);

            // StartupFactory registration
            for (StartupFactory factory : getProviders(StartupFactory.class, urlCl)) {
View Full Code Here

    private void handleException(String message, Exception e) throws DeploymentException {
        if (log.isDebugEnabled()) {
            log.debug(message, e);
        }
        throw new DeploymentException(message, e);
    }
View Full Code Here

    private void handleException(String message, Throwable t) throws DeploymentException {
        if (log.isDebugEnabled()) {
            log.debug(message, t);
        }
        throw new DeploymentException(message, t);
    }
View Full Code Here

            }
        } else {
            String msg = "Artifact representing the filename "
                    + fileName + " is not deployed on Synapse";
            log.error(msg);
            throw new DeploymentException(msg);
        }

        if (log.isDebugEnabled()) {
            log.debug("UnDeployment of the synapse artifact from file : "
                    + fileName + " : COMPLETED");
View Full Code Here

TOP

Related Classes of org.apache.axis2.databinding.DeserializationContext

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.