Topic
3 replies Latest Post - ‏2012-03-20T07:20:29Z by TrushkinAndrey
CDSR
CDSR
5 Posts
ACCEPTED ANSWER

Pinned topic How to handle different message types from out bound system in WESB7.0?

‏2012-03-17T00:20:29Z |
I am totally new to WESB and Java and I have to work on a integration using WESB7.0.

Requirement is: User will send list of part numbers to WESB. Once the request comes to WESB, we use Fan Out with iterative mode to loop through all part numbers and send request to out bound system. The out bound system either will replay PartDetails if it finds the part detail for requested part number or will replay PartError if it could not find the part detail for requested part number. And finally aggregate the responses of all part numbers and send the final response to user.

How could we define the interface for out bound system when they can send different message types for same request?

Please help us how could we resolve this. Any help would be greatly appreciated.

Thanks
Updated on 2012-03-20T07:20:29Z at 2012-03-20T07:20:29Z by TrushkinAndrey
  • TrushkinAndrey
    TrushkinAndrey
    111 Posts
    ACCEPTED ANSWER

    Re: How to handle different message types from out bound system in WESB7.0?

    ‏2012-03-19T06:23:24Z  in response to CDSR
    Hello, CDSR!

    If i correctly understand your situation, you can resolve your problem without any interfaces by using custom mediation primitive (or ServiceInvoke, may be). You invoke the external system service, the input parameter is the part of the original message. The result is string ("Success" or "Error", for example).

    Write, if my view on your problem is not correct.

    Good luck!
    • CDSR
      CDSR
      5 Posts
      ACCEPTED ANSWER

      Re: How to handle different message types from out bound system in WESB7.0?

      ‏2012-03-20T00:04:44Z  in response to TrushkinAndrey
      Thanks a lot and I appreciate your response.
      But the result is not just string. they are different business object. foe ex:

      If it finds part detail then it will return following business object:
      <ns0:PartDetail1 xmlns:ns0="http://ai.Schemas.PartDetail1">
      <PartNumber>123</PartNumber>
      <PartName>asd</PartName>
      <PartType>PartType_0</PartType>
      <PDMAuthority>PDMAuthority_0</PDMAuthority>
      <DingList>
      <Ding>
      <DingNbr>DingNbr_0</DingNbr>
      <DingSheet>DingSheet_0</DingSheet>
      </Ding>
      </DingList>
      <MaterialList>
      <Material> <MaterialClassCode>MaterialClassCode_0</MaterialClassCode>
      <Length>Length_0</Length>
      <Width>Width_0</Width>
      </Material>
      </MaterialList>
      <UsedOnAssemblyList>
      <UsedOnAssembly> <UsedOn_PartNumber>UsedOn_PartNumber_0</UsedOn_PartNumber>
      <Quantity>Quantity_0</Quantity>
      </UsedOnAssembly>
      </UsedOnAssemblyList>
      </ns0:PartDetail1>

      If it did not find, then it will return following error object:
      <ns0:PartError partNumber="partNumber_0" errorCode="errorCode_1" xmlns:ns0="http://ai.Schemas.PartError">
      <error-text>No Part Found</error-text>
      </ns0:PartError>

      Please help us how to handle if same end point(it is HTTP end point and not the web service end point) return different business object.
      • TrushkinAndrey
        TrushkinAndrey
        111 Posts
        ACCEPTED ANSWER

        Re: How to handle different message types from out bound system in WESB7.0?

        ‏2012-03-20T07:20:29Z  in response to CDSR
        Thanks for your answer!

        One of the possible results is:

        Business object (success or error) is the internal structure in your integration solution. You can send to and receive from external system XML string. And you can serialize it to and deserialize from business object. There is helpful class in SDO API: BOXMLSerializer. You can use it for such purposes.

        In this case you have one business object structure: some wrapper, may be in context and xml string in body. And you parse this string with SDO API classes