Package org.jboss.ws.core.soap

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


   // [JBWS-745] SAAJ:SOAPBodyElement.addNamespaceDeclaration should allow empty prefix
   public void testAddNamespaceDeclaration() throws Exception
   {
      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessage soapMsg = factory.createMessage();
      SOAPEnvelope env = soapMsg.getSOAPPart().getEnvelope();

      assertEquals("env:Envelope", env.getNodeName());
      assertEquals(Constants.NS_SOAP11_ENV, env.getNamespaceURI());
     
View Full Code Here


      assertTrue("File exists: " + envFile, envFile.exists());

      FileInputStream inputStream = new FileInputStream(envFile);

      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessage soapMsg = factory.createMessage(null, inputStream);
      SOAPEnvelope env = soapMsg.getSOAPPart().getEnvelope();

      assertEquals("SOAP-ENV:Envelope", env.getNodeName());
      assertEquals(Constants.NS_SOAP11_ENV, env.getNamespaceURI());
   }
View Full Code Here

         "</soapenv:Envelope>";
     
      MessageFactory factory = new MessageFactoryImpl();
      ByteArrayInputStream inputStream = new ByteArrayInputStream(expMsg.getBytes());
      StreamSource source = new StreamSource(inputStream);
      SOAPMessage message = factory.createMessage();
      message.getSOAPPart().setContent(source);
      message.saveChanges();
     
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      message.writeTo(baos);
View Full Code Here

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

         "</soap:Envelope>";

      InputStream inputStream = new FileInputStream("resources/jaxrpc/wsse/interop/microsoft-wse.xml");

      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessage soapMsg = factory.createMessage(null, inputStream);
      SOAPEnvelope soapEnv = soapMsg.getSOAPPart().getEnvelope();

      // The Microsoft WSE message is timestamp protected like so:
      // <wsu:Timestamp wsu:Id="Timestamp-9e3e6632-f2a1-4b26-a682-9301a75003a7">
      //   <wsu:Created>2005-09-26T22:17:32Z</wsu:Created>
View Full Code Here

   public void testSunSTRRequest() throws Exception
   {
      InputStream inputStream = new FileInputStream("resources/jaxrpc/wsse/interop/sun-xws.xml");

      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessage soapMsg = factory.createMessage(null, inputStream);
      SOAPEnvelope env = soapMsg.getSOAPPart().getEnvelope();
      Document doc = env.getOwnerDocument();

      // The Sun JWSDP message is timestamp protected like so:
      // <wsu:Timestamp wsu:Id="Timestamp-9e3e6632-f2a1-4b26-a682-9301a75003a7">
View Full Code Here

   public void testSunIssuerSerialSignEncrypt() throws Exception
   {
      InputStream inputStream = new FileInputStream("resources/jaxrpc/wsse/interop/sun-xws-issuerserial-sign-encrypt.xml");

      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessage soapMsg = factory.createMessage(null, inputStream);
      SOAPEnvelope env = soapMsg.getSOAPPart().getEnvelope();
      Document doc = env.getOwnerDocument();

      // The Sun JWSDP message is timestamp protected like so:
      // <wsu:Timestamp wsu:Id="Timestamp-9e3e6632-f2a1-4b26-a682-9301a75003a7">
View Full Code Here

            + "</env:Envelope>";

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

      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessage soapMsg = factory.createMessage(null, inputStream);
      SOAPEnvelope env = soapMsg.getSOAPPart().getEnvelope();
      Document doc = env.getOwnerDocument();

      String inputString = DOMWriter.printNode(soapMsg.getSOAPPart(), true);
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.