[英]Webservice proxy class generation
我包括以下xsd文件:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns="http://www.xxxx.com/schemas/2005/06/messages" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.xxxx.com/schemas/2005/06/messages" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="xxxxCommonTypes.xsd" />
<xs:element name="HotelDetailRQ">
<xs:annotation>
<xs:documentation>Request data to obtain detailed information for the specified hotel product.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent mixed="false">
<xs:extension base="CoreRequest">
<xs:sequence>
<xs:element name="HotelCode">
<xs:annotation>
<xs:documentation>Hotel code to obtain detailed inormation.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1" />
<xs:maxLength value="10" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:schema>
通過以下方式到wsdl文件:
<wsdl:definitions xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:tns1="http://axis.frontend.hydra.xxxx.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:impl="http://www.xxxx.com/wsdl/2005/06" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:intf="http://www.xxxx.com/wsdl/2005/06" targetNamespace="http://www.xxxx.com/wsdl/2005/06" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://axis.frontend.hydra.xxxx.com">
<xsd:import schemaLocation="C:\Users\xxxx\HotelDetailRQ.xsd" namespace="http://www.xxxx.com/schemas/2005/06/messages" />
</xsd:schema>
</wsdl:types>
.
.
.
</wsdl:definitions>
問題是當我將wsdl文件作為網絡參考添加到Visual Studio時,它沒有在reference.cs文件中生成HotelDetailRQ代理類。 因此,我無法使用生成的HotelDetailRQ類。
我沒有使用xsd文件或wsdl文件的經驗。 您能指出我在這里可能犯錯誤的地方嗎?
您的架構文件包括另一個架構文件:
<xs:include schemaLocation="xxxxCommonTypes.xsd" />
您是否更新了該文件的路徑?
任何錯誤消息也將有所幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.