Powershell and WSDL Question

    General discussion

  • I've read many a posting about using Powershell to get a WSDL and call a method.  In fact I too can do this using one of the many Weather examples out there.  My problem comes in when the WSDL gets a little more complicated.

    I have a internal WSDL we use inside my company to pull trouble tickets.  Using Storm I am able to pass the required data and get the response.  This is the generated Raw data sent.

    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="" xmlns:xsi="" xmlns:xsd="">
    <AuthenticationInfo xmlns="urn:HPDGetTicketDetails">
    <authentication />
    <locale />
    <timeZone />
    <OpGet xmlns="urn:HPDGetTicketDetails">
    <ViewOHDTicketRequest xmlns="">
    <RequestId xmlns="" />
    <WebServiceName xmlns="" />
    <AuthenticationId xmlns="" />
    <AuthenticationPassword xmlns="" />
    <TroubleTicketId xmlns="">HD00004798638</TroubleTicketId>


    $URI = <My WSDL URI>
    $myWSDL = New-WebServiceProxy -uri $URI
    # Add the Authentication Bit
    # Add the InputDataSet stuff
    $Response = $myWSDL.opget


     The only Values I need to pass are the TroubleTicketID, Username, Password


    Any help is greatly appreciated, Thanks


    So I'm missing pretty much everything.  I figure it should be something like $Data.InputDataSet.Trouble.Ticket.ID = "HD12345678901" or something like that.
    Thursday, October 21, 2010 12:20 AM