Cannot receive response from WEBSERVER (IRD)

Hi,
Im trying to connect to a WeBServer but in Genesys i get the HTTP/1.1 500 Server Error!
Whein I try to get the information by SoapUI, i receive the response!
I taked a look in the WSDL archive and i realize that Genesys does not creat the same script than SoapUI!

Here we have the script by SOAP:

<soapenv:Envelope
xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/
xmlns:web=“http://soap.sforce.com/schemas/class/WebServiceGetClientInfo”>
soapenv:Header
web:SessionHeader
web:sessionId00Do0000000aXf1!ARUAQKOPZVbE6n.rxgPfsskiTCOTdgA9xidNR2MzOYDcIaQ33mEW7KRVbnaWcNOpGsCbxhqByDWlQzguzKXqYYlvwbAt7jNi</web:sessionId>
</web:SessionHeader>
</soapenv:Header>
soapenv:Body
web:getClientInfo
web:docNum27822261</web:docNum>
</web:getClientInfo>
</soapenv:Body>
</soapenv:Envelope>

It looks like good, and works!

Here when is created by genesys (from LOG FILE)

<?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” xmlns:tns=“http://soap.sforce.com/schemas/class/WebServiceGetClientInfo”>
<SOAP-ENV:Body SOAP-ENV:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”>
tns:getClientInfo
00Do0000000aXf1!ARUAQKOPZVbE6n.rxgPfsskiTCOTdgA9xidNR2MzOYDcIaQ33mEW7KRVbnaWcNOpGsCbxhqByDWlQzguzKXqYYlvwbAt7jNi


27822261

</tns:getClientInfo>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

When i execute this, i have INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session
as you can see here in log file!

URL: https://na17.salesforce.com/services/Soap/class/WebServiceGetClientInfo
SOAP Action:
HTTP Auth: Anonymous
WS-Security: No
Method: tns:getClientInfo
Namespace: tns=http://soap.sforce.com/schemas/class/WebServiceGetClientInfo
List Tags:
key SessionHeader
value: (size=130)
key sessionId [String] value: “00Do0000000aXf1!ARUAQKOPZVbE6n.rxgPfsskiTCOTdgA9xidNR2MzOYDcIaQ33mEW7KRVbnaWcNOpGsCbxhqByDWlQzguzKXqYYlvwbAt7jNi”
key getClientInfo value: (size=23)
key docNum [String] value: “27822261”
Result: getClientInfoResponse.result
06/06/16@16:12:55.091: [HTTP Client 016d9784] Connecting to https://na17.salesforce.com/services/Soap/class/WebServiceGetClientInfo
Certif: (null)
Certif Key: (null)
Trusted CA: (null)
Client Auth: 0
Secure connection is established. type ‘client’, info ‘208-96.43.151.60:443’, issuer ‘C=US, O=Symantec Corporation, OU=Symantec Trust Network, CN=Symantec Class 3 Secure Server CA - G4’, subject ‘C=US, S=California, L=San Francisco, O=“Salesforce.com, Inc”, OU=Applications, CN=*.salesforce.com’
06/06/16@16:12:55.753: [HTTP Client 016d9784] Connected on socket 208
06/06/16@16:12:55.753: [HTTP Client 016d9784] Request sent:
POST /services/Soap/class/WebServiceGetClientInfo HTTP/1.1
Host: na17.salesforce.com:443
User-Agent: gSOAP/2.7
Content-Type: text/xml; charset=utf-8
Content-Length: 727
Connection: keep-alive
SOAPAction: “”

<?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” xmlns:tns=“http://soap.sforce.com/schemas/class/WebServiceGetClientInfo”><SOAP-ENV:Body SOAP-ENV:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”>tns:getClientInfo00Do0000000aXf1!ARUAQKOPZVbE6n.rxgPfsskiTCOTdgA9xidNR2MzOYDcIaQ33mEW7KRVbnaWcNOpGsCbxhqByDWlQzguzKXqYYlvwbAt7jNi27822261</tns:getClientInfo></SOAP-ENV:Body></SOAP-ENV:Envelope>
06/06/16@16:12:55.986: [HTTP Client 016d9784] Received 707 bytes from server on socket 208:
HTTP/1.1 500 Server Error
Date: Mon, 06 Jun 2016 19:12:55 GMT
Set-Cookie: BrowserId=HLBBKjYGSwqX6lrWtSXaCA;Path=/;Domain=.salesforce.com;Expires=Fri, 05-Aug-2016 19:12:55 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked

19E

<?xml version="1.0" encoding="UTF-8"?>sf:INVALID_SESSION_IDINVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session

06/06/16@16:12:55.986: [HTTP Response 016d9798] Chunked transfer encoding
06/06/16@16:12:55.986: [HTTP Client 016d9784] Received 5 bytes from server on socket 208:
0

06/06/16@16:12:55.986: [HTTP Client 016d9784] Response received
06/06/16@16:12:55.986: [SOAP Client 016d9740] SOAP Fault, faultcode: ‘tns:INVALID_SESSION_ID’, faultstring: ‘INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session’, faultsubcode ‘tns:INVALID_SESSION_ID’, faultdetail ‘’
06/06/16@16:12:55.986: [SOAP Handler 016d9700] Ref 130. Next attempt to contact Web Service in 10 seconds

Anybody saw something about it!?
i tried to search in genesys documentation but i can’t find anything!

Thanks

Genesys URS 8.1.300.30
IRD: 8.1.300.22
WSDL Archive Type: Document

Are you forcing the Session ID? Can you put a screenshot on how are you calling the WS at the IRD strategy?

http://i66.tinypic.com/2zeghfo.jpg

http://i64.tinypic.com/2ikbk87.jpg

Yeah…why are you forcing the SessionID?

Probably related with SOAP server looks for session in SOAP Header (which is actually passed in IRD/URS case in SOAP Body)
Web service object (IRD/URS) unlikely supports passing data through soapenv:Header but through soapenv:Body (all request parameters go into Body of SOAP envelope, not into header). Header is used for special purposes like SOAP based security, etc.

If it is the case, one way to handle it as far as I know (a bit clumsy though) - you can try to build Envelope content manually with header/body etc and pass it as is (assuming not very old IRD/URS)
template= ‘soapenv:Headerweb:SessionHeaderweb:sessionId~s</web:sessionId></web:SessionHeader></soapenv:Header>
soapenv:Bodyweb:getClientInfoweb:docNum~s</web:docNum></web:getClientInfo></soapenv:Body>’

content= StrFormat[template, var_return, doc]

after that use Web service object with Request parameters having just one parameter named Body and having value content.

I’m actually working on a Salesforce integration myself right now, so it could be that I’m about to run into the same issue.

Cav, with this web service you have to perform a login function, which returns a session id, then do whatever you need to do using the session id

I see…I have done the same but not for IRD but on GVP. Would be valid to ask then after how many seconds later you perform the second WS after the login one. Also ask to your WS provider for how long they keep the SessionID valid.

Enviado de meu E6633 usando Tapatalk

Hi guys!!
First of all, thank your for your attention!

Well,
I did it terry (thank you for your time), but when i change the parameter to Body, I have this error:
SOAP Fault, faultcode: ‘SOAP-ENV:Client’, faultstring: ‘The prefix “soapenv” for element “soapenv:Header” is not bound.’, faultsubcode ‘SOAP-ENV:Client’, faultdetail ‘’

http://i66.tinypic.com/2qu4x3c.jpg

LOG (BODY PARAMETR)

<?xml version="1.0" encoding="UTF-8"?> 00Do0000000aXf1!ARUAQBmRav9mAad3kraRyXsQVUkPnGUG0Rh0vC0zy4EO69WKgurBVIedtkVXMUEF.mfJw38SZTfbUSY.Y7UGISF7GlQJPEgY 27822261

