WCF: Svcutil generates invalid client proxy, Apache AXIS Web Service, overload operations

后端 未结 6 1342
予麋鹿
予麋鹿 2020-12-06 13:59

I\'m using a 3rd party web service written in Java and using Apache Axis 1.3. The service has many overload operations. When the WCF Svcutil generates the proxy, it rename

6条回答
  •  佛祖请我去吃肉
    2020-12-06 14:32

    I didn't see this question before, because you had a "java" tag on it, and I ignore Java questions. Your question wasn't about Java, so should not have had a "java" tag.

    svcutil is not renaming the overloaded operations. That's because there's no such thing as overloaded operations. WSDL has no concept of two operations with the same name, but using different messages.

    If you look at the WSDL from Axis, I believe you'll find the operations have the numbers appended to them.


    Correction: In a comment, Mark Good correctly points out that WSDL 1.1 does permit overloading. I happen to think it only makes any sense in the context of an RPC-based service, where the message name can be used to distinguish between one overload and another.

    However, he may not be aware that operator overloading is prohibited by WS-I Basic Profile 1.1:

    4.5.3 Distinctive Operations

    Operation name overloading in a wsdl:portType is disallowed by the Profile.

    R2304 A wsdl:portType in a DESCRIPTION MUST have operations with distinct values for their name attributes.

    Note that this requirement applies only to the wsdl:operations within a given wsdl:portType. A wsdl:portType may have wsdl:operations with names that are the same as those found in other wsdl:portTypes.


    If one reads more of WS-I BP1.1, one will learn why not everything in WSDL 1.1 is a good idea.

提交回复
热议问题