This happens because we are using a hash to store the request params, and then use a for loop to retrieve the params. The order in which the params are retrieved depends on the hashing function in use. If we are to solve this, we have to get rid of the has and go for another container where the original ordering could be preserved.

Samisa...

Senaka Fernando wrote:
Hi Brian,
I think this is a bug somewhere or the other. I tried it and was amazed to
get another result.

try1:
http://localhost:8080/axis2/services/echo/echoString?qid=qid1\&hostname=hostname1\&bbpl_id=d6ge5gyrgj4

result1:
<ns1:echoString>
<text>d6ge5gyrgj4</text>
</ns1:echoString>

try2:
http://localhost:8080/axis2/services/echo/echoString?qid=qid1\&hostname=hostname1\&bepl_id=d6ge5gyrgj4

result2:
<ns1:echoString>
<text>qid1\</text>
</ns1:echoString>

try3:
http://localhost:8080/axis2/services/echo/echoString?bid=qid1\&bastname=hostname1\&bipl_id=d6ge5gyrgj4

result3:
<ns1:echoString>
<text>d6ge5gyrgj4</text>
</ns1:echoString>

I have no idea on what logic takes place. There is no alphabetic sort or
node grouping here. It is something I can't logically explain. But, I will
look in to this and raise appropriate JIRAs.

Regards,
Senaka

N.B.: I tried this using Mozilla Firefox.



Great - this will be a perfect example  I do this one:

 curl
http://localhost:9090/axis2/services/echo/echoString?qid=qid1\&hostname=hostname1\&repl_id=d6ge5gyrgj4

I get:

<ns1:echoString
xmlns:ns1="http://ws.apache.org/axis2/c/samples";><text>qid1</text></ns1:echoString>

It echoed the first parameter.

When I change the last parameter to be alphabetically first:

curl
http://localhost:9090/axis2/services/echo/echoString?qid=qid1\&hostname=hostname1\&bbbbbbbbb=d6ge5gyrgj4

Now the last parameter is echoed:

<ns1:echoString
xmlns:ns1="http://ws.apache.org/axis2/c/samples";><text>d6ge5gyrgj4</text></ns1:echoString>

Its apparently not a simple an alphabetical sort, but its something
odd.  Why would the name of the parameter effect the ordering of the
nodes as constructed within the server?  I think the server is
converting the REST input into a sequence of nodes somehow, and it is
imposing and order of its own on the nodes.

Brian

On Jan 16, 2008 12:56 AM, Dinesh Premalal <[EMAIL PROTECTED]> wrote:
Hi Brain,

"Brian McQueen" <[EMAIL PROTECTED]> writes:
<soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
  <soapenv:Header/>
  <soapenv:Body>
    <ns1:replicate
xmlns:ns1="http://ws.apache.org/axis2/services/replicate";>
      <qid>qid1</qid>
      <hostname>hostname1</hostname>
      <repl_id>d6ge5gyrgj4</repl_id>
    </ns1:replicate>
  </soapenv:Body>
</soapenv:Envelope>
I modified echo sample to echo back the node it receives. I used
following commands

curl
http://localhost:9090/axis2/services/echo/echoString?qid=qid1\&hostname=hostname1\&repl_id=d6ge5gyrgj4

I got this as the response

<echoString><qid>qid1</qid><hostname>hostname1</hostname><repl_id>d6ge5gyrgj4</repl_id></echoString>


then I used following command

 curl
http://localhost:9090/axis2/services/echo/echoString?qid=qid1\&repl_id=d6ge5gyrgj4\&hostname=hostname1

and response is

<echoString><qid>qid1</qid><repl_id>d6ge5gyrgj4</repl_id><hostname>hostname1</hostname></echoString>

as far as I can see , there is a no such an alphabetical ordering in
REST parsing or did I miss something here?

thanks,
Dinesh

--
http://nethu.org


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to