03-15-2005 02:12 PM - edited 03-13-2019 08:23 AM
I've been trying to get AXL/addPhone to work.. have run into a few problems - either my understanding of XML is flawed, or the XML parser on the call manager is.. not sure which it is.
I've removed all the SOAP and AXL stuff wrapping the request for brevity in the following example:
<newPhone>
<description>Test AXL addPhone</description>
<name>SEP0028A9B0B21</name>
.... etc etc ...
</newPhone>
it dies with a message saying it expected <name> but saw <description>, in other words, it seems to regard order as important within the document.. I always understood order to be relatively unimportant in an XML document.
This is quite annoying, because it means I'm going to have to store a static list in my code that records the correct order to pass things in to the CM.
03-17-2005 06:38 AM
Your SOAP Request is incorrect. And remember.. Order IS important. The Correct syntax would be:
....
....
Abt the Parser thing, why don't u use some way to ensure that the SOAP Request string is correctly built. Like you build a template having all the tags pre-inserted, and u just fill them by the values supplied by the user.
04-17-2006 09:50 PM
Was just reading over your post here and was wondering how do you parse soap to xml? I'm just starting on this stuff and am getting a sucessful responce, I just need to parse it into xml.
Thanks
04-18-2006 05:25 AM
SOAP is just XML over HTTP so there's no need to parse. If you just want the contents of the result element of a SOAP response, parse the substring from
04-18-2006 10:46 PM
Thanks for your speedy responce. I went ahead and downloaded the wingfoot soap client in order to access attributes easily but now I am getting the error :
IOEXCEPTION : error writing to server.
I am asuming that I have sucessfully connected to the server because there was no connection error but do you know why I would be receiving this error message? From googling the problem so far I have a feeling it might be an SSL issue but I can't see how this can be disabled in callmanager.
Cheers, D
06-13-2006 08:22 PM
Hi again, you seem to be the smartest guy on this block so I was wondering if you could help me:
I am using wingfoot to send a AXL query to CM. The envelope responce I am getting =null. I think it has something to do with the call.setTargetObjectURI statement- I need to inlcude the AXL path somewhere right?
Also, do I need to authenticate first or is the client trusted. When I was using a socket before and including an authentication header everything worked fine but now I am using a soap client, nothing is working. Below is my code, any help you can give would be appreciated.
env= new Envelope();
//need to authenticate the user? or is client trusted
call = new Call(env);/*
call.setMethodName("updateLine");//:axl
call.setTargetObjectURI("xmlns:axl=http://www.cisco.com/AXL/1.0/xsi:schemaLocation=" +
"http://www.cisco.com/AXL/1.0 http://gkar.cisco.com/schema/axlsoap.xsd");
try{
call.addParameter("pattern","1001");
call.addParameter("routePartitionName","Part_OnlineAdminPhones");
call.addParameter("routeFilterId","");
call.addParameter("autoAnswer","Auto Answer with SpeakerPhone");
*/
trans = new J2SEHTTPTransport("http://192.168.100.66:80/POST /CCMApi/AXL/V1/soapisapi.dll",null);
trans.getResponse(true);
try{
rt= call.invoke(trans);
System.out.println(rt.getBody()); //this is returning null
Cheers, D
06-14-2006 05:24 AM
I've never used that particular framework.. I'm making regular HTTPURLConnections to post my XML elements in Java.
However, what I would do is trace the SOAP exchange using Ethereal. Capture the contents of your POST request, and compare it with a post made using the AXL Test tool that you can download from Cisco.
I don't see you setting any authentication parameters so this may effectively be a factor. You could be getting a HTTP 401 unauthorized response so your body would be null.. you need to check the return code for any web call. I do the authorization by assing the base64 encoded user:password string to the header. Here's the line:
conn.setRequestProperty("Authorization", "Basic " + this.authentication);
where conn is my HttpURLConnection.
Have you tried using Cisco's AXLProvider from the SDK? I'm using a modified version of that to send my calls.. it's not as pretty as it could be since you have to strip out the interesting bits from a response, but it does its job anyway.
06-20-2006 08:03 PM
Cheers, I have traced it already - basically there is an authentication issue now like you say. The problem is that I can't see anyway of authenticating myself in the transport of the envelope. There is a method addHeaderElement or something liek that which I hav tried to put the authentrication in but so far no good. I haven't looked at the AXL provider so I'll check it out.
Thanks again.
D
06-20-2006 09:13 PM
Its all sorted now. Working like clock work- thanks.
On another completely unrelated note: Do you know if there is a way to dynamically create timers in jbpm? I am trying to create an alarm clock type set up where at a certain time each day a phone rings. I have created a process definition with a timer but I don't want to have to instantiate the process def until it is needed (i.e the first time the alarm goes off) I want to then be able to change the duedate of the timer at any stage. Do you know how to do this? The jbpm timer methods are confusing.
Thanks,
D
06-14-2006 05:26 PM
you need to use the addHeader method in wingfoot
i.e.
String _AUTH = Base64Coder.encode(_Usr+":"+_Psw);
trans.addHeader("Authorization","Basic "+_AUTH+"");
HTH
06-20-2006 08:05 PM
Great! thankyou so much. I'd been trying to use that method but had been doing so incorrectly.
Thanks again,
D
06-20-2006 08:09 PM
Cool! You're very welcome.
don't forget to rate useful posts!
06-21-2006 06:22 AM
Dear All
I'd like to add a new Conference Bridge via AXL. This is my XML:
----------------------
----------------------
If i try to send this AXL to CCM i get back this SOAP FAULTstring:
"Model and Class are not compatible".
I'm getting crazy because model and class are 2 enumerations i can read in AXL schema and i can't understand why they are not compatible.
Someone can HELP ME?
Thanks
06-21-2006 07:29 AM
do a getPhone on an existing conference bridge, and use the resulting response to help figure out your problem.
06-21-2006 07:44 AM
Well... i've already tried this way...
I made a getPhone and then an addPhone with getPhone results (i only changed the conference bridge name of course)
The results are the same!!
Maybe this is a new AXL BUG?
Someone could try it for me?
Thanks
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide