Package org.xmlsoap.schemas.soap.envelope

Examples of org.xmlsoap.schemas.soap.envelope.Body


   */
  private String getColorFromMessage1(String messageText) {
    try {
      EnvelopeDocument ed=(org.xmlsoap.schemas.soap.envelope.EnvelopeDocument)XmlObject.Factory.parse(messageText);
      org.xmlsoap.schemas.soap.envelope.Envelope env = ed.getEnvelope();
      Body body = env.getBody();
      XmlObject[] arryStuff = XmlBeanUtils.getChildElements(body);
      if(arryStuff.length==0)
        return "Black";
      NotifyDocument.Notify ele = (NotifyDocument.Notify) arryStuff[0];
      NotificationMessageHolderType noteMess = ele.getNotificationMessageArray(0);
View Full Code Here


    private ManagementEventTypeImpl parseManagementEvent(String messageText)
            throws XmlException
    {
        EnvelopeDocument ed = (EnvelopeDocument) XmlObject.Factory.parse(messageText);
        org.xmlsoap.schemas.soap.envelope.Envelope env = ed.getEnvelope();
        Body body = env.getBody();
        XmlObject[] arryStuff = XmlBeanUtils.getChildElements(body);
        NotifyDocument.Notify ele = (NotifyDocument.Notify) arryStuff[0];
        NotificationMessageHolderType noteMess = ele.getNotificationMessageArray(0);
        XmlAnyTypeImpl mess = (XmlAnyTypeImpl) noteMess.getMessage();
        ManagementEventTypeImpl manEvt =
View Full Code Here

            WebMethod webMethod = beanInvocation.getMethod().getAnnotation(WebMethod.class);
            if (webMethod != null && webMethod.action() != null) {
                soapAction = webMethod.action();
            }
        }
        Body body = new Body();

        Throwable exception = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Throwable.class);
        if (exception == null) {
            exception = exchange.getIn().getHeader(Exchange.EXCEPTION_CAUGHT, Throwable.class);
        }
        final JAXBElement<?> content;
        if (exception != null) {
            content = createFaultFromException(exception);
        } else {
            content = createBodyContentFromObject(inputObject, soapAction);
        }
        body.getAny().add(content);
        Envelope envelope = new Envelope();
        envelope.setBody(body);
        JAXBElement<Envelope> envelopeEl = new ObjectFactory().createEnvelope(envelope);
        super.marshal(exchange, envelopeEl, stream);
    }
View Full Code Here

            if (webMethod != null && webMethod.action() != null) {
                soapAction = webMethod.action();
            }
        }
               
        Body body = new Body();
        Header header = new Header();

        Throwable exception = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Throwable.class);
        if (exception == null) {
            exception = exchange.getIn().getHeader(Exchange.EXCEPTION_CAUGHT, Throwable.class);
        }
       
        final List<JAXBElement<?>> bodyContent;
        List<JAXBElement<?>> headerContent = new ArrayList<JAXBElement<?>>();
        if (exception != null) {
            bodyContent = new ArrayList<JAXBElement<?>>();
            bodyContent.add(createFaultFromException(exception));
        } else {
            bodyContent = createContentFromObject(inputObject, soapAction, headerContent);
        }
      
        for (JAXBElement<?> elem : bodyContent) {
            body.getAny().add(elem);
        }
        for (JAXBElement<?> elem : headerContent) {
            header.getAny().add(elem);
        }
        Envelope envelope = new Envelope();
View Full Code Here

   * @throws Exception
   */
  public String execute() throws Exception {
    String strRet = null;
    Envelope env = this.xmlToEnvelope(this.soapRequest);
    Body body = env.getBody();
    String bodyXml = this.bodyToXML(body);
    SoapMethodCall smc = this.parseSoapBody(bodyXml);
    String methodRequest = smc.getMethodName();
    WebMethod webMethod = this.hashWebMethods.get(methodRequest);
    strRet = this.doNativeMethodCall(webMethod, smc);
View Full Code Here

    private JAXBElement<Envelope> createJAXBEnvelope() {
        org.xmlsoap.schemas.soap.envelope.ObjectFactory factory =
            new org.xmlsoap.schemas.soap.envelope.ObjectFactory();
        Envelope env = new Envelope();
       
        Body body = new Body();
        env.setBody(body);
       
        JAXBElement<Envelope> jaxbEnv = factory.createEnvelope(env);
        return jaxbEnv;
    }
View Full Code Here

        return dataFormat;
    }

    @Override
    public Object doMarshal(Exchange exchange, Object inputObject, OutputStream stream, String soapAction) throws IOException {
        Body body = objectFactory.createBody();
        Header header = objectFactory.createHeader();

        Throwable exception = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Throwable.class);
        if (exception == null) {
            exception = exchange.getIn().getHeader(Exchange.EXCEPTION_CAUGHT, Throwable.class);
        }

        final List<JAXBElement<?>> bodyContent;
        List<JAXBElement<?>> headerContent = new ArrayList<JAXBElement<?>>();
        if (exception != null) {
            bodyContent = new ArrayList<JAXBElement<?>>();
            bodyContent.add(createFaultFromException(exception));
        } else {
            bodyContent = getDataFormat().createContentFromObject(inputObject, soapAction, headerContent);
        }

        for (JAXBElement<?> elem : bodyContent) {
            body.getAny().add(elem);
        }
        for (JAXBElement<?> elem : headerContent) {
            header.getAny().add(elem);
        }
        Envelope envelope = new Envelope();
View Full Code Here

        //get envelope
        XmlObject xmlObject = XmlObject.Factory.parse(incomingMsg);
        assertTrue("The returned message was not a SOAP Envelope.", xmlObject instanceof EnvelopeDocument);
        EnvelopeDocument envelope = (EnvelopeDocument) xmlObject;
        Body body = envelope.getEnvelope().getBody();

        XmlObject event = null;
        if (isWrapped) //wrapped
        {
            //get notify
View Full Code Here

        //get envelope
        XmlObject xmlObject = XmlObject.Factory.parse( incomingMsg );
        assertTrue( "The returned message was not a SOAP Envelope.", xmlObject instanceof EnvelopeDocument );
        EnvelopeDocument envelope = (EnvelopeDocument) xmlObject;
        Body body = envelope.getEnvelope().getBody();

        XmlObject mgmtEventElem = null;
        if ( ResourceStub.USE_WRAPPED_NOTIFICATIONS ) //wrapped
        {
            //get notify
View Full Code Here

            WebMethod webMethod = beanInvocation.getMethod().getAnnotation(WebMethod.class);
            if (webMethod != null && webMethod.action() != null) {
                soapAction = webMethod.action();
            }
        }
        Body body = new Body();

        Throwable exception = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Throwable.class);
        if (exception == null) {
            exception = exchange.getIn().getHeader(Exchange.EXCEPTION_CAUGHT, Throwable.class);
        }
        final JAXBElement<?> content;
        if (exception != null) {
            content = createFaultFromException(exception);
        } else {
            content = createBodyContentFromObject(inputObject, soapAction);
        }
        body.getAny().add(content);
        Envelope envelope = new Envelope();
        envelope.setBody(body);
        JAXBElement<Envelope> envelopeEl = new ObjectFactory().createEnvelope(envelope);
        super.marshal(exchange, envelopeEl, stream);
    }
View Full Code Here

TOP

Related Classes of org.xmlsoap.schemas.soap.envelope.Body

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.