Can a jax-ws web service use an rpc type call and receive raw xml?

折月煮酒 提交于 2020-01-06 08:37:09

问题


I have a web service that I've been working on and it's wokrring fine so far by creating a port in the client and then calling a method on the port. However, I've just been told that a couple of the clients who will be using the web service plan on sending it raw xml based based off of the schemas used by the web service and I was wondering if this was possible. I think I may need to use the provider interface to make the web service capable of handling this type of request but I'm not sure.

I've done a search of the questions here but none of them seemed to answer my question and what I find on the net after googling says that it's possible but they then proceed with examples that work the exact same way as what I already have.

Thanks in advance for any help you can provide.


回答1:


plan on sending it raw xml based based off of the schemas used by the web service

So you mean they plan on sending you XML messages based on the schema published in your web service's WSDL?

This is exactly what SOAP is and how SOAP/XML web services work.

Assuming the clients are sending your properly formed messages, these client's requests are identical to requests from any other client and you shouldn't have to do anything special for them.




回答2:


I think you want to send and receive XMLs across

here is 1 way

http://java.dzone.com/articles/implementing-jax-ws-web



来源:https://stackoverflow.com/questions/1955495/can-a-jax-ws-web-service-use-an-rpc-type-call-and-receive-raw-xml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!