How-To: Using a custom Java class in UCCX 5.x (SOAP Example)

Unanswered Question
Jul 8th, 2008

Update:  Due to a server failure, the links to http://www.avholloway.com/ are no longer active.  Please download the offline project.

This tutorial can be viewed in its entirety on my web site:

http://www.avholloway.com/vtools/ipcc/custom-java/soap/

The first thing we need to do is find out what version of Java is our server running, this way we know which version of Java to compile in.

This document outlines the JRE (Java Runtime Environment) version compatibility with all versions of CRS:

"Cisco Customer Response Solutions (CRS) Software and Hardware Compatibility Guide" - June 16, 2008

http://www.cisco.com/en/US/docs/voice_ip_comm/cust_contact/contact_center/crs/express_compatibility/matrix/crscomtx.pdf

According to that document, my version of CRS, v5.0(1) SR2, uses JRE 1.5.0.  So I will go to Sun's site and download the JDK (Java Development Kit) for that version.

Alternatively, you could determine the Java version right on the CRS server itself.  Though, there could be multiple JRE's installed, and the CRS Engine uses only the one listed in the above document.

Sun's page for previous JDK versions:

http://java.sun.com/javase/downloads/previous.jsp

I would typically install the JDK and JRE for 1.5.0 on my personal computer and not on the server.  This way I can do all of my Java testing offline, making sure it all works, before even uploading it to the server.  I did one additional, and optional, thing to make developing easier.  I added the bin directory to my path variable so I can execute the necessary Java commands from any directory.  This is outlined in the installation instructions, which can be found on the JDK download page.

So now we have our development environment setup.  Yep, all we needed was the JDK, and the JRE, the only other tool we'll use it already on every system; a text editor.  I will use TextEdit on my Mac for this example, but you could easily use Notepad on Windows, or nano on Linux.

I will not get into the details of writing Java apps/classes, so for the purpose of this tutorial I will offer my simple SOAP class to you.

Disclaimer: I am not a Java programmer.  In fact, this is my very first program in Java, and I learned just enough for this task.

Browseable link: http://www.avholloway.com/vtools/ipcc/custom-java/soap/SimpleSOAP.java.txt

Download link: http://www.avholloway.com/vtools/ipcc/custom-java/soap/SimpleSOAP.java

Now, we need to compile our source code into byte code so the JRE can execute it.  Compiling the .java file will result in a new file of the same name, but with the .class extension on it.

http://www.avholloway.com/vtools/ipcc/custom-java/soap/compiling-SimpleSOAP.png - Command Prompt>javac SimpleSOAP.java

Now we need to test this new class to see if it works before we add the complexity of the CRS environment.

Let's create another Java file, and this one will utilize our newly created class.

Browseable link: http://www.avholloway.com/vtools/ipcc/custom-java/soap/RunMyCode.java.txt

Download link: http://www.avholloway.com/vtools/ipcc/custom-java/soap/RunMyCode.java

Now we compile that source code so it can also be ran.

http://www.avholloway.com/vtools/ipcc/custom-java/soap/compiling-RunMyCode.png - Command Prompt>javac RunMyCode.java

Next we pass the RunMyCode class to the JRE like so (Note the absence of the .class or .java file extension):

http://www.avholloway.com/vtools/ipcc/custom-java/soap/running-RunMyCode.png - Command Prompt>java RunMyCode

Your output should look something similar to this:

Screen shot: http://www.avholloway.com/vtools/ipcc/custom-java/soap/running-RunMycode.png

Browseable link: http://www.avholloway.com/vtools/ipcc/custom-java/soap/soap-response.xml

OK, so if everything is working up to this point, it's safe to assume that our CRS server will be able to utilize our class as well.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Average Rating: 4.9 (11 ratings)
Anthony Holloway Tue, 07/08/2008 - 22:20

The first thing we do in a series of steps to get this class on the server is to package the class file in a .jar file. A .jar file is simply a .zip file with some additional information in it, but mainly your .class file.

http://www.avholloway.com/vtools/ipcc/custom-java/soap/packaging-SimpleSOAP.png - Command Prompt>jar SimpleSOAP.jar SimpleSOAP.class

Next, we need to upload this .jar file to the Document Management on the CRS server's admin page, and it will go under default\classpath.

http://www.avholloway.com/vtools/ipcc/custom-java/soap/uploading01.png

http://www.avholloway.com/vtools/ipcc/custom-java/soap/uploading02.png

