• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

starting web service

 
Hendra Kurniawan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm quite new to web service, and I'd like to create a simple one. I'm given an XML file detailing the objects to send as parameter like so:


while I know typical SOAP request will need to have the POST header, envelope, header, body etc. So I'm wondering what to do with the given xml above? do I wrap the xml in the SOAP request, or upload the xml or what?
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could convert it to WSDL format, then build your server and client(s) around that.

If the clients cannot change the XML format, then you may have to wrap in CDATA,
and unmarshall yourself using jaxb or something.

It all depends on the restrictions enforced by your application infrastructure.


WP
 
Hendra Kurniawan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wish to make the client to be web based, should I do this with top down or bottom up approach? or it doesn't matter? both works just fine? I also wish to use apache axis2 or cxf. which is more recommended?
I created the service server using dynamic web project with bottom up approach (eclipse indigo and axis2). Right now, there's only one class (MyService.java) containing one public method:


1. how do I create the web-based client? do I make a separate project? if so, what's the type of the project? maven, javaEE, dynamic web?
2. also as I mentioned above, the soap request will contain the xml that will be most likely to later be parsed into a Java object. I assume that the POJO definition will be in the web service server project?
3. what's the naming convention for the classes and packages in web service project (both the server and client project)?
thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic