Author Message
TarunJindal
Joined: Dec 12, 2013
Messages: 2
Offline
I am getting folowing error while connecting with the the webs service via stubs generated in my client code. Will appreciate any help or pointers.

com.sun.xml.ws.streaming.XMLStreamReaderException: XML reader error: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected charac
ter 'S' (code 83) in prolog; expected '<'
at [row,col,system-id]: [1,1,"file:/apps/opt/aims2/appserver/config/ws/wsdl_xml/"]
at com.sun.xml.ws.streaming.XMLStreamReaderUtil.wrapException(XMLStreamReaderUtil.java:267)
at com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:95)
at com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReaderUtil.java:110)
at com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStreamReaderUtil.java:100)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.hasWSDLDefinitions(RuntimeWSDLParser.java:220)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:130)
at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:271)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:234)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:182)
at weblogic.wsee.jaxws.spi.WLSServiceDelegate.<init>(WLSServiceDelegate.java:40)
at weblogic.wsee.jaxws.spi.WLSProvider$ServiceDelegate.<init>(WLSProvider.java:380)
at weblogic.wsee.jaxws.spi.WLSProvider.createServiceDelegate(WLSProvider.java:79)
...skipping...
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:182)
at weblogic.wsee.jaxws.spi.WLSServiceDelegate.<init>(WLSServiceDelegate.java:40)
at weblogic.wsee.jaxws.spi.WLSProvider$ServiceDelegate.<init>(WLSProvider.java:380)
at weblogic.wsee.jaxws.spi.WLSProvider.createServiceDelegate(WLSProvider.java:79)
at weblogic.wsee.jaxws.spi.WLSProvider.createServiceDelegate(WLSProvider.java:62)
at javax.xml.ws.Service.<init>(Service.java:56)
at com.avaya.smsxml.SystemManagementService.<init>(SystemManagementService.java:42)
at com.verizon.cms.server.comm.ServiceRequest.setup(ServiceRequest.java:163)
at com.verizon.cms.server.comm.ServiceRequest.execRequest(ServiceRequest.java:275)
at com.verizon.cms.server.AESTask.processTask(AESTask.java:161)
at com.verizon.cms.server.AES$AESConnectionThread.run(AES.java:379)
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 'S' (code 83) in prolog; expected '<'
at [row,col,system-id]: [1,1,"file:/apps/opt/aims2/appserver/config/ws/wsdl_xml/"]
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:623)
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2047)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
at com.sun.xml.ws.util.xml.XMLStreamReaderFilter.next(XMLStreamReaderFilter.java:92)
at com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:76)
... 17 more


Thanks,
Tarun Jindal
Verizon
CraigJohnson5
Joined: Oct 24, 2013
Messages: 413
Offline
Have you viewed your copy of the WSDL file that you are using when connecting? It looks like there is a tag that is missing it's '<'.
TarunJindal
Joined: Dec 12, 2013
Messages: 2
Offline
Thanks for your reply . I have checked . It is well formatted. It is SystemManagementService,wsdl that comes with examples . I have not made any change to it.

I changed the location in wsdllocation in build and now I get slightly different error.

Instead of S it complains on . now .

