Skip to main content

Constructing request messages

When working with Dispatch objects requests must be built from scratch. The developer is responsible for ensuring that the messages passed to a Dispatch object match a request that the targeted service provider can process. This requires precise knowledge about the messages used by the service provider and what, if any, header information it requires.

This information can be provided by a WSDL document or an XMLSchema document that defines the messages. While service providers vary greatly there are a few guidelines that can be followed:

  • The root element of the request is based in the value of the name attribute of the wsdl:operation element that corresponds to the operation being invoked.

    Information noteWarning: If the service being invoked uses doc/literal bare messages, the root element of the request will be based on the value of name attribute of the wsdl:part element referred to by the wsdl:operation element.
  • The root element of the request will be namespace qualified.

  • If the service being invoked uses rpc/literal messages, the top-level elements in the request will not be namespace qualified.

    Information noteNote: The children of top-level elements may be namespace qualified. To be certain you will need to check their schema definitions.
  • If the service being invoked uses rpc/literal messages, none of the top-level elements can be null.

  • If the service being invoked uses doc/literal messages, the schema definition of the message determines if any of the elements are namespace qualified.

For more information about how services use XML messages see the WS-I Basic Profile.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!