Package org.apache.axis.encoding

Examples of org.apache.axis.encoding.DeserializationContext$LocalIDResolver


        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


        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

       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

        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

    }

    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

        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

        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

                reader = new StringReader(msgString);
            } else {
                reader = new FileReader(args[0]);
            }

            DeserializationContext dser = new DeserializationContext(new InputSource(reader), msgContext, org.apache.axis.Message.REQUEST);
            dser.parse();
            SOAPEnvelope env = dser.getEnvelope();
            //System.out.println("********\n" + DOM2Writer.nodeToString(env, true) + "\n********");
           
            RPCElement rpcElem = (RPCElement) env.getFirstBody();
            RPCParam struct = rpcElem.getParam("struct");
            if (struct == null)
View Full Code Here

            is = new InputSource( (InputStream) currentMessage );
        } else {
            is = new InputSource(new StringReader(getAsString()));
        }
        SAXParser parser = XMLUtils.getSAXParser();
        DeserializationContext dser =
            new DeserializationContext(msgContext, messageType);
       
        // This may throw a SAXException
        try {
            parser.parse(is, dser);
        } catch (SAXException e) {
            Exception real = e.getException();
            if (real == null)
                real = e;
            throw new AxisFault(real);
        } catch (IOException ioe) {
            throw new AxisFault(ioe);
        }

        setCurrentMessage(dser.getEnvelope(), FORM_SOAPENVELOPE);
        Debug.Print( 2, "Exit: Message::getAsSOAPEnvelope" );
        return( (SOAPEnvelope) currentMessage );
    }
View Full Code Here

    }

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

TOP

Related Classes of org.apache.axis.encoding.DeserializationContext$LocalIDResolver

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.