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

  • Home
  • SEARCH
  • 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 9115401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:25:24+00:00 2026-06-17T04:25:24+00:00

A third party in charge of developing Java based webservice came back to us

  • 0

A third party in charge of developing Java based webservice came back to us with requirement that message header needs to look like this:

<soapenv:Header>
 <wsse:Security>
     <xenc:ReferenceList>
        <xenc:DataReference URI="#EncDataId-1"/>
     </xenc:ReferenceList>
     <wsse:UsernameToken>
        <wsse:Username>[snip]</wsse:Username>
        <xenc:EncryptedData Id="EncDataId-1" Type="http://www.w3.org/2001/04/xmlenc#Element">
           <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc"/>
           <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
              <ds:KeyName>[snip]</ds:KeyName>
           </ds:KeyInfo>
           <xenc:CipherData>
              <xenc:CipherValue>[snip]</xenc:CipherValue>
           </xenc:CipherData>
        </xenc:EncryptedData>
     </wsse:UsernameToken>
  </wsse:Security>
</soapenv:Header>

Given my very surfacish understanding of this security voodoo magic I am having trouble figuring out how configure my client to produce such header. Right now my code looks like this:

client.ClientCredentials.UserName.UserName = "[snip]";
client.ClientCredentials.UserName.Password = "[snip]";

and the header:

<s:Header>
    <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
        <o:UsernameToken u:Id="uuid-e906a1ca-aa63-474c-b4ac-cf9b90ab2435-1">
            <o:Username>[snip]</o:Username>
            <o:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">[snip]</o:Password>
        </o:UsernameToken>
    </o:Security>
</s:Header>

and binding:

<binding name="SMSSoap11">
    <security mode="TransportWithMessageCredential" />
</binding>
  • 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-17T04:25:25+00:00Added an answer on June 17, 2026 at 4:25 am

    WCF will not produce this output for you. You will have to write your own token for this and maybe even more. WCF supports only username token with plain password out-of-the-box and your code example even doesn’t look like any part of username token specification. If the goal is to use encrypted password with WS-Security then the security header seems incomplete.

    You should ask Java developers what are security requirements in terms of WS-SecurityPolicy?

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

Sidebar

Related Questions

I am developing a third-party service embedded in websites as a JS snippet, that
I have a java application that uses some third party API. The third party
We are using a Third-Party assembly that seems to be compiled as AnyCPU. However,
I'm using a third party library which has a blocking function, that is, it
I'm using a third party storage system that only returns me stdClass objects no
I have a third party component that displays a print preview form. I would
I have an event that is raised from a third-party library, which executes on
as background I've got an embedded device that talks to a third party server
I'm using a third party library that returns Exception information in the form of
I have an application using a third party package that has a factory that

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.