Forum Discussion

Jasper175's avatar
Jasper175
Frequent Contributor
16 years ago

</soapenv:Header> "Does it need to be in a SOAP Request?"

Very general question - I see some people's code and they have

However I noticed in my testing a SOAP Response that it fails if I have in my request.

When I take out , it works fine.

What's the reason behind this?

Thank you,
Rob

1 Reply

  • Hey,

    A SOAP structure should have an SOAP:envelope,  SOAP:header (optional) and a SOAP:body (mandatory). If you do not have any header value to be passed it appears always in the request with a empty tag
    .

    In header we normally pass security details like your username and password if header expects as per the service implementation.

    Check the link below for more info,

    http://publib.boulder.ibm.com/infocente ... ssage.html

    Can you validate the request with in the req?  I think you should see errors.

    I believe it should be
    which is a empty tag and not . Can you invoke your request with
    ? It should work fine.

    When you validate the req with only in the request you will see
    error: does not close tag .

    Hope the above helps,


    Thanks,
    Raj