Examples of saveRequired()


Examples of javax.xml.soap.SOAPMessage.saveRequired()

         // TODO: there should be a clear transition to an immutable object model
         XOPContext.eagerlyCreateAttachments();

         // save object model changes
         SOAPMessage soapMessage = (SOAPMessage)reqMessage;
         if (reqMessage != null && soapMessage.saveRequired())
            soapMessage.saveChanges();

         return super.invoke(reqMessage, endpoint, oneway);
      }
      catch (SOAPException ex)
View Full Code Here

Examples of javax.xml.soap.SOAPMessage.saveRequired()

        AttachmentPart ap2 = msg.createAttachmentPart(dh);
        ap2.setContentType("image/jpg");
        msg.addAttachmentPart(ap2);

        // Test for Bug #17664
        if(msg.saveRequired()) {
            msg.saveChanges();
        }
        MimeHeaders headers = msg.getMimeHeaders();
        assertTrue(headers != null);
        String [] contentType = headers.getHeader("Content-Type")
View Full Code Here

Examples of javax.xml.soap.SOAPMessage.saveRequired()

        Detail d;
        d = fault.addDetail();
        d.addDetailEntry(factory.createName("Hello"));
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        if (outputmsg != null) {
            if (outputmsg.saveRequired()) {
                outputmsg.saveChanges();
            }
            outputmsg.writeTo(baos);
        }
        String xml = new String(baos.toByteArray());
View Full Code Here

Examples of javax.xml.soap.SOAPMessage.saveRequired()

      AttachmentPart attachment2 = msg1.createAttachmentPart();
      attachment2.setContent(img, "image/png");
      attachment2.setContentId("<attachment2@test.ws.jboss.org>");
      msg1.addAttachmentPart(attachment2);

      if (msg1.saveRequired())
         msg1.saveChanges();

      String type = msg1.getMimeHeaders().getHeader(MimeConstants.CONTENT_TYPE)[0];
      File file = File.createTempFile("JBossWSAttachmentTest", ".dat");
      file.deleteOnExit();
View Full Code Here

Examples of javax.xml.soap.SOAPMessage.saveRequired()

        } catch (XMLStreamException e) {
            throw (e.getCause() instanceof SOAPException) ? (SOAPException) e.getCause() : new SOAPException(e);
        }
        msg = writer.getSOAPMessage();
        addAttachmentsToSOAPMessage(msg, message);       
        if (msg.saveRequired())
          msg.saveChanges();
        return msg;
  }
 
    public SOAPMessage readAsSOAPMessageSax2Dom(final SOAPVersion soapVersion, final Message message) throws SOAPException {
View Full Code Here

Examples of javax.xml.soap.SOAPMessage.saveRequired()

            message.writeTo(s2d, XmlUtil.DRACONIAN_ERROR_HANDLER);
        } catch (SAXException e) {
            throw new SOAPException(e);
        }
        addAttachmentsToSOAPMessage(msg, message);       
        if (msg.saveRequired())
            msg.saveChanges();
        return msg;
    }
 
  static protected void addAttachmentsToSOAPMessage(SOAPMessage msg, Message message) {
View Full Code Here

Examples of javax.xml.soap.SOAPMessage.saveRequired()

        Detail d;
        d = fault.addDetail();
        d.addDetailEntry(factory.createName("Hello"));
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        if (outputmsg != null) {
            if (outputmsg.saveRequired()) {
                outputmsg.saveChanges();
            }
            outputmsg.writeTo(baos);
        }
        String xml = new String(baos.toByteArray());
View Full Code Here

Examples of javax.xml.soap.SOAPMessage.saveRequired()

        fault.setFaultCode(valueCode);
        fault.setFaultString(valueString);
        Detail detail = fault.addDetail();
        detail.addDetailEntry(factory.createName("Hello"));
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        if (outputmsg.saveRequired()) {
            outputmsg.saveChanges();
        }
        outputmsg.writeTo(baos);
        String xml = new String(baos.toByteArray());
        assertTrue(xml.indexOf("Hello") != -1);
View Full Code Here

Examples of javax.xml.soap.SOAPMessage.saveRequired()

        AttachmentPart ap2 = msg.createAttachmentPart(dh);
        ap2.setContentType("image/jpg");
        msg.addAttachmentPart(ap2);

        // Test for Bug #17664
        if(msg.saveRequired()) {
            msg.saveChanges();
        }
        MimeHeaders headers = msg.getMimeHeaders();
        assertTrue(headers != null);
        String [] contentType = headers.getHeader("Content-Type")
View Full Code Here

Examples of javax.xml.soap.SOAPMessage.saveRequired()

            if (secServ != null && wssSucceded) {
                Ejb2RuntimeEndpointInfo endpointInfo2 = (Ejb2RuntimeEndpointInfo)endpointInfo;
                secServ.secureResponse(endpointInfo2.getServerAuthConfig(),(StreamingHandler)endpointInfo2.getHandlerImplementor().getHandler(),msgContext);
            }
           
            if (reply.saveRequired()) {
                reply.saveChanges();
            }
            wsUtil.writeReply(resp, msgContext);
        } catch (Throwable e) {
            String errorMessage = "invocation error on ejb endpoint " +
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.