• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

web service that takes a JAXB class

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Forgive this question, but I'm very new to web services!

I've got an application that takes a xml document in a request parameter attribute of a HTTP post. This xml document validates to custom xsd I created and I currently use JAXB to unmarshall the xml so I can pull the data out and insert it into my database.

What I'd like to do instead is create a web service that receives the xml document in a soap message. Do I create a method that takes my JAXB generated class in the method signature and create the web service off of that method? How exactly do I create a web service that takes in custom xml? I also will want some authenticating data along with the xml like a username and password. Can someone point me in the right direction?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For authentication you can use either HTTP authentication or WS-Security (in the shape of WSS4J), links to both of which you'll find in the FAQ in my signature.

As to sending an XML document, you may want to look into the different WSDL styles, some of which allow you to send an XML document over SOAP as it is; there's a link to an introductory article in the FAQ as well.
 
Ranch Hand
Posts: 548
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
did you look at the Message Style Web Service support from AXIS ?
 
Robyn Haas
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, that helps! I also found this article last night that might get me going in the right direction: http://www-128.ibm.com/developerworks/webservices/library/ws-castor/ The article talks about integrating Castor and Axis and I'm hoping that I can use JAXB instead of the Castor. I'll also look into WSS4J.
reply
    Bookmark Topic Watch Topic
  • New Topic