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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top