Package org.jboss.ws.core.soap

Examples of org.jboss.ws.core.soap.MessageFactoryImpl.createMessage()


         "</soapenv:Envelope>";
     
      MessageFactory factory = new MessageFactoryImpl();
     
      ByteArrayInputStream inputStream = new ByteArrayInputStream(expMsg.getBytes());
      SOAPMessage soapMsg = factory.createMessage(null, inputStream);
           
      SOAPMessage message = factory.createMessage();
      message.getSOAPPart().setContent(soapMsg.getSOAPPart().getContent());
      message.saveChanges();
     
View Full Code Here


      MessageFactory factory = new MessageFactoryImpl();
     
      ByteArrayInputStream inputStream = new ByteArrayInputStream(expMsg.getBytes());
      SOAPMessage soapMsg = factory.createMessage(null, inputStream);
           
      SOAPMessage message = factory.createMessage();
      message.getSOAPPart().setContent(soapMsg.getSOAPPart().getContent());
      message.saveChanges();
     
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      message.writeTo(baos);
View Full Code Here

   {
      MessageFactoryImpl factory = new MessageFactoryImpl();
      factory.setStyle(style);
     
      ByteArrayInputStream inputStream = new ByteArrayInputStream(expXML.getBytes());
      SOAPMessage soapMsg = factory.createMessage(null, inputStream);
      SOAPEnvelope wasEnv = soapMsg.getSOAPPart().getEnvelope();
     
      String wasXML = DOMWriter.printNode(wasEnv, false);
      String wasBody = wasXML.substring(wasXML.indexOf("<env:Body>"));
      wasBody = wasBody.substring(0, wasBody.indexOf("</env:Body>") + 11);
View Full Code Here

              " </env:Header>" +
              " <env:Body/>" +
              "</env:Envelope>";

      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessage soapMessage = factory.createMessage(null, new ByteArrayInputStream(envStr.getBytes()));
      SOAPEnvelope soapEnv = soapMessage.getSOAPPart().getEnvelope();
      SOAPHeader soapHeader = soapEnv.getHeader();
      SOAPHeaderElement shElement = (SOAPHeaderElement)soapHeader.getChildElements().next();

      Name name = new NameImpl("Bar", "ns2", "http://org.jboss.ws/header2");
View Full Code Here

              " </env:Header>" +
              " <env:Body/>" +
              "</env:Envelope>";

      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessage soapMessage = factory.createMessage(null, new ByteArrayInputStream(envStr.getBytes()));
      SOAPEnvelope soapEnv = soapMessage.getSOAPPart().getEnvelope();
      SOAPHeader soapHeader = soapEnv.getHeader();
      SOAPHeaderElement shElement = (SOAPHeaderElement)soapHeader.getChildElements().next();

      Name name = new NameImpl("Bar", "ns2", "http://org.jboss.ws/header2");
View Full Code Here

                "</env:Header>" +
                "<env:Body/>" +
              "</env:Envelope>";

      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessage soapMessage = factory.createMessage();
      SOAPEnvelope soapEnv = soapMessage.getSOAPPart().getEnvelope();
      SOAPHeader soapHeader = soapEnv.getHeader();

      Name name = new NameImpl("Bar", "ns2", "http://org.jboss.ws/header2");
      SOAPHeaderElement soapHeaderElement = soapHeader.addHeaderElement(name);
View Full Code Here

      CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();

      ByteArrayInputStream inputStream = new ByteArrayInputStream(resEnvelope.getBytes());

      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessageImpl resMessage = (SOAPMessageImpl)factory.createMessage(null, inputStream);

      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
      msgContext.setSOAPMessage(resMessage);

      EndpointInvocation epInv = new EndpointInvocation(opMetaData);    
View Full Code Here

      CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();

      ByteArrayInputStream inputStream = new ByteArrayInputStream(resEnvelopeWithBoundHeader.getBytes());

      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessageImpl resMessage = (SOAPMessageImpl)factory.createMessage(null, inputStream);

      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
      msgContext.setSOAPMessage(resMessage);

      // Add bound header
View Full Code Here

      CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();

      ByteArrayInputStream inputStream = new ByteArrayInputStream(resEnvelopeWithUnboundHeader.getBytes());

      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessageImpl resMessage = (SOAPMessageImpl)factory.createMessage(null, inputStream);

      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
      msgContext.setSOAPMessage(resMessage);

      QName xmlName = new QName("http://somens", "OutHeader");
View Full Code Here

      CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();

      ByteArrayInputStream inputStream = new ByteArrayInputStream(resEnvelopeWithFault.getBytes());

      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessageImpl resMessage = (SOAPMessageImpl)factory.createMessage(null, inputStream);

      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
      msgContext.setSOAPMessage(resMessage);

      try
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.