Reputation: 2416
I try to write a wsdl file. And I start with defining in the element my future operations. So I need to define a method like getAllObjects. That's why I don't need to set any parameter to getAllObjectsRequest. Could anybody tell me how I must define my message and operations for a method which doesn't declare any inputparameters (like ID in getById).
At the moment I have the next code:
<type .....>
<xsd:element name="getAllObjectRequest">
<xsd:complexType>
<xsd:sequence>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getAllObjectResponce">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="allObject" type="wsbean:ObjectADB"
minOccurs="0" maxOccurs="unbounded"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
I think this is not corect.
Thanks.
Upvotes: 7
Views: 8687
Reputation: 340723
This syntax is correct. If you don't like it, I suggest creating special marker Void
type for these kind of messages:
<xsd:element name="getAllObjectRequest" type="Void"/>
<xsd:complexType name="Void">
<xsd:sequence>
</xsd:sequence>
</xsd:complexType>
Note that valid request in SOAP message look like this:
<getAllObjectRequest/>
Upvotes: 10