header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Web Service Method
Last Post 16 Aug 2011 05:39 AM by halr9000. 3 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
powernoobUser is Offline
New Member
New Member
Posts:2
Avatar

--
16 Aug 2011 04:32 AM
    Hey,

    i want to call a Web Service Method.

    $pages = New-WebServiceProxy -Uri http://localhostxyz/bla/string.asmx
    $pages | Get-Member -type Method

    I see all methods, how i can trigger/call a method now?
    halr9000User is Offline
    PowerShell MVP, Site Admin
    Advanced Member
    Advanced Member
    Posts:565
    Avatar

    --
    16 Aug 2011 04:33 AM
    The same way you would invoke any other method!
    $c = New-WebServiceProxy -Uri 'http://www.w3schools.com/webservice...vert.asmx' 
    $c.FahrenheitToCelsius( 72 )
    Community Director, PowerShellCommunity.org
    Co-host, PowerScripting Podcast
    Author, TechProsaic
    powernoobUser is Offline
    New Member
    New Member
    Posts:2
    Avatar

    --
    16 Aug 2011 04:52 AM
    Hm sorry, I understand not quite...

    I have a method "IsAvailable"

    $c=IsAvailable >>> I get the following message:

    MemberType: Method
    OverloadDefinitions: {bool IsAvailable()}
    TypeNameOfValue: System.Management.Automation.PSMethod
    Value: bool IsAvailable()
    Name: IsAvailable
    IsInstance: True
    halr9000User is Offline
    PowerShell MVP, Site Admin
    Advanced Member
    Advanced Member
    Posts:565
    Avatar

    --
    16 Aug 2011 05:39 AM
    You use parentheses to call a method and supply it with parameters. Joel Bennett wrote about it on this blog article: http://huddledmasses.org/parenthesi...owershell/
    Community Director, PowerShellCommunity.org
    Co-host, PowerScripting Podcast
    Author, TechProsaic
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer