Jump to content

AutoIT + WSDL + SOAP


 Share

Recommended Posts

Hi guys

does anyone of you have any experience with WSDL and SOAP in autoit?

i would like to create an app for the cisco WebDialer (http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucm/webdialer/1_0_3/webdial/wbdldev.html)

some info can be found on this page 2 : http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucm/webdialer/1_0_3/webdial/wbdlprf.html#wpxref88308

is this possible to do, and also, can it be done fairly easily?

cisco webdialer is the webinterface which lets you interact with the cisco server (VoIP) to make phone calls etc

i want to create an app that just has an input field for the phone number, a settings section for user + pass and a button to make a call or disconnect a call.

I have been looking for examples but i couldn't seem to find any with wsdl and soap

thx

colombeen

some other wsdl soap info from cisco : 

<wsdl:definitions xmlns:tns="urn:WebdialerSoap" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:WebdialerSoap" name="urn:WebdialerSoap">
    <wsdl:types>
        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:WebdialerSoap" targetNamespace="urn:WebdialerSoap">
            <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
            <xsd:complexType name="CallResponse">
                <xsd:sequence>
                    <xsd:element name="responseCode" type="xsd:int"/>
                    <xsd:element name="responseDescription" nillable="true" type="xsd:string"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="Credential">
                <xsd:sequence>
                    <xsd:element name="userID" nillable="true" type="xsd:string"/>
                    <xsd:element name="password" nillable="true" type="xsd:string"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="UserProfile">
                <xsd:sequence>
                    <xsd:element name="user" nillable="true" type="xsd:string"/>
                    <xsd:element name="deviceName" nillable="true" type="xsd:string"/>
                    <xsd:element name="lineNumber" nillable="true" type="xsd:string"/>
                    <xsd:element name="supportEM" type="xsd:boolean"/>
                    <xsd:element name="locale" nillable="true" type="xsd:string"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="GetConfigResponse">
                <xsd:sequence>
                    <xsd:element name="description" nillable="true" type="xsd:string"/>
                    <xsd:element name="deviceInfoList" nillable="true" type="tns:ArrayOfWDDeviceInfo"/>
                    <xsd:element name="responseCode" type="xsd:int"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="WDDeviceInfo">
                <xsd:sequence>
                    <xsd:element name="deviceName" nillable="true" type="xsd:string"/>
                    <xsd:element name="lines" nillable="true" type="tns:ArrayOfstring"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="ArrayOfWDDeviceInfo">
                <xsd:complexContent>
                    <xsd:restriction base="soapenc:Array">
                        <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="tns:WDDeviceInfo[]"/>
                    </xsd:restriction>
                </xsd:complexContent>
            </xsd:complexType>
            <xsd:complexType name="ArrayOfstring">
                <xsd:complexContent>
                    <xsd:restriction base="soapenc:Array">
                        <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
                    </xsd:restriction>
                </xsd:complexContent>
            </xsd:complexType>
        </xsd:schema>
    </wsdl:types>
    <wsdl:message name="makeCallSoap0In">
        <wsdl:part name="cred" type="tns:Credential"/>
        <wsdl:part name="dest" type="xsd:string"/>
        <wsdl:part name="prof" type="tns:UserProfile"/>
    </wsdl:message>
    <wsdl:message name="makeCallSoap0Out">
        <wsdl:part name="return" type="tns:CallResponse"/>
    </wsdl:message>
    <wsdl:message name="endCallSoap1In">
        <wsdl:part name="cred" type="tns:Credential"/>
        <wsdl:part name="prof" type="tns:UserProfile"/>
    </wsdl:message>
    <wsdl:message name="endCallSoap1Out">
        <wsdl:part name="return" type="tns:CallResponse"/>
    </wsdl:message>
    <wsdl:message name="getProfileSoap2In">
        <wsdl:part name="cred" type="tns:Credential"/>
        <wsdl:part name="userid" type="xsd:string"/>
    </wsdl:message>
    <wsdl:message name="getProfileSoap2Out">
        <wsdl:part name="return" type="tns:GetConfigResponse"/>
    </wsdl:message>
    <wsdl:message name="isClusterUser3In">
        <wsdl:part name="userid" type="xsd:string"/>
    </wsdl:message>
    <wsdl:message name="isClusterUser2Out">
        <wsdl:part name="return" type="xsd:boolean"/>
    </wsdl:message>
    <portType name="WebdialerSoapService">
        <wsdl:operation name="makeCallSoap">
            <wsdl:input message="tns:makeCallSoap0In"/>
            <wsdl:output message="tns:makeCallSoap0Out"/>
        </wsdl:operation>
        <wsdl:operation name="endCallSoap">
            <wsdl:input message="tns:endCallSoap1In"/>
            <wsdl:output message="tns:endCallSoap1Out"/>
        </wsdl:operation>
        <wsdl:operation name="getProfileSoap">
            <wsdl:input message="tns:getProfileSoap2In"/>
            <wsdl:output message="tns:getProfileSoap2Out"/>
        </wsdl:operation>
        <wsdl:operation name="isClusterUserSoap">
            <wsdl:input message="tns:isClusterUser3In"/>
            <wsdl:output message="tns:isClusterUser2Out"/>
        </wsdl:operation>
    </portType>
    <binding name="WebdialerSoapService" type="tns:WebdialerSoapService">
        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="makeCallSoap">
            <soap:operation soapAction="urn:makeCallSoap"/>
            <input>
                <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:WebdialerSoap"/>
            </input>
            <output>
                <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:WebdialerSoap"/>
            </output>
        </wsdl:operation>
        <wsdl:operation name="endCallSoap">
            <soap:operation soapAction="urn:endCallSoap"/>
            <input>
                <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:WebdialerSoap"/>
            </input>
            <output>
                <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:WebdialerSoap"/>
            </output>
        </wsdl:operation>
        <wsdl:operation name="getProfileSoap">
            <soap:operation soapAction="urn:getProfileSoap"/>
            <input>
                <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:WebdialerSoap"/>
            </input>
            <output>
                <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:WebdialerSoap"/>
            </output>
        </wsdl:operation>
        <wsdl:operation name="isClusterUserSoap">
            <soap:operation soapAction="urn:isClusterUserSoap"/>
            <input>
                <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:WebdialerSoap"/>
            </input>
            <output>
                <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:WebdialerSoap"/>
            </output>
        </wsdl:operation>
    </binding>
    <service name="WebdialerSoap">
        <port name="WebdialerSoapService" binding="tns:WebdialerSoapService">
            <soap:address location="https://your_webdialer_server/webdialer/services/WebdialerSoapService"/>
        </port>
    </service>
