Cisco UCP Web服务问题AuthenticateUser

时间:2011-10-25 16:56:28

标签: web-services soap soapui cisco

更新:此问题已得到解决。我试图验证各种管理员帐户,这些帐户显然位于与此服务所使用的用户帐户不同的数据库中。我使用了我在CISCO中创建的通用用户帐户,并且Web服务调用运行良好!

我要感谢@Yahia关于运行Fiddler的建议!

我几天来一直在阅读 CICCO UCP网络服务 documentation。我可以通过正确的凭据与盒子上的一个Web服务进行通信,一切正常;但是,使用 UCP服务,我得到错误 ... SoapUI似乎理解了WSDL文件,我能够向端点发送请求但是我在下面获得身份验证错误。

我使用相同的用户名和密码登录ACS门户网站,因此该帐户未过期。我几乎迷失在这一点上并且受到CICSO技术支持的支配。 欢迎任何和所有想法!

SOAP响应:

<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>

1 个答案:

答案 0 :(得分:0)

更新:此问题已得到解决。我试图验证各种管理员帐户,这些帐户显然位于与此服务所使用的用户帐户不同的数据库中。我使用了在CISCO中创建的通用用户帐户,并且Web服务调用工作得很好!

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