• RajiSrinivasan
  • NEWBIE
  • 0 Points
  • Member since 2011

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

I am trying to call a web service in PeopleSoft from salesforce (Apex class). The service requires a SOAP XML request with necessary security (username and password) in SOAP header.

 

I generated Apex classes from the WSDL following this document.

http://wiki.developerforce.com/page/Apex_Web_Services_and_Callouts

 

But there is not an option to create a SOAP request using the classes generated from WSDl2Apex.

 

Is it possible to create a complete SOAP XML HTTP request to call an external web service from an Apex class?

Is it possible to use the standard SOAP APIs in Apex to create a complete SOAP XML request in a Apex class?

 

Thanks,

Raji

 

 

 

I am trying to call a web service in PeopleSoft from salesforce (Apex class). The service requires a SOAP XML request with necessary security (username and password) in SOAP header.

 

I generated Apex classes from the WSDL following this document.

http://wiki.developerforce.com/page/Apex_Web_Services_and_Callouts

 

But there is not an option to create a SOAP request using the classes generated from WSDl2Apex.

 

Is it possible to create a complete SOAP XML HTTP request to call an external web service from an Apex class?

Is it possible to use the standard SOAP APIs in Apex to create a complete SOAP XML request in a Apex class?

 

Thanks,

Raji

 

 

 

Hi All,

     I am new to people soft.But i want integration of people soft with sfdc through apis or webservices.any one can u please help me.

 

Thanks in advace

anu

  • August 17, 2011
  • Like
  • 0

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.