![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | winrm invoke a custom action Hi, I am using the winrm command to invoke a custom action (ie, 'winrm invoke ACTION ResourceURI......). I have a custom namespace that I want to define in the SOAP body, so that the body comes out something like this: <s:Body> <mod:SomeModel xmlns:mod="http://myurl/webservices/model"> <mod:Address>xxx.xxx.xxx.xxx</mod:Address> <mod:Port>xx</mod:Port> <mod:Username>user</mod:Username> <mod:Password>password</mod:Password> </mod:SomeModel> </s:Body> I found I can accomplish this by using the -file option, where I put this XML model content within the file. It then gets added between the <s:Body> tags. However, I would like to be able to specify these values on the command line itself. When I add values to the resourceURI they come out as selectors, and if I use the [@{KEY="VALUE"[;KEY="VALUE"]}] format, they come out as options within an option set. Is there any way to accomplish this without specifying an XML file that contains the content? Thanks, Simon |
My System Specs![]() |
| | #2 (permalink) |
| | Re: winrm invoke a custom action Well, I've played around a bit more, and did manage to get address, username, etc. in the right spot using the @{key="value"} format (not sure what I did differently from before to make it work this time, however). I still have issues with both the action name and the associated namespace. If I use http://myurl/ws/SYSTEM as my resource URI and SomeAction as my ACTION I get the following XML created: <p:SomeModel_INPUT xmlns ="http://myurl/ws/SYSTEM.xsd">It seems that the '_INPUT' is automatically generated after the action, and that the namespace is based off the resourceURI. As I am still somewhat new to this space, perhaps someone could enlighten me as to whether or not this a standard naming convention that I should be working from. If not, is there a way to modify these values from the command line when making the winrm call? Thanks again, Simon |
My System Specs![]() |
| | #3 (permalink) |
| | Re: winrm invoke a custom action Simon wrote: Quote: > Hi, > > I am using the winrm command to invoke a custom action (ie, 'winrm > invoke ACTION ResourceURI......). > > I have a custom namespace that I want to define in the SOAP body, so > that the body comes out something like this: Marco |
My System Specs![]() |
| | #4 (permalink) |
| | Re: winrm invoke a custom action Thanks Marco. Looking forward to hearing what they have to say. Simon |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| calling winrm from a custom cmdlet | PowerShell | |||
| winrm connection to custom web service | PowerShell | |||
| Custom Keyboard action? | Vista General | |||
| SetupIterateCabinet failing from Custom Action .dll | Vista General | |||
| MSI Custom Action DLL does not have administrator rights | Vista General | |||