2 Replies Latest reply on Sep 11, 2007 2:34 AM by Jacob Boje

    How to make a web service with XML input?

    Jacob Boje Newbie

      I'll like to create some web services on JBoss 4.2 which accepts a XML document/node as input for the web method. Is it possible and can anyone describe how to do it?

      One way of doing could be to create a web method which just accept a string like


      @Stateless
      public class MyWS {

      @WebMethod()
      public void acceptXml(String xml) throws WSException{
      ...
      }


      This approach required that the method converts the String to a XML Node and then do some validation against a XSD. But, is it possible to pass a XML strukture to the method instead, like:


      @WebMethod()
      public void acceptXml(Node xml) throws WSException{
      ...
      }