savonrb / savon

Heavy metal SOAP client
https://www.savonrb.com
MIT License
2.07k stars 616 forks source link

Message part was not recognized #625

Closed carlhoerberg closed 6 years ago

carlhoerberg commented 9 years ago

Have been running Savon for a long time just fine, but suddenly it started to report:

Savon::SOAPFault: (soap:Client) Message part {urn:ec.europa.eu:taxud:vies:services:checkVat}checkVatRequest was not recognized.  (Does it exist in service WSDL?)

This is the code:

c = Savon.client(wsdl: 'http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl')
c.call(:check_vat, message: { countryCode: 'SE', vatNumber: '556074308985' })

I've tried the the service here: http://wsdlbrowser.com/soapclient?wsdl_url=http%3A%2F%2Fec.europa.eu%2Ftaxation_customs%2Fvies%2FcheckVatService.wsdl&function_name=checkVat

And it seems to be working. Any idea? I've tried both savon 2.7.2 and 2.6.0. I guess the WSDL changed, but to my untrained eye it looks ok.

anajavi commented 9 years ago

I don't know whats wrong with the service, but specifying the message_tag makes it work again:

c.call(:check_vat, message: { countryCode: 'SE', vatNumber: '556074308985' }, message_tag: :checkVat)

carlhoerberg commented 9 years ago

Awesome, thanks!

tjarratt commented 9 years ago

Suspicious ... we had a rash of reports similar to this late last year due to a bad change in Wasabi.

I was able to confirm that this works correctly with an older version of Wasabi, namely v3.0.0. Seems that there might be some more changes to revert there.

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 6 years ago

This issue is now closed due to inactivity. If you believe this needs further action, please re-open to discuss.

balamcsd commented 6 years ago

I have same issue, i added wsdl file in service reference and getting this error when trying to access a method please help

Dogani commented 2 years ago

Hello If anyone is stuck at this error. Just check the URL to which you submit your soap/xml request. Mostly you find the message part does not belong to that URL hence rectify and enjoy.