Search code examples
ruby-on-rails-3.2apache-axissavon

How to resolve UnExpected Subelement


I'm trying to call a simple operation with Savon, but it keeps throwing

Savon::SOAPFault ((soapenv:Server) org.apache.axis2.databinding.ADBException: Unexpected subelement OperationRequest):

Here's my two lines that are throwing this:

client = Savon.client(wsdl: 'http://wsdl_location') response = client.call(:operation, message: { id: id })


Solution

  • That error means that the message from the remote system is malformed. The message parser encountered an OperationRequest element in the XML when it was expecting something else.