Win a copy of liveProject: Build an ML Recommender System this week in the Artificial Intelligence and Machine Learning forum!

Jan Vandernoot

Greenhorn
+ Follow
since Mar 05, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jan Vandernoot

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?

    Regards,
    Jan
    16 years ago
    Hello,

    You don't do joins in Hibernate, Hibernate does it for you. You should read the Hibernate reference manual (http://www.hibernate.org/hib_docs/v3/reference/en/html/), it explains everything you need to know...

    Regards,
    Jan
    With Apache Axis (http://ws.apache.org/axis/) you can generate Java classes that do the SOAP call for you. You can then just call the methods from the web service using these generated classes. Check out the user's guide on the site for more info and examples!

    Regards,
    Jan
    16 years ago
    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,
    Jan
    [ May 03, 2005: Message edited by: Jan Vandernoot ]
    16 years ago
    Alright, I got it working... Mentioning the inverse attribute made me look that up in the manual again and there it was:

    Changes made only to the inverse end of the association are not persisted (...) The non-inverse side is used to save the in-memory representation to the database.



    So it the cascade was actually working just fine, the problen was with the bidirectional association! I actually had the inverse attribute set correctly (see my mapping above), but I was trying to save on the inverse side and it needs to be the other way around.

    For completeness, here's the working code (the difference is in the last line!):



    Thanks!
    hi all,

    i'm just starting to work with hibernate and i have this situation i don't really understand. maybe someone can explain?

    i have a product object that has a parent which is again a product. hibernate mapping looks something like this:



    then in my code i load a product, set a new parent and try to save:



    but i get an exception:
    JDBCExceptionReporter - Duplicate key or integrity constraint violation message from server: "Cannot add or update a child row: a foreign key constraint fails"

    if i save the parent before i save the product, it works. however, i was expecting the cascade settings to take care of this somehow. why is this not the case? and how can i use these cascades correctly then?

    many thanks,
    jan

    [ January 05, 2005: Message edited by: Jan Vandernoot ]
    [ January 05, 2005: Message edited by: Jan Vandernoot ]