Sending WSMAN request to Web Browser

Sending WSMAN request to Web Browser


Our team has recently had to switch from using SOAP requests to WS-Man. And I'm a little stuck on getting it to work, so I'm hoping someone can shed some light. 

Using OpenWSMan, I was able to invoke a RequestPowerStateChange, so I thought I could take the XML request and send it to the webservice to make it work the same way. Sadly that has not been the case. 


<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="" xmlns:wsa="" xmlns:wsman="" xmlns:n1="">
  <wsa:Action s:mustUnderstand="true">
  <wsa:To s:mustUnderstand="true">http://some_hostname:16992/wsman</wsa:To>
  <wsman:ResourceURI s:mustUnderstand="true">
  <wsa:MessageID s:mustUnderstand="true">uuid:fc6f2bc3-498e-45f6-84e0-5f7b2665903e</wsa:MessageID>
    <wsman:Selector Name="Name">Intel(r) AMT Power Management Service</wsman:Selector>
    <wsman:Selector Name="SystemName">Intel(r) AMT</wsman:Selector>
    <wsman:Selector Name="CreationClassName">CIM_PowerManagementService</wsman:Selector>
    <wsman:Selector Name="SystemCreationClassName">CIM_ComputerSystem</wsman:Selector>
          <wsman:Selector Name="Name">ManagedSystem</wsman:Selector>
          <wsman:Selector Name="CreationClassName">CIM_ComputerSystem</wsman:Selector>

Sending to Webservice using Python:

url = 'http://some_hostname:16992/wsman'
passwdmgr = urllib2.HTTPPasswordMgrWithDefaultRealm()
passwdmg.add_password(None, url, 'admin', 'secret')
authhandler = urllib2.HTTPDigestAuthHandler(passwdmgr)
headers = {
  'Content-Type': 'application/soap+xml'
request = urllib2.Request(url, MY_XML_REQUEST)


Is this not even possible, or do I need to use a WSMan Client like OpenWSMAN? Any help would be greatly appreciated

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Please see the article Developing WSman solutions for Intel AMT. It explains why we use a client.

Sweet, thank you, just wanted to make sure I wasn't going down a rabbit hole with trying to get this request to work. I can use the client and make a Python subprocess call either way.

Leave a Comment

Please sign in to add a comment. Not a member? Join today