What is the best way to send XML data to webservices jaxws

前端 未结 5 637
刺人心
刺人心 2021-01-20 04:09

What is the best way to send XML data to web services jax-ws?

One of the way I could make out is to convert xml into String from client side and send it as a String

相关标签:
5条回答
  • 2021-01-20 04:27

    Encode --> Escape/ Wrap with CDATA --> set value to a string --> pass as a parameter to webservice/remote method as defined in your wsdl.

    0 讨论(0)
  • 2021-01-20 04:32

    Why are using XML would be the first question.

    I would say take a look at the google protocol buffer, you will be able create a .proto file same as you create xsd and then you will be able to generate code from that proto file into different languages, the way you send over to the webservice is just takes the bytes array out of the google proto object and send it.

    0 讨论(0)
  • 2021-01-20 04:35

    I can understand the need to do so such XML request -response.. Though there could be varied views on this.. at times the need is defined by the application/package that we work on ..

    1 good article which i found on this http://java.dzone.com/articles/implementing-jax-ws-web

    Hope this helps

    Samant

    0 讨论(0)
  • 2021-01-20 04:36

    I use the serialized Java objects directly.

    0 讨论(0)
  • 2021-01-20 04:42

    Best way is to use framework that supports web-service standards. For Java try Apache CXF or Apache Axis 2.

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