Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JAX-RPC and JAX-WS  RSS feed

 
Charles McGuire
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am about to be thrown under the bus.

My boss told me we have to begin exchanging XML files with a strategic trading partner ASAP. The trading partner has an RPC server, and I need to code a client to communicate with it.

All my experience with sending files has been with automated FTP scripts. I know *nothing* about JAX-RPC or web services. So I grab my reference books and begin Googling key phrases to bone up on this stuff.

One of the first hits I get while Googling is a page from Sun that says "JAX-WS is designed to take the place of JAX-RPC in web services."

Should I ignore JAX-RPC and focus on JAX-WS to communicate with their RPC server? Or must I continue to focus on JAX-RPC client development?

Finally, any good web sites that can explain JAX-RPC (or whatever I need) in language a 2nd grader can understand?
 
M Easter
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Disclaimer: I don't know the answer.

Here is a quote from a major player in JAX-WS:

"JAX-RPC clients can access JAX-WS endpoints and JAX-WS clients
can access JAX-RPC endpoints. However, since JAX-RPC defaults to
rpc/encoded and JAX-WS does not support this mode since document/literal
is specified by BP 1.1, JAX-WS clients may not be able to easily access
JAX-RPC rpc/encoded endpoints."

from

http://weblogs.java.net/blog/kohlert/archive/2005/05/jaxrpc_20_renam.html#comments

This implies to me that we need more info about the partner's protocol: they do JAX-RPC but do they use "rpc/encoded" or "doc/literal". The good news is that it may well be the latter, as it is considered a "best practice".

I have written an article on a small section of JAX-WS. I don't think the article will help per se but there are references at the end, which are prime stuff. Several of the JAX-WS blogs and also a website for an SOA book (here http://soabook.com/ ). The author was a guest on JavaRanch and is very sharp, as are many Java Ranchers.

The article is here http://ociweb.com/jnb There is an article on SOAP and WS dating to Aug 2001 (same website) but that is pretty dated. For a quick upload, it may be best to read the links mentioned above and hit Wikipedia.

Not to freak you out, but you may want to manage expectations with your manager: implementing web services with a partner is not just a quick "exchanging of XML files".

[ June 13, 2007: Message edited by: M Easter ]
[ June 13, 2007: Message edited by: M Easter ]
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Charles McGuire:
Should I ignore JAX-RPC and focus on JAX-WS to communicate with their RPC server? Or must I continue to focus on JAX-RPC client development?

Depends on your platform. JAX-RPC is part of any J2EE 1.4 compliant application server. For JAX-WS you either need Java 6 SE or Java 5 EE.

Finally, any good web sites that can explain JAX-RPC (or whatever I need) in language a 2nd grader can understand?


Not any that I am aware of. Have a look at the Web Services FAQ. In the past Creating Web Services with Apache Axis has been recommended as a good tutorial to get started with web services - however it uses Axis 1.x. There doesn't seem to be an equivalent tutorial with Axis 2 yet.

Ironically the fact that you are dealing XML documents may actually make things a bit more difficult as some of these tools are bend on turning that XML into objects of some description. However there are some pointers here if you are using JAX-RPC.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to state the (maybe) obvious, but when you say that the partner has an "RPC server", you do mean some kind of WS server, right? Because there is an old protocol called "RPC", which has nothing to do with WS at all.
 
Charles McGuire
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi OP here. First, thanks for all the posts so far.

Here is some of what the specifications say. I don't know if this clarifies the issue:


XML-RPC is an industry standard method for allowing servers to communicate with one another....
To initiate the data upload, you will send and XML package containing the Shipment Data to our XML RPC Server....
The upload will be executed over HTTP or HTTPS using XML as the data format...


From the posts placed here so far, it seems that I should focus on JAX-RPC to do this. If I knew anything about WS or RPC, I wouldn't be asking such bone-headed questions. Thanks again to everyone for your help so far.
 
M Easter
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think Ulf nailed it with the clarification...

Here is a Wikipedia link

http://en.wikipedia.org/wiki/Xml-rpc

My _theory_ is this:

I believe that XML-RPC is a precursor to JAX-RPC. i.e. It does not use SOAP, WSDL, or other "WS" constructs. From the Wikipedia article, it seems like it is much simpler.

My guess is that you won't want JAX-WS and probably not even JAX-RPC, but rather the old XML-RPC. The good news is that you may in fact just be transferring XML files after all: over HTTP.

I don't know the relationship between your firm and the partner, but I wonder if you can talk to someone technical on their side to get a foothold on this...
 
Charles McGuire
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. I feel so much smarter than I did just 24 hours ago. I have a introduction teleconference call with the company within the hour.

Clicking around the Wikipedia links, I found this: http://xmlrpc.sourceforge.net/

I hope it is simple enough. This is new ground for me...
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The XML-RPC home page is XML-RPC.com

Elliotte Rusty Harold's book Processing XML with Java (amazon US) has some good introductory material on XML-RPC:

XML-RPC
A DOM based XML-RPC servlet
A Simple XML-RPC Client
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!