0

更新:这个问题已经解决。我试图验证各种管理员帐户,这些帐户显然位于一个单独的数据库中,而不是该服务与之交谈的用户帐户。我使用了在 CISCO 中创建的通用用户帐户,并且 Web 服务调用效果很好!

我还要感谢@Yahia 对运行 Fiddler 的建议!

几天来,我一直在阅读CICCO UCP Web Service 文档。我可以使用正确的凭据与盒子上的一个 Web 服务通信,并且一切正常;但是,使用UCP Service时,出现错误... SoapUI 似乎理解 WSDL 文件,并且我能够向端点发送请求,但出现身份验证错误,如下所示。

我使用相同的用户名和密码登录 ACS 门户,因此帐户不会过期。我几乎迷失了这一点,并受制于 CICSO 技术支持。 欢迎任何和所有想法!

肥皂响应:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <ns1:authenticateUserResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://cisco.com/nm/acs/mgmt/ucp/service/">
         <authenticateUserReturn href="#id0"/>
      </ns1:authenticateUserResponse>
      <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:ResponseType" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://cisco.com/nm/acs/mgmt/ucp/service/">
         <errors soapenc:arrayType="xsd:string[1]" xsi:type="soapenc:Array">
            <errors xsi:type="xsd:string">Credentials are incorrect.</errors>
         </errors>
         <status href="#id1"/>
      </multiRef>
      <multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:StatusCodeType" xmlns:ns3="http://cisco.com/nm/acs/mgmt/ucp/service/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">failure</multiRef>
   </soapenv:Body>
</soapenv:Envelope>

肥皂信封:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://cisco.com/nm/acs/mgmt/ucp/service/">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:authenticateUser soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <userName xsi:type="xsd:string">myusername</userName>
    <password xsi:type="xsd:string">mypassword</password>
      </ser:authenticateUser>
   </soapenv:Body>
</soapenv:Envelope>

和 WSDL:

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions targetNamespace="http://cisco.com/nm/acs/mgmt/ucp/service/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://www.cisco.com/wsdl.service"
xmlns:intf="http://cisco.com/nm/acs/mgmt/ucp/service/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <wsdl:documentation>Copyright (c) 2007, 2009 Cisco Systems, Inc.
  WSDL Service Interface for ACS5.1 User Change Password interface
  (UCP) This WSDL document defines the publication API calls for
  interacting with the ACS UCP service.</wsdl:documentation>
  <wsdl:types>
    <schema targetNamespace="http://cisco.com/nm/acs/mgmt/ucp/service/"
    xmlns="http://www.w3.org/2001/XMLSchema">
      <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
      <complexType name="ArrayOf_xsd_string">
        <complexContent>
          <restriction base="soapenc:Array">
            <attribute ref="soapenc:arrayType"
            wsdl:arrayType="xsd:string[]" />
          </restriction>
        </complexContent>
      </complexType>
      <simpleType name="StatusCodeType">
        <restriction base="string">
          <enumeration value="success" />
          <enumeration value="failure" />
        </restriction>
      </simpleType>
      <complexType name="ResponseType">
        <sequence>
          <element name="errors" nillable="true"
          type="intf:ArrayOf_xsd_string" />
          <element name="status" nillable="false"
          type="intf:StatusCodeType" />
        </sequence>
      </complexType>
    </schema>
  </wsdl:types>
  <wsdl:message name="changeUserPassRequest">
    <wsdl:part name="userName" type="xsd:string" />
    <wsdl:part name="oldPassword" type="xsd:string" />
    <wsdl:part name="newPassword" type="xsd:string" />
  </wsdl:message>
  <wsdl:message name="authenticateUserRequest">
    <wsdl:part name="userName" type="xsd:string" />
    <wsdl:part name="password" type="xsd:string" />
  </wsdl:message>
  <wsdl:message name="changeUserPassResponse">
    <wsdl:part name="changeUserPassReturn"
    type="intf:ResponseType" />
  </wsdl:message>
  <wsdl:message name="authenticateUserResponse">
    <wsdl:part name="authenticateUserReturn"
    type="intf:ResponseType" />
  </wsdl:message>
  <wsdl:portType name="UCP">
    <wsdl:operation name="authenticateUser"
    parameterOrder="userName password">
      <wsdl:input message="intf:authenticateUserRequest"
      name="authenticateUserRequest" />
      <wsdl:output message="intf:authenticateUserResponse"
      name="authenticateUserResponse" />
    </wsdl:operation>
    <wsdl:operation name="changeUserPass"
    parameterOrder="userName oldPassword newPassword">
      <wsdl:input message="intf:changeUserPassRequest"
      name="changeUserPassRequest" />
      <wsdl:output message="intf:changeUserPassResponse"
      name="changeUserPassResponse" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="UCP" type="intf:UCP">
    <wsdlsoap:binding style="rpc"
    transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="authenticateUser">
      <wsdlsoap:operation soapAction="" />
      <wsdl:input name="authenticateUserRequest">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
        namespace="http://cisco.com/nm/acs/mgmt/ucp/service/"
        use="encoded" />
      </wsdl:input>
      <wsdl:output name="authenticateUserResponse">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
        namespace="http://cisco.com/nm/acs/mgmt/ucp/service/"
        use="encoded" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="changeUserPass">
      <wsdlsoap:operation soapAction="" />
      <wsdl:input name="changeUserPassRequest">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
        namespace="http://cisco.com/nm/acs/mgmt/ucp/service/"
        use="encoded" />
      </wsdl:input>
      <wsdl:output name="changeUserPassResponse">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
        namespace="http://cisco.com/nm/acs/mgmt/ucp/service/"
        use="encoded" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="UCPService">
    <wsdl:port binding="intf:UCP" name="UCP">
      <wsdlsoap:address location="https://localhost/PI/services/UCP/" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
4

1 回答 1

0

更新:这个问题已经解决。我试图验证各种管理员帐户,这些帐户显然位于一个单独的数据库中,而不是该服务与之交谈的用户帐户。我使用了在 CISCO 中创建的通用用户帐户,并且 Web 服务调用效果很好!

我还要感谢@Yahia 对运行 Fiddler 的建议!

于 2011-11-02T01:07:11.067 回答