Package org.jboss.ws.core.soap

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


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


      ByteArrayOutputStream stream = new ByteArrayOutputStream();
      soapMsg.writeTo(stream);

      ByteArrayInputStream instream = new ByteArrayInputStream(stream.toByteArray());
      soapMsg = factory.createMessage(null, instream);
      env = soapMsg.getSOAPPart().getEnvelope();
      doc = env.getOwnerDocument();

      SecurityDecoder decoder = new SecurityDecoder(new SecurityStore());
      decoder.decode(doc);
View Full Code Here

         + " </env:Body>"
         + "</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

      ByteArrayOutputStream stream = new ByteArrayOutputStream();
      soapMsg.writeTo(stream);

      ByteArrayInputStream instream = new ByteArrayInputStream(stream.toByteArray());
      soapMsg = factory.createMessage(null, instream);
      env = soapMsg.getSOAPPart().getEnvelope();
      doc = env.getOwnerDocument();

      SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), null, null, null);
      decoder.decode(doc);
View Full Code Here

            + "  </config>"
            + "</jboss-ws-security>";
      WSSecurityConfiguration configuration = WSSecurityOMFactory.newInstance().parse(new StringReader(conf));
      ByteArrayInputStream inputStream = new ByteArrayInputStream(envStr.getBytes());
      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessage soapMsg = factory.createMessage(null, inputStream);
      String expected = DOMWriter.printNode(soapMsg.getSOAPPart().getEnvelope(), true);

      WSSecurityAPI sec = new WSSecurityDispatcher();
      try
      {
View Full Code Here

            throw new WSException("MessageContext not available");

         // Associate current message with message context
         MessageFactoryImpl factory = new MessageFactoryImpl();
         factory.setEnvNamespace(Constants.NS_SOAP11_ENV);
         SOAPMessageImpl resMessage = (SOAPMessageImpl)factory.createMessage();
         msgContext.setSOAPMessage(resMessage);

         ParameterMetaData retParameter = opMetaData.getReturnParameter();
         QName xmlName = retParameter.getXmlName();
         SOAPBodyImpl soapBody = (SOAPBodyImpl)resMessage.getSOAPBody();
View Full Code Here

      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
      SerializationContext serContext = (msgContext != null ? msgContext.getSerializationContext() : new SerializationContextJAXRPC());
      NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();

      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessageImpl soapMessage = (SOAPMessageImpl)factory.createMessage();

      SOAPEnvelopeImpl soapEnvelope = (SOAPEnvelopeImpl)soapMessage.getSOAPPart().getEnvelope();
      SOAPBody soapBody = soapEnvelope.getBody();

      QName faultCode = faultEx.getFaultCode();
View Full Code Here

      if (isSOAP12() == true)
      {
         factory.setEnvNamespace(Constants.NS_SOAP12_ENV);
      }

      return (SOAPMessageImpl)factory.createMessage();
   }

   private static boolean isSOAP12()
   {
      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
View Full Code Here

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

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

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

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

      EndpointInvocation epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
View Full Code Here

      paramMetaData.setInHeader(true);

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

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

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

      CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
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.