So i created my own SOAP service using Spring Maven Java. I am able to create a custom object "Machine" which displays the hostname and the ip address of the machine. Because there are multiple machines my goal is to show the list of machines instead of showing only 1 machine.
My xsd file:
<xs:schema xmlns:xs="http://ift.tt/tphNwY"
xmlns:tns="http://ift.tt/1JUARQF"
targetNamespace="http://ift.tt/1JUARQF"
elementFormDefault="qualified">
<xs:element name="getDevicesRequest">
<xs:complexType>
<!-- This one isn't used -->
</xs:complexType>
</xs:element>
<xs:element name="getDevicesResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="machine" type="tns:machine" />
</xs:sequence>
</xs:complexType>
</xs:element> -->
<xs:complexType name="machine">
<xs:sequence>
<xs:element name="hostname" type="xs:string" />
<xs:element name="primaryip" type="xs:string" />
</xs:sequence>
</xs:complexType>
When i test this using soapUI i get the following output: http://ift.tt/1AgM1Eh
but i want it to show the hostname and ip for each machine in a list. I found the following list example but this only seems to work with simple types like int or string and not for a custom types like my machine type.
No comments:
Post a Comment