[jboss-user] [JBossWS] - How to make a web service with XML input?

jaboj do-not-reply at jboss.com
Mon Sep 10 08:51:51 EDT 2007


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 
anonymous wrote : 
  | @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:

anonymous wrote : 
  | @WebMethod()	
  | public void acceptXml(Node xml) throws WSException{
  |   ...
  | }
  | 
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082588#4082588

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082588



More information about the jboss-user mailing list