Package org.jboss.ws.core

Examples of org.jboss.ws.core.CommonBindingProvider


   protected CommonBindingProvider getCommonBindingProvider()
   {
      if (bindingProvider == null)
      {
         bindingProvider = new CommonBindingProvider(getEndpointMetaData());
      }
      return bindingProvider;
   }
View Full Code Here


            if(handlerPass && messageContext.isModified())
            {
               try
               {
                  OperationMetaData opMetaData = messageContext.getOperationMetaData();
                  CommonBindingProvider bindingProvider = new CommonBindingProvider(opMetaData.getEndpointMetaData());
                  CommonBinding binding = bindingProvider.getCommonBinding();
                 
                  log.debug("Handler modified payload, unbind message and update invocation args");
                  EndpointInvocation epInv = binding.unbindRequestMessage(opMetaData, messageContext.getMessageAbstraction());
                  wsInv.getInvocationContext().addAttachment(EndpointInvocation.class, epInv);
               }
View Full Code Here

   /** Test binding of the request message
    */
   public void testBindRequestMessage() throws Exception
   {
      CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
      CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();

      EndpointInvocation epInv = new EndpointInvocation(opMetaData);
      epInv.initInputParams(new Object[]{"Hello World!"});

      SOAPMessage reqMessage = (SOAPMessage)binding.bindRequestMessage(opMetaData, epInv, null);
View Full Code Here

   /** Test binding of the request message with bound header
    */
   public void testBindRequestMessageWithBoundHeader() throws Exception
   {
      CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
      CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();

      // Add bound header
      QName xmlName = new QName("http://somens", "String_2");
      ParameterMetaData paramMetaData = new ParameterMetaData(opMetaData, xmlName, Constants.TYPE_LITERAL_STRING, "java.lang.String");
      opMetaData.addParameter(paramMetaData);
View Full Code Here

   /** Test binding of the request message with header
    */
   public void testBindRequestMessageWithUnboundHeader() throws Exception
   {
      CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
      CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();

      // Add unbound header
      QName xmlName = new QName("http://somens", "String_2");
      UnboundHeader header = new UnboundHeader(xmlName, Constants.TYPE_LITERAL_STRING, String.class, ParameterMode.IN);
      header.setHeaderValue("IN header message");
View Full Code Here

   /** Test unbinding of the request message
    */
   public void testUnbindRequestMessage() throws Exception
   {
      CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
      CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();

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

      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessageImpl reqMessage = (SOAPMessageImpl)factory.createMessage(null, inputStream);
View Full Code Here

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

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

      CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
      CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
      EndpointInvocation epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
      assertNotNull(epInv);

      Object[] args = epInv.getRequestPayload();
      assertEquals(2, args.length);
View Full Code Here

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

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

      CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
      CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
      EndpointInvocation epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
      assertNotNull(epInv);

      Object[] args = epInv.getRequestPayload();
      assertEquals(1, args.length);
View Full Code Here

   /** Test binding of the response message
    */
   public void testBindResponseMessage() throws Exception
   {
      CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
      CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();

      EndpointInvocation epInv = new EndpointInvocation(opMetaData);
      epInv.setReturnValue("Hello World!");

      SOAPMessage resMessage = (SOAPMessage)binding.bindResponseMessage(opMetaData, epInv);
View Full Code Here

   /** Test unbinding of the response message
    */
   public void testUnbindResponseMessage() throws Exception
   {
      CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
      CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();

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

      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessageImpl resMessage = (SOAPMessageImpl)factory.createMessage(null, inputStream);
View Full Code Here

TOP

Related Classes of org.jboss.ws.core.CommonBindingProvider

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.