apperydev77
Posts: 0
Joined: Fri Jul 26, 2013 7:01 am

How to exclude "inputParameters" from the generated XML for REST call

I have complex input to my REST service so cannot use the mapper in the default manner. Currently I have my REST Service almost working but am stuck at the very end as the generated XML is begin wrapped in "inputParameters" which my service does not accept. How can I get the system to not wrap my input in this tag?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

How to exclude "inputParameters" from the generated XML for REST call

Hi,

Could you please show us how you implement this? What's the service URL, service settings and request parameters you use to define the service?

apperydev77
Posts: 0
Joined: Fri Jul 26, 2013 7:01 am

How to exclude "inputParameters" from the generated XML for REST call

I created a javascript method that builds the the XML body. This method is attached to service parameter under the form instance of the REST Method.

Mapper:

Image

Settings:

Image

Sample XML Request with the inputParameters( which is causing the problem)

Image

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

How to exclude "inputParameters" from the generated XML for REST call

Hello! You have two variables entity-ID and Invoice. If you wrap them with some common root element for example inputParameters - you won't get xml (because xml should have only one root element). That's why Appery.io automatically puts all parameters into element inputParameters. As a workaround you can create generic service and send data through ajax manually (without wrapping).

apperydev77
Posts: 0
Joined: Fri Jul 26, 2013 7:01 am

How to exclude "inputParameters" from the generated XML for REST call

entity-ID is for the url replacement not for the content. How can I replace entity-ID in the url without adding a parameter on the request?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

How to exclude "inputParameters" from the generated XML for REST call

Hello! Even if you delete entity-ID from parameters list builder still wraps parameters into element inputParameters. Use Generic and send data through ajax manually (without wrapping).

Return to “Issues”