• 1 reply
  • Latest Post - ‏2011-02-26T19:32:34Z by SystemAdmin
3 Posts

Pinned topic SCA call to SCA, Data Object not being received as expected

‏2011-02-26T04:45:56Z |
I have two SCA components which I will refer to as Component1 and Component2.
I'm doing a call Component2 using JUnit. Component2 does some processing with the info it receives through a DataObject and then creates a new DataObject. Then, it calls

Component1 sending the new created DataObject. And Component1 does more processing with this DataObject.

The problem is when I create the DataObject in Component2 we create it with specific types. Ex:

Name: xxxxRequest -Type: XxxxRequestObj -URI: xxxxxxxxxxx

Values inside the above DTO
xxxxRequest Name: param1 -Type: Header -URI: xxxxxxxxxxx
xxxxRequest Name: param2 -Type: Alpha -URI: xxxxxxxxxxx
xxxxRequest Name: param3 -Type: Alpha -URI: xxxxxxxxxxx
xxxxRequest Name: param4 -Type: Alpha -URI: xxxxxxxxxxx
xxxxRequest Name: param5 -Type: Alpha -URI: xxxxxxxxxxx
xxxxRequest Name: param6 -Type: Alpha -URI: xxxxxxxxxxx
xxxxRequest Name: param7 -Type: Alpha -URI: xxxxxxxxxxx

But when we read the info in Component1 we get this:

Name: xxxxRequest -Type: DataObject -URI: commonj.sdo

Values inside the above DTO:
xxxxRequest Name: param1 -Type: DataObject -URI: commonj.sdo
xxxxRequest Name: param2 -Type: Object -URI: commonj.sdo
xxxxRequest Name: param3 -Type: Object -URI: commonj.sdo
xxxxRequest Name: param4 -Type: Object -URI: commonj.sdo
xxxxRequest Name: param5 -Type: Object -URI: commonj.sdo
xxxxRequest Name: param6 -Type: Object -URI: commonj.sdo
xxxxRequest Name: param7 -Type: Object -URI: commonj.sdo

As you can see none of the original types remained. Instead they we're modified to DataObject or Object.

Also when I make the call to Component1 itself with JUnit we receive the DataObject correctly.
Updated on 2011-02-26T19:32:34Z at 2011-02-26T19:32:34Z by SystemAdmin
  • SystemAdmin
    126 Posts

    Re: SCA call to SCA, Data Object not being received as expected

    The problem seems to be that for some reason Component1 is not able to find schema definitions for the serialized XML payload passed to it by Component2. (As you can see SDO allows you to deserialize an XML element of unknown schema type, but the instance created will only be of the generic type {commonj.sdo}DataObject.)

    I imagine that Component2 and Component1 are defined in composites packaged within separate JARs. How are the schema definitions being made available to each? Are the corresponding WSDL(s) and/or XSD(s) packaged separately within each JAR? If not what packaging approach is being used.

    For reference, the InfoCenter article on using SDO in SCA in WAS is:

    Scott Kurz
    WebSphere SCA