作为导入Web服务以与其系统进行互操作的一部分,我从客户端收到了一个WSDL。他们发送了两个文件:一个WSDL和一个模式。当我运行WSDL导入程序时,得到的输出如下所示:如何导入此WSDL?
type
// ************************************************************************ //
// The following types, referred to in the WSDL document are not being represented
// in this file. They are either aliases[@] of other types represented or were referred
// to but never[!] declared in the document. The types from the latter category
// typically map to predefined/known XML or Embarcadero types; however, they could also
// indicate incorrect WSDL documents that failed to declare or import a schema type.
// ************************************************************************ //
// !:LoadData - "http://client.com/"[Lit][]
// !:LoadDataResponse - "http://client.com/"[Lit][]
// ************************************************************************ //
// Namespace : http://client.com/
// transport : http://schemas.xmlsoap.org/soap/http
// style : document
// binding : ClientPortBinding
// service : ClientService
// port : ClientPort
// URL : http://localhost:8080/ClientService
// ************************************************************************ //
IClientLoad = interface(IInvokable)
['{8DC02C6F-78D3-E09A-FE43-EE5211DB188D}']
// Cannot unwrap:
// - Input part does not refer to an element
// - Output part does not refer to an element
function LoadDataBatch(const parameters: LoadData): LoadDataResponse; stdcall;
end;
缺少的类型在它们发送的模式文件中定义。我试图改变WSDL的进口线看起来是这样,但它并没有改变什么:
<xsd:import namespace="http://client.com/" schemaLocation="file://C:/Users/mwheeler/Documents/WSDL/ClientLoadData Schema.xml"></xsd:import>
如何设置这种不当使德尔福的WSDL导入向导会检查我的本地系统上的模式文件并从中读取类型定义?
我还没有尝试过,但在WSDL导入程序中有一个选项。 '包含进程和导入模式'。听起来像你需要的东西。默认打开,所以你可能已经有了。 – 2011-03-14 18:48:37
在使用我们自己的服务和客户时,我们在工作中遇到了这样的麻烦。这与D2010导入拒绝非标准类型的元素有关,即使它们在名称空间中被明确定义。我认为他们通过在soap界面中使用标准数据类型来解决这个问题。如果您明天早上(UTC + 1)还没有找到答案,我会与同事核对。 – 2011-03-14 18:49:56
@duffymo:请仔细阅读问题。我没有在问题中包含WSDL,只是(输出的匿名版本)。这特别是一个Delphi WSDL Importer问题;不是WSDL/XML问题。 – 2011-03-14 18:52:18