Hello.

    Searching in SM sources why a change in behavior of inMessage.properties in a Groovy component I notice this change from SM-1.0-M2 and SM-Current.

    In SM-1.0-M2, parameters where copied to inMessage.properties when request was a POST.
    In SM-Head, parameters are copied to inMesage.properties when request is a GET, but not when is a POST.

    The method toNMS ins HttpMarshaler was:
---------------------------------------------------
    public void toNMS(NormalizedMessage inMessage, HttpServletRequest request) throws IOException, MessagingException {
        addNmsProperties(inMessage, request);
        inMessage.setContent(new StreamSource(request.getInputStream()));
    }

    Now is:
---------------------------------------
    public void toNMS(MessageExchange exchange, NormalizedMessage inMessage, HttpServletRequest request) throws IOException, MessagingException {
        addNmsProperties(exchange, request);
        String method = request.getMethod();
        if (method != null && method.equalsIgnoreCase("POST")) {
            inMessage.setContent(new StreamSource(request.getInputStream()));
        }
        else {
            Enumeration enumeration = request.getParameterNames();
            while (enumeration.hasMoreElements()) {
                String name = (String) enumeration.nextElement();
                String value = request.getParameter(name);
                inMessage.setProperty(name, value);
            }
            inMessage.setContent(EMPTY_CONTENT);
        }
    }

    The addNmsProperties parameter changed from inMessage to exchange and the parameters in the http rquest are not getting to GroovyComponent in inMessage.properties anymore.

    Question:
    1.- Is this the intended behavior of the HttpMarshaller ?
    2.- If this parameters are getting thru to Groovy Component, in what variable are they accesible from it ?

    Regards.

Reply via email to