0

I am currently working on an web app which has web services allowing user to upload xml files to server. I am using JAX-WS to create web services. All examples I've seen describe uploading image files. Hence web service would contain a method like:

@WebMethod String uploadImage(Image data);

However, in case if I am uploading XML file what would be the type of arguments for that method?

@WebMethod String uploadXML(????? data);
Russell'sTeapot
  • 373
  • 2
  • 11
  • 21

1 Answers1

0

I found answer to my question!

@WebMethod
public int uploadXML(DataHandler xmlData)

javax.activation.DataHandler has method getInputStream which contains the XML file sent as attachment

Russell'sTeapot
  • 373
  • 2
  • 11
  • 21