Delphi xe8 wsdl import - 没有soap标头

时间:2016-05-12 02:56:03

标签: web-services delphi wsdl delphi-xe8

导入wsdl后,没有生成TSOAPHeader类,因此请求中没有元素。 wsdl中的operation元素:

<wsdl:operation name="searchTdsProviderIndividual">
    <wsoap12:operation soapaction="" style="document">
    <wsdl:input>
        <wsoap12:header message="tns:searchTdsProviderIndividualInMsg" part="productHeader" use="literal">
        <wsoap12:header message="tns:searchTdsProviderIndividualInMsg" part="signatureHeader" use="literal">
        <wsoap12:header message="tns:searchTdsProviderIndividualInMsg" part="timestampHeader" use="literal">
        <wsoap12:header message="tns:searchTdsProviderIndividualInMsg" part="userHeader" use="literal">
        <wsoap12:body parts="request" use="literal">
    </wsoap12:body></wsoap12:header></wsoap12:header></wsoap12:header></wsoap12:header></wsdl:input>
    <wsdl:output>
        <wsoap12:header message="tns:searchTdsProviderIndividualOutMsg" part="productHeader" use="literal">
        <wsoap12:header message="tns:searchTdsProviderIndividualOutMsg" part="signatureHeader" use="literal">
        <wsoap12:body parts="response" use="literal">
    </wsoap12:body></wsoap12:header></wsoap12:header></wsdl:output>
    <wsdl:fault name="standardError">
        <wsoap12:fault name="standardError" use="literal">
    </wsoap12:fault></wsdl:fault>
</wsoap12:operation></wsdl:operation>

生成的soap请求:

<!--?xml version="1.0"?-->
<soap-env:envelope xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soap-env:body>
        <searchtdsproviderindividual xmlns="http://ns.electronichealth.net.au/hi/svc/ProviderSearchTdsProviderIndividual/5.1.0">
            <familyname xmlns="http://ns.electronichealth.net.au/hi/xsd/providermessages/SearchTdsProviderIndividual/5.1.0">Smith</familyname>
            <dateofbirth xmlns="" xsi:nil="true">
        </dateofbirth></searchtdsproviderindividual>
        <product xmlns="http://ns.electronichealth.net.au/hi/xsd/common/CommonCoreElements/3.0">
            <vendor xsi:nil="true">
            <productname>xxx</productname>
            <productversion>1.8</productversion>
            <platform>
        </platform></vendor></product>
        <timestamp xmlns="http://ns.electronichealth.net.au/hi/xsd/common/CommonCoreElements/3.0">
            <created xsi:nil="true">
        </created></timestamp>
        <signature xmlns="http://ns.electronichealth.net.au/hi/xsd/common/CommonCoreElements/3.0">
            <signature xmlns="" xsi:nil="true">
        </signature>
        <user xmlns="http://ns.electronichealth.net.au/hi/xsd/common/CommonCoreElements/3.0">
            <qualifier xmlns="http://ns.electronichealth.net.au/hi/xsd/common/QualifiedIdentifier/3.0">http://ns.electronichealth.net.au/id/hi/vendorid/1.0</qualifier>
            <id xmlns="http://ns.electronichealth.net.au/hi/xsd/common/QualifiedIdentifier/3.0">XXX00001</id>
        </user>
    </signature></soap-env:body>
</soap-env:envelope>

0 个答案:

没有答案