Package org.apache.axis2.util

Examples of org.apache.axis2.util.MultipleEntryHashMap


        params = getListenerParameters();


        param = transportIn.getParameter(NhttpConstants.ENDPOINTS_CONFIGURATION);
        if (param != null && param.getValue() != null) {
            endpoints = new URLEndpointsConfigurationFactory().create(param.getValue().toString());
        }
    }
View Full Code Here


        // map is there, build a dummy soap body which contains all the parameters coming in.
        SOAPBody body = soapEnv.getBody();
        String httpMethod = (String) messageContext.getProperty(HTTPConstants.HTTP_METHOD);
        if (body.getFirstElement() == null && HTTPConstants.HTTP_METHOD_POST.equals(httpMethod) &&
                messageContext.getProperty(Constants.REQUEST_PARAMETER_MAP) != null) {
            MultipleEntryHashMap map = (MultipleEntryHashMap) messageContext
                    .getProperty(Constants.REQUEST_PARAMETER_MAP);
            SOAPFactory soapFactory = getSOAPFactory(messageContext);
            OMElement bodyFirstChild = soapFactory
                    .createOMElement(XFORM_FIRST_ELEMENT, body);
            BuilderUtil.createSOAPMessageWithoutSchema(soapFactory, bodyFirstChild, map);
View Full Code Here

      String operationName = callRemoved.trim().substring(callRemoved.indexOf(":"), callRemoved.indexOf("(")-1);

      //Extract parameters from IM message
      String parameterList = callRemoved.trim().substring(callRemoved.indexOf("("),callRemoved.trim().length()-1);  
      StringTokenizer st = new StringTokenizer(parameterList,",");
    MultipleEntryHashMap parameterMap = new MultipleEntryHashMap();
      while(st.hasMoreTokens()){
        String token = st.nextToken();
        String name = token.substring(0, token.indexOf("="));
        String value = token.substring(token.indexOf("=")+1);
        parameterMap.put(name, value);
      }
     
    SOAPEnvelope envelope = null;
    try {
      msgCtx.setProperty(XMPPConstants.CONTAINS_SOAP_ENVELOPE, new Boolean(true));
View Full Code Here

    @Override
    public AxisOperation findOperation(AxisService axisService, MessageContext messageContext)
            throws AxisFault {

        MultipleEntryHashMap multipleEntryHashMap =
                (MultipleEntryHashMap) messageContext.getProperty(Constants.REQUEST_PARAMETER_MAP);

        if (multipleEntryHashMap != null) {
            Object actionNameProperty = multipleEntryHashMap.get(MessageBoxConstants.ACTION);
            multipleEntryHashMap.put(MessageBoxConstants.ACTION, actionNameProperty);

            if (actionNameProperty != null) {
                String actionName = actionNameProperty.toString();
                return axisService.getOperationBySOAPAction(actionName);
View Full Code Here

    private static final Log log = LogFactory.getLog(AuthenticationHandler.class);

    public InvocationResponse invoke(MessageContext messageContext) throws AxisFault {
        if (messageContext.isEngaged(MessageBoxConstants.SQS_AUTHENTICATION_MODULE_NAME)) {

            MultipleEntryHashMap multipleEntryHashMap =
                    (MultipleEntryHashMap) messageContext.getProperty(Constants.REQUEST_PARAMETER_MAP);

            if (multipleEntryHashMap != null) {
                // get signature and signature calculating details from url parameters
                //  and verify signature
View Full Code Here

import java.util.ArrayList;
import java.util.List;

public class SQSRestBasedHandler extends AbstractHandler {
    public InvocationResponse invoke(MessageContext messageContext) throws AxisFault {
        MultipleEntryHashMap multipleEntryHashMap =
                (MultipleEntryHashMap) messageContext.getProperty(Constants.REQUEST_PARAMETER_MAP);
        if (multipleEntryHashMap != null) {
            Object accessKeyIdProperty = multipleEntryHashMap.get(MessageBoxConstants.AWSACCESS_KEY_ID);
            Object actionNameProperty = multipleEntryHashMap.get(MessageBoxConstants.ACTION);
            Object messageBodyProperty = multipleEntryHashMap.get("MessageBody");
            Object maxNumberOfMessagesProperty = multipleEntryHashMap.get("MaxNumberOfMessages");
            Object visibilityTimeoutProperty = multipleEntryHashMap.get("VisibilityTimeout");
            Object receiptHandleProperty = multipleEntryHashMap.get("ReceiptHandle");
            Object queueNamePrefixProperty = multipleEntryHashMap.get("QueueNamePrefix");
            Object permissionLabelProperty = multipleEntryHashMap.get("Label");
            Object queueNameProperty = multipleEntryHashMap.get("QueueName");

            // AWSAccountId.n  ActionName.n AttributeName.n  Attribute.Name  Attribute.Value
            List<Object> aWSAccountIdList = new ArrayList<Object>();
            List<Object> actionNameList = new ArrayList<Object>();
            List<Object> attributeNameList = new ArrayList<Object>();
            List<Object> setQueueAttributeNameList = new ArrayList<Object>();
            List<Object> setQueueAttributeValueList = new ArrayList<Object>();

            getParametersFromHashMap(multipleEntryHashMap, aWSAccountIdList, actionNameList,
                                     attributeNameList, setQueueAttributeNameList,
                                     setQueueAttributeValueList);


            if (actionNameProperty != null) {
                String actionName = actionNameProperty.toString();
                emptyMultipleHashMap(multipleEntryHashMap);

                if (actionName.equalsIgnoreCase("CreateQueue") ||
                    actionName.equalsIgnoreCase("DeleteQueue")) {
                    multipleEntryHashMap.put("QueueName", queueNameProperty);
                } else if (actionName.equalsIgnoreCase("SendMessage")) {
                    try {
                        String messageBody = URLDecoder.decode(messageBodyProperty.toString(),
                                                               MessageBoxConstants.URL_ENCODING);
                        multipleEntryHashMap.put("MessageBody", messageBody);
                    } catch (UnsupportedEncodingException e) {
                        throw new AxisFault("Failed to decode message body " +
                                            messageBodyProperty.toString(), e);
                    }
                } else if (actionName.equalsIgnoreCase("ReceiveMessage")) {
                    setReceiveMessageParameters(multipleEntryHashMap, maxNumberOfMessagesProperty,
                                                visibilityTimeoutProperty, attributeNameList);
                } else if (actionName.equalsIgnoreCase("DeleteMessage")) {
                    multipleEntryHashMap.put("ReceiptHandle", receiptHandleProperty);
                } else if (actionName.equalsIgnoreCase("ListQueues")) {
                    multipleEntryHashMap.put("QueueNamePrefix", queueNamePrefixProperty);
                } else if (actionName.equalsIgnoreCase("ChangeMessageVisibility")) {
                    multipleEntryHashMap.put("ReceiptHandle", receiptHandleProperty);
                    multipleEntryHashMap.put("VisibilityTimeout", visibilityTimeoutProperty);
                } else if (actionName.equalsIgnoreCase("GetQueueAttributes")) {
                    for (Object attributeNameProperty : attributeNameList) {
                        multipleEntryHashMap.put("AttributeName", attributeNameProperty);
                    }
                } else if (actionName.equalsIgnoreCase("SetQueueAttributes")) {
                    setSetQueueAttributeParameters(multipleEntryHashMap, setQueueAttributeNameList,
                                                   setQueueAttributeValueList);

                } else if (actionName.equalsIgnoreCase("AddPermission")) {
                    setAddPermissionParameters(multipleEntryHashMap, accessKeyIdProperty,
                                               permissionLabelProperty, aWSAccountIdList,
                                               actionNameList);
                } else if (actionName.equalsIgnoreCase("RemovePermission")) {
                    multipleEntryHashMap.put("AWSAccountId", accessKeyIdProperty);
                    multipleEntryHashMap.put("Label", permissionLabelProperty);
                }


                org.apache.axiom.soap.SOAPFactory soapFactory = OMAbstractFactory.getSOAP11Factory();
                messageContext.setEnvelope(BuilderUtil.buildsoapMessage(messageContext,
View Full Code Here

                                      String signatureOnSoapMessage, String signatureMethod,
                                      String signatureVersion)
            throws SQSAuthenticationException {

        String dataTobeSigned;
        MultipleEntryHashMap multipleEntryHashMap =
                (MultipleEntryHashMap) messageContext.getProperty(Constants.REQUEST_PARAMETER_MAP);
        if ("0".equals(signatureVersion)) {
            dataTobeSigned = actionName + timestamp;
        } else if ("1".equals(signatureVersion)) {
            dataTobeSigned = getDataTobeSignedUsingVersion1(convertMultipleEntryHashMapToMap(multipleEntryHashMap));
View Full Code Here

     */
    public OMElement processDocument(InputStream inputStream, String contentType,
                                     MessageContext messageContext)
            throws AxisFault {

        MultipleEntryHashMap parameterMap = new MultipleEntryHashMap();
        SOAPFactory soapFactory;
        AxisBindingOperation axisBindingOperation =
                (AxisBindingOperation) messageContext.getProperty(
                        Constants.AXIS_BINDING_OPERATION);
        String queryParameterSeparator = null;
View Full Code Here

      String operationName = callRemoved.trim().substring(callRemoved.indexOf(":"), callRemoved.indexOf("(")-1);

      //Extract parameters from IM message
      String parameterList = callRemoved.trim().substring(callRemoved.indexOf("("),callRemoved.trim().length()-1);  
      StringTokenizer st = new StringTokenizer(parameterList,",");
    MultipleEntryHashMap parameterMap = new MultipleEntryHashMap();
      while(st.hasMoreTokens()){
        String token = st.nextToken();
        String name = token.substring(0, token.indexOf("="));
        String value = token.substring(token.indexOf("=")+1);
        parameterMap.put(name, value);
      }
     
    SOAPEnvelope envelope = null;
    try {
      msgCtx.setProperty(XMPPConstants.CONTAINS_SOAP_ENVELOPE, new Boolean(true));
View Full Code Here

     * @return Returns the document element.
     */
    public OMElement processDocument(InputStream inputStream, String contentType,
                                     MessageContext messageContext)
            throws AxisFault {
        MultipleEntryHashMap parameterMap;
        HttpServletRequest request = (HttpServletRequest) messageContext
                .getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
        if (request == null) {
            throw new AxisFault("Cannot create DocumentElement without HttpServletRequest");
        }
View Full Code Here

TOP

Related Classes of org.apache.axis2.util.MultipleEntryHashMap

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.