http://www.avholloway.com/vtools/ipcc/custom-java/soap/uploading03.png

Now let's do this next step which I still haven't quite figured out the purpose of. We will go to System > Custom File Configuration, and move our .jar file over from the left pane to the right pane.

http://www.avholloway.com/vtools/ipcc/custom-java/soap/customfileconfig01.png

http://www.avholloway.com/vtools/ipcc/custom-java/soap/customfileconfig02.png

Essentially what you are doing in these two steps, is adding your custom Java class to the search path for finding other classes when the CRS server tries to use your custom class. Because by default, it only knows about core Java classes that are built into the JRE.

Lastly, we have to restart the CRS Engine.

http://www.avholloway.com/vtools/ipcc/custom-java/soap/restartengine01.png

Now we can launch our CRS Editor, and it's important to note, the editor must be ran from the server. So, if you have it installed on your local dev box, skip the headache and launch it from within the server. RDP or VNC is fine.

I am going to create a very simple script just to show the bare minimum to access our custom Java class, and return a SOAP response.

Download link: http://www.avholloway.com/vtools/ipcc/custom-java/soap/you-need-some-soap.aef

Screen shot: http://www.avholloway.com/vtools/ipcc/custom-java/soap/you-need-some-soap.aef.png

There are three important things to note here:

1. I do not have to create a variable of type SimpleSOAP, even though I can

http://www.avholloway.com/vtools/ipcc/custom-java/soap/variable-SimpleSOAP.png

2. I do need a variable to hold the return value (The SOAP response)

http://www.avholloway.com/vtools/ipcc/custom-java/soap/variable-String.png

3. I only need one set step to use my custom Java class, and have it return something useful

The set step is the most complex step, because it is written in Java. So what we have in this step is a block of Java being executed, and it must return a String value.

Source code: http://www.avholloway.com/vtools/ipcc/custom-java/soap/set-step-expression.txt

Screen shot: http://www.avholloway.com/vtools/ipcc/custom-java/soap/set-step-expression.png

Before we run it, set a break point on the End step, then click the play button in the tool bar. Because the End step has a break point set on it, you will be able to see the variable xml_soap_response populated with the XML response. Double click the xml_soap_response variable in the variable list to access the expression editor where you can see the full XML output.

http://www.avholloway.com/vtools/ipcc/custom-java/soap/script-execution-complete.png

This is where this how-to goes south, and hopefully that will change. You see, Cisco's CRS editor lacks the programming to handle XML documents that reference name spaces, but it can handle simple XML documents pretty well.

So, we can take the return XML SOAP response, and create an XML document with it, but I cannot extract any of the data out of it.

See this script for an example of my attempt at this:

Screen shot: http://www.avholloway.com/vtools/ipcc/custom-java/soap/attempt-xml-document.aef.png

Download link: http://www.avholloway.com/vtools/ipcc/custom-java/soap/attempt-xml-document.aef

Please comment/rate. =)

Anthony Holloway (avholloway@gmail.com)

sferland Wed, 07/09/2008 - 11:26

Thanks Anthony, this is by far, the best post I've seen in this forum.

Good job !

mvtonytjo Tue, 08/26/2008 - 17:38

Thanks Anthony!!

I have a related problem and very wish you could help.

I can follow your instructions and call a custom-defined class.

However, I wish to return something from the class. I think I should use the RMI logic provided by IPCCX.

But there is a "java.rmi.NotBoundException" when I create the RMI object.

I have uploaded the RMI server, client and the interface classes to the default classpath.

What settings else?

Thanks a lot in advance!!

Tony

voiceops@sscinc... Tue, 12/09/2008 - 13:42

Thank you very much for sharing this info with us. Would you have any info using custom classes with CRS 3.5(2).

I've done all but copying the class to the location in the server where the editor can see it.

I think I know where I'm supposed to copy it but I'm not to clear about needing a jar file. My class uses a third party driver to connect to a SQL server table. I've run the class from the server's command line and it works. I've also modified the classpath so that it can find the 3rd party driver.

So, basically what I have is a class (dbinsert.class) and a jar file (jtds.jar). I can run/call dbinsert.class from a java application (rundbinsert.class) successfully.

thanks

nicolas.mansour Mon, 02/23/2009 - 09:51

Hi Anthony,

First of all,I want to thank you for the this post. Very handy.

