小编Dou*_*son的帖子

如何使用dotnet使用ColdFusion Web服务

我在SOAP和Web服务方面根本没有经验.我正在尝试从C#(.NET 4.0)调用ColdFusion Web服务.我正在使用svcutil.exe从WSDL生成代理.当我从SoapUI调用ListCases时,Web服务正常工作,但是当我从代理调用它时,我得到一个带有单个mapItem的映射,并且该mapItem具有null项和值.我猜这不起作用,因为WSDL不包含QueryBean的定义.如果这是问题,我会尝试让Web服务的作者添加定义,否则除了手动解析XML之外我还有其他选择吗?

<wsdl:definitions xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://syndication.v63" xmlns:intf="http://syndication.v63" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="http://rpc.xml.coldfusion" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://syndication.v63">
  <!-- WSDL created by ColdFusion version 9,0,1,274733 -->
  <wsdl:types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xml.apache.org/xml-soap">
      <import namespace="http://rpc.xml.coldfusion"/>
      <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
      <complexType name="mapItem">
        <sequence>
          <element name="key" nillable="true" type="xsd:anyType"/>
          <element name="value" nillable="true" type="xsd:anyType"/>
        </sequence>
      </complexType>
      <complexType name="Map">
        <sequence>
          <element maxOccurs="unbounded" minOccurs="0" name="item" type="apachesoap:mapItem"/>
        </sequence>
      </complexType>
    </schema>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://rpc.xml.coldfusion">
      <import namespace="http://xml.apache.org/xml-soap"/>
      <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
      <complexType name="CFCInvocationException">
        <sequence/>
      </complexType>
    </schema>
  </wsdl:types>
  <wsdl:message name="ListCasesResponse">
    <wsdl:part name="ListCasesReturn" type="apachesoap:Map"/>
  </wsdl:message>
  <wsdl:message name="FolderDetailsResponse">
    <wsdl:part name="FolderDetailsReturn" type="apachesoap:Map"/>
  </wsdl:message>
  <wsdl:message name="ListBoxesRequest"> …
Run Code Online (Sandbox Code Playgroud)

.net c# coldfusion soap web-services

5
推荐指数
1
解决办法
1341
查看次数

标签 统计

.net ×1

c# ×1

coldfusion ×1

soap ×1

web-services ×1