Package org.jboss.ws.extensions.addressing.metadata

Examples of org.jboss.ws.extensions.addressing.metadata.AddressingOpMetaExt


    * Process operation meta data extensions.
    */
   private void processMetaExtensions(Method method, EndpointMetaData epMetaData, OperationMetaData opMetaData)
   {
      AddressingProperties ADDR = new AddressingPropertiesImpl();
      AddressingOpMetaExt addrExt = new AddressingOpMetaExt(ADDR.getNamespaceURI());

      Action anAction = method.getAnnotation(Action.class);
      if (anAction != null)
      {
         addrExt.setInboundAction(anAction.input());
         addrExt.setOutboundAction(anAction.output());
      }
      else
      // default action values
      {
         // TODO: figure out a way to assign message name instead of IN and OUT
         String tns = epMetaData.getPortName().getNamespaceURI();
         String portTypeName = epMetaData.getPortName().getLocalPart();
         addrExt.setInboundAction(tns + "/" + portTypeName + "/IN");

         if (!opMetaData.isOneWay())
            addrExt.setOutboundAction(tns + "/" + portTypeName + "/OUT");
      }

      opMetaData.addExtension(addrExt);
   }
View Full Code Here


      String tns = wsdlOperation.getName().getNamespaceURI();
      String portTypeName = wsdlOperation.getName().getLocalPart();

      AddressingProperties ADDR = new AddressingPropertiesImpl();
      AddressingOpMetaExt addrExt = new AddressingOpMetaExt(ADDR.getNamespaceURI());

      // inbound action
      WSDLProperty wsaInAction = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_ACTION_IN);
      if (wsaInAction != null)
      {
         addrExt.setInboundAction(wsaInAction.getValue());
      }
      else
      {
         WSDLProperty messageName = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_IN);
         if (messageName != null)
         {
            addrExt.setInboundAction(tns + "/" + portTypeName + "/" + messageName.getValue());
         }
         else
         {
            addrExt.setInboundAction(tns + "/" + portTypeName + "/IN");
         }
      }

      // outbound action
      WSDLProperty wsaOutAction = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_ACTION_OUT);
      if (wsaOutAction != null)
      {
         addrExt.setOutboundAction(wsaOutAction.getValue());
      }
      else
      {
         WSDLProperty messageName = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_OUT);
         if (messageName != null)
         {
            addrExt.setOutboundAction(tns + "/" + portTypeName + "/" + messageName.getValue());
         }
         else
         {
            addrExt.setOutboundAction(tns + "/" + portTypeName + "/OUT");
         }
      }

      opMetaData.addExtension(addrExt);
   }
View Full Code Here

    * Process operation meta data extensions.
    */
   private void processMetaExtensions(Method method, EndpointMetaData epMetaData, OperationMetaData opMetaData)
   {
      AddressingProperties ADDR = new AddressingPropertiesImpl();
      AddressingOpMetaExt addrExt = new AddressingOpMetaExt(ADDR.getNamespaceURI());

      Action anAction = method.getAnnotation(Action.class);
      if (anAction != null)
      {
         addrExt.setInboundAction(anAction.input());
         addrExt.setOutboundAction(anAction.output());
      }
      else
      // default action values
      {
         // TODO: figure out a way to assign message name instead of IN and OUT
         String tns = epMetaData.getPortName().getNamespaceURI();
         String portTypeName = epMetaData.getPortName().getLocalPart();
         addrExt.setInboundAction(tns + "/" + portTypeName + "/IN");

         if (!opMetaData.isOneWay())
            addrExt.setOutboundAction(tns + "/" + portTypeName + "/OUT");
      }

      opMetaData.addExtension(addrExt);
   }
View Full Code Here

      String tns = wsdlOperation.getName().getNamespaceURI();
      String portTypeName = wsdlOperation.getName().getLocalPart();

      AddressingProperties ADDR = new AddressingPropertiesImpl();
      AddressingOpMetaExt addrExt = new AddressingOpMetaExt(ADDR.getNamespaceURI());

      // inbound action
      WSDLProperty wsaInAction = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_ACTION_IN);
      if (wsaInAction != null)
      {
         addrExt.setInboundAction(wsaInAction.getValue());
      }
      else
      {
         WSDLProperty messageName = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_IN);
         if (messageName != null)
         {
            addrExt.setInboundAction(tns + "/" + portTypeName + "/" + messageName.getValue());
         }
         else
         {
            addrExt.setInboundAction(tns + "/" + portTypeName + "/IN");
         }
      }

      // outbound action
      WSDLProperty wsaOutAction = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_ACTION_OUT);
      if (wsaOutAction != null)
      {
         addrExt.setOutboundAction(wsaOutAction.getValue());
      }
      else
      {
         WSDLProperty messageName = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_OUT);
         if (messageName != null)
         {
            addrExt.setOutboundAction(tns + "/" + portTypeName + "/" + messageName.getValue());
         }
         else
         {
            addrExt.setOutboundAction(tns + "/" + portTypeName + "/OUT");
         }
      }

      opMetaData.addExtension(addrExt);
   }
