File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes references and axis code generation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "references and axis code generation" Watch "references and axis code generation" New topic

references and axis code generation

Jan Vandernoot

Joined: Mar 05, 2002
Posts: 6
Hi all,

I'm trying to build a web service that has a complex XML document as input. In that XML document I have some elements referencing each other, something like this for example:

I defined these references in my WSDL file using key and keyref elements. I would have loved it if axis would now use this to generate a Thing reference in my OtherThing class, like this:

But unfortunately this isn't happening Axis is just generating the simple fields and I have to resolve the reference myself. I'm wondering now: is this really not possible in Axis at the moment, or is there a chance I'm doing it wrong? Anybody have a clue about this?

Many thanks,
[ May 03, 2005: Message edited by: Jan Vandernoot ]
Jan Vandernoot

Joined: Mar 05, 2002
Posts: 6
I've been doing some research and this is what I've come up with:
  • when using an 'encoded' SOAP binding you can use ID and HREF, which seems to be supported by Axis (the HREF seems to be important when working with attachments in SOAP)
  • 'encoded' automatically means RPC/encoded as document/encoded is not supported by the JAX-RPC specification and generally not well understood
  • documented/literal seems to be the recommended SOAP binding, as it has the most support
  • this means I can't use ID/HREF and should resolve references myself

  • Comments anyone?

    I agree. Here's the link:
    subject: references and axis code generation
    It's not a secret anymore!