cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1228
Views
5
Helpful
3
Replies

Passing Cookies from Previous Web HTTP Request to the Next

mcofino
Cisco Employee
Cisco Employee

Hi,

I have two Web Http Requests. The first one performs a Login and the second one executes another method called ListRecoveryPlans.

First SOAP calls for Login looks like this:

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap-url>https://srm-app-003:9007</soap-url>

<connection>

<name>srm_connection_test_01</name>

<terminate-on-exit>false</terminate-on-exit>

</connection>

<SOAP-ENV:Body>

<urn:SrmLogin xmlns:urn="urn:srm0">

<urn:_this xmlns:urn="urn" type="SrmApi">Srm</urn:_this>

<urn:username>cisco\xxx</urn:username>

<urn:password>xxx</urn:password>

</urn:SrmLogin>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

The second soap looks like this:

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap-url>https://srm-app-003:9007</soap-url>

<connection>

<name>srm_connection_test_01</name>

<terminate-on-exit>false</terminate-on-exit>

</connection>

<connectionCookie>

<name>

<xsl:text disable-output-escaping="no">DE78D964-DDF4-40B6-BCB7-BEB44624826D</xsl:text>

</name>

</connectionCookie>

<SOAP-ENV:Body>

<urn:ListRecoveryPlans xmlns:urn="urn:srm0">

<urn:_this xmlns:urn="urn" type="SrmApi">

<xsl:text disable-output-escaping="no">Srm</xsl:text>

</urn:_this>

</urn:ListRecoveryPlans>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

In addition, under the Cookies tab for the ListRecoveryPlans request, I passed the cookies from the previous request:

passCookie.PNG

However, I am getting a "session is not authenticated" error.

The remote server returned an error: (500) Internal Server Error.

<?xml version="1.0" encoding="UTF-8"?>

<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"

xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<soapenv:Body>

<soapenv:Fault><faultcode>ServerFaultCode</faultcode><faultstring>The session is not authenticated.</faultstring><detail><SecurityErrorFault xmlns="urn:srm0" xsi:type="SecurityError"></SecurityErrorFault></detail></soapenv:Fault>

</soapenv:Body>

</soapenv:Envelope>

Can you shed some light on how I can fix this issue? I am using CPO v. 2.2.0.1409.

Thank you.

Regards,

Mary Jane Cofino

3 Replies 3

Shaun Roberts
Cisco Employee
Cisco Employee

On the first request, did you check to accept cookies from it? Can you try viewing the cookie table and making sure you are getting it in the first call?

If you need more help, open a TAC case.

-shaun

--Shaun Roberts
Principal Engineer, CX
shaurobe@cisco.com

Hi,

Thank you for the prompt reply.

For the first request, here is the response header I am getting

I checked the "Accept cookies from this request" checkbox button and am now getting a new error:

The remote server returned an error: (500) Internal Server Error.

http://schemas.xmlsoap.org/soap/encoding/"

xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

ServerFaultCodeThe object has already been deleted or has not been completely created

Regards,

Mary Jane Cofino

A 500 error means an error on the application you are calling.

Have you tested this with like SOAP UI or some other manual soap engine?

-shaun

--Shaun Roberts
Principal Engineer, CX
shaurobe@cisco.com
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers