02-14-2007 12:50 AM - edited 03-13-2019 03:55 PM
Hi all,
We tested the axlsqltoolkit from the plugin. After setting the right parameters, we get the following result:
C:\dl>java -cp .\classes;.\lib\saaj-api.jar;.\lib\saaj-impl.jar;.\lib\mail.jar;.\lib\activation.jar;.\lib\jaxm-api.jar;.\lib\jaxm-runtime.jar;.\lib\xercesImpl.jar;.\lib\xml-apis.jar AxlSqlToolkit -username=CCMAdministrator -password=password -host=ccm5-ip
select * from callmanager
*****************************************************************************
Sending message...
---------------------
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><executeSQLQuery sequence="1171363613718"><sql>select * from callmanager</sql></executeSQLQuery></SOAP-ENV:Body></SOAP-ENV:Envelope>
---------------------
Feb 13, 2007 11:46:53 AM com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAP Connection call
SEVERE: SAAJ0007: Bad endPoint type (endPoint instance of URL)
com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad endPoint type https://CCMAdministrator:password@ccm5-ip:8443/axl/
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(Unknown Source)
at AxlSqlToolkit.sendMessage(AxlSqlToolkit.java:138)
at AxlSqlToolkit.execute(AxlSqlToolkit.java:199)
at AxlSqlToolkit.main(AxlSqlToolkit.java:244)
com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad endPoint type https://CCMAdministrator:password@ccm5-ip:8443/axl/
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(Unknown Source)
etc...
the axl web service is running:
result:
Cisco CallManager: AXL Web Service
The AXL Web Service is working and accepting requests. Use HTTP POST to send a request
When we open this page in IE:
https://CCMAdministrator:password@ccm5-ip:8443/axl/
The result is working without a prompt for a certificate and we get the same result as posted above
Also when we use the ciscoipservices-push2phone we get no result with the right parameters. We also tested a lot
with changing the code, like: xmlhttp.Open("POST", "https://ccm5-ip:8443/axl/", false); Without a success
We have no problems with the push2phone script on callmanager 4.
Hopefully someone can help us? Or give us sample code to get information from the callmanager database with axl?
Thanks
05-16-2007 03:45 AM
Hi
Did you find a solution to this?
I have the exact same issue with the axlsqltoolkit sample - the URL is valid and works in firefox...
Aaron
Thanks
05-16-2007 05:08 AM
OK - so I've got it working now... but would appreciate someone who understands java better than me commenting or showing me a better way.
What I've done is edited the source file like so:
swapped:
import org.apache.xerces.parsers.DOMParser;
for:
import com.sun.org.apache.xerces.internal.parsers.DOMParser;
Also removed this line:
import javax.xml.messaging.URLEndpoint;
And then edited this function:
public URLEndpoint getUrlEndpoint() {
return new URLEndpoint("https://" + username + ":" + password + "@" + host + ":" + port + "/axl/");
}
To use strings instead:
public String getUrlEndpoint() {
return new String("https://" + username + ":" + password + "@" + host + ":" + port + "/axl/");
}
And it works!
So.. what's a URLEndpoint, why use one if a string will work, and why didn't it work? I guess it's a classpath thing?
Thanks
05-21-2007 12:30 AM
What's your call manager version? I've had no problems running the default axlsqltoolkit for CCM 5.03 and 5.04 (and by the looks of it I'll e trying the 5.11 version soon). There are two things that might have an influence: one is using the toolkit from the call manager you're trying to connect to (axl changes between ccm versions), and the other might be the java version.. I'm still on 1.5, and I reckon there've been significant changes as far as webservices are concerned in 1.6 (they included the whole java webservice development kit, meaning you can now connect to webservices from the getgo without requiring external classes).
Stuff like import com.sun.org.apache.xerces.internal.parsers.DOMParser;
has me a little concerned.. I don't think classes in an internal namespace are meant to be used in third party software.
08-20-2007 05:01 AM
Hi,
Thank you for the posting. It is very useful. I faced same issue and cleared it by referring the solution. Thanks
Suresh Mani.
08-20-2007 07:16 AM
I have used Apache Axis and it worked like a champ. It creates all the Java stub classes for you based on the WSDL provided to it.
08-21-2007 11:28 AM
Thanks for this thread. I got it working too. I had to downgrade to Java 1.4 to get this working.
In the results that I got, how do I parse it so I can capture the results in more meaningful way, like excel or comma delimited...?
Thanks...
09-19-2007 12:21 PM
I'll throw in my praise as well...good job Aaron!
I was able to get it working against our CCM 5.1.2 system once I changed that getUrlEndpoint() to return a String like you said.
I was able to reference the included jar files into a netbeans library to keep the apache parser.
I'm using Java 6 for those curious...
DB
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