</wsdl:definitions>
Edited by colombeen
Link to comment
Share on other sites

I guess using java would be easier, but have a look here: '?do=embed' frameborder='0' data-embedContent>>

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

I've written a number of small utilities that communicate with various network protocols like that, e.g. XML RPC, SOAP, and RESTful API with a custom response.  In my cases the server side is written in various environments (typically either .NET or Java), and my client is AutoIt.  The times I've done so, I've had to manually analize the network traffic and then manually generate the same content that the server would expect if it were coming from an actual "SOAP" (et al) aware application.

Generally speaking I do this so that there's a simple tool to extract information from a server where the real client is extremely heavy.  My client is a response to users complaining that they need a quick and light client for times when "All I need to know is 'x', and the real client is too slow".

I've coded up some tools for myself that assist with this process, but basically it's always a PITA for me.  I always spend a day or two looking at a bunch of XML in an editor in order to figure out how to manually do the same thing as the "real" client.

 

I've been watching this thread with interest to see if anyone has a better answer, but alas it appears not.

How's my riding? Dial 1-800-Wait-There

Trying to use a computer with McAfee installed is like trying to read a book at a rock concert.

Link to comment
Share on other sites

If it helps, I'd be willing to share the script I use to see what the SOAP traffic contains.  It's a sort of generalized client or server where as a server you can open any port and wait for communications, or as a client you can connect to any port and send any text you specify.  I don't do encryption with it, so if the page is SSL then it won't work.

Basically what I do is first get something that communicates properly from the client and server.  Then I mung the client such that it points at my tool instead of the server and I capture the traffic it sends.  Then I try sending that to the server to see what it returns.  From there it's a matter of reading and understanding the XML.

I wrote the code ages ago, and it's fairly cringe-worthy, but it does the job.  Again, ONLY if the traffic is not encrypted...

How's my riding? Dial 1-800-Wait-There

Trying to use a computer with McAfee installed is like trying to read a book at a rock concert.

Link to comment
Share on other sites

As I say, the code is fairly cringe worthy.  The basic gist is to use this program to discover what the messages look like. 

So first start off in "Server" mode.  Open the proper port for your application.  Have your client attach and attempt to perform a normal task.  You'll see what the client sends you in the "Inbound" side edit window.  You won't know what to send back, so you'll just have to stop the server while the client is expecting data.  Depending on how well written the client is, you'll get anything from an error message to a crash.

Next switch over to "Client" mode.  Move the data the client sent you over to the "Outbound" data side (there's a "move" button).  Now put in the parameters for the real server, connect to the server, and send the data the client sent you.  You should then see the server's response to your request.

 

analyze.ico

Traffic_Analyze.au3

Traffic_Analyze_GUI.au3

How's my riding? Dial 1-800-Wait-There

Trying to use a computer with McAfee installed is like trying to read a book at a rock concert.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...