Author Message
KB_member
Joined: Nov 5, 2013
Messages: 66
Offline
Hi,

I have an OD IVR application from where I need to check if an AGENT ID is logged in or not ? How do I do so ? Any documentation on this will be very helpful.



Thanks,
Kartik

CraigJohnson5
Joined: Oct 24, 2013
Messages: 413
Offline
AE Services has a web service called System Management Service where you can send requests to Communication Manager through AE Services and get this information. It runs commands against the Communication Manager in the same way you run them in a SAT session on Communication Manager. So you can send a request to list agent xxxxx (where xxxxx is the agent ID), and it will return a record. If the "Extension" field has a station extension then it is staffed (logged in). If it is not logged in it will return "unstaffed" in that field.

You can go to this page, then click your version on the right. Then click the Downloads tab and then Web Services. The SDK and programmers guide is available for download there. There is also a forum for AES web services if you have additional questions. When you download the SDK and extract it there is a "usage.doc" file located in the main extraction directory that is really helpful.

Also, AE Services comes with a test application that you can run all of the models that are available to SMS, including Agent. That way you can run the request and see the response before you begin. It is located at http://AESIP/smsxml/smsxml_test.php. Make sure to replace "AESIP" with your AES's IP address.
KB_member
Joined: Nov 5, 2013
Messages: 66
Offline
Thanks much Craig.I will take a look at it.



Thanks,
Kartik
KB_member
Joined: Nov 5, 2013
Messages: 66
Offline
Hi Craig,
I keep getting

Fault: Connection Failed:

as the response when I submit the request from this page

http://AESIP/smsxml/smsxml_test.php

I got a read only CM account from the telecom team and I have tried using it with the IPv4 and also with the host name (with port 1719).

Any idea why the the connection would fail ?


Thanks,
Kartik
CraigJohnson5
Joined: Oct 24, 2013
Messages: 413
Offline
CM Login ID should be in the format of: cmusername@CMIP
Password: password for that CM user

What model and operation are you using?

You should be able to login to the CM SAT with the username and password you are using, and run the command. If you can't do it in the SAT you can do it with SMS.
KB_member
Joined: Nov 5, 2013
Messages: 66
Offline
Thanks Craig.

I was able to get a response from the test page.It was a permission issue with the login.

Now, my next task was to generate the wsdl which I did and loaded it onto the SOAP UI to invoke the "submitRequest" method.I also added the http headers "username" and "password".

The response i get is "Authentication Required for SMS access". What does this mean ? Do I need to have my laptop ip added somewhere on the CM ?

Let me know.

Thanks,
Kartik
CraigJohnson5
Joined: Oct 24, 2013
Messages: 413
Offline
So you went under the "Auth" tab and used "Basic" Authorization? That's where you should add the same CM username and password you put in the SMS test app.
KB_member
Joined: Nov 5, 2013
Messages: 66
Offline
I am sorry , my bad. I added it under the "headers" tab as the avaya doc wanted those to be added as http headers.I tried it now as basic auth and it works !!

Thanks so much for your help with this Craig.

Kartik
KB_member
Joined: Nov 5, 2013
Messages: 66
Offline
Hi Craig,
Attached is the stub generated using axis2.But I am having difficulty sending the request.This is what i am doing :

AgentType agent[] = new AgentType[1];

ModelChoices m = new ModelChoices();
m.setAgent(agent);

String qualifier = mySession.getVariableField(IProjectVariables.QUALIFIER).getStringValue();

connectivity.ws.beans.SystemManagementServiceStub.SubmitRequestType request = new connectivity.ws.beans.SystemManagementServiceStub.SubmitRequestType();


//connectivity.ws.beans2.SystemManagementServiceStub.SubmitRequestType request = (connectivity.ws.beans2.SystemManagementServiceStub.SubmitRequestType)mySession.getVariable(IProjectVariables.SUBMIT_REQUEST).getSimpleVariable().getObjectValue();
request.setModelFields(m);

request.setOperation("list");
request.setQualifier(qualifier);

mySession.getVariable(IProjectVariables.SUBMIT_REQUEST).getSimpleVariable().setValue(request);





But I get an error stating Invalid XML sent in ModelFields.





