Visual Studio无法读取WSDL参数

时间:2018-01-05 10:18:14

标签: java c# web-services parameters wsdl

我在Java中创建了webservice,它使用JAX-WS自动构建WSDL。我的同事正在尝试使用Visual Studio中的参数访问方法,但IDE仅提供没有参数的void方法。我没有任何线索,有什么可能是错的,是吗?这是包含类型模式和VS预览的完整wsdl。谢谢你的任何建议。

<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://foo/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://foo/" name="GRCWSHLService">
    <types>
        <xsd:schema>
            <xsd:import namespace="http://foo/" schemaLocation="http://foo/grcwshl/GRCWSHLPort?xsd=1"/>
        </xsd:schema>
    </types>
    <message name="querycastxml">
        <part name="parameters" element="tns:setExtraDataElement"/>
    </message>
    <message name="querycastxmlResponse">
        <part name="parameters" element="tns:setExtraDataResponseElement"/>
    </message>
    <portType name="GRCWSHL">
        <operation name="querycastxml">
            <input message="tns:querycastxml"/>
            <output message="tns:querycastxmlResponse"/>
        </operation>
    </portType>
    <binding name="GRCWSHLPortBinding" type="tns:GRCWSHL">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
        <operation name="querycastxml">
            <soap:operation soapAction=""/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
        </operation>
    </binding>
    <service name="GRCWSHLService">
        <port name="GRCWSHLPort" binding="tns:GRCWSHLPortBinding">
            <soap:address location="http://foo/grcwshl/GRCWSHLPort"/>
        </port>
    </service>
</definitions>

类型架构:

<xs:schema xmlns:tns="http://foo/" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://foo/">
    <xs:element name="Error" type="tns:lineError"/>
    <xs:element name="setExtraDataElement" type="tns:request"/>
    <xs:element name="setExtraDataResponseElement" type="tns:response"/>
    <xs:complexType name="request">
        <xs:complexContent>
            <xs:extension base="tns:generalObject">
                <xs:sequence>
                    <xs:element name="jmsoub1" type="xs:string" minOccurs="0"/>
                    <xs:element name="data1" type="xs:string" minOccurs="0"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="generalObject">
        <xs:sequence/>
    </xs:complexType>
    <xs:complexType name="response">
        <xs:complexContent>
            <xs:extension base="tns:generalObject">
                <xs:sequence>
                    <xs:element name="Message" type="xs:string" minOccurs="0"/>
                    <xs:element name="ReceiveDate" type="xs:dateTime" minOccurs="0"/>
                    <xs:element name="LinesTotal" type="xs:int"/>
                    <xs:element name="ErrorsTotal" type="xs:int"/>
                    <xs:element name="Errors" type="tns:lineError" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="lineError">
        <xs:complexContent>
            <xs:extension base="tns:generalObject">
                <xs:sequence>
                    <xs:element name="LineNumber" type="xs:int"/>
                    <xs:element name="ErrorText" type="xs:string" minOccurs="0"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
</xs:schema>

Visual Studio预览

enter image description here

0 个答案:

没有答案