Examples of DeserializationContext


Examples of org.apache.axis.encoding.DeserializationContext

        log.debug(msgString);
        log.debug("---");

        StringReader reader = new StringReader(msgString);

        DeserializationContext dser = new DeserializationContextImpl(
            new InputSource(reader), msgContext, org.apache.axis.Message.REQUEST);
        dser.parse();

        SOAPEnvelope env = dser.getEnvelope();
        RPCElement rpcElem = (RPCElement)env.getFirstBody();
        RPCParam struct = rpcElem.getParam("struct");
        assertNotNull("No <struct> param", struct);

        Data val = (Data)struct.getValue();
View Full Code Here

Examples of org.apache.axis.encoding.DeserializationContext

     * @throws Exception
     */
    public void testSAXXXE3() throws Exception
    {
        StringReader strReader3 = new StringReader(msg2);
        DeserializationContext dser = new DeserializationContextImpl(
            new InputSource(strReader3), null, org.apache.axis.Message.REQUEST);
        dser.parse();
        SOAPEnvelope env = dser.getEnvelope();
        SOAPBodyElement body = (SOAPBodyElement)env.getBody().getChildElements().next();
        assertNotNull(body);
        MessageElement child = (MessageElement)body.getChildElements().next();
        assertNotNull(child);
        Iterator i = child.getAllAttributes();
View Full Code Here

Examples of org.apache.axis.encoding.DeserializationContext

     * @throws Exception
     */
    public void testNSStack() throws Exception
    {
        StringReader strReader3 = new StringReader(msg3);
        DeserializationContext dser = new DeserializationContextImpl(
            new InputSource(strReader3), null, org.apache.axis.Message.REQUEST);
        dser.parse();
        org.apache.axis.message.SOAPEnvelope env = dser.getEnvelope();
        String xml = env.toString();
        assertXMLEqual(xml,msg3);
    }
View Full Code Here

Examples of org.apache.axis.encoding.DeserializationContext

        SerializationContext context = new SerializationContextImpl(writer, msgContext);
        msg.output(context);
        writer.flush();
       
        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
        DeserializationContext dser = new DeserializationContextImpl(
            new InputSource(bais), msgContext, org.apache.axis.Message.REQUEST);
        dser.parse();
       
        SOAPEnvelope env = dser.getEnvelope();
        RPCElement rpcElem = (RPCElement)env.getFirstBody();
        RPCParam output = rpcElem.getParam("testParam");
        assertNotNull("No <testParam> param", output);
       
        String result = (String)output.getValue();
View Full Code Here

Examples of org.apache.axis.encoding.DeserializationContext

        log.debug(msgString);
        log.debug("---");

        StringReader reader = new StringReader(msgString);

        DeserializationContext dser = new DeserializationContextImpl(
            new InputSource(reader), msgContext, org.apache.axis.Message.REQUEST);
        dser.parse();

        SOAPEnvelope env = dser.getEnvelope();
        RPCElement rpcElem = (RPCElement)env.getFirstBody();
        RPCParam struct = rpcElem.getParam("struct");
        assertNotNull("No <struct> param", struct);

        Data val = (Data)struct.getValue();
View Full Code Here

Examples of org.apache.axis.encoding.DeserializationContext

       message.output(context);
       stringWriter.close();
       String messageString = stringWriter.getBuffer().toString();
       logger.debug(messageString);
       Reader reader = new StringReader(messageString);
       DeserializationContext deserializer = new DeserializationContextImpl(new InputSource(reader),
                                                                           messageContext,
                                                                           Message.REQUEST);
       deserializer.parse();
       SOAPEnvelope env = deserializer.getEnvelope();
      
       RPCElement rpcElem = (RPCElement)env.getFirstBody();
       Vector parameters = rpcElem.getParams();
       RPCParam param = (RPCParam) parameters.get(0);
       return param.getValue();
View Full Code Here

Examples of org.apache.axis.encoding.DeserializationContext

        if ( currentForm == FORM_INPUTSTREAM ) {
            is = new InputSource( (InputStream) currentMessage );
        } else {
            is = new InputSource(new StringReader(getAsString()));
        }
        DeserializationContext dser = new DeserializationContextImpl(is,
                                           getMessage().getMessageContext(),
                                           getMessage().getMessageType());

        // This may throw a SAXException
        try {
            dser.parse();
        } catch (SAXException e) {
            Exception real = e.getException();
            if (real == null)
                real = e;
            throw AxisFault.makeFault(real);
        }

        SOAPEnvelope nse= dser.getEnvelope();
        if(currentMessageAsEnvelope != null){
          //Need to synchronize back processed header info.
          Vector newHeaders= nse.getHeaders();
          Vector oldHeaders= currentMessageAsEnvelope.getHeaders();
          if( null != newHeaders && null != oldHeaders){
View Full Code Here

Examples of org.apache.axis.encoding.DeserializationContext

    }

    public void testAddChild() throws Exception {
        SOAPConstants sc = SOAPConstants.SOAP11_CONSTANTS;
        EnvelopeBuilder eb = new EnvelopeBuilder(Message.REQUEST, sc);
        DeserializationContext dc = new DeserializationContextImpl(null,
                                                                   eb);
        MessageElement parent = new MessageElement("parent.names",
                                                "parent",
                                                "parns",
                                                null,
View Full Code Here

Examples of org.apache.axis.encoding.DeserializationContext

        assertTrue("Unexpected child", !c1only.hasNext());
    }
    public void testDetachNode() throws Exception {
        SOAPConstants sc = SOAPConstants.SOAP11_CONSTANTS;
        EnvelopeBuilder eb = new EnvelopeBuilder(Message.REQUEST, sc);
        DeserializationContext dc = new DeserializationContextImpl(null,
                                                                   eb);
        SOAPElement parent = new MessageElement("parent.names",
                                                "parent",
                                                "parns",
                                                null,
View Full Code Here

Examples of org.apache.axis.encoding.DeserializationContext

        log.debug(msgString);
        log.debug("---");

        StringReader reader = new StringReader(msgString);

        DeserializationContext dser = new DeserializationContextImpl(
            new InputSource(reader), msgContext, org.apache.axis.Message.REQUEST);
        dser.parse();

        SOAPEnvelope env = dser.getEnvelope();
        RPCElement rpcElem = (RPCElement)env.getFirstBody();
        RPCParam struct = rpcElem.getParam("struct");
        assertNotNull("No <struct> param", struct);

        Data val = (Data)struct.getValue();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.