Web Service Request -> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header><sessionID xmlns="http://xml.avaya.com/ws/session" /></soapenv:Header><soapenv:Body><ns2:submitRequest xmlns:ns2="http://xml.avaya.com/ws/SystemManagementService/2008/07/01" /></soapenv:Body></soapenv:Envelope>
22/09/2015 10:32:00:759 DEBUG - D97C495E8B5C0291AB658828DF6D37C8:/AES_SMS : Axis Fault message <- <?xml version='1.0' encoding='utf-8'?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Invalid XML sent in ModelFields!</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
22/09/2015 10:32:00:759 ERROR - D97C495E8B5C0291AB658828DF6D37C8:/AES_SMS : Got AxisFault during web service call: Invalid XML sent in ModelFields!
22/09/2015 10:32:00:759 DEBUG - D97C495E8B5C0291AB658828DF6D37C8:/AES_SMS : Fault action <- null
22/09/2015 10:32:00:759 DEBUG - D97C495E8B5C0291AB658828DF6D37C8:/AES_SMS : Fault node <- null
22/09/2015 10:32:00:759 DEBUG - D97C495E8B5C0291AB658828DF6D37C8:/AES_SMS : Fault role <- null
22/09/2015 10:32:00:759 DEBUG - D97C495E8B5C0291AB658828DF6D37C8:/AES_SMS : Fault type <- 0
22/09/2015 10:32:00:759 DEBUG - D97C495E8B5C0291AB658828DF6D37C8:/AES_SMS : Fault message <- Invalid XML sent in ModelFields!
22/09/2015 10:32:00:761 ERROR - D97C495E8B5C0291AB658828DF6D37C8:/AES_SMS : session id:Somerset-MPP1-2015265143154-26 |
EXCEPTION>
org.apache.axis2.AxisFault: Invalid XML sent in ModelFields!
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:375)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at com.avaya.sce.runtime.connectivity.ws2.DDAxis2Stub.execute(DDAxis2Stub.java:130)
at com.avaya.sce.runtime.connectivity.ws2.CallService.execute(CallService.java:388)
at com.avaya.sce.runtime.Data.evaluateActions(Data.java:191)
at flow.ExecuteSMS.executeDataActions(ExecuteSMS.java:123)
at com.avaya.sce.runtime.Data.handleRequest(Data.java:104)
at com.avaya.sce.runtime.AppServlet.processRequest(AppServlet.java:96)
at com.avaya.sce.runtime.SCEServlet.requestHandler(SCEServlet.java:285)
at com.avaya.sce.runtime.SCEServlet.doPost(SCEServlet.java:190)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)






Soap UI works fine and heres the soap ui request :


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ses="http://xml.avaya.com/ws/session" xmlns:ns="http://xml.avaya.com/ws/SystemManagementService/2008/07/01">
<soapenv:Header>
<ses:sessionID></ses:sessionID>
</soapenv:Header>
<soapenv:Body>
<ns:submitRequest>
<modelFields>
<Agent></Agent>
</modelFields>
<operation>list</operation>
<objectname></objectname>
<qualifier>17999</qualifier>
</ns:submitRequest>
</soapenv:Body>
</soapenv:Envelope>




Could you please help me with the correct request for ModelFields using axis2 ?

Thanks,
Kartik




Filename SystemManagementServiceStub.java [Disk] Download
CraigJohnson5
Joined: Oct 24, 2013
Messages: 413
Offline
For investigation into coding issues you must open a DevConnect Support ticket and have support hours we can use to troubleshoot the issue. Please open a ticket and we can go from there.
KB_member
Joined: Nov 5, 2013
Messages: 66
Offline
Craig,

I am using OD7 to generate the wsop2 for the WS request/response.But am stuck at this point. Even though I see the request/reply in the logs, I get an ADBException thereafter :

org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Required attribute position is missing

Is this an issue with OD 7 axis2 ?


