• vinit_sf
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 5
    Replies

Currently I am able to send the Header in the Soap request in 2 ways as shown below:

 

1st way

<env:Header>

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

                        <UsernameToken>

                                    <Username>abcde</Username>

                                    <Password>abc123</Password>            (Password here is simple xsd:string type)

                        </UsernameToken>

            </ Security>

</env:Header>

 

And like this:

2nd way

<env:Header>

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

                        <UsernameToken>

                                    <Username>abcde</Username>

                                    <Password Type=”PasswordText” />

                        </UsernameToken>

            </ Security>

</env:Header>

 

 

But this is the header that I require (marked in Red):

<env:Header>

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

                        <UsernameToken>

                                    <Username>abcde</Username>

                                    <Password Type= “PasswordText”>abc123</Password>

                        </UsernameToken>

            </ Security>

</env:Header>

 

 

What I am unable to create 2 things as shown above:

  1. I can send either password type or password value, but not both together.
  2. I cannot add soapenv:mustUnderstand="1" in Security tag.

Is there way to achieve it by making modification in the Apex class or any other way?

 

I am trying to make callout to a webapplication from salesforce.

 

Thank you.





Currently I am able to send the Header in the Soap request in 2 ways as shown below:

 

1st way

<env:Header>

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

                        <UsernameToken>

                                    <Username>abcde</Username>

                                    <Password>abc123</Password>            (Password here is simple xsd:string type)

                        </UsernameToken>

            </ Security>

</env:Header>

 

And like this:

2nd way

<env:Header>

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

                        <UsernameToken>

                                    <Username>abcde</Username>

                                    <Password Type=”PasswordText” />

                        </UsernameToken>

            </ Security>

</env:Header>

 

 

But this is the header that I require (marked in Red):

<env:Header>

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

                        <UsernameToken>

                                    <Username>abcde</Username>

                                    <Password Type= “PasswordText”>abc123</Password>

                        </UsernameToken>

            </ Security>

</env:Header>

 

 

What I am unable to create 2 things as shown above:

  1. I can send either password type or password value, but not both together.
  2. I cannot add soapenv:mustUnderstand="1" in Security tag.

Is there way to achieve it by making modification in the Apex class or any other way?

 

Thank you.



 

Hi my current SOAP request looks like below:-

 

<env:Header>

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

                        <UsernameToken>

                                    <Username>abcde</Username>

                                    <Password>abc123</Password>

                        </UsernameToken>

            </ Security>

</env:Header>



 

I want it convert as below:-

 

<env:Header>

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

                        <wsse:UsernameToken>

                                                <wsse:Username>abcde</wsse:Username>

                                                <wsse:Password Type="wsse:PasswordText">abc123</wsse:Password>

                        </wsse:UsernameToken>

            </wsse:Security>

</env:Header>

 

Basically,I want to add wsse in the envelope.I want to know if this is possbile through Apex class or is there any other way to achive it.

 

Thank you for the help.



Hi my current SOAP request looks like below:-

 

<env:Header>

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

                        <UsernameToken>

                                    <Username>abcde</Username>

                                    <Password>abc123</Password>

                        </UsernameToken>

            </ Security>

</env:Header>



 

I want it convert as below:-

 

<env:Header>

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

                        <wsse:UsernameToken>

                                                <wsse:Username>abcde</wsse:Username>

                                                <wsse:Password Type="wsse:PasswordText">abc123</wsse:Password>

                        </wsse:UsernameToken>

            </wsse:Security>

</env:Header>

 

Basically,I want to add wsse in the envelope.I want to know if this is possbile through Apex class or is there any other way to achive it.

 

Thank you for the help.

Hi, Need help in trigger.

 

Whenver a ticket is created through email to case, the ticket is created in the name of my company's administrator and contact name and email shows up as her instead of who actually create the ticket. Although the actual contact who emailed for that ticket exist in our salesforce account.

 

How I can create a trigger to assign the contact name and email for that particular person who created the ticket through email to case instead of my company's administrator? Please help.

Currently I am able to send the Header in the Soap request in 2 ways as shown below:

 

1st way

<env:Header>

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

                        <UsernameToken>

                                    <Username>abcde</Username>

                                    <Password>abc123</Password>            (Password here is simple xsd:string type)

                        </UsernameToken>

            </ Security>

</env:Header>

 

And like this:

2nd way

<env:Header>

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

                        <UsernameToken>

                                    <Username>abcde</Username>

                                    <Password Type=”PasswordText” />

                        </UsernameToken>

            </ Security>

</env:Header>

 

 

But this is the header that I require (marked in Red):

<env:Header>

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

                        <UsernameToken>

                                    <Username>abcde</Username>

                                    <Password Type= “PasswordText”>abc123</Password>

                        </UsernameToken>

            </ Security>

</env:Header>

 

 

What I am unable to create 2 things as shown above:

  1. I can send either password type or password value, but not both together.
  2. I cannot add soapenv:mustUnderstand="1" in Security tag.

Is there way to achieve it by making modification in the Apex class or any other way?

 

Thank you.



 

Hi my current SOAP request looks like below:-

 

<env:Header>

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

                        <UsernameToken>

                                    <Username>abcde</Username>

                                    <Password>abc123</Password>

                        </UsernameToken>

            </ Security>

</env:Header>



 

I want it convert as below:-

 

<env:Header>

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

                        <wsse:UsernameToken>

                                                <wsse:Username>abcde</wsse:Username>

                                                <wsse:Password Type="wsse:PasswordText">abc123</wsse:Password>

                        </wsse:UsernameToken>

            </wsse:Security>

</env:Header>

 

Basically,I want to add wsse in the envelope.I want to know if this is possbile through Apex class or is there any other way to achive it.

 

Thank you for the help.