om.sun.xml.ws.streaming.XMLStreamReaderException: XML reader error: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected charac
ter '.' (code 46) in prolog; expected '<'
at [row,col,system-id]: [1,1,"file:/apps/opt/aims2/appserver/lib/"]
at com.sun.xml.ws.streaming.XMLStreamReaderUtil.wrapException(XMLStreamReaderUtil.java:267)
at com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:95)
at com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReaderUtil.java:110)
at com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStreamReaderUtil.java:100)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.hasWSDLDefinitions(RuntimeWSDLParser.java:220)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:130)
at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:271)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:234)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:182)
at weblogic.wsee.jaxws.spi.WLSServiceDelegate.<init>(WLSServiceDelegate.java:40)
at weblogic.wsee.jaxws.spi.WLSProvider$ServiceDelegate.<init>(WLSProvider.java:380)
at weblogic.wsee.jaxws.spi.WLSProvider.createServiceDelegate(WLSProvider.java:79)
at weblogic.wsee.jaxws.spi.WLSProvider.createServiceDelegate(WLSProvider.java:62)
at javax.xml.ws.Service.<init>(Service.java:56)
TarunJindal
Joined: Dec 12, 2013
Messages: 2
Offline
I dont see last error in my dev environment - So looks likes it has got something to do with paths in unix. In dev env I however get following exception
Caused by: java.security.cert.CertificateException: No subject alternative names present
   at sun.security.util.HostnameChecker.matchIP(HostnameChecker.java:142)
   at sun.security.util.HostnameChecker.match(HostnameChecker.java:91)
   at sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:347)
   at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:203)
   at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126)
   at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1319)

Any ideas how to get past this ?

Thanks,
Tarun
CraigJohnson5
Joined: Oct 24, 2013
Messages: 413
Offline
Please open a ticket with Devconnect. When opening the ticket provide the log, the version of AE Services, and SMS SDK in your environment. Are the versions the sames in both environments?

See this FAQ for turning on the SMS logs: https://devconnect.avaya.com/secure/faq/d_faq.jsp?f=1&q=804#q804
JohnBiggs
Joined: Jun 20, 2005
Messages: 1141
Location: Rural, Virginia
Offline
Please also include the OS and version you are using on the application side. I doubt anyone has done much testing of SMS with Unix OS which is what I read you statement to indicate you are using.

Please test connectivity from a windows OS machine and report those results as well.
TarunJindal
Joined: Dec 12, 2013
Messages: 2
Offline
I changed from https to http and I dont get this error any more on my windows machine .
However when I submit the example xml that comes bundled with the example app.



<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:submitRequest xmlns:ns2="http://xml.avaya.com/ws/SystemManagementService/2008/07/01" xmlns:ns3="http://xml.avaya.com/ws/session">
<modelFields>
<Station>
<Extension></Extension>
<Type></Type>
<Port></Port>
<Name></Name>
</Station>
</modelFields>
<operation>list</operation>
<objectname></objectname>
<qualifier>count 5</qualifier>
</ns2:submitRequest>



Response I get is

execRequest:: submitRequestThe request returned an error (result_code ==1);com.avaya.smsxml.ModelChoices@23cd4638;1 00000000 5bc5 "station" is an invalid entry; please press HELP

Is it returned by SMS ? if yes then is there anything wrong with the request xml or on the SMS side ?


Is there any documentation that talks about effect of "operations" on the model elements. e,g if I send skill update for an agent using xml - if agent is in 2 branches and skill update is only for one branch - then is the update applied only to one branch or it will wipe out the other branch.

Appreciate your help.
Thanks,
Tarun
JohnBiggs
Joined: Jun 20, 2005
Messages: 1141
Location: Rural, Virginia
Offline
The actual error is returned by Communication Manager.

It is a confusing response since 'list station count 5' to the SAT is a valid command. Enabling SMS tracing (there is a FAQ on that) on AE Services and reviewing the logs could help you understand where the issue is originating.

I am not sure what you are referencing by the word 'branch' a 'change agent' request replaces what is currently provisioned in the fields that the application sends. Think of it as a delete and add on a per field basis if you must.

The 'ocumentation for SMS related to the behavior you are inquiring about is an assumption that the user is familiar with SAT command operation behavior. The smsxml_test.php tool allows you to manipulate the interface, and discover what happens when you make requests such as you suggest. Once you get it working, it fairly quickly allows you to understand what the impact of a particular request would be. Documenting all of it would be a monumental task; it is simpler to see it in action using smsxml_test.php Since SMS merely invokes SAT commands programmatically, your expectations should be driven by what you see happening when you run a command at the SAT interface with identical changes in form that is sent with the SMS request. Unreferenced fields in the SMS request are not modified in the SAT form submission.
CraigJohnson5
Joined: Oct 24, 2013
Messages: 413
Offline
The main problem in this scenario is usually the username and password to CM that is being used. I have seen that the login being sent by someones application is different than the one they use in the test application (smsxml_test.php). These users may have different access rights in CM causing different behaviors.

