Package org.xmlsoap.schemas.soap.envelope

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


      //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


            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

        String response = sendPrinterRequest("GetPrinterPropertiesDoc.soap");
        System.out.println("Printer Prop Doc: \n" + response);
        assertTrue(response.indexOf("printer_properties") > -1);
        EnvelopeDocument envelopeDocument = loadResponseEnvelope(response);

        Body body = envelopeDocument.getEnvelope().getBody();
        XmlObject[] childElements = XmlBeanUtils.getChildElements(body, new QName("http://docs.oasis-open.org/wsrf/2004/11/wsrf-WS-ResourceProperties-1.2-draft-05.xsd","GetResourcePropertyDocumentResponse"));
        XmlObject childElement = childElements[0];
        XmlObject[] printerprops = XmlBeanUtils.getChildElements(childElement, new QName(PrinterPortPropertyQNames.QUEUED_JOB_COUNT.getNamespaceURI(), "printer_properties"));
        XmlInteger elem = (XmlInteger) XmlBeanUtils.getChildElements(printerprops[0], PrinterPortPropertyQNames.QUEUED_JOB_COUNT)[0];
        assertTrue(elem.getBigIntegerValue().intValue() == 0);
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

            LOG.debug( MSG.getMessage( Keys.RECEIVED_REQUEST ) );
            SOAPMessageContext soapMsgContext = (SOAPMessageContext) msgContext;
            SOAPEnvelope envelope = soapMsgContext.getMessage().getSOAPPart().getEnvelope();
            EnvelopeDocument envelopeDocXmlBean = EnvelopeDocument.Factory.parse( envelope.toString() );
            Envelope envelopeXmlBean = envelopeDocXmlBean.getEnvelope();
            Body body = envelopeXmlBean.getBody();

            ResourceContext resourceContext = createResourceContext( soapMsgContext );
            resourceContext.setProperty( SOAP_ENVELOPE_XMLBEAN, envelopeXmlBean );
            List responseBodyElems = new ArrayList();
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 = 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 = 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

            if(LOG.isDebugEnabled())
            {
                LOG.debug("The request envelope: \n" + envelope.toString());
            }
            Envelope envelopeXmlBean = envelopeDocXmlBean.getEnvelope();
            Body body = envelopeXmlBean.getBody();

            ResourceContext resourceContext = createResourceContext( soapMsgContext );
            resourceContext.setProperty( SOAP_ENVELOPE_XMLBEAN, envelopeXmlBean );
            List responseBodyElems = new ArrayList();
View Full Code Here

   * @throws XmlException
   */
  private NotificationMessageHolderType getNotificationMessageHolder(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);
    return noteMess;
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

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.