none
Powershell handling Soap request

    Question

  • hello all! 

    First time post! So all smarter ppl than me who speak geek a better than i do....I am trying to make a soap request to a web-console which will read off a txt file or csv and then delete each computer from the inventory in the webconsole. i have a general idea of how to do it, just missing some details, i know i would use a foreach statement, build up my array, but how do i actually call the web-console? Thanks and Happy President's Day! 

    Saturday, February 16, 2013 2:57 PM

Answers

  • hello all! 

    First time post! So all smarter ppl than me who speak geek a better than i do....I am trying to make a soap request to a web-console which will read off a txt file or csv and then delete each computer from the inventory in the webconsole. i have a general idea of how to do it, just missing some details, i know i would use a foreach statement, build up my array, but how do i actually call the web-console? Thanks and Happy President's Day! 

    SOAP is usually, in PowerShell, somewhat transparent. It's used in remoting for example, but the end user never sees it or has any real access. If you are communicating with an XML Web service, PowerShell's WebSeverProxy can serve as a proxy. But if you want raw SOAP, there is no direct PowerShell support. You can of course, use .NET and PowerShell's XML support to build the Soap envelope/header/message.

    Can you explain your environment a bit more?


    Thomas Lee <DoctorDNS@Gmail.Com>

    Saturday, February 16, 2013 5:36 PM
    Moderator
  • Saturday, February 16, 2013 5:57 PM
  • This has nothing to do with SOAP.  This is a proprietary HTML interface with submits a page request with HTML arguments.

    Just change the id as needed.

    Unfortunately you are not providing enough information for anyone to be able to help you because you do not understand HTML, IE or Windows and Windows scripting.  I recommend that you contact a consultant to help you with this.

    Just asking for help does not mean that we can guess your needs.

    What OS?  What language?  How are you proposing to submit the page request?  How do you authenticate?

    Without complete and accurate information your request is impossible to respond to.

    We will not write this for you.  We will answer specific technical questions about  a script.  Leaning the technology is still your responsibility.


    ¯\_(ツ)_/¯

    Saturday, February 16, 2013 11:24 PM

All replies

  • hello all! 

    First time post! So all smarter ppl than me who speak geek a better than i do....I am trying to make a soap request to a web-console which will read off a txt file or csv and then delete each computer from the inventory in the webconsole. i have a general idea of how to do it, just missing some details, i know i would use a foreach statement, build up my array, but how do i actually call the web-console? Thanks and Happy President's Day! 

    SOAP is usually, in PowerShell, somewhat transparent. It's used in remoting for example, but the end user never sees it or has any real access. If you are communicating with an XML Web service, PowerShell's WebSeverProxy can serve as a proxy. But if you want raw SOAP, there is no direct PowerShell support. You can of course, use .NET and PowerShell's XML support to build the Soap envelope/header/message.

    Can you explain your environment a bit more?


    Thomas Lee <DoctorDNS@Gmail.Com>

    Saturday, February 16, 2013 5:36 PM
    Moderator
  • Saturday, February 16, 2013 5:57 PM
  • https://xxx.xxxx.xxx/ws/api/hostDelete.aspx?companyid=<companyid>&PID=<PID>&hostid="<hostid>"

    this is the api which i have. the only variable that changes i the HOSTID, ideally i would like to end up with a script that would read of text file and do until finished with the text file.

    Saturday, February 16, 2013 11:04 PM
  • This has nothing to do with SOAP.  This is a proprietary HTML interface with submits a page request with HTML arguments.

    Just change the id as needed.

    Unfortunately you are not providing enough information for anyone to be able to help you because you do not understand HTML, IE or Windows and Windows scripting.  I recommend that you contact a consultant to help you with this.

    Just asking for help does not mean that we can guess your needs.

    What OS?  What language?  How are you proposing to submit the page request?  How do you authenticate?

    Without complete and accurate information your request is impossible to respond to.

    We will not write this for you.  We will answer specific technical questions about  a script.  Leaning the technology is still your responsibility.


    ¯\_(ツ)_/¯

    Saturday, February 16, 2013 11:24 PM