Alex Martian
Alex Martian

Reputation: 3782

SOAP message without header - how to process?

I've tried web search to find answer to my question but found only articles like how to create SOAP message without header.

In wikipedia on SOAP:

SOAP header : A collection of one or more header blocks targeted at each SOAP receiver. SOAP body : Contains the body of the message intended for the SOAP receiver. The interpretation and processing of SOAP body is defined by header blocks.

And:

A SOAP message is an ordinary XML document containing the following elements:
Element - Required
Header - No
Body - Yes
...

How can be a message without header if processing of body is defined in header?

Upvotes: 0

Views: 501

Answers (1)

Marcel
Marcel

Reputation: 5119

The SOAP header is optional. If a header is required, it is mainly mentioned in the WSDL file, that is bound to the webservice. The WSDL defines the functions of a webservice and the types, that are bound to the functions. It depends on how a function is defined. Some definitions need an action attribute in the soap header. Others are used by directly mentioning them in the SOAP Body. To keep it short: how a SOAP message should look like is more or less strictly defined in the webservice definition (wsdl).

Upvotes: 1

Related Questions