So make sure you can login to CM with the user name that is having problems, open a SAT window and run 'list station count 5'.
TarunJindal
Joined: Dec 12, 2013
Messages: 2
Offline
Thanks for your reply. I dont see this problem anymore as there was un upgrade done to the ACD AES and now I see the results - The other issue however is I see is I get folliwing exception while accessing SMS programmatically.

java.security.cert.CertificateException: No subject alternative names present if I try to use https, in Browser I can see that certificate is invalid.

Is there anything that I can do on the client side to ignore this error ?

Appreciate your response.

Thanks,
Tarun
JohnBiggs
Joined: Jun 20, 2005
Messages: 1141
Location: Rural, Virginia
Offline
Follow the procedures in the AE Services Administration and maintenance document related to certificate creation and installation in your application. I suspect the default certificates have been replaced on your AE Services server.
TarunJindal
Joined: Dec 12, 2013
Messages: 2
Offline
Hi,

I am trying to figure out the query semantics of the webservices interface to AES .

In samples I see to list 5 agents following xml is used
<modelFields>
<Station>
<Extension></Extension>
<Type></Type>
<Port></Port>
<Name></Name>
</Station>
</modelFields>
<operation>list</operation>
<objectname></objectname>
<qualifier>count 5</qualifier>

Is there any example of update operation - Say if I need to update skill of an agent, where does the where clause and update values go ? Is there any documentation around on this, Appreciate your help on this,

Thanks,
Tarun
CraigJohnson5
Joined: Oct 24, 2013
Messages: 413
Offline
There is no specific documentation on this as John stated in a previous post. It is assumed that a CM SAT session, along with the smsxml_test.php application can be used to find out how an operation works. In the case you state for updating an agents state, you would first look at what operations are supported for a model. So to update an Agent's skill the change operation would be used in the CM SAT.

In using SMS there are two main field types, Array and String. The best way to see what type a field is, would be to do a display using the sms test and see what is returned. If the "position" attribute is associated with a field (it is for SN in an Agent query) then it is an array.

So the operation would be "change". The qualifier is the agent that needs a skill updated. In looking at the SMS test application there is a field drop down once you have selected the model. In your scenario you are updating the SN (Skill Number) field. As you can see by using the CM SAT there are many SN fields on the the form at that is the reason this field is an array. If you use the display agent operation you can see what position a certain skill is. The first one is position 1. So back in the SMS test application you would set the "Value" to the skill number you are updating to, and the position would be used for which one of the SN values is getting updated on the CM form. Once you have entered the field, value, and position then click the ADD Field button and the XML request will be updated below in the SMS Application. Then submit the request and verify the results.

So for any future questions about how to perform a certain operation in SMS the recommended solution is to use the CM SAT session along with the SMS test application.
TarunJindal
Joined: Dec 12, 2013
Messages: 2
Offline
Hi Craig,


Thanks for your explanation. How do I get CM SAT - is it a thick client that needs to be downloaded . Where can I download from ?

Appreciate your help as always.

Regards,
Tarun
TarunJindal
Joined: Dec 12, 2013
Messages: 2
Offline
Hi,
In the SMS webservice sample client -
it is recommended to keep connection to AES /ACD open over multiple requests to avoid initial setup time. So I am planning to implement a pool of ServiceRequest objects, My doubt is if the connection context is lost - then what kind of indication / exception will I get so that I van attempt reconnect ? Also Is there a way in API to know if the transport connection and / or connection context is valid ? appreciate your reply on this.

Thanks,
Tarun
Go to:   
Mobile view