Mapping of type string in WSDL

O

oliver.wulff

Hi

I've got the following webmethod:

[WebMethod]
public string Hello( string name)
{
return "Hello " + name;
}

This webmethod is mapped to the following element definition:
<s:element name="Hello">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="name" type="s:string"
/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="HelloResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="HelloResult"
type="s:string" />
</s:sequence>
</s:complexType>
</s:element>

I've got a problem with the minOccurs and maxOccurs. That looks like an
array with one element.

How can I influence the WSDL generation to have the following element
definition:
<s:element name="Hello">
<s:complexType>
<s:sequence>
<s:element name="name" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="HelloResponse">
<s:complexType>
<s:sequence>
<s:element name="HelloResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>

I hope that this is possible. Thanks for any help!

Oliver
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top