I have SOAP script - how I can run it?

Version 1
    This document was generated from CDN thread

    Created by: Alexandr Kulbida on 17-03-2009 01:59:31 PM
    Hello I have sample SOAP
     
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
            <SOAP-ENV:Body>
                    <axlapi:executeSQLQuery sequence="1" xmlns:axlapi="http://www.cisco.com/AXL/API/1.0" xmlns:axl="http://www.cisco.com/AXL/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.cisco.com/AXL/API/1.0 axlsoap.xsd">
     <sql>select * from device</sql>
      </axlapi:executeSQLQuery>
            </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
     
     
    that as I see select all info from device table.
     
    What I need to execute this SOAP?

    Subject: RE: I have SOAP script - how I can run it?
    Replied by: David Staudt on 17-03-2009 07:24:31 PM
    What you have there is not strictly a script, but a SOAP message.  For AXL, the application needs to use HTTP POST to send the SOAP message to the AXL web service.  There are a multide of ways to do this.  Some you might want to look into:
     
    - Manually, via telnet: http://developer.cisco.com/web/axl/wikidocs?src=/wiki/display/AXL/how-to_telnet
    - Using the CURL command line program: http://developer.cisco.com/web/axl/wikidocs?src=/wiki/display/AXL/how-to_CURL
    - Via a SOAP testing tool, like soapUI: http://www.soapui.org/
    - Importing/compiling the AXL WSDL for use in a Java (Axis) or .NET application (see AXL SQL Toolkit schema readme)
     
    The AXL SQL Toolkit contains a simple java-based application that sends/retrieves AXL messages (as-is, it does SQL queries.)  This is a good place to start and can be easily modified to your uses: it is available from the UCM Admin web UI, under Applications|Plugins.

    Subject: RE: I have SOAP script - how I can run it?
    Replied by: Alexandr Kulbida on 17-03-2009 08:20:28 PM
    I have downloaded AXLToolkit, now I run 

    C:\axlsqltoolkit>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\x 
    ercesImpl.jar;.\lib\xml-apis.jar AxlSqlToolkit -username=AppAdmin -password=AppA 
    dmin1 -host=10.10.10.10 


    and receive this answer: 

    select * from device 
    ***************************************************************************** 
    Sending message... 

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="[url=javascript:newWin('http://schemas.xmlsoap.org/soap/envelope/')]http://schemas.xmlsoap.org/soap/envelope/"> 
    <SOAP-ENV:Header/><SOAP-ENV:Body><executeSQLQuery sequence="1237319007171"><sql> 
    select * from device</sql></executeSQLQuery></SOAP-ENV:Body></SOAP-ENV:Envelope> 

    Mar 17, 2009 2:43:27 PM com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPC 
    onnection call 
    SEVERE: SAAJ0007: Bad endPoint type (endPoint instance of URL) 
    com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad endPoint type [url=javascript:newWin('https:/')]https:/ 
    /AppAdmin:AppAdmin1@10.10.10.10:8443/axl/ 
    at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.cal 
    l(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 [url=javascript:newWin('https:/')]https:/ 
    /AppAdmin:AppAdmin1@10.10.10.10:8443/axl/ 
    at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.cal 
    l(Unknown Source) 
    at AxlSqlToolkit.sendMessage(AxlSqlToolkit.java:138) 
    at AxlSqlToolkit.execute(AxlSqlToolkit.java:199) 
    at AxlSqlToolkit.main(AxlSqlToolkit.java:244) 



    What I do wrong and what should I to to receive needed info? 


    What other way I can go to extract needed information. It shouldn't be Bulk Web. 

    Subject: RE: I have SOAP script - how I can run it?
    Replied by: Alexandr Kulbida on 17-03-2009 08:22:54 PM
    CURL results:
     
    C:\axl_browser\curl\bin>curl -k -u AppAdmin -H 'Content-type: text/xml;' -H 'SOA
    PAction: "CUCMB ver=6.0"' -d @request.xml https://10.10.10.10:8443/axl/
    Enter host password for user 'AppAdmin':
    curl: (6) Could not resolve host: text; Host not found
    curl: (6) Could not resolve host: CUCMB ver=6.0'; Host not found
    <html><head><title>Apache Tomcat/5.5.17 - Error report</title><style><!--H1 {fon
    t-family:Tahoma,Arial,sans-serif;color:white;background-color kiss 525D76;font-size:
    22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color kiss 525
    D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;backgro
    und-color kiss 525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;col
    or:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:w
    hite;background-color kiss 525D76;} P {font-family:Tahoma,Arial,sans-serif;backgroun
    d:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR
    {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="
    1" noshade="noshade"><b>type</b> Exception report<b>message</b> <u></u
    ><b>description</b> <u>The server encountered an internal error () that p
    revented it from fulfilling this request.</u><b>exception</b> javax.
    servlet.ServletException: Unable to internalize message
            com.cisco.ccm.axl.AxlListener.doPost(AxlListener.java:287)
            javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
            javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
            sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
    a:39)
            sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
    Impl.java:25)
            java.lang.reflect.Method.invoke(Method.java:585)
            org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
            java.security.AccessController.doPrivileged(Native Method)
            javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
            org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
            org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.jav
    a:161)
    <b>root cause</b> com.sun.xml.messaging.saaj.SOAPExceptionImpl
    : Unable to internalize message
            com.sun.xml.messaging.saaj.soap.MessageImpl.&lt;init&gt;(MessageImpl.jav
    a:194)
            com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.&lt;init&gt;(Messa
    ge1_1Impl.java:43)
            com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.createM
    essage(SOAPMessageFactory1_1Impl.java:32)
            com.cisco.ccm.axl.AxlListener.doPost(AxlListener.java:187)
            javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
            javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
            sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
    a:39)
            sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
    Impl.java:25)
            java.lang.reflect.Method.invoke(Method.java:585)
            org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
            java.security.AccessController.doPrivileged(Native Method)
            javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
            org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
            org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.jav
    a:161)
    <b>note</b> <u>The full stack trace of the root cause is available
    in the Apache Tomcat/5.5.17 logs.</u><HR size="1" noshade="noshade"><h3>Apac
    he Tomcat/5.5.17</h3></body></html>
    C:\axl_browser\curl\bin>
     
     
     
     
    WHen I watch
    https://10.10.10.10:8443/realtimeservice/SOAPMonitor
     
    I don't see here any result that could apear.
     
    All AXL , SOAP services on CUCM is enebled
     
    What is wrong?
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     

    Subject: RE: I have SOAP script - how I can run it?
    Replied by: David Staudt on 17-03-2009 09:52:51 PM
    For CURL on windows, see this post: http://developer.cisco.com/web/axl/forums/-/message_boards/message/1126161?_19_redirect=%2Fweb%2Faxl%2Fforums%2F-%2Fmessage_boards%2Fsearch%3F_19_redirect%3D%252Fweb%252Faxl%252Fforums%26_19_breadcrumbsCategoryId%3D0%26_19_searchCategoryIds%3D0%26_19_keywords%3Dcurl
     
    The 'bad endpoint type' error with the AXL SQL Toolkit is due to an issue with the sample and the JRE 1.6.  This should be resolved in the latest versions of UCM 6.1 and 7.0(1).  Please update to these versions and give it a try...be sure and re-download the Toolkit itself and run from the new sample code there.
     
    If you want to make the fix to AxlSqlToolkit.java manually:
     
    Old
     
        public URLEndpoint getUrlEndpoint() {
            return new URLEndpoint("https://" + username + ":" + password + "@" + host + ":" + port + "/axl/");
     
    New
     
       public String getUrlEndpoint() {
            return new String("https://" + username + ":" + password + "@" + host + ":" + port + "/axl/");

    Subject: RE: I have SOAP script - how I can run it?
    Replied by: Alexandr Kulbida on 23-03-2009 10:26:10 AM
    I have teste AXLtoolkit.
    Now I have received result with file like sample.response

    The problem was with version of CUCM 6, with CUCM 7 everything works fine

    Somebody recomend me to delete first row with SQL query and rename file to sample.response.xml

    Now I Can read info - but this info isn't readable.
    How I Can convert this file into simple txt file or excel file - FOREXAMPLE or do this file more readable ??
     
     
     
    like this one in attach.
     
     
     Thank you!