Author Message
MichaelCallaghan
Joined: Nov 30, 2007
Messages: 0
Offline
I have an AES/CM Simulator up and running and a set of unit tests that make repeated calls to the SMS web service. After six calls, I get a SOAP fault for every request. It starts with:

Soap Fault: SoapFault Object ( [message:protected] => Connection Failed: All available connections are in use. Try again later.

What does this mean? This is a new simulator installation. The last time we had a simulator this never came up. I'm wondering what I'm missing.

Thanks!
Mike
MichaelCallaghan
Joined: Nov 30, 2007
Messages: 0
Offline
Update: The sms_test.php page shows the same issue. After awhile, the issue goes away and then comes back. I'm thinking that I'm not releasing resources, but I thought that web services were stateless.
AnthonyGreway
Joined: Feb 12, 2007
Messages: 0
Offline
Mike,

SMS maintains a session between the client and Communication Manager for each client request, so you are correct that you are not likely releasing unused resources. The "release" method of the web service is intended for this purpose. For more details on how to implement and maintain sessions with SMS download the SMS SDK and read the "Authentication and Session Management" section of the usage doc. Please let me know if you have anymore questions.

--Tony
MichaelCallaghan
Joined: Nov 30, 2007
Messages: 0
Offline
I see that I wasn't even trying to track sessionID. I added code to do it, but the value always appeared blank. So then I decided to print the raw XML returned by the web service. Here is my response header:

<SOAP-ENV:Header>
<ns1:sessionID/>
</SOAP-ENV:Header>

There is no sessionID being returned from any of my calls. There is valid data, though. What do I make of that?

Thanks!
Mike
AnthonyGreway
Joined: Feb 12, 2007
Messages: 0
Offline
Mike,

I believe the problem you are experiencing is appearing because the sessionID SOAP Header element is not being included in the request. Ex:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://xml.avaya.com/ws/SystemManagementService/2005/04/04" xmlns:tns3="http://xml.avaya.com/ws/session">
<soap:Body>
<tns:submitRequest>
<model>Station</model>
<operation>display</operation>
<objectname/>
<qualifier>4700</qualifier>
<fields>*</fields>
</tns:submitRequest>
</soap:Body>
</soap:Envelope>

The SMS web service has a bug which returns a null session ID if the SOAP Header is missing in the request. This will be fixed in the 4.1.1 service pack and all future release when they are available. Here is an example of what the request should look like in order to receive a valid session ID. Ex:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://xml.avaya.com/ws/SystemManagementService/2005/04/04" xmlns:tns3="http://xml.avaya.com/ws/session">
<soap:Header>
<tns3:sessionID/>
</soap:Header>
<soap:Body>
<tns:submitRequest>
<model>Station</model>
<operation>display</operation>
<objectname/>
<qualifier>4700</qualifier>
<fields>*</fields>
</tns:submitRequest>
</soap:Body>
</soap:Envelope>

FYI: You might try using SoapSonar (Personal Edition) (put in your favorite web search engine) to get a good feel for what the web service requests and responses should look like.

--Tony

MichaelCallaghan
Joined: Nov 30, 2007
Messages: 0
Offline
Setting the header in the SOAP call resulted in this in the header:

<SOAP-ENV:Header>
<ns1:sessionID>
89e75fc242363f9167fe55cb4ea0b2c8
</ns1:sessionID>
</SOAP-ENV:Header>

So I think I'm on the right track. Thanks for the help!
Go to:   
Mobile view