• Dimon
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies

Hi Guys,

 

I'm working on integration with some web service that requires WSSE authentication.

WSSE Authentication requires special SOAP Header that can look like below:

 

<env:Header>

            <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2003/06/secext">

                        <wsse:UsernameToken>

                                                <wsse:Username>test</wsse:Username>

                                                <wsse:Password>123</wsse:Password>

                        </wsse:UsernameToken>

            </wsse:Security>

</env:Header>

 

So, I decided to use WebServiceCallout class to invoke that web service methods. I also found a way how to add SOAP header but I spent a lot of time reading documentation and trying different things to figure out how to add "wsse" prefix for the lements in this header without any success...

 

The maximum I was able to produce is:

 

<env:Header>

     <n1:Security xmlns:n1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">

             <usernameToken>

                   <username>test</username>

                   <password>123</password>

             </usernameToken>

      </n1:Security>

</env:Header>

 

Do anybody know about any workaround to specify "wsse" prefix?

I really don't want to go with Http classes solution yet hoping that there could be some solution I don't know about. Please advise.

 

Thanks in advance!

 

  • July 06, 2011
  • Like
  • 0

Hi Guys,

 

I'm working on integration with some web service that requires WSSE authentication.

WSSE Authentication requires special SOAP Header that can look like below:

 

<env:Header>

            <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2003/06/secext">

                        <wsse:UsernameToken>

                                                <wsse:Username>test</wsse:Username>

                                                <wsse:Password>123</wsse:Password>

                        </wsse:UsernameToken>

            </wsse:Security>

</env:Header>

 

So, I decided to use WebServiceCallout class to invoke that web service methods. I also found a way how to add SOAP header but I spent a lot of time reading documentation and trying different things to figure out how to add "wsse" prefix for the lements in this header without any success...

 

The maximum I was able to produce is:

 

<env:Header>

     <n1:Security xmlns:n1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">

             <usernameToken>

                   <username>test</username>

                   <password>123</password>

             </usernameToken>

      </n1:Security>

</env:Header>

 

Do anybody know about any workaround to specify "wsse" prefix?

I really don't want to go with Http classes solution yet hoping that there could be some solution I don't know about. Please advise.

 

Thanks in advance!

 

  • July 06, 2011
  • Like
  • 0