Bee
Bee

Reputation: 529

what to namespace in @PayloadRoot?

I am trying to understand what is namespace exactly means in payloadroot annotation i.e.

 @PayloadRoot(localPart = "orderRequest", namespace = "http://samples")

I have taken this piece of code from spring docs but I still don't understand what http://samples is or what it does and why we need it?

Upvotes: 1

Views: 1274

Answers (1)

emeraldjava
emeraldjava

Reputation: 11212

The namespace value is intended to be a URI location which points to a xsd/xml schema by which you can validate the incoming value of the @RequestPayload request.

Upvotes: 1

Related Questions