Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7850271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:47:46+00:00 2026-06-02T18:47:46+00:00

Here is the request <soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/ xmlns:soap=http://soap.ws.server.wst.fit.cvut.cz/> <soapenv:Header> <userId>someId</userId> </soapenv:Header> <soapenv:Body> … </soapenv:Body> </soapenv:Envelope>

  • 0

Here is the request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:soap="http://soap.ws.server.wst.fit.cvut.cz/">
    <soapenv:Header>
        <userId>someId</userId>
    </soapenv:Header>
    <soapenv:Body>
    ...
    </soapenv:Body>
</soapenv:Envelope>

and I want to get that userId.

I tried this

private List<Header> getHeaders() {
    MessageContext messageContext = context.getMessageContext();
    if (messageContext == null || !(messageContext instanceof WrappedMessageContext)) {
        return null;
    }
    Message message = ((WrappedMessageContext) messageContext).getWrappedMessage();
    return CastUtils.cast((List<?>) message.get(Header.HEADER_LIST));
}

private String getHeader(String name) {
    List<Header> headers = getHeaders();
    if (headers != null) {
        for (Header header : headers) {
            logger.debug(header.getObject());
            // return header by the given name                   
        }
    }
    return null;
}

And it logs [userId : null]. How can I get the value and why is null there?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T18:47:47+00:00Added an answer on June 2, 2026 at 6:47 pm

    “[userId : null]” is generally the “toString” printout of a DOM element. Most likely if you do something like

    logger.debug(header.getObject().getClass())
    

    you will see that it is a DOM Element subclass of somesort. Thus, something like:

    logger.debug(((Element)header.getObject()).getTextContent())
    

    might print the text node.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have Soap WS on Java. Here is soap request <soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/ xmlns:his=SCC/Lis/HistoryFormatter> <soapenv:Header/>
This is the SOAP document I'm trying to model using SOAP::Lite. <SOAP-ENV:Envelope xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/ xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/
I have the generic structure here: <?xml version=1.0 encoding=UTF-8?> <SOAP-ENV:Envelope xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/ xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/
I am sending HTTP GET request and receiving data here: ssize_t numBytes = recvfrom(sock,
NOOb here. I've got a HTTP request that pulls all of the content from
I keep getting a Request format is invalid. Here's the raw http that gets
I'm trying to make a soap request and having difficulties. Here is my php:
How emulate xmlhttprequest and get json response? Here Answer: HTTP/1.1 200 OK Server: nginx/1.1.7
Hello I am trying to do a SOAP request here is my code: #
So I'm having some problems adding a wsse header to my SOAP request. #!/usr/bin/perl

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.