06/10/2015 10:24:10:963 DEBUG - A96AC1BE00ECC23343AC76D531345C91:/AES_SMS : Web Service Request -> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header><sessionID xmlns="http://xml.avaya.com/ws/session" /></soapenv:Header><soapenv:Body><ns2:submitRequest xmlns:ns2="http://xml.avaya.com/ws/SystemManagementService/2008/07/01"><modelFields><Agent /></modelFields><operation>list</operation><objectname></objectname><qualifier>17999</qualifier></ns2:submitRequest></soapenv:Body></soapenv:Envelope>
06/10/2015 10:24:12:934 DEBUG - A96AC1BE00ECC23343AC76D531345C91:/AES_SMS : Web Service Reply <- <?xml version='1.0' encoding='utf-8'?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="http://xml.avaya.com/ws/SystemManagementService/2008/07/01" xmlns:ns1="http://xml.avaya.com/ws/session"><SOAP-ENV:Header><ns1:sessionID>1dfe73be33d050aaabaf77735d76b0a7</ns1:sessionID></SOAP-ENV:Header><SOAP-ENV:Body><ns2:submitRequestResponse><return><result_code>0</result_code><result_data><Agent><Login_ID>17999</Login_ID><Name>Gary Ellington Test</Name><Extension>unstaffed</Extension><Direct_Agent_Skill /><AAS>n</AAS><AUDIX>n</AUDIX><COR>17</COR><Call_Handling_Preference>skill-level</Call_Handling_Preference><Service_Objective>n</Service_Objective><SN /><SL /></Agent></result_data><message_text /></return></ns2:submitRequestResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
06/10/2015 10:24:12:992 DEBUG - A96AC1BE00ECC23343AC76D531345C91:/AES_SMS : Axis Fault message <- org.apache.axis2.databinding.ADBException: Required attribute position is missing
06/10/2015 10:24:12:992 ERROR - A96AC1BE00ECC23343AC76D531345C91:/AES_SMS : Got AxisFault during web service call: org.apache.axis2.databinding.ADBException: Required attribute position is missing
06/10/2015 10:24:12:992 DEBUG - A96AC1BE00ECC23343AC76D531345C91:/AES_SMS : Fault action <- null
06/10/2015 10:24:12:992 DEBUG - A96AC1BE00ECC23343AC76D531345C91:/AES_SMS : Fault node <- null
06/10/2015 10:24:12:992 DEBUG - A96AC1BE00ECC23343AC76D531345C91:/AES_SMS : Fault role <- null
06/10/2015 10:24:12:992 DEBUG - A96AC1BE00ECC23343AC76D531345C91:/AES_SMS : Fault type <- 0
06/10/2015 10:24:12:992 DEBUG - A96AC1BE00ECC23343AC76D531345C91:/AES_SMS : Fault message <- org.apache.axis2.databinding.ADBException: Required attribute position is missing
06/10/2015 10:24:12:994 ERROR - A96AC1BE00ECC23343AC76D531345C91:/AES_SMS : session id:Somerset-MPP2-2015279142407-7 |
EXCEPTION>
org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Required attribute position is missing
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:419)
at com.avaya.sce.runtime.connectivity.ws2.DDAxis2Stub.fromOM(DDAxis2Stub.java:243)
at com.avaya.sce.runtime.connectivity.ws2.DDAxis2Stub.execute(DDAxis2Stub.java:159)
at com.avaya.sce.runtime.connectivity.ws2.CallService.execute(CallService.java:388)
at com.avaya.sce.runtime.Data.evaluateActions(Data.java:191)
at flow.ExecuteSMS.executeDataActions(ExecuteSMS.java:247)
at com.avaya.sce.runtime.Data.handleRequest(Data.java:104)
at com.avaya.sce.runtime.AppServlet.processRequest(AppServlet.java:96)
at com.avaya.sce.runtime.SCEServlet.requestHandler(SCEServlet.java:285)
at com.avaya.sce.runtime.SCEServlet.doPost(SCEServlet.java:190)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Required attribute position is missing
at connectivity.ws.beans10.SystemManagementServiceStub$ArrayType$Factory.parse(SystemManagementServiceStub.java:39176)
at connectivity.ws.beans10.SystemManagementServiceStub$AgentArrayGroup$Factory.parse(SystemManagementServiceStub.java:8638)
at connectivity.ws.beans10.SystemManagementServiceStub$AgentType$Factory.parse(SystemManagementServiceStub.java:14631)
at connectivity.ws.beans10.SystemManagementServiceStub$ModelChoices$Factory.parse(SystemManagementServiceStub.java:9081)
at connectivity.ws.beans10.SystemManagementServiceStub$Result$Factory.parse(SystemManagementServiceStub.java:10198)
at connectivity.ws.beans10.SystemManagementServiceStub$ReturnType$Factory.parse(SystemManagementServiceStub.java:31617)
at connectivity.ws.beans10.SystemManagementServiceStub$SubmitRequestResponse$Factory.parse(SystemManagementServiceStub.java:1752)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.avaya.sce.runtime.connectivity.ws2.DDAxis2Stub.fromOM(DDAxis2Stub.java:234)
... 30 more
Caused by: org.apache.axis2.databinding.ADBException: Required attribute position is missing
at connectivity.ws.beans10.SystemManagementServiceStub$ArrayType$Factory.parse(SystemManagementServiceStub.java:39139)
... 41 more


Thanks,
Kartik
CraigJohnson5
Joined: Oct 24, 2013
Messages: 413
Offline
OD7=Orchestration Designer 7?

I am not familiar with that product. There is a forum for that on this portal though. If the SMS test application and SoapUI works then I am guessing there is an issue with OD7/Axis. I know that certain fields have a position attribute if it is an array, but in looking at list agent with the test app I don't see any fields being returned with the position attribute. SN and SL really should be but they aren't returning at all because there is a bug in SMS, and a ticket has already been opened for that with development.
KB_member
Joined: Nov 5, 2013
Messages: 66
Offline
yes, orchestration designer 7.

I have posted the issue in the other forum too.But no resolution yet.


Thank you,
Kartik

KB_member
Joined: Nov 5, 2013
Messages: 66
Offline
Just wanted to update this thread about the solution I figured out myself ..


I had to comment the following code in the SystemManagementService Stub class :

// handle attribute "position"
/* java.lang.String tempAttribPosition =

reader.getAttributeValue(null,"position");

if (tempAttribPosition!=null){
java.lang.String content = tempAttribPosition;

object.setPosition(
org.apache.axis2.databinding.utils.ConverterUtil.convertToUnsignedInt(tempAttribPosition));

} else {

throw new org.apache.axis2.databinding.ADBException("Required attribute position is missing");

}
handledAttributes.add("position");*/

Once I did that I did not see the exception I posted earlier.Everything works as expected.

I think there's some issue with the "position" attribute in the schema file which needs to rectified.Just my 2 cents.


Thanks,
Kartik
Go to:   
Mobile view