Add Service Reference is generating Message Contracts

天涯浪子 提交于 2019-11-30 11:30:05
Shanwayne

I had this same issue and this solved it.

I used this:

    <wsdl:message name="Method">
      <wsdl:part name="parameters" element="s0:Method"/>
    </wsdl:message>

    <wsdl:message name="MethodResponse">
      <wsdl:part name="parameters" element="s0:MethodResponse"/>
    </wsdl:message>

Instead of:

    <wsdl:message name="Method">
      <wsdl:part name="request" element="s0:Method"/>
    </wsdl:message>

    <wsdl:message name="MethodResponse">
      <wsdl:part name="response" element="s0:MethodResponse"/>
    </wsdl:message>

I believe someone mentioned it before but I can't upVote their answer yet!

Here is another item to check:

  1. Right click on your service reference in the Solution Explorer and select 'Configure Service Reference'

  2. Check whether or not 'Always generate message contracts' is checked.

Have you tried changing the WSDL so that for every instance of part element="tns:myOperation" name="request", changing the value of the name attribute to 'parameters'.

jaeckyl

While I know this is a long out dated entry, for those that stumble on this same issue:

Double check that the proxy that was generated doesn't contain any jagged arrays, e.g.

(C#)

private string[][] mystring;

(VB.NET)

Private myString()() As String

Did you try using the scvutil Goto --> Startmenu / Visual Studio 2008 / Tools / VS Command Prompt

Type svcutil, then check out the parameters, especially the /wrapped parameter. Eventually use this to generate your proxy, it gives you alot more control over whats going on

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!