Examples of DeserializationContext


Examples of org.apache.axis.encoding.DeserializationContext

             */
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            resMsg.writeTo(out);
            ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());

            DeserializationContext dser =
                new DeserializationContext(new InputSource(in), resMsg.getMessageContext(), null);
            dser.parse();
            SOAPEnvelope responseEnvelope = dser.getEnvelope();

            SOAPBodyElement bodyEl = responseEnvelope.getFirstBody();
            if (bodyEl == null) {
                return null;
            }
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);
        }

        setCurrentMessage(dser.getEnvelope(), FORM_SOAPENVELOPE);
        log.debug(JavaUtils.getMessage(
                "exit00", "SOAPPart::getAsSOAPEnvelope"));
        return (SOAPEnvelope)currentMessage;
    }
View Full Code Here

Examples of org.apache.axis.encoding.DeserializationContext

    }

    public SOAPEnvelope(InputStream input) throws SAXException {
        InputSource is = new InputSource(input);
        header = new SOAPHeader(this, soapConstants); // soapConstants = null!
        DeserializationContext dser = null ;
        AxisClient     tmpEngine = new AxisClient(new NullProvider());
        MessageContext msgContext = new MessageContext(tmpEngine);
        dser = new DeserializationContextImpl(is, msgContext,
                                              Message.REQUEST, this );
        dser.parse();
    }
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

            case STATE_SKIPPED_ENTITY:
                handler.skippedEntity(st.getSymbol(events.get(n,1)));
                break;
            case STATE_NEWELEMENT:
                if (handler instanceof DeserializationContext) {
                    DeserializationContext context =
                              (DeserializationContext)handler;
                    context.setCurElement(
                              (MessageElement)elements.get(events.get(n,1)));
                }
                break;
            }
        }
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);
        SOAPElement parent = new MessageElement("parent.names",
                                                "parent",
                                                "parns:parent",
                                                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:parent",
                                                null,
View Full Code Here

Examples of org.apache.axis.encoding.DeserializationContext

             */
            final ByteArrayOutputStream out = new ByteArrayOutputStream();
            resMsg.writeTo(out);
            final ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());

            final DeserializationContext dser =
                new DeserializationContext(new InputSource(in), resMsg.getMessageContext(), null);
            dser.parse();
            final SOAPEnvelope responseEnvelope = dser.getEnvelope();

            final SOAPBodyElement bodyEl = responseEnvelope.getFirstBody();
            if (bodyEl == null) {
                return null;
            }
View Full Code Here

Examples of org.apache.axis.encoding.DeserializationContext

             */
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            resMsg.writeTo(out);
            ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());

            DeserializationContext dser =
                new DeserializationContext(new InputSource(in), resMsg.getMessageContext(), null);
            dser.parse();
            SOAPEnvelope responseEnvelope = dser.getEnvelope();

            SOAPBodyElement bodyEl = responseEnvelope.getFirstBody();
            if (bodyEl == null) {
                return null;
            }
View Full Code Here

Examples of org.apache.axis.encoding.DeserializationContext

        soapMessage=xml; // use it as it is
        leader=xml.substring(0, 20);
         if(!leader.contains("Envelope"))
            soapMessage=EnvelopeStart+soapMessage+EnvelopeEnd;
        DeserializationContext dser = new DeserializationContext(
            new InputSource(new StringReader(soapMessage)),
            new MessageContext(new AxisServer()),
            org.apache.axis.Message.RESPONSE);
        try {
            dser.parse();

            SOAPEnvelope env = dser.getEnvelope();
            RPCElement rpcElem = (RPCElement)env.getFirstBody();
            String objectType=rpcElem.getLocalName();
            if(objectType.equals("searchRetrieveRequest"))
                obj=rpcElem.getObjectValue(SearchRetrieveRequestType.class);
            else if(objectType.equals("searchRetrieveResponse"))
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.