Topic
  • 2 replies
  • Latest Post - ‏2012-03-24T10:56:25Z by athom
athom
athom
19 Posts

Pinned topic Issue with instantiation of Party when AddParty is invoked as a webservice

‏2012-03-15T04:45:54Z | mdm-migration
Hi,

I am trying to run OOTB AddParty as a webservice. I dont have any extensions on Party. But I am getting this error "org.xml.sax.SAXException: WSWS3279E: Error: Unable to create JavaBean of type com.ibm.wcc.party.service.to.Party. Missing default constructor? Error was: java.lang.InstantiationException: com.ibm.wcc.party.service.to.Party. Message being parsed" when i invoke AddParty webservice.

I am using 8.0.1.0 version of MDM Server. Dont understand why its trying to create an instance of Party when its an abstract class. What I would like it to do is instantiate Person when it encounters Party. I have specified the Person converter in my TCRM.properties file.
This is what I have in TCRM.properties file.

services.endpoints.message.converter.com.ibm.wcc.party.service.to.Party=com.ibm.wcc.party.service.to.convert.PersonBObjConverter

My workspace was built from the default distribution file of MDM. It doesnt have any custom code in it.

Does anyone have any idea what should be done to fix this error? Any help on this would be much appreciated.

Thanks
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: Issue with instantiation of Party when AddParty is invoked as a webservice

    ‏2012-03-19T16:01:26Z  
    Hi,

    I'm afraid you can't call the addParty web service with just a Party - it has to be a Person, or Organization. That's because Party is defined as abstract in the web service XSD.

    An instance of com.ibm.wcc.party.service.to.Party would have to be instantiated in order to call PersonBObjConverter - which is expecting an instance of com.ibm.wcc.party.service.to.Person. That isn't going to work for a number of reasons.

    So the solution is to call addParty with a Person if you want a Person.

    Hope that helps, Catherine
  • athom
    athom
    19 Posts

    Re: Issue with instantiation of Party when AddParty is invoked as a webservice

    ‏2012-03-24T10:56:25Z  
    Hi,

    I'm afraid you can't call the addParty web service with just a Party - it has to be a Person, or Organization. That's because Party is defined as abstract in the web service XSD.

    An instance of com.ibm.wcc.party.service.to.Party would have to be instantiated in order to call PersonBObjConverter - which is expecting an instance of com.ibm.wcc.party.service.to.Person. That isn't going to work for a number of reasons.

    So the solution is to call addParty with a Person if you want a Person.

    Hope that helps, Catherine
    Thanks Catherine. The issue was that the PartyAdaptor class that I had to marshall and unmarshall the request and response was ripping off the xml namespace and type from the input request. So the request was being sent just as party instead of mentioning that the request is party of type person. When I changed the marshaller, it worked.

    Thanks!
    Ansoo Thomas