svcutil을 사용하여 웹 서비스 프록시를 생성하는 데 문제가 있습니다

StackOverflow https://stackoverflow.com/questions/906082

  •  05-09-2019
  •  | 
  •  

문제

우리의 응용 프로그램에서 우리는 여러 웹 서비스를 소비해야합니다. 처음에는 WCF 프록시를 만들기 위해 "서비스 참조 추가"메뉴 옵션 만 사용했습니다.

마법사는 데이터 콘텐츠를 생성하지 않았지만 훨씬 XML- 소개 클래스입니다. 지금까지 너무 나쁘지만 이것은 살인자가 아니 었습니다. 그러나 나중에 우리는 생성 된 프록시가 귀속 할 때 주문 속성을 추가하고 있었기 때문에 데이터를 잃고 있음을 알았습니다.

이제 우리는 svcutil.exe를 사용하여 WSDL에서 프록시 클래스를 생성하려고하지만 다음과 같은 오류 메시지를 받고 있습니다.

    C:\temp\WSDL>svcutil /serializer:DataContractSerializer ReadSddsAddressOut.wsdl
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.2152]
Copyright (c) Microsoft Corporation.  All rights reserved.

Warning: Das optionale WSDL-Erweiterungselement "body" aus Namespace "http://schemas.xmlsoap.org/wsdl/soap/" wurde nicht behandelt.
XPath: //wsdl:definitions[@targetNamespace='http://post.ch/sdds/address']/wsdl:binding[@name='ReadSddsAddressOutBinding']/wsdl:operation[@name='GeoSuchKanton']/wsdl:input


Warning: Das optionale WSDL-Erweiterungselement "body" aus Namespace "http://schemas.xmlsoap.org/wsdl/soap/" wurde nicht behandelt.
XPath: //wsdl:definitions[@targetNamespace='http://post.ch/sdds/address']/wsdl:binding[@name='ReadSddsAddressOutBinding']/wsdl:operation[@name='GeoSuchKanton']/wsdl:output


Warning: Das optionale WSDL-Erweiterungselement "body" aus Namespace "http://schemas.xmlsoap.org/wsdl/soap/" wurde nicht behandelt.
XPath: //wsdl:definitions[@targetNamespace='http://post.ch/sdds/address']/wsdl:binding[@name='ReadSddsAddressOutBinding']/wsdl:operation[@name='GeoSuchPlz']/wsdl:input


Warning: Das optionale WSDL-Erweiterungselement "body" aus Namespace "http://schemas.xmlsoap.org/wsdl/soap/" wurde nicht behandelt.
XPath: //wsdl:definitions[@targetNamespace='http://post.ch/sdds/address']/wsdl:binding[@name='ReadSddsAddressOutBinding']/wsdl:operation[@name='GeoSuchPlz']/wsdl:output


Warning: Das optionale WSDL-Erweiterungselement "body" aus Namespace "http://schemas.xmlsoap.org/wsdl/soap/" wurde nicht behandelt.
XPath: //wsdl:definitions[@targetNamespace='http://post.ch/sdds/address']/wsdl:binding[@name='ReadSddsAddressOutBinding']/wsdl:operation[@name='GeoSuchNation']/wsdl:input


Warning: Das optionale WSDL-Erweiterungselement "body" aus Namespace "http://schemas.xmlsoap.org/wsdl/soap/" wurde nicht behandelt.
XPath: //wsdl:definitions[@targetNamespace='http://post.ch/sdds/address']/wsdl:binding[@name='ReadSddsAddressOutBinding']/wsdl:operation[@name='GeoSuchNation']/wsdl:output


Warning: Das optionale WSDL-Erweiterungselement "body" aus Namespace "http://schemas.xmlsoap.org/wsdl/soap/" wurde nicht behandelt.
XPath: //wsdl:definitions[@targetNamespace='http://post.ch/sdds/address']/wsdl:binding[@name='ReadSddsAddressOutBinding']/wsdl:operation[@name='GeoSuchAdr']/wsdl:input


Warning: Das optionale WSDL-Erweiterungselement "body" aus Namespace "http://schemas.xmlsoap.org/wsdl/soap/" wurde nicht behandelt.
XPath: //wsdl:definitions[@targetNamespace='http://post.ch/sdds/address']/wsdl:binding[@name='ReadSddsAddressOutBinding']/wsdl:operation[@name='GeoSuchAdr']/wsdl:output


