Forum Discussion

mdavila's avatar
mdavila
New Contributor
12 years ago

How can one setup the XmlRootElement

Folks,

to state the obvious, I am a new soapUI end user hence, this posting.

The problem I need help with is that, one of the code changes in a project I am working on caused collateral damage for over 70 test cases. The reason I am given is shared below so it helps as background info:

Developer's comments for the code change:
XmlRootElement name was not set for SearchAccountsByEmail, SearchAccountsByName, SearchAccountsByUserName, SearchAccounts (the name is the same as class's simple name).

A failing request looks similar to the following:

POST http://hostname:port/identity-service/r ... arch/email HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/xml
Accept: application/xml
Content-Length: 143
Host: hostname removed for security reasons
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

<searchAccountsByEmail>
<limit>999</limit>
<offset>0</offset>
<email>mxdavila@msn.com</email>
</searchAccountsByEmail>

HTTP/1.1 500 Internal Server Error
Server:
..
Content-Type: application/json
Transfer-Encoding: chunked
Connection: close


can someone provide an example of where in the above request goes the XmlRootElement?

3 Replies

  • Hello,

    Can you please provide a little more information. Where was the Code change made? Was it something in a groovy script within soapui or was it on your API? CAn you please send us the SoapUI log and Error log so that we can troubleshoot this further? Thanks.

    Regards,
    Temil
  • mdavila's avatar
    mdavila
    New Contributor
    Hi Temil,

    somehow the requests are now passing without any effort on my part so, I need to find out what happened as I got a new build. the code change took place at the API level. I would like to know where the XMLRootElement goes on the request shown on the initial request so I know how to address it if that issues comes back.

    Thanks,
    MIsael
  • Your question does not make sense to me but the XMLRootElement is the main elements thats in your request. Let me know if this makes sense.