X-Road icon indicating copy to clipboard operation
X-Road copied to clipboard

Required field 'protocolVersion' is missing

Open Konservin opened this issue 1 year ago • 6 comments

protocolVersion is set in headers, but response error is that it is missing. What might cause this? image

Konservin avatar Nov 10 '23 11:11 Konservin

Hey @Konservin!

Unfortunately I am not familiar with the output on the screenshot. Could you please clarify what framework you are using and if it would be possible to get the actual SOAP message that is generated based on the displayed input?

raits avatar Nov 10 '23 12:11 raits

test_req.xml.txt

Thank You for looking into it. Platform is Symfony 4.4, generated XML is attached with replaced XXXXs.

Konservin avatar Nov 10 '23 12:11 Konservin

Hi @Konservin! Does the response message returned by your service contain all the same headers that the request message has? The error message indicates that the response message doesn't have the protocolVersion header. The service is responsible for adding the required headers to the response message - the Security Server doesn't do it automatically. Here's an example of a request / response message pair.

petkivim avatar Nov 13 '23 08:11 petkivim

Hi! No, service returns an error message that says "Required field 'protocolVersion' is missing"

Konservin avatar Nov 13 '23 09:11 Konservin

Thanks for the clarification! The request that you shared earlier looks good to me and it includes the protocolVersion header field correctly. Unfortunately, I'm not familiar with the framework you're using to implement the service and therefore, it's difficult to say what could cause the issue.

petkivim avatar Nov 13 '23 09:11 petkivim

This error occurs because there are some incorrect namespaces in the request.

The namespaces should be:

  • http://x-road.eu/xsd/xroad.xsd instead of https://x-road.eu/xsd/xroad.xsd
  • http://x-road.eu/xsd/identifiers instead of https://x-road.eu/xsd/identifiers

And the namespace for element detailandmed_v1 should be http://arireg.x-road.eu/producer/ instead of http://arireg.x-road.eu.

jalmar-spin avatar Mar 20 '24 10:03 jalmar-spin