Created a test web service like this tutorial here - http://spring-projects.ru/guides/producing-web-service/ . Generated wsdl, everything is OK.

Interested in such a thing - can I attach several folts to one operation? Now he is alone - getStudentFault.

students.xsd

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://concretepage.com/soap" targetNamespace="http://concretepage.com/soap" elementFormDefault="qualified"> <xs:element name="getStudentRequest"> <xs:complexType> <xs:sequence> <xs:element name="studentId" type="xs:int"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="getStudentResponse"> <xs:complexType> <xs:sequence> <xs:element name="student" type="tns:student"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="getStudentFault"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="StudentFault" nillable="true" type="tns:student"/> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="student"> <xs:sequence> <xs:element name="studentId" type="xs:int"/> <xs:element name="name" type="xs:string"/> <xs:element name="age" type="xs:int"/> <xs:element name="class" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:schema> 

StudentEndpoint

 @Endpoint public class StudentEndpoint { private static final String NAMESPACE_URI = "http://concretepage.com/soap"; @Autowired private StudentUtility studentUtility; @PayloadRoot(namespace = NAMESPACE_URI, localPart = "getStudentRequest") @ResponsePayload public GetStudentResponse getStudent(@RequestPayload GetStudentRequest request) { GetStudentResponse response = new GetStudentResponse(); response.setStudent(studentUtility.getStudent(request.getStudentId())); return response; } } 

It is necessary to make so that after generation of wsdl there were several folts in the operation.

    0