I wanted to ask you, have you ever used nested classes? My goal is to create a custom class that will use default classes. Should I just create a jar file containing all of the needed files?

Thank you in advance

Anthony Holloway Mon, 02/23/2009 - 09:54

I have no idea. As I stated in my post, I am not a Java Programmer.

I don't fully understand how class are all mapped to, or pointing at each other.

If you find out, do post it here.

mvtonytjo Mon, 02/23/2009 - 17:39

My colleague has tried to use package in the Java code, and it succeeds.

I don't know if using package can help you.

Tony

nicolas.mansour Wed, 02/25/2009 - 06:11

Hi there,

I am trying to integrate these java classes with a custom built .NET web service. I haven't been able to get it to work with my web service but if i try the one on the net it works fine. Anyone has tried it and has any insight on the requirements of the web service?

The error i'm getting is:

java.io.IOException: Server returned HTTP response code: 500 for URL: http:///WebService/

Thanks in advance.

Nick

Anthony Holloway Wed, 02/25/2009 - 06:59

Are you testing on your PC or in an script?

I would recommend testing on your PC before trying it in a script.

nicolas.mansour Wed, 02/25/2009 - 07:03

Hi,

I'm using just my pc.

i'm just compiling and trying to use it directly from command prompt.

I was able to find the specific error by sniffing my packets.

Here is the error:

"System.Web.Services.Protocols.SoapException: Unable to handle request without a valid action parameter. Please supply a valid soap action"

Any help will be appreciated.

Thanks in advance,

Nick

Anthony Holloway Wed, 02/25/2009 - 07:14

I wont be able to help you because it sounds like it's a problem with your SOAP request, and the format of that XML document.

Not every SOAP request is built the same or has all of the same elements.

Double check your Web Service that you built and modify the SOAP request accordingly.

Best of luck.

Stephen Earl Fri, 10/09/2009 - 05:42

Does anyone have any of the content mentioned in this post? The website, www.avholloway.com, appears to be down at this point in time.

If not, if anyone can point me in the direction of a developers guide for some of the java / UCCX stuff I certainly would appreciate it.

I'm a very experienced java engineer, I just have no experience integrating with UCCX.

Thanks,

Steve E.

raziel78kain Fri, 01/28/2011 - 03:39

Dear Anthony,

have you made a similar guide for UCCX 8.X, too?

Thanks and regards.

Haitham Hadad Sun, 02/06/2011 - 06:23

Hi,

I need to check for these 3-point:

1. Why I upload the JAR file into the CRS as a document ?
you said to make use of its classes and methods ,, what is this mean and why I need this upload process and how I'll use the benifit of this step then ?

2. In my case I'll play IVR to the client,then get his ID and his choice, based on this, I'll contact a URL [web service] to get the required data and play them back to the customer
So I'll give the webservice a value to get some values based on it
So is what i need is called [calling a web service] ?
Also I found that I need
create URL document & create XML document then Get XML Document Data

the first one will take the URL,the second will query the webservice and the 3rd will get the needed variables
So why I would need the SET step that you have showed in your tutorial ? that I found the above 3-steps may be sufficient.


3. What is the supported webservice security in the IPCC ?

PLease correct me if I'm wrong

Thanks a lot for your time

cmcglamry Mon, 03/28/2011 - 13:24

Awesome post.

I have some stuff to add.  I've been working on this, and I've found some interesting things.  First of all, having an XPath visualizer that will allow you to see what is going to happen becomes critical.  It also lets you see when the namespace (xmlns) tags create a problem.  There is a free one out there that is awesome.  I downloaded it from here:

http://xpathvisualizer.codeplex.com/

Once I had this, I found that the problem that was breaking the query appears to be the XMLNS tag on the

GetCityWeatherByZIPResponse key.  Having the namespace on the initial tag doesn't appear to be a problem (it might be...still working through all this).

The question became how to get rid of the namespace tag in the response so it wouldn't mess things up.  We're not using it, and we're not passing it on, so it is safe to strip it out in this case.

I stripped out the offending tag by adding the following code to the bottom of the java class before it was compiled:

//original code in next two lines provided to show positioning

   wr.close();
   rd.close();


//   Following section is added to identify the string we want to strip.  I have to escape my " characters with a \ so that

//   they will be interpreted as part of the string

   String r = "xmlns=\"http://ws.cdyne.com/WeatherWS/\"";
     
   String rip = "";

   // we use the replace function to find the contents of string "r" and replace them with an empty string - ""

   //  The results go into another string variable "rip"
   rip=soapResponse.replace(r,"");


   //now we take our modified results, and push them back into our response variable

   soapResponse=rip;

//  Here we return you to the existing code - with one minor exception tagged below...


   return soapResponse;
  } catch (Exception exception) {
   return "OUCH";        //<<====   I added "OUCH" so I could tell if it was going to error handling (silly, but with no debugger, it works)
  }

This runs cleanly, and returns an XML document that can be successfully parsed...at least by the XPath Visualizer.  I'm going to work with it more in UCCX to check it's behavior there.  More once I work through it farther.

I've attached the modified SimpleSOAP.java class code.

Cliff

Anthony Holloway Mon, 03/28/2011 - 13:41

Thanks for the enthusiasm here, it's nice to see another user actively making improvements.

Doing a simple string replace is fine, when there's a single piece to remove, but it's just duct tape.

Imagine if you had a much more complex SOAP response: e.g.,

http://schemas.xmlsoap.org/soap/envelope/" S

OAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

   

       

            SOAP-ENV:Client

            Device not found with name SEP003094C39708.

            http://www.cisco.com/AXL/1.0"

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

                     xsi:schemaLocation="http://www.cisco.com/AXL/1.0

                                         http://myhost/CMApi/AXL/V1/axlsoap.xsd">

               

                    0

                   

Device not found with name SEP003094C39708.

]]>

                  

                   doDeviceLogin

              

          

       

   

The real solution is to get it working with the XML parser, with a second option of taping into some more custom Java.  Ultimately, I would like to see Cisco incorporate some new steps to work directly with Web Services (SOAP and REST), without the need for complex Java.

EDIT: Formatting of XML

cmcglamry Mon, 03/28/2011 - 13:48

Agreed.  I think there are two approaches that have to be addressed:

1.  How to work with what we have now and

2.  How would we like this to be improved so it works better.

Ideally, you could solve the problem completely if the XPath spec were implemented more than just at the /descendant and /child levels.  For example, you should be able to enter //  and jump directly to the tag you want.

Getting Cisco to make a change like that will take some pushing.  In the meantime, I'm going to look at being able to figure how how to get a subroutine that can look at any appearance of xmlns and strip that all the way to the next > in the string.

Admittedly it is a work around, but a lot of these solutions are completely custom anyway.  But I do like the challenge. 

Cliff    

Anthony Holloway Mon, 03/28/2011 - 14:13

You will be pleasantly surprised that you can type //node. Granted it will not return an array or even empty nodes, but you can do complex xpath expressions.

Search on the forums for posts by me and xpath or XML. One or two examples should pop up.

Sent from Cisco Technical Support iPhone App

cmcglamry Mon, 03/28/2011 - 14:27

Hmmm.....I tried that and couldn't get it to work.  I'll have to go back and look at it some more.      

cmcglamry Mon, 03/28/2011 - 14:50

Interesting.  I went back and tried this again.  Here's what I found out.

Even though I could select //State using the XPath visualizer and land on the correct node, UCCX doesn't seem to be able to handle that as long as the xmlns is present on one of the child nodes.

But if I strip off the xmlns, then it does in fact work.

I'm not sure if that's a bug or not.  You'd think that xpath = xpath, but maybe there are different versions/implementations.

Cliff

Anthony Holloway Mon, 03/28/2011 - 22:21

I agree that it's the xml namespace messing it up, hence the end of my post talking about it not working.

Take a look at this example:

veer.pratap Wed, 02/23/2011 - 04:29

Thanks anthony, i was use the custom calss , but unable to load the script in the application on UCCX it is giving error " An error occurred while loading the script SCRIPT{test.aef}, please check the logs for more details."

I am having UCCX 5.0 with premium licence.

Regards,

Veer Pratap

amanbasra Wed, 03/23/2011 - 06:09

I am having a similar problem.  I developed and tested my script using custom Java classes in Cisco Unified CCX Editor, and was able to run them fine and get results using Debug mode.  Then I uploaded the script using UCCX App Admin > Script Management, that was also fine.  But when I attempt to associate that IVR script to a UCCX Application using Application Management, I am getting the following error:

"Failed to load script file; com.cisco.script.ScriptIOException:Failed to load script: C:\Documents and Settings\Administration\My Documents\Downloads\Hyundai-v1.6-Aman.aef; nested exception is: com.cisco.io.IOException: bad version number in .class file; nested exception is: java.lang.UnsupportedClassVersionError: Bad version number in .class file"

We are using Cisco Unified CCX and Cisco Unified IP IVR,Release 7.0(1)SR5 Solution Set. As per Cisco documentation, the supported Java versions for this UCCX version are: Custom Classes/SDK> Sun JRE 1.5.0_011; Sun JRE 1.5.0_014; Sun JRE 1.6.0_12.  I confirmed that my Java classes are compiled for backward compatibility with Sun JRE 1.5. (It is only possible to compile for a x.y version, not the minor update version denoted by the underscore.)

I also checked the JRE version on the UCCX server:

C:\>java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)

Will greatly appreciate advice!

marks@lynxtec.com Fri, 03/25/2011 - 01:18

hi guys

i thought i would add my two pence wirth in here.

if you are getting errors when loading you need to reboot the server just restarting the node manager is not enough.

i am having a strange issue though.

I have wrote a custom class and i can reference it in the expression editor no issues. i can attach the script to an application with no issues.

but when trying to debug under reactive script the application never fires into the debug window.

anyone got any ideas on this one?

not sure if it is because i am using public classes or not. Oh and this works perfect from my dev machine when compliled in same version as the UCCX

matrix say to use.

any thoughts

thanks

Mark

marks@lynxtec.com Fri, 03/25/2011 - 05:40

i have tried this on UCCX 8.0.2 and UCCX 8.5.1

UCCX 8.0.2 just will not fire the script at all

UCCX 8.5.1 will allow the script to start in debug mode but then complains about my constructor which is fine on the test java test machine (Not uccx)

Mark

Stephen Earl Fri, 03/25/2011 - 05:45

Hi Mark,

Any SUs on 8.0.2?

I'm betting your running into an issue related to the following bug ID: CSCti50428

There's an overly restrictive java security policy in place on 8.0.2 and 8.5.1.

If you ssh into the admin shell on those servers and issue the following command you can tail stdout.log which will display the specific security exception(s):

file tail activelog uccx/log/MIVR/stdout.log

Steve E.

marks@lynxtec.com Fri, 03/25/2011 - 05:53

Yes SU3 on 8.02

where is there details on this?

is there a way to switch off / work around?

:S

Mark

Stephen Earl Fri, 03/25/2011 - 05:57

It's in the bug database under the bug id I posted previously CSCti50428.

If you're on SU3 then you already have an "opened up" security policy.  I actually worked on a deployment yesterday evening of 8.0.2 SU3 and applying SU3 fixed our security policy issues.  For 8.5.1, currently, you'll have to work with TAC to get the updated security policy applied.

It may be something else alltogether.  If you can tail that stdout.log and post any exceptions we may be able to diagnose further.

Steve E.

marks@lynxtec.com Thu, 04/21/2011 - 07:02

Hi Guys

I had to upgrade to V 8.5.1 now getting no errors at all in the stdout log or the MIVR. just get ringing and then system error message.

reactive debug does not work either just times out.

Any more ideas?

do i have enough debuging on?

Mark

Chad Stachowicz Thu, 08/25/2011 - 12:48

All,

  I thought I would toss in my 2 cents.  I think UCCX 8 still looks pretty untested compared to 7.x.  I wrote a pretty big salesforce.com integration last year..  About 7 megs after axis2 code generation and 40 megs with all required libs.  UCCX 8.0(2)SU3 wants nothing to do with it.  I can load the classes in the editor, write and validate the script.  Upload the script and thats as far as I get.  When trying to create an application with the script it bomb out with the MADM logs posted below...  I can't even launch the script for debugging in the editor either if the custom classes are in use...  I have posted the script below to humor you all..  MADM logs as well

I have a TAC case open and as soon as I get it sent to dev (today I hope) I will report back.

Chad



39277: Aug 25 00:50:48.070 MDT %MADM-ADM_CFG-7-UNK:AppUtil.getConfigVarFromWf() - scriptName=SCRIPT[Test.aef]

39278: Aug 25 00:50:48.071 MDT %MADM-DB_MGR-7-UNK:getConnection request for :: CRS Repository Datastore

39279: Aug 25 00:50:48.105 MDT %MADM-SCRIPT_MGR-3-UNABLE_LOAD_SCRIPT:Unable to load script: Script=/Test.aef,Exception=java.io.StreamCorruptedException: unexpected block data

39280: Aug 25 00:50:48.105 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:java.io.StreamCorruptedException: unexpected block data

39281: Aug 25 00:50:48.106 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1343)

39282: Aug 25 00:50:48.106 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)

39283: Aug 25 00:50:48.106 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)

39284: Aug 25 00:50:48.106 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)

39285: Aug 25 00:50:48.106 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

39286: Aug 25 00:50:48.106 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

39287: Aug 25 00:50:48.106 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at com.cisco.wfframework.steps.core.StepAssign.readObjectCurrentVersion(StepAssign.java:255)

39288: Aug 25 00:50:48.106 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at com.cisco.wfframework.steps.core.StepAssign.readObject(StepAssign.java:225)

39289: Aug 25 00:50:48.106 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

39290: Aug 25 00:50:48.106 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

39291: Aug 25 00:50:48.106 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

39292: Aug 25 00:50:48.106 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.lang.reflect.Method.invoke(Method.java:597)

39293: Aug 25 00:50:48.106 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)

39294: Aug 25 00:50:48.106 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)

39295: Aug 25 00:50:48.106 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)

39296: Aug 25 00:50:48.106 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

39297: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

39298: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at com.cisco.wfframework.obj.WFBeanStep.readObjectCurrentVersion(WFBeanStep.java:537)

39299: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at com.cisco.wfframework.obj.WFBeanStep.readObject(WFBeanStep.java:401)

39300: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

39301: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

39302: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

39303: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.lang.reflect.Method.invoke(Method.java:597)

39304: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)

39305: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)

39306: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)

39307: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

39308: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

39309: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at com.cisco.util.DoublyLinkedList.readObject(DoublyLinkedList.java:333)

39310: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

39311: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

39312: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

39313: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.lang.reflect.Method.invoke(Method.java:597)

39314: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)

39315: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)

39316: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)

39317: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

39318: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

39319: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at com.cisco.wfframework.obj.WFWorkflow.readObjectCurrentVersion(WFWorkflow.java:1115)

39320: Aug 25 00:50:48.107 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at com.cisco.wfframework.obj.WFWorkflow.readObject(WFWorkflow.java:860)

39321: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

39322: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

39323: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

39324: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.lang.reflect.Method.invoke(Method.java:597)

39325: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)

39326: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)

39327: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)

39328: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

39329: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

39330: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at com.cisco.wfframework.obj.WFWorkflow.load(WFWorkflow.java:267)

39331: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at com.cisco.script.impl.ScriptManagerImpl.loadInternal(ScriptManagerImpl.java:297)

39332: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at com.cisco.script.impl.ScriptManagerImpl.load(ScriptManagerImpl.java:2143)

39333: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at com.cisco.script.Script.load(Script.java:370)

39334: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at com.cisco.script.Script.load(Script.java:389)

39335: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at com.cisco.appadmin.util.AppUtil.getConfigVarFromWf(AppUtil.java:656)

39336: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at com.cisco.jsp.protected_.Cisco_005fScript_005fApplication_jsp._jspService(Cisco_005fScript_005fApplication_jsp.java:366)

39337: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

39338: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

39339: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at sun.reflect.GeneratedMethodAccessor260.invoke(Unknown Source)

39340: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

39341: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.lang.reflect.Method.invoke(Method.java:597)

39342: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)

39343: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.security.AccessController.doPrivileged(Native Method)

39344: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)

39345: Aug 25 00:50:48.108 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:301)

39346: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)

39347: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)

39348: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)

39349: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)

39350: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.security.AccessController.doPrivileged(Native Method)

39351: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)

39352: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)

39353: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)

39354: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)

39355: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:65)

39356: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:80)

39357: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.security.AccessController.doPrivileged(Native Method)

39358: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:294)

39359: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at com.cisco.appadmin.ui.AppAdminServlet.forwardToJSP(AppAdminServlet.java:495)

39360: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at com.cisco.appadmin.ui.AppAdminServlet.processService(AppAdminServlet.java:370)

39361: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at com.cisco.appadmin.ui.AppAdminServlet.doPost(AppAdminServlet.java:213)

39362: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

39363: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

39364: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at sun.reflect.GeneratedMethodAccessor260.invoke(Unknown Source)

39365: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

39366: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.lang.reflect.Method.invoke(Method.java:597)

39367: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)

39368: Aug 25 00:50:48.109 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.security.AccessController.doPrivileged(Native Method)

39369: Aug 25 00:50:48.110 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)

39370: Aug 25 00:50:48.110 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:301)

39371: Aug 25 00:50:48.110 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)

39372: Aug 25 00:50:48.110 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)

39373: Aug 25 00:50:48.110 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)

39374: Aug 25 00:50:48.110 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)

39375: Aug 25 00:50:48.110 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.security.AccessController.doPrivileged(Native Method)

39376: Aug 25 00:50:48.110 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)

39377: Aug 25 00:50:48.110 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at com.cisco.appadmin.util.XssFilter.doFilter(XssFilter.java:167)

39378: Aug 25 00:50:48.110 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at sun.reflect.GeneratedMethodAccessor204.invoke(Unknown Source)

39379: Aug 25 00:50:48.110 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

39380: Aug 25 00:50:48.110 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.lang.reflect.Method.invoke(Method.java:597)

39381: Aug 25 00:50:48.110 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)

39382: Aug 25 00:50:48.110 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.security.AccessController.doPrivileged(Native Method)

39383: Aug 25 00:50:48.110 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)

39384: Aug 25 00:50:48.110 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:301)

39385: Aug 25 00:50:48.110 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:243)

39386: Aug 25 00:50:48.110 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)

39387: Aug 25 00:50:48.110 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)

39388: Aug 25 00:50:48.110 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)

39389: Aug 25 00:50:48.110 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.security.AccessController.doPrivileged(Native Method)

39390: Aug 25 00:50:48.111 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)

39391: Aug 25 00:50:48.111 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

39392: Aug 25 00:50:48.111 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

39393: Aug 25 00:50:48.111 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)

39394: Aug 25 00:50:48.111 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)

39395: Aug 25 00:50:48.111 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

39396: Aug 25 00:50:48.111 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567)

39397: Aug 25 00:50:48.111 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:421)

39398: Aug 25 00:50:48.111 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

39399: Aug 25 00:50:48.111 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)

39400: Aug 25 00:50:48.111 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)

39401: Aug 25 00:50:48.111 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)

39402: Aug 25 00:50:48.111 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)

39403: Aug 25 00:50:48.111 MDT %MADM-SCRIPT_MGR-3-EXCEPTION:      at java.lang.Thread.run(Thread.java:619)

39404: Aug 25 00:50:48.111 MDT %MADM-ADM_CFG-7-UNK:AppUtil.getConfigVarFromWf() - ScriptException com.cisco.script.ScriptIOException: Failed to load script: /Test.aef; nested exception is:

      java.io.StreamCorruptedException: unexpected block data

39405: Aug 25 00:50:48.111 MDT %MADM-ADM_CFG-7-UNK:AppUtil.getConfigVarFromWf() - returning null

39406: Aug 25 00:50:48.111 MDT %MADM-ADM_CFG-7-UNK:ScriptApp.jsp - script not foundSCRIPT[Test.aef]

amanbasra Wed, 03/30/2011 - 05:26

Thanks Mark and Anthony,

1. The following error was resolved by restarting UCCX Application Administration service.  This was the error that was occurring when attempting to associate that IVR script to a UCCX Application using Application Management.

" An error occurred while loading the script SCRIPT{xxx.aef}, please check the logs for more details."