Warning: Das optionale WSDL-Erweiterungselement "body" aus Namespace "http://schemas.xmlsoap.org/wsdl/soap/" wurde nicht behandelt.
XPath: //wsdl:definitions[@targetNamespace='http://post.ch/sdds/address']/wsdl:binding[@name='ReadSddsAddressOutBinding']/wsdl:operation[@name='GeoSuchPkt']/wsdl:input


Warning: Das optionale WSDL-Erweiterungselement "body" aus Namespace "http://schemas.xmlsoap.org/wsdl/soap/" wurde nicht behandelt.
XPath: //wsdl:definitions[@targetNamespace='http://post.ch/sdds/address']/wsdl:binding[@name='ReadSddsAddressOutBinding']/wsdl:operation[@name='GeoSuchPkt']/wsdl:output


Generating files...
C:\temp\WSDL\ReadSddsAddressOut.cs
C:\temp\WSDL\output.config

영어의 오류 메시지는 다음과 같습니다

"옵션 WSDL 확장 요소 '네임 스페이스에서'본문 'http://schemas.xmlsoap.org/wsdl/soap/'처리되지 않았다.'

원래 WSDL은 다음과 같습니다.

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="ReadSddsAddressOut" targetNamespace="http://post.ch/sdds/address" xmlns:p2="http://post.ch/sdds" xmlns:p1="http://post.ch/sdds/address" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <wsdl:documentation/>
    <wsdl:types>
        <xsd:schema targetNamespace="http://post.ch/sdds" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://post.ch/sdds">
            <xsd:element name="ZuboGeoKantonReq">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="GEOKTNID" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="GEOKTNBEZ" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="maxRows" type="xsd:integer" minOccurs="0"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="ZuboGeoPktReq">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="GEOPKTID" type="xsd:integer" minOccurs="0"/>
                        <xsd:element name="GEOADRID" type="xsd:integer" minOccurs="0"/>
                        <xsd:element name="GEOKTNID" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="GEOKTNBEZ" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="GEOPLZPLZ" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="GEOPLZPLZ4" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="GEOPLZORT39" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="GEOSTRBEZ" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="GEOADRSTRNRT" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="GEOADRCMT" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="GEOPKTKORX" type="xsd:decimal" minOccurs="0"/>
                        <xsd:element name="GEOPKTKORY" type="xsd:decimal" minOccurs="0"/>
                        <xsd:element name="GEOPKTKORZ" type="xsd:decimal" minOccurs="0"/>
                        <xsd:element name="GEOPKTTYP" type="xsd:integer" minOccurs="0"/>
                        <xsd:element name="GEOPKTMAIN" type="xsd:boolean" minOccurs="0"/>
                        <xsd:element name="withDeletedPkt" type="xsd:boolean" minOccurs="0"/>
                        <xsd:element name="maxRows" type="xsd:integer" minOccurs="0"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="ZuboGeoNationResp">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="ErrorCode" type="xsd:integer"/>
                        <xsd:element name="ErrorText" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="DataSet">
                            <xsd:complexType>
                                <xsd:sequence maxOccurs="unbounded">
                                    <xsd:element name="row" minOccurs="0">
                                        <xsd:complexType>
                                            <xsd:sequence>
                                                <xsd:element name="GEONATID" type="xsd:string"/>
                                                <xsd:element name="GEONATBEZ" type="xsd:string"/>
                                            </xsd:sequence>
                                        </xsd:complexType>
                                    </xsd:element>
                                </xsd:sequence>
                            </xsd:complexType>
                        </xsd:element>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="ZuboGeoKantonResp">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="ErrorCode" type="xsd:integer"/>
                        <xsd:element name="ErrorText" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="DataSet">
                            <xsd:complexType>
                                <xsd:sequence maxOccurs="unbounded">
                                    <xsd:element name="row" minOccurs="0">
                                        <xsd:complexType>
                                            <xsd:sequence>
                                                <xsd:element name="GEOKTNID" type="xsd:string"/>
                                                <xsd:element name="GEOKTNBEZ" type="xsd:string"/>
                                                <xsd:element name="GEONATID" type="xsd:string"/>
                                                <xsd:element name="GEONATBEZ" type="xsd:string"/>
                                            </xsd:sequence>
                                        </xsd:complexType>
                                    </xsd:element>
                                </xsd:sequence>
                            </xsd:complexType>
                        </xsd:element>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="ZuboGeoPlzResp">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="ErrorCode" type="xsd:integer"/>
                        <xsd:element name="ErrorText" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="DataSet">
                            <xsd:complexType>
                                <xsd:sequence maxOccurs="unbounded">
                                    <xsd:element name="row" minOccurs="0">
                                        <xsd:complexType>
                                            <xsd:sequence>
                                                <xsd:element name="GEOPLZPLZ" type="xsd:string"/>
                                                <xsd:element name="GEOPLZPLZ4" type="xsd:string"/>
                                                <xsd:element name="GEOPLZONRP" type="xsd:integer"/>
                                                <xsd:element name="GEOPLZSPRCOD1" type="xsd:integer"/>
                                                <xsd:element name="GEOPLZSPRCOD2" type="xsd:integer" minOccurs="0"/>
                                                <xsd:element name="GEOPLZORT18" type="xsd:string"/>
                                                <xsd:element name="GEOPLZORT27" type="xsd:string"/>
                                                <xsd:element name="GEOPLZORT39" type="xsd:string"/>
                                                <xsd:element name="GEOPLZPLZTYP" type="xsd:integer"/>
                                                <xsd:element name="GEOKTNID" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOKTNBEZ" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEONATID" type="xsd:string"/>
                                                <xsd:element name="GEONATBEZ" type="xsd:string"/>
                                                <xsd:element name="GEOPLZSTATUS" type="xsd:integer"/>
                                            </xsd:sequence>
                                        </xsd:complexType>
                                    </xsd:element>
                                </xsd:sequence>
                            </xsd:complexType>
                        </xsd:element>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="ZuboGeoPktResp">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="ErrorCode" type="xsd:integer"/>
                        <xsd:element name="ErrorText" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="DataSet">
                            <xsd:complexType>
                                <xsd:sequence maxOccurs="unbounded">
                                    <xsd:element name="row" minOccurs="0">
                                        <xsd:complexType>
                                            <xsd:sequence>
                                                <xsd:element name="GEOPKTID" type="xsd:integer"/>
                                                <xsd:element name="GEOPKTBEZ" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOPKTKORX" type="xsd:decimal"/>
                                                <xsd:element name="GEOPKTKORY" type="xsd:decimal"/>
                                                <xsd:element name="GEOPKTKORZ" type="xsd:decimal" minOccurs="0"/>
                                                <xsd:element name="GEOPKTSTK" type="xsd:integer" minOccurs="0"/>
                                                <xsd:element name="GEOPKTWOH" type="xsd:integer" minOccurs="0"/>
                                                <xsd:element name="GEOPKTTYP" type="xsd:integer" minOccurs="0"/>
                                                <xsd:element name="GEOPKTMAIN" type="xsd:boolean"/>
                                                <xsd:element name="GEOADRID" type="xsd:integer" minOccurs="0"/>
                                                <xsd:element name="GEOSTRBEZ" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOSTRTYP" type="xsd:integer" minOccurs="0"/>
                                                <xsd:element name="GEOADRSTRNR" type="xsd:integer" minOccurs="0"/>
                                                <xsd:element name="GEOADRSTRNRZ" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOADRSTRNRT" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOADRHAUSN" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOADRGEBFLG" type="xsd:boolean" minOccurs="0"/>
                                                <xsd:element name="GEOADRLAGFLG" type="xsd:boolean" minOccurs="0"/>
                                                <xsd:element name="GEOADRCMT" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOADRHAUSKEY" type="xsd:integer" minOccurs="0"/>
                                                <xsd:element name="GEOADRGPOID" type="xsd:integer" minOccurs="0"/>
                                                <xsd:element name="GEOPLZPLZ" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOPLZPLZ4" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOPLZONRP" type="xsd:integer" minOccurs="0"/>
                                                <xsd:element name="GEOPLZSPRCOD1" type="xsd:integer" minOccurs="0"/>
                                                <xsd:element name="GEOPLZSPRCOD2" type="xsd:integer" minOccurs="0"/>
                                                <xsd:element name="GEOPLZORT18" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOPLZORT27" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOPLZORT39" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOPLZPLZTYP" type="xsd:integer" minOccurs="0"/>
                                                <xsd:element name="GEOKTNID" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOKTNBEZ" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEONATID" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEONATBEZ" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOPKTSTATUS" type="xsd:integer"/>
                                            </xsd:sequence>
                                        </xsd:complexType>
                                    </xsd:element>
                                </xsd:sequence>
                            </xsd:complexType>
                        </xsd:element>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="ZuboGeoPlzReq">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="GEOPLZPLZ" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="GEOPLZPLZ4" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="GEOPLZORT39" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="maxRows" type="xsd:integer" minOccurs="0"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="ZuboGeoNationReq">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="GEONATID" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="GEONATBEZ" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="maxRows" type="xsd:integer" minOccurs="0"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="ZuboGeoAdrResp">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="ErrorCode" type="xsd:integer"/>
                        <xsd:element name="ErrorText" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="DataSet">
                            <xsd:complexType>
                                <xsd:sequence maxOccurs="unbounded">
                                    <xsd:element name="row" minOccurs="0">
                                        <xsd:complexType>
                                            <xsd:sequence>
                                                <xsd:element name="GEOADRID" type="xsd:integer"/>
                                                <xsd:element name="GEOSTRBEZ" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOSTRTYP" type="xsd:integer" minOccurs="0"/>
                                                <xsd:element name="GEOADRSTRNR" type="xsd:integer" minOccurs="0"/>
                                                <xsd:element name="GEOADRSTRNRZ" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOADRSTRNRT" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOADRSTRHAUSN" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOADRGEBFLG" type="xsd:boolean" minOccurs="0"/>
                                                <xsd:element name="GEOADRLAGFLG" type="xsd:boolean" minOccurs="0"/>
                                                <xsd:element name="GEOADRCMT" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOADRHAUSKEY" type="xsd:integer"/>
                                                <xsd:element name="GEOADRGPOID" type="xsd:integer" minOccurs="0"/>
                                                <xsd:element name="GEOPLZPLZ" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOPLZPLZ4" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOPLZONRP" type="xsd:integer" minOccurs="0"/>
                                                <xsd:element name="GEOPLZSPRCOD1" type="xsd:integer" minOccurs="0"/>
                                                <xsd:element name="GEOPLZSPRCOD2" type="xsd:integer" minOccurs="0"/>
                                                <xsd:element name="GEOPLZORT18" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOPLZORT27" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOPLZORT39" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOPLZPLZTYP" type="xsd:integer" minOccurs="0"/>
                                                <xsd:element name="GEOKTNID" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOKTNBEZ" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEONATID" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEONATBEZ" type="xsd:string" minOccurs="0"/>
                                                <xsd:element name="GEOADRSTATUS" type="xsd:integer"/>
                                            </xsd:sequence>
                                        </xsd:complexType>
                                    </xsd:element>
                                </xsd:sequence>
                            </xsd:complexType>
                        </xsd:element>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="ZuboGeoAdrReq">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="GEOADRID" type="xsd:integer" minOccurs="0"/>
                        <xsd:element name="GEOKTNID" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="GEOKTNBEZ" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="GEOPLZPLZ" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="GEOPLZPLZ4" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="GEOPLZORT39" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="GEOSTRBEZ" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="GEOADRSTRNRT" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="GEOADRCMT" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="withDeletedAdr" type="xsd:boolean" minOccurs="0"/>
                        <xsd:element name="maxRows" type="xsd:integer" minOccurs="0"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
        </xsd:schema>
    </wsdl:types>
    <wsdl:message name="p2.ZuboGeoKantonReq">
        <wsdl:documentation/>
        <wsdl:part name="ZuboGeoKantonReq" element="p2:ZuboGeoKantonReq"/>
    </wsdl:message>
    <wsdl:message name="p2.ZuboGeoKantonResp">
        <wsdl:documentation/>
        <wsdl:part name="ZuboGeoKantonResp" element="p2:ZuboGeoKantonResp"/>
    </wsdl:message>
    <wsdl:message name="p2.ZuboGeoPlzReq">
        <wsdl:documentation/>
        <wsdl:part name="ZuboGeoPlzReq" element="p2:ZuboGeoPlzReq"/>
    </wsdl:message>
    <wsdl:message name="p2.ZuboGeoPlzResp">
        <wsdl:documentation/>
        <wsdl:part name="ZuboGeoPlzResp" element="p2:ZuboGeoPlzResp"/>
    </wsdl:message>
    <wsdl:message name="p2.ZuboGeoNationReq">
        <wsdl:documentation/>
        <wsdl:part name="ZuboGeoNationReq" element="p2:ZuboGeoNationReq"/>
    </wsdl:message>
    <wsdl:message name="p2.ZuboGeoNationResp">
        <wsdl:documentation/>
        <wsdl:part name="ZuboGeoNationResp" element="p2:ZuboGeoNationResp"/>
    </wsdl:message>
    <wsdl:message name="p2.ZuboGeoAdrReq">
        <wsdl:documentation/>
        <wsdl:part name="ZuboGeoAdrReq" element="p2:ZuboGeoAdrReq"/>
    </wsdl:message>
    <wsdl:message name="p2.ZuboGeoAdrResp">
        <wsdl:documentation/>
        <wsdl:part name="ZuboGeoAdrResp" element="p2:ZuboGeoAdrResp"/>
    </wsdl:message>
    <wsdl:message name="p2.ZuboGeoPktReq">
        <wsdl:documentation/>
        <wsdl:part name="ZuboGeoPktReq" element="p2:ZuboGeoPktReq"/>
    </wsdl:message>
    <wsdl:message name="p2.ZuboGeoPktResp">
        <wsdl:documentation/>
        <wsdl:part name="ZuboGeoPktResp" element="p2:ZuboGeoPktResp"/>
    </wsdl:message>
    <wsdl:portType name="ReadSddsAddressOut">
        <wsdl:documentation/>
        <wsdl:operation name="GeoSuchKanton">
            <wsdl:documentation/>
            <wsdl:input message="p1:p2.ZuboGeoKantonReq"/>
            <wsdl:output message="p1:p2.ZuboGeoKantonResp"/>
        </wsdl:operation>
        <wsdl:operation name="GeoSuchPlz">
            <wsdl:documentation/>
            <wsdl:input message="p1:p2.ZuboGeoPlzReq"/>
            <wsdl:output message="p1:p2.ZuboGeoPlzResp"/>
        </wsdl:operation>
        <wsdl:operation name="GeoSuchNation">
            <wsdl:documentation/>
            <wsdl:input message="p1:p2.ZuboGeoNationReq"/>
            <wsdl:output message="p1:p2.ZuboGeoNationResp"/>
        </wsdl:operation>
        <wsdl:operation name="GeoSuchAdr">
            <wsdl:documentation/>
            <wsdl:input message="p1:p2.ZuboGeoAdrReq"/>
            <wsdl:output message="p1:p2.ZuboGeoAdrResp"/>
        </wsdl:operation>
        <wsdl:operation name="GeoSuchPkt">
            <wsdl:documentation/>
            <wsdl:input message="p1:p2.ZuboGeoPktReq"/>
            <wsdl:output message="p1:p2.ZuboGeoPktResp"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="ReadSddsAddressOutBinding" type="p1:ReadSddsAddressOut">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
        <wsdl:operation name="GeoSuchKanton">
            <soap:operation soapAction="http://sap.com/xi/WebService/soap1.1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
            <wsdl:input>
                <soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="GeoSuchPlz">
            <soap:operation soapAction="http://sap.com/xi/WebService/soap1.1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
            <wsdl:input>
                <soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="GeoSuchNation">
            <soap:operation soapAction="http://sap.com/xi/WebService/soap1.1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
            <wsdl:input>
                <soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="GeoSuchAdr">
            <soap:operation soapAction="http://sap.com/xi/WebService/soap1.1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
            <wsdl:input>
                <soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="GeoSuchPkt">
            <soap:operation soapAction="http://sap.com/xi/WebService/soap1.1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
            <wsdl:input>
                <soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="ReadSddsAddressOutService">
        <wsdl:port name="ReadSddsAddressOutPort" binding="p1:ReadSddsAddressOutBinding">
            <soap:address location="http://h03kyq:51000/XISOAPAdapter/MessageServlet?channel=:SDDS_DEV:ssReadSddsAddress" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

