小编One*_*yth的帖子

使用PowerShell SOAP进行HP保修查询

到目前为止,惠普保修信息的网络抓取工作正常,但是在最近几周他们已经改变了网页,看起来他们现在正在新网页上使用POST而不是GET,这意味着我真的无法通过URL的信息.

我确实在这个页面上的解决方案中找到了一些希望:
http://ocdnix.wordpress.com/2013/03/14/hp-server-warranty-via-the-isee-api/
但我不明白这个例子脚本,因为我以前没有使用过Python.

我还发现这个网页向我展示了戴尔保修的一个很好的例子,但惠普没有我可以使用的WSDL.(我会发布链接,但没有足够的代表)

使用这些功能,我可以形成请求:http:
//www.iislogs.com/steveschofield/execute-a-soap-request-from-powershell

我认为一切都会按预期工作,但我很难形成注册客户端的请求,我一直得到500错误,这意味着他们的服务器坏了或我的请求导致内部错误.

我第一次完全不知所措.

任何人都有这个在PowerShell中工作或有类似的问题?

更新了22-10-13

我现在有了信封,我设法让Python脚本运行但由于我的代理失败了,所以提取生成的XML,这是我想要的,因为我不确定它应该如何形成,这看起来像:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:iseeReg="http://www.hp.com/isee/webservices/">
<SOAP-ENV:Body>
    <iseeReg:RegisterClient2>
    <iseeReg:request><isee:ISEE-Registration xmlns:isee="http://www.hp.com/schemas/isee/5.00/event" schemaVersion="5.00">
<RegistrationSource>
    <HP_OOSIdentifiers>
    <OSID>
        <Section name="SYSTEM_IDENTIFIERS">
        <Property name="TimestampGenerated" value="2013/10/22 09:40:35 GMT Standard Time"/>
        </Section>
    </OSID>
    <CSID>
        <Section name="SYSTEM_IDENTIFIERS">
        <Property name="CollectorType" value="MC3"/>
        <Property name="CollectorVersion" value="T05.80.1 build 1"/>
        <Property name="AutoDetectedSystemSerialNumber" value="10"/>
        <Property name="SystemModel" value="HP ProLiant"/>
        <Property name="TimestampGenerated" value="2013/10/22 09:40:35 GMT Standard Time"/>
        </Section>
    </CSID>
    </HP_OOSIdentifiers>
    <PRS_Address>
    <AddressType>0</AddressType>
    <Address1/>
    <Address2/>
    <Address3/>
    <Address4/>
    <City/>
    <Region/>
    <PostalCode/>
    <TimeZone/>
    <Country/>
    </PRS_Address>
</RegistrationSource>
<HP_ISEECustomer> …
Run Code Online (Sandbox Code Playgroud)

powershell soap

6
推荐指数
1
解决办法
7751
查看次数

标签 统计

powershell ×1

soap ×1