2. The other error was easier to resolve, as it just requires that when working on an IVR script with Java classes you should always run UCCX Editor from the UCCX server (as mentioned in Anthony's how-to doc.)

"Failed to load script file; com.cisco.script.ScriptIOException:Failed to load script: C:\Documents and Settings\Administration\My Documents\Downloads\Hyundai-v1.6-Aman.aef; nested exception is: com.cisco.io.IOException: bad version number in .class file; nested exception is: java.lang.UnsupportedClassVersionError: Bad version number in .class file"

andywallace Wed, 07/20/2011 - 11:06

Hmm i am trying to get this working but seem to be stuck at the first hurdle. I have installed the correct SDK/JRE on my pc. I compiled the code. (so far so good) however when i run it Java RunMyCode it brings back the HTML for the actual ASMX and not the XML. Where have i gone wrong?

Any help would be much appreciated.

I found the problem. the link for the webservice has now changed.

change your URL to (note the f)

http://wsf.cdyne.com/WeatherWS/Weather.asmx";

Message was edited by: Andy Wallace

andywallace Tue, 07/26/2011 - 05:36

Thanks for you work on this. It has help me out and i did manage to get your script up and running.

I am now a little stuck on mine and wonder id anyone can help. I have the basic JAVA runing from an ivr script it goes off and fetches a sesion ID for me. THis bit works. However i am having problme parsing the XML to get the bit of data i want.

THe response from the get xml document is attaqched. I need to be able to create an xml path to get the EstablishSessionResult in to a varible.

Using yours as an examplre to amend mine i always get an error. it says illegalaxis name: descendent;nested exception.

Any idea if it is possible and how do i create the XML path. I am very new to JAVA in fact 1 weeks experence so i am a little stuck now.

Any help would be much appreciated.

Andy

cmcglamry Tue, 07/26/2011 - 12:14

I downloaded your file, and put it through my XML XPath Visualizer tool.  Several things it didn't like:

1.  Get rid of the \r\n in the file.  These are escaped carriage return / line feed indicators.  XPath doesn't know what to do with it.

2.  Get rid of all the backwards slashes you have in there "\".  You have a bunch of these in the first few lines.

Once you get rid of the above, XPath can query for the value in the file as:

/descendant::EstablishSessionResponse/child::EstablishSessionResult

I didn't try running this through UCCX. Historically, it has had issues with custom namespaces, but this should get you pointed in the right direction.

Cliff

Please rate helpful posts

i.chichikov Mon, 03/19/2012 - 05:40

Hi All!

I try create a script with custom Java class by this manual. And have a problem:

I uploaded successfully  SimpleSOAP.jar  to Custom File (Classes) Configuration, add it to "Selected Classpath Entries", restart CCX Engine and CCX Administration.

Open Script Editor and trying create new Variable, but there is no SimpleSOAP type.

Where is my fault?

Aaron Harrison Mon, 03/19/2012 - 06:15

Hi

It's not a fault - at least, it's not your fault!

When I've done this it doesn't appear in the variable pane until you first instantiate an instance of the new object - this seems to bring it 'into memory'.

I do this by doing something simple like:

- add a 'do' step

- in the box, enter:

{

SimpleSOAP x = new SimpleSOAP();

}

If you hit apply, and it doesn't error out, then you should see the new class in the variable pane from then on.

If it errors, try it with a built in var type to check your syntax:

{

String x = new String();

}

If that fails consider:

- does your class need parameters in the constructor call?

- if you have put the class in a package (as any IDE will encourage you to), then it must be fully qualified...e.g:

{

com.mystuff.SimpleSOAP x = new com.mystuff.SimpleSOAP();

}

Also you may not need a variable assigning. For example, you might do something like this, where retVal is a String var:

{

SimpleSOAP x = new SimpleSOAP();

SimpleSOAP.doSomethingUseful("username", "password");

retVal = SimpleSOAP.getResult();

}


Regards

Aaron Harrison

Principal Engineer at Logicalis UK

Please rate helpful posts...

valbercarvalho Mon, 04/16/2012 - 08:59

Hi Anthony,

How are you? I hope you are ok.

I am testing in LAB some possibilites to connect the UCCX8.0 on the Web Services. I tested your Java class and it is working very well. Congratulations!!!

I had to modify somethings and now when I use the Netbeans,  I can see the HTTP Response normally.

Nowadays, I am working with

  • CCX Editor 8.0,
  • IPIVR Version 8.0.2.10000-42,
  • Demo License with 25 ports.

See my SOAP request:

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

http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

 

    http://tempuri.org/">

      1111111111

      1111

   

 

See the result:

<?xml version="1.0" encoding="utf-8"?>http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">http://tempuri.org/">*****Cosan***********V*****

I would like to create a script that could send this SOAP Request, and it could receive the SOAP Response, but every script that I try to create I don't have any sucess.

I am checking some HTTP components, and I realize that I have one choice in these HTTP Components. Is it right? Could the demo license give me other choices?

Do you have any example for UCCX8.0?

Thanks a lot.

Valber.

Attachment: 
valbercarvalho Wed, 04/18/2012 - 07:18

Hi Gergely,

I have read your new document and I saw the SimpleSOAP.java created by Clifford MCGlamry available in this post and both of them are very clear. Based in your experiences I made a Script.aef that is working perfectly. I would like to share it with the community.

I am grateful for your help.

Thank you,

Valber

Actions

Login or Register to take actions

This Discussion

Posted July 8, 2008 at 10:19 PM
Stats:
Replies:62 Avg. Rating:4.92593
Views:9158 Votes:0
Shares:0
Tags: No tags.

Discussions Leaderboard