그리고 (나사) 프록시 클래스는 다음과 같습니다.

//------------------------------------------------------------------------------
// <auto-generated>
//     Dieser Code wurde von einem Tool generiert.
//     Laufzeitversion:2.0.50727.3074
//
//     Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
//     der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------



[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
[System.ServiceModel.ServiceContractAttribute(Namespace="http://post.ch/sdds/address", ConfigurationName="ReadSddsAddressOut")]
public interface ReadSddsAddressOut
{

    [System.ServiceModel.OperationContractAttribute()]
    void GeoSuchKanton();

    [System.ServiceModel.OperationContractAttribute()]
    void GeoSuchPlz();

    [System.ServiceModel.OperationContractAttribute()]
    void GeoSuchNation();

    [System.ServiceModel.OperationContractAttribute()]
    void GeoSuchAdr();

    [System.ServiceModel.OperationContractAttribute()]
    void GeoSuchPkt();
}

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
public interface ReadSddsAddressOutChannel : ReadSddsAddressOut, System.ServiceModel.IClientChannel
{
}

[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
public partial class ReadSddsAddressOutClient : System.ServiceModel.ClientBase<ReadSddsAddressOut>, ReadSddsAddressOut
{

    public ReadSddsAddressOutClient()
    {
    }

    public ReadSddsAddressOutClient(string endpointConfigurationName) : 
            base(endpointConfigurationName)
    {
    }

    public ReadSddsAddressOutClient(string endpointConfigurationName, string remoteAddress) : 
            base(endpointConfigurationName, remoteAddress)
    {
    }

    public ReadSddsAddressOutClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : 
            base(endpointConfigurationName, remoteAddress)
    {
    }

    public ReadSddsAddressOutClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
            base(binding, remoteAddress)
    {
    }

    public void GeoSuchKanton()
    {
        base.Channel.GeoSuchKanton();
    }

    public void GeoSuchPlz()
    {
        base.Channel.GeoSuchPlz();
    }

    public void GeoSuchNation()
    {
        base.Channel.GeoSuchNation();
    }

    public void GeoSuchAdr()
    {
        base.Channel.GeoSuchAdr();
    }

    public void GeoSuchPkt()
    {
        base.Channel.GeoSuchPkt();
    }
}

어떤 도움이든 좋을 것입니다.

도움이 되었습니까?

해결책

WSDL이 사용하는 스키마는 데이터 계약 시리얼 라이저를 준수하지 않습니다. 스키마 참조.

문제 :

  1. "모든 요소는 DatacontractSerializer에서 스키마를 지원할 수 있도록 자격이 있어야합니다."

    스키마는 태그의 elementformDefault 속성을 생략하므로 기본값 인 "자격이없는"이 유효합니다. 다음 속성 이름/값 쌍을u003Cschema> DCS (Data Contract Serializer)가 로컬 요소/유형을 해결할 수 있도록 요소.

    ElementFormDefault = "자격이"

  2. Maxoccurs와 Minoccurs 속성u003Csequence> 태그는 1이거나 생략해야합니다 (기본값은 1).

    따라서 Maxoccurs = "Unbounded"를 제거하십시오.u003Csequence> .

  3. Maxoccurs = "Unbounded"를 추가하십시오u003Crow> 태그는 데이터 세트 필드에 대해 중첩 된 수집 데이터 계약을 얻습니다.

    예를 들어,

    <xsd:element name="DataSet"> <xsd:complexType> <xsd:sequence> <xsd:element name="row" minOccurs="0" maxOccurs="unbounded"/>

다른 팁

나는 "요소"의 사용을 제거해야했고 오히려 "복합 유형"을 사용했습니다.

그래서 데이터 코닝과 메시지에서 Enclosing 요소를 제거하면 요소 속성 대신 유형 속성을 설정했습니다. 이제 작동합니다. 대단히 감사합니다. :)

당신이 당신의 WSDL과 물건을 어떻게 생성했는지 잘 모르겠지만 데이터 세트에는 몇 가지 이상한 점이 있습니다.

DS로 프록시를 생성 할 때이 어셈블리를 참조해야합니다.

C : Windows Microsoft.net Framework V2.0.50727 System.Data.dll

건배, Stian

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top