Guest User

Untitled

a guest
Jan 23rd, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.59 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:sch="http://fer2.klab/notify" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://fer2.klab/notify" targetNamespace="http://fer2.klab/notify">
  2. <wsdl:types>
  3. <xs:schema xmlns:er="http://fer2.klab/notify" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://fer2.klab/notify">
  4. <xs:element name="ServiceRequest">
  5. <xs:complexType>
  6. <xs:sequence>
  7. <xs:element maxOccurs="1" minOccurs="1" name="HL7message" type="xs:string"/>
  8. </xs:sequence>
  9. </xs:complexType>
  10. </xs:element>
  11. <xs:element name="ServiceResponse">
  12. <xs:complexType>
  13. <xs:sequence>
  14. <xs:element maxOccurs="1" minOccurs="1" name="response" type="xs:string"/>
  15. </xs:sequence>
  16. </xs:complexType>
  17. </xs:element>
  18. </xs:schema>
  19. </wsdl:types>
  20. <wsdl:message name="ServiceResponse">
  21. <wsdl:part element="tns:ServiceResponse" name="ServiceResponse">
  22. </wsdl:part>
  23. </wsdl:message>
  24. <wsdl:message name="ServiceRequest">
  25. <wsdl:part element="tns:ServiceRequest" name="ServiceRequest">
  26. </wsdl:part>
  27. </wsdl:message>
  28. <wsdl:portType name="NotifyPort">
  29. <wsdl:operation name="Service">
  30. <wsdl:input message="tns:ServiceRequest" name="ServiceRequest">
  31. </wsdl:input>
  32. <wsdl:output message="tns:ServiceResponse" name="ServiceResponse">
  33. </wsdl:output>
  34. </wsdl:operation>
  35. </wsdl:portType>
  36. <wsdl:binding name="NotifyPortSoap11" type="tns:NotifyPort">
  37. <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
  38. <wsdl:operation name="Service">
  39. <soap:operation soapAction=""/>
  40. <wsdl:input name="ServiceRequest">
  41. <soap:body use="literal"/>
  42. </wsdl:input>
  43. <wsdl:output name="ServiceResponse">
  44. <soap:body use="literal"/>
  45. </wsdl:output>
  46. </wsdl:operation>
  47. </wsdl:binding>
  48. <wsdl:service name="NotifyPortService">
  49. <wsdl:port binding="tns:NotifyPortSoap11" name="NotifyPortSoap11">
  50. <soap:address location="http://192.168.1.101:8080/fer2-0.0.1/ws"/>
  51. </wsdl:port>
  52. </wsdl:service>
  53. </wsdl:definitions>
  54.  
  55. @Endpoint
  56. public class NotifyEndPoint {
  57.  
  58. private static final String NAMESPACE_URL = "http://fer2.klab/notify";
  59.  
  60. @Autowired
  61. MainController mainController;
  62.  
  63. @PayloadRoot(namespace = NAMESPACE_URL, localPart = "ServiceRequest")
  64. @ResponsePayload
  65. public ServiceResponse send(@RequestPayload ServiceRequest hlMessage){
  66. System.out.println("notify method");
  67. Object resp = mainController.notify(null, "", hlMessage.getHL7Message());
  68. ServiceResponse sr = new ServiceResponse();
  69. if (resp != null){
  70. sr.setResponse(resp.toString());
  71. }
  72. else{
  73. sr.setResponse("null");
  74. }
  75.  
  76. return sr;
  77. }
  78. }
  79.  
  80. <sws:annotation-driven />
  81.  
  82. <bean id="notify" name="notify" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
  83. <!--<property name="createSoap12Binding" value="true" />-->
  84. <property name="portTypeName" value="NotifyPort" />
  85. <property name="locationUri" value="/ws" />
  86. <property name="schema">
  87. <bean class="org.springframework.xml.xsd.SimpleXsdSchema">
  88. <property name="xsd" value="notify.xsd" />
  89. </bean>
  90. </property>
  91. <property name="targetNamespace" value="http://fer2.klab/notify" />
  92. <property name="soapActions">
  93. <props>
  94. <prop key="http://fer2.klab/notify/ws/ServiceRequest">ServiceRequest</prop>
  95. </props>
  96. </property>
  97. </bean>
  98.  
  99. <bean class="klab.backend.utils.MainConfig" id="mainConfig">
  100. <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE"/>
  101. <property name="locations">
  102. <list>
  103. <value>/WEB-INF/main.properties</value>
  104. <value>/WEB-INF/build.properties</value>
  105. </list>
  106. </property>
  107. </bean>
  108.  
  109. <mvc:annotation-driven>
  110. <mvc:message-converters>
  111. <bean class="org.springframework.http.converter.StringHttpMessageConverter">
  112. <property name="writeAcceptCharset" value="true"/>
  113. </bean>
  114. <bean class="klab.backend.utils.json.JacksonView2HttpMessageConverter">
  115.  
  116. <property name="objectMapper">
  117. <bean class="klab.backend.utils.json.KJsonMapper">
  118. </bean>
  119. </property>
  120. </bean>
  121. </mvc:message-converters>
  122. </mvc:annotation-driven>
  123.  
  124. <context:component-scan base-package="klab.fer2"/>
  125.  
  126. <bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/>
  127.  
  128. <bean class="org.springframework.validation.beanvalidation.MethodValidationPostProcessor">
  129. <property name="validator" ref="validator"/>
  130. </bean>
  131.  
  132. <bean class="klab.backend.controller.base.DefaultController"/>
  133.  
  134. <bean name="CorsFilter" class="klab.backend.filter.CorsFilter"/>
  135.  
  136. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:not="http://fer2.klab/notify">
  137. <soapenv:Header/>
  138. <soapenv:Body>
  139. <not:ServiceRequest>
  140. <not:HL7message>hdfghdfghdfgh</not:HL7message>
  141. </not:ServiceRequest>
  142. </soapenv:Body>
  143. </soapenv:Envelope>
  144.  
  145. org.springframework.ws.server.EndpointNotFound- No endpoint mapping found for [SaajSoapMessage {http://fer2.klab/notify}ServiceRequest]
  146.  
  147. <context:component-scan base-package="пакет.где.лежит.ендпоинт"/>
  148.  
  149. <sws:annotation-driven/>
  150.  
  151. <soap:operation soapAction=""/>
Add Comment
Please, Sign In to add comment