Looks like the builder calls BuilderUtil.buildsoapMessage method immediately
after extracting parameters into the Multiple value HashMap and all the
values are consumed there. So if you have a look at the SOAP body when it
comes to your synapse mediator, it should contain these key value pairs as
XML elements.
However, I'm not sure why the value is removed when the get method is
called. If that is the expected behavior, there's no point in storing the
Map in the MessageContext. So I think we don't need to remove the value.
And also the following method looks wrong.
public Object get(Object key) {
ArrayList list = (ArrayList) table.get(key);
if (list != null && list.size() > 0) {
Object o = list.get(0);
list.remove(0);
return o;
}
return null;
}
When the get method is called, only the first value is returned. Ideally it
should return the ArrayList, if this is a multiple value map.
Thanks,
~Isuru
On Wed, Jun 22, 2011 at 12:21 PM, Pradeep Fernando <[email protected]>wrote:
> Hi devs,
>
> In the axis2 x-form-url-encoded builder it stores HTTP post request
> values (in the message body) in MultipleEntryHashMap and attach to the
> axis2MessageContext using a property. So when I send a POST request
> with a key,value pairs in the message body, axis2 builds a SOAP env
> with an empty body, while the properties themselves are stored as a
> property in the messageContext.
>
> However this the values stored in the above map are not available,
> when i try to access those using a synapse mediator. Since the get
> implementation of the map is destroy and read, it must have got
> consumed during a axis2 dispatching phase (not sure).
>
> Is there any particular reason for implementing get operation of the
> MultipleEntryHashMap in this manner. ?
>
>
> Thanks,
> --
> Pradeep Fernando.
> http://pradeepfernando.blogspot.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
--
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/