JAX-WS return empty lists

后端 未结 2 1123
情深已故
情深已故 2021-01-23 04:32

I\'m new in web services. I have faced some problem. At the server side i\'m using spring-ws. At the client side i\'m using jax-ws. With wsimport tool i have generated java clas

相关标签:
2条回答
  • 2021-01-23 05:02

    I just answered a similar question in How can I handle Castor unmarshaling of SOAP messages when the namespace is defined inside the operation tag? - if you're using Spring-WS, you're writing contract-first web services, so make sure you really nail that contract down. Put all your elements in a namespace, make sure your XSD schema expects elements to be qualified, and declare ns-uri and ns-prefixes in your Castor mappings. It's worth the effort.

    0 讨论(0)
  • 2021-01-23 05:15

    Seems it's just an invalid body of response, that does not math wsdl shema. Neither spring-ws neither jax-ws throws exception. It simply parse invalid data to empty list without any warrnings.

    org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor saved my day

    probably i have to tweak logging for jax-ws to avoid it next time

    0 讨论(0)
提交回复
热议问题