06/07/16@11:17:49.996: [HTTP Client 0000000001066b30] Received 633 bytes from server on socket 336:
HTTP/1.1 500 Server Error
Date: Tue, 07 Jun 2016 14:17:49 GMT
Set-Cookie: BrowserId=eAN_Mp6vS1Cw-gs2kLpGyg;Path=/;Domain=.salesforce.com;Expires=Sat, 06-Aug-2016 14:17:49 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked

154

<?xml version="1.0" encoding="UTF-8"?>soapenv:ClientThe prefix "soapenv" for element "soapenv:Header" is not bound.

06/07/16@11:17:49.996: [HTTP Response 0000000001066b58] Chunked transfer encoding
06/07/16@11:17:49.996: [HTTP Client 0000000001066b30] Received 5 bytes from server on socket 336:
0

06/07/16@11:17:49.996: [HTTP Client 0000000001066b30] Response received
06/07/16@11:17:49.996: [SOAP Client 0000000001066a90] SOAP Fault, faultcode: ‘SOAP-ENV:Client’, faultstring: ‘The prefix “soapenv” for element “soapenv:Header” is not bound.’, faultsubcode ‘SOAP-ENV:Client’, faultdetail ‘’
06/07/16@11:17:49.996: [SOAP Handler 00000000010669e0] Ref 70. Next attempt to contact Web Service in 10 seconds

So…, i tried to change the parameter to HEADER, and returned the same error that we had before:
SOAP Fault, faultcode: ‘“”:INVALID_SESSION_ID’, faultstring: ‘INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session’, faultsubcode ‘“”:INVALID_SESSION_ID’, faultdetail ‘’

http://i64.tinypic.com/2s8ok0j.jpg

<?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-ENV:Body SOAP-ENV:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”><soapenv:Header> <web:SessionHeader> <web:sessionId>00Do0000000aXf1!ARUAQBmRav9mAad3kraRyXsQVUkPnGUG0Rh0vC0zy4EO69WKgurBVIedtkVXMUEF.mfJw38SZTfbUSY.Y7UGISF7GlQJPEgY</web:sessionId> </web:SessionHeader> </soapenv:Header> <soapenv:Body> <web:getClientInfo> <web:docNum>27822261</web:docNum> </web:getClientInfo> </soapenv:Body></soapenv:Envelope></SOAP-ENV:Body></SOAP-ENV:Envelope>
06/07/16@11:18:58.965: [HTTP Client 0000000001066b30] Received 632 bytes from server on socket 328:
HTTP/1.1 500 Server Error
Date: Tue, 07 Jun 2016 14:18:58 GMT
Set-Cookie: BrowserId=qnPQrJ-7Sg2gyDDls2MFUA;Path=/;Domain=.salesforce.com;Expires=Sat, 06-Aug-2016 14:18:58 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked

153

<?xml version="1.0" encoding="UTF-8"?>INVALID_SESSION_IDINVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session

06/07/16@11:18:58.965: [HTTP Response 0000000001066b58] Chunked transfer encoding
06/07/16@11:18:58.965: [HTTP Client 0000000001066b30] Received 5 bytes from server on socket 328:
0

06/07/16@11:18:58.965: [HTTP Client 0000000001066b30] Response received
06/07/16@11:18:58.965: [SOAP Client 0000000001066a90] SOAP Fault, faultcode: ‘“”:INVALID_SESSION_ID’, faultstring: ‘INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session’, faultsubcode ‘“”:INVALID_SESSION_ID’, faultdetail ‘’
06/07/16@11:18:58.965: [SOAP Handler 00000000010669e0] Ref 77. Next attempt to contact Web Service in 10 seconds

Im not sure that i did it right, here i put a screen to best understand!

http://i63.tinypic.com/w0pc0h.jpg

Thank you!!!

Filipe o problema não é a chamada, é o retorno que tá fazendo…
The problem is not the call but the return you are having
Forcing the SESSIONID has its tricks. Please answer the other questions

Enviado de meu E6633 usando Tapatalk

Hi cavagnaro,
sorry fo this!

I think that im not forcing the sessionId (in Genesys, just in SoapUI,that i need to put it the value directly) because i need this value to get the response!

http://i66.tinypic.com/t5m3af.jpg

the sessionId value i got from other WS in the same strategy, and put it in var_return variable
var_return=sessionId
When i get it i need the value doc as well!

Would be valid to ask then after how many seconds later you perform the second WS after the login one.
r: i asked the provider and he told me that is around 2s or 3s

ask to your WS provider for how long they keep the SessionID valid.
r: The sessionId is updated every time that we make login in salesforce (on the first WS)
Of course if it is valid, will work!

Dionysis, it is exactly what happens, but the we have other WS to performs the login function!
Thank you

Yes, I’m aware of the login method, I’m using the same API currently. You shouldn’t need to run the login method every time you perform the query though. You can hold the session ID (and server URL) in a global (or script) variable for as long as it is still valid. There is a value returned in the login method which tells you how long this is, in my case it is 8 hours (28800 seconds).

So if you do the second WS call after 2 seconds with Login WS SessID it won’t work.
As Dionysis says, check that value on the Login WS. I also agree should be much more longer, if not you only have 2 seconds to do that WS call…which could the the root of your problems.

Sorry, under soapenv I meant referring in one or another way to “http://schemas.xmlsoap.org/soap/envelope/” namespace.
As URS by default assigns to this namespace label SOAP-ENV then proper SOAP body need to be something like
template= ‘SOAP-ENV:Headerweb:SessionHeaderweb:sessionId~s</web:sessionId></web:SessionHeader></SOAP-ENV:Header>
SOAP-ENV:Bodyweb:getClientInfoweb:docNum~s</web:docNum></web:getClientInfo></SOAP-ENV:Body>’

Plus this SOAP message uses web prefix so appropriate xmlns should be defined too, in Method Namespace put something like
web=http://soap.sforce.com/schemas/class/WebServiceGetClientInfo

Word Header as parameter is not working. URS has special reaction only on parameter named Body (all others treated as regular parameters).

;D ;D ;D ;D ;D ;D ;D
IT WORKS!!!
terry, THANK YOU VERY MUCH!!!
and thank you guys!!!

look this:

<?xml version="1.0" encoding="UTF-8"?> 00Do0000000aXf1!ARUAQA1MTxJMIRLYQf6Lu.DSXyJoXSytLKLkoeGxlmEf6zfRBCjPAfWdbM3MbtB1xZV6plyqpcqchZ0rAntwabcBJO4z8jd527822261

06/07/16@15:16:12.883: [HTTP Client 0000000001066b30] Received 610 bytes from server on socket 256:
HTTP/1.1 200 OK

Date: Tue, 07 Jun 2016 18:16:10 GMT
Set-Cookie: BrowserId=Fb59A8SVTjW-ebsALj7JsQ;Path=/;Domain=.salesforce.com;Expires=Sat, 06-Aug-2016 18:16:10 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked

147

<?xml version="1.0" encoding="UTF-8"?>FERNANDO EMANUEL BRONDOLO VARELA

06/07/16@15:16:12.883: [HTTP Response 0000000001066b58] Chunked transfer encoding
06/07/16@15:16:12.883: [HTTP Client 0000000001066b30] Received 5 bytes from server on socket 256:
0

06/07/16@15:16:12.883: [HTTP Client 0000000001066b30] Response received
06/07/16@15:16:12.883: [SOAP Handler 00000000010669e0] Ref 581. Response:

Body:
key getClientInfoResponse value: (size=47)
key result [String] value: “FERNANDO EMANUEL BRONDOLO VARELA”
06/07/16@15:16:12.883: Ref 581. Response with event type 3 (status 0) sent to client
06/07/16@15:16:12.883: [SOAP Handler 00000000010669e0] State ‘Connected’

Exactly terry this was the solution!!!

http://i64.tinypic.com/2k0l6c.jpg

http://i68.tinypic.com/35ixjwi.jpg

thanks guys!!!