Gen EDGE

 View Only
Expand all | Collapse all

CA Gen & SOAP with attachments

  • 1.  CA Gen & SOAP with attachments

    Posted Dec 26, 2019 11:23 AM
    Can CA Gen supports calling a SOAP web service with attachments?


  • 2.  RE: CA Gen & SOAP with attachments
    Best Answer

    Broadcom Employee
    Posted Dec 26, 2019 01:49 PM
    Hi Saeed,
    No, CA Gen does not support calling a SOAP web service with attachment using call external statement, though you could use blob to send/receive binary data.

    Regards,
    Amit D


  • 3.  RE: CA Gen & SOAP with attachments

    Posted Dec 26, 2019 02:38 PM
    Thanks Amit.

    So in this case, what's the best practice to do that; i mean to receive a person's image and display it in CA Gen java web application?


  • 4.  RE: CA Gen & SOAP with attachments

    Broadcom Employee
    Posted Dec 26, 2019 04:57 PM
    Hi Saeed,
    Are you constrained by having to pull this data from the 3rd party external source or can that 3rd party push the data to your Gen application?
    If a push is feasible you can create an EJB Web Service for your Gen Java server with in import BLOB view & then provide access to that Web Service to the 3rd party.

    Regards,

    Lynn

    ------------------------------
    Lynn Williams
    Senior Principal Support Engineer
    Broadcom
    Australia
    ------------------------------



  • 5.  RE: CA Gen & SOAP with attachments

    Posted Dec 26, 2019 05:49 PM
    Thanks Lynn,

    Please check out the diagram, is that what you meant? Please confirm?



  • 6.  RE: CA Gen & SOAP with attachments

    Broadcom Employee
    Posted Dec 26, 2019 06:22 PM

    Hi Saeed,
    In effect yes - in that diagram you have the 3rd Party application providing the input data by calling the Gen server EJB Web Service.
    I would assume that prior to Step 1, your Gen client would initially call the Gen server to check if data is already there for the Person_Number (Step 0) and if not present then go to the 3rd Party application (Step 1/2) which will then send the data to the Gen server (Step 3/4).
    For Step 5 (after some delay to allow EJB to receive the 3rd Party data) your Gen client would then need to call the Gen server again (repeat Step 0) to get the new data.

    Regards,

    Lynn



    ------------------------------
    Lynn Williams
    Senior Principal Support Engineer
    Broadcom
    Australia
    ------------------------------



  • 7.  RE: CA Gen & SOAP with attachments

    Broadcom Employee
    Posted Dec 26, 2019 06:33 PM
    @AMIT KUMAR DWIVEDI might also have additional suggestions​

    ------------------------------
    Lynn Williams
    Senior Principal Support Engineer
    Broadcom
    Australia
    ------------------------------



  • 8.  RE: CA Gen & SOAP with attachments

    Posted Dec 26, 2019 06:41 PM
    Thank you Lynn, will try and see how things can go.


  • 9.  RE: CA Gen & SOAP with attachments

    Posted Dec 28, 2019 12:37 PM
    Edited by Saeed Almutairi Dec 29, 2019 11:59 AM
    @Lynn Williams To keep that approach makes sense, I'm wondering if CA Gen supports creating a SOAP with attachments web service to let the 3rd party consumer to push the image then Gen can receive it ​​​​in BLOB attribute?

    If not, then the 3rd party may encode the image to Base64 string and send it to Gen SOAP web service; but here I should assume that Gen has the capability to decode the Base64 string to image. Is that possible? or we need to write inline code in Java?



  • 10.  RE: CA Gen & SOAP with attachments

    Broadcom Employee
    Posted Dec 29, 2019 05:40 PM

    Hi @Saeed Almutairi,
    1. There is no support for creating an EJB SOAP Web Service with attachments. I justed checked what the generated wsdl would look like for an EJB with import view containing a BLOB attribute. The BLOB data type is base64Binary per below extract, so the 3rd party would just need to send the binary data and the EJB would then store it in the database as a BLOB:
    ===
    <xs:complexType name="S1Import">
    <xs:sequence>
    <xs:element minOccurs="0" name="InE1">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="Blob1" type="xs:base64Binary"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    ...
    </xs:complexType>​
    ===

    2. To display the BLOB data as an image on the Java client will probably require online code/EAB. This tutorial section for the egolf model "Using BLOB in Applications" covers reading the BLOB data from server, then using an EAB to write it to a file and finally using an OCX control "Chestysoft csXImage" to display it as an image:
    https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-mainframe-software/devops/ca-gen/8-6/tutorial/using-blob-in-applications.html
    As stated there are some limitations using OLE/OCX controls with Web Generation Java clients but that method may still be valid
    https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-mainframe-software/devops/ca-gen/8-6/distributed-processing/working-with-web-generation/unsupported-features-in-web-generation.html
    Other community users might also have experiences they can share on displaying BLOB data as images in Gen Web Generation Java clients.

    I hope that information helps.

    Regards,

    Lynn



    ------------------------------
    Lynn Williams
    Senior Principal Support Engineer
    Broadcom
    Australia
    ------------------------------



  • 11.  RE: CA Gen & SOAP with attachments

    Posted Dec 30, 2019 01:00 AM

    Thanks Lynn.

    Things are now clearer for me. But again, if Gen can receive a Base64Binary (BLOB) then I believe I could ask the 3rd party to provide a SOAP web service and I can consume it to receive the image as Base64Binary format in an import view defined as BLOB in Gen client? Is that applicable?




  • 12.  RE: CA Gen & SOAP with attachments

    Broadcom Employee
    Posted Dec 30, 2019 01:17 AM

    Hi @Saeed Almutairi,
    Yes if the 3rd party can provide a similar style of web service where BLOB data is available as ​Base64Binary (instead of via file attachment), then per @AMIT KUMAR DWIVEDI 's initial reply the Gen CALL EXTERNAL function could then be used to access it. In that case you can revert to your original plan to pull the 3rd party data from the Gen client application, which is probably simpler in terms of controlling the overall processing sequence because it is all under the control of the Gen client.

    Regards,

    Lynn



    ------------------------------
    Lynn Williams
    Senior Principal Support Engineer
    Broadcom
    Australia
    ------------------------------



  • 13.  RE: CA Gen & SOAP with attachments

    Broadcom Employee
    Posted Dec 30, 2019 01:23 AM
    ... just to be clear you can use CALL EXTERNAL on either Java client or Java server but my main point was that with the pull approach you can be using the Gen client to control the overall processing sequence.

    ------------------------------
    Lynn Williams
    Senior Principal Support Engineer
    Broadcom
    Australia
    ------------------------------



  • 14.  RE: CA Gen & SOAP with attachments

    Posted Dec 30, 2019 02:17 AM
    Thanks Lynn, I got what you mean.