View Full Code Here

      String tns = wsdlOperation.getName().getNamespaceURI();
      String portTypeName = wsdlOperation.getName().getLocalPart();

      AddressingProperties ADDR = new AddressingPropertiesImpl();
      AddressingOpMetaExt addrExt = new AddressingOpMetaExt(ADDR.getNamespaceURI());

      // inbound action
      WSDLProperty wsaInAction = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_ACTION_IN);
      if (wsaInAction != null)
      {
         addrExt.setInboundAction(wsaInAction.getValue());
      }
      else
      {
         WSDLProperty messageName = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_IN);
         addrExt.setInboundAction(tns + "/" + portTypeName + "/" + messageName);
      }

      // outbound action
      WSDLProperty wsaOutAction = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_ACTION_OUT);
      if (wsaOutAction != null)
      {
         addrExt.setOutboundAction(wsaOutAction.getValue());
      }
      else
      {
         WSDLProperty messageName = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_OUT);
         addrExt.setOutboundAction(tns + "/" + portTypeName + "/" + messageName);
      }

      opMetaData.addExtension(addrExt);
   }
View Full Code Here

    * Process operation meta data extensions.
    */
   private void processMetaExtensions(Method method, EndpointMetaData epMetaData, OperationMetaData opMetaData)
   {
      AddressingProperties ADDR = new AddressingPropertiesImpl();
      AddressingOpMetaExt addrExt = new AddressingOpMetaExt(ADDR.getNamespaceURI());

      Action anAction = method.getAnnotation(Action.class);
      if (anAction != null)
      {
         addrExt.setInboundAction(anAction.input());
         addrExt.setOutboundAction(anAction.output());
      }
      else
      // default action values
      {
         // TODO: figure out a way to assign message name instead of IN and OUT
         String tns = epMetaData.getPortName().getNamespaceURI();
         String portTypeName = epMetaData.getPortName().getLocalPart();
         addrExt.setInboundAction(tns + "/" + portTypeName + "/IN");

         if (!opMetaData.isOneWay())
            addrExt.setOutboundAction(tns + "/" + portTypeName + "/OUT");
      }

      opMetaData.addExtension(addrExt);
   }
View Full Code Here

      String tns = wsdlOperation.getName().getNamespaceURI();
      String portTypeName = wsdlOperation.getName().getLocalPart();

      AddressingProperties ADDR = new AddressingPropertiesImpl();
      AddressingOpMetaExt addrExt = new AddressingOpMetaExt(ADDR.getNamespaceURI());

      // inbound action
      WSDLProperty wsaInAction = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_ACTION_IN);
      if (wsaInAction != null)
      {
         addrExt.setInboundAction(wsaInAction.getValue());
      }
      else
      {
         WSDLProperty messageName = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_IN);
         if (messageName != null)
         {
            addrExt.setInboundAction(tns + "/" + portTypeName + "/" + messageName.getValue());
         }
         else
         {
            addrExt.setInboundAction(tns + "/" + portTypeName + "/IN");
         }
      }

      // outbound action
      WSDLProperty wsaOutAction = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_ACTION_OUT);
      if (wsaOutAction != null)
      {
         addrExt.setOutboundAction(wsaOutAction.getValue());
      }
      else
      {
         WSDLProperty messageName = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_OUT);
         if (messageName != null)
         {
            addrExt.setOutboundAction(tns + "/" + portTypeName + "/" + messageName.getValue());
         }
         else
         {
            addrExt.setOutboundAction(tns + "/" + portTypeName + "/OUT");
         }
      }

      opMetaData.addExtension(addrExt);
   }
