Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
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.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - winrm invoke a custom action

Reply
 
Old 05-07-2008   #1 (permalink)
Simon


 
 

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 SpecsSystem Spec
Old 05-07-2008   #2 (permalink)
Simon


 
 

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 SpecsSystem Spec
Old 05-08-2008   #3 (permalink)
Marco Shaw [MVP]


 
 

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:
I've just emailed the winrm team to see if they have any feedback.

Marco
My System SpecsSystem Spec
Old 05-09-2008   #4 (permalink)
Simon


 
 

Re: winrm invoke a custom action

Thanks Marco. Looking forward to hearing what they have to say.

Simon
My System SpecsSystem Spec
Reply

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


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46