Announcement Announcement Module
Collapse
No announcement yet.
Spring WS with JSON Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring WS with JSON

    Hi,

    I have developed a spring-ws with jaxb marshallar.
    But i'm trying to create the WebService client which accepts request and response using JSON object. Can anyone help me with this scenario. Any help would be greatly appreciated.

    Thanks!!

  • #2
    Hi,

    Could anybody help me with the problem. Please reply whatever ideas you have. Thanks!!

    Comment


    • #3
      How you did Spring WS with JAXB marsheller? For JSON, your webservice has to be modified to accept "application/json" type and the response body should be in "application/json" content-type. To convert the HTTP request/response Object from/to JSON, you need to use Jackson library.

      Reference:
      http://www.ibm.com/developerworks/we...ry/wa-restful/

      Comment


      • #4
        Sorry, My explanation was wrong. I have developed Spring-ws using Jaxb builder, buy creating the request and response classes using the Jaxb builder. I'm using @RequestPayload and @Response payload for sending and receiving the request and response values at the end point.

        Thank You for your suggestions!! I'll try to modify the websevice to accept "application/json".

        Comment


        • #5
          In general, Spring-WS is not meant for JSON services. Try using Spring MVC for that.

          Comment

          Working...
          X