View Full Code Here

         OperationMetaData opMetaData = ((SOAPMessageContextJAXRPC)msgContext).getOperationMetaData();

         if (!isFault && !opMetaData.isOneWay())
         {

            AddressingOpMetaExt addrExt = (AddressingOpMetaExt)opMetaData.getExtension(ADDR_CONSTANTS.getNamespaceURI());
            if (addrExt != null)
            {
               outProps.setAction(ADDR_BUILDER.newURI(addrExt.getOutboundAction()));
            }
            else
            {
               log.warn("Unable to resolve replyAction for " + opMetaData.getQName());
            }
View Full Code Here

      OperationMetaData opMetaData = ((CommonMessageContext)msgContext).getOperationMetaData();

      if (!isFault && !opMetaData.isOneWay())
      {

        AddressingOpMetaExt addrExt = (AddressingOpMetaExt)opMetaData.getExtension(ADDR_CONSTANTS.getNamespaceURI());
        if (addrExt != null)
        {
          outProps.setAction(ADDR_BUILDER.newURI(addrExt.getOutboundAction()));
        }
        else
        {
          log.warn("Unable to resolve replyAction for " + opMetaData.getQName());
        }
View Full Code Here

      // register createSequence method
      QName createSequenceQName = rmProvider.getConstants().getCreateSequenceQName();
      OperationMetaData createSequenceMD = new OperationMetaData(endpointMD, createSequenceQName, "createSequence");
      createSequenceMD.setOneWay(false);
      // setup addressing related data
      AddressingOpMetaExt createSequenceAddrExt = new AddressingOpMetaExt(new AddressingPropertiesImpl().getNamespaceURI());
      createSequenceAddrExt.setInboundAction(RMAddressingConstants.CREATE_SEQUENCE_WSA_ACTION);
      createSequenceAddrExt.setOutboundAction(RMAddressingConstants.CREATE_SEQUENCE_RESPONSE_WSA_ACTION);
      createSequenceMD.addExtension(createSequenceAddrExt);
      // register operation metadata with endpoint metadata
      endpointMD.addOperation(createSequenceMD);
     
      // register sequenceAcknowledgement method
      QName sequenceAcknowledgementQName = rmProvider.getConstants().getSequenceAcknowledgementQName();
      OperationMetaData sequenceAcknowledgementMD = new OperationMetaData(endpointMD, sequenceAcknowledgementQName, "sequenceAcknowledgement");
      sequenceAcknowledgementMD.setOneWay(true);
      // setup addressing related data
      AddressingOpMetaExt sequenceAcknowledgementAddrExt = new AddressingOpMetaExt(new AddressingPropertiesImpl().getNamespaceURI());
      sequenceAcknowledgementAddrExt.setInboundAction(RMAddressingConstants.SEQUENCE_ACKNOWLEDGEMENT_WSA_ACTION);
      sequenceAcknowledgementMD.addExtension(sequenceAcknowledgementAddrExt);
      // register operation metadata with endpoint metadata
      endpointMD.addOperation(sequenceAcknowledgementMD);
     
      if (rmProvider.getMessageFactory().newCloseSequence() != null)
      {
         // register closeSequence method
         QName closeSequenceQName = rmProvider.getConstants().getCloseSequenceQName();
         OperationMetaData closeSequenceMD = new OperationMetaData(endpointMD, closeSequenceQName, "closeSequence");
         closeSequenceMD.setOneWay(false);
         // setup addressing related data
         AddressingOpMetaExt closeSequenceAddrExt = new AddressingOpMetaExt(new AddressingPropertiesImpl().getNamespaceURI());
         closeSequenceAddrExt.setInboundAction(RMAddressingConstants.CLOSE_SEQUENCE_WSA_ACTION);
         closeSequenceAddrExt.setOutboundAction(RMAddressingConstants.CLOSE_SEQUENCE_RESPONSE_WSA_ACTION);
         closeSequenceMD.addExtension(closeSequenceAddrExt);
         // register operation metadata with endpoint metadata
         endpointMD.addOperation(closeSequenceMD);
      }
     
      // register terminateSequence method
      QName terminateSequenceQName = rmProvider.getConstants().getTerminateSequenceQName();
      OperationMetaData terminateSequenceMD = new OperationMetaData(endpointMD, terminateSequenceQName, "terminateSequence");
      boolean isOneWay = rmProvider.getMessageFactory().newTerminateSequenceResponse() == null;
      terminateSequenceMD.setOneWay(isOneWay);
      // setup addressing related data
      AddressingOpMetaExt terminateSequenceAddrExt = new AddressingOpMetaExt(new AddressingPropertiesImpl().getNamespaceURI());
      terminateSequenceAddrExt.setInboundAction(RMAddressingConstants.TERMINATE_SEQUENCE_WSA_ACTION);
      if (!isOneWay)
      {
         terminateSequenceAddrExt.setOutboundAction(RMAddressingConstants.TERMINATE_SEQUENCE_RESPONSE_WSA_ACTION);
      }
      terminateSequenceMD.addExtension(terminateSequenceAddrExt);
      // register operation metadata with endpoint metadata
      endpointMD.addOperation(terminateSequenceMD);
   }
View Full Code Here

TOP

Related Classes of org.jboss.ws.extensions.addressing.metadata.AddressingOpMetaExt

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.