IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Binding webservice input list

    Posted Tue March 26, 2013 08:01 AM

    Hi,
    I have a portlet that visualize via webservice, called “getRequests”, the list of requests into a table. This table has the possibility to select some rows.
    I would like that the selected rows are the input of another webservice called “updateRequests”.
    The output structure of “getRequest” and the input structure of “updateRequest” are the same. Both have a list of element “Richiesta”.
    How can I bind the selected rows with the input of webservice “updateRequests”?

    Thanks,
    Bye

    Fabio


    #webMethods
    #MWS-CAF-Task-Engine
    #webMethods-BPMS


  • 2.  RE: Binding webservice input list

    Posted Tue March 26, 2013 06:36 PM

    Assuming you are using the SelectableistTableContentProvider as the content provider for your table, there is a java API (this also be used in a binding expression) that would give you a list of the row objects for the selected rows.

    See: [url]http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuites/wmsuite8-2_sp2/My_webMethods/8-2-SP1_CAF_and_MWS_Java_API_Reference/com/webmethods/caf/faces/data/object/SelectableListTableContentProvider.html#getSelectedRows()[/url]

    Though, depending on how you generated the two web services, you may have two copies of the class representing your “Richiesta” element generated in two different java packages. So the output of one service may not be directly mappable to the input of the second service. If that is the case you would need to write some java code to transfer he data from the objects used as output of the first webservice to new object that will work for the second webservice.

    Though, if you are using a recent release of Integration Server to host your web services, then you could put both of the services under a Web Service Descriptor (WSD) node. You create them in the Developer and organize multiple flow services under a single node. Then if you create a WS client to call services from WSD node it is going to create a single proxy class for each document type used by different services. Then mapping from output of one service as an input to another will be as simple as assignment of a whole document.


    #MWS-CAF-Task-Engine
    #webMethods-BPMS
    #webMethods


  • 3.  RE: Binding webservice input list

    Posted Wed March 27, 2013 10:11 AM

    Hi Eric,
    thanks to reply.

    I recreated the WSD with the two services (GetRequests and UpdateRequests) and imported it into portlet.
    I binded the input of UpdateRequests with the SelectedRows of ContentProvider “Richieste” (the array source is the output of GetRequests webservice)(see imageRequest.png) but when i call the UpdateRequest i have these errors (see Errors.png).

    Bye
    Fabio



    #MWS-CAF-Task-Engine
    #webMethods
    #webMethods-BPMS


  • 4.  RE: Binding webservice input list

    Posted Wed March 27, 2013 12:39 PM

    I think you may be binding at one level too deep.

    In the “Bindings” view the items under the List/Array node are transient items that represent the data available in each item in the List/Array. It’s a visual representation of what is the table control will have available while it is iterating through the list while rendering each row. I agree that it is a little confusing, and maybe we can do that better in the future.

    For example, the “Input Parameters > Update Requests > Richieste” should be bound directly to “Richieste > Selected Rows”.

    Note, if your input parameters expect an array of Richieste objects instead of a List of them, you may have to create a custom java getter method in your page bean java class to convert the list to an array. Then you can bind to your custom getter method for the input parameter instead.

    For example:

    public Richieste[] getSelectedRowsAsArray() {
    List selectedRows = [get_table_content_provder_here].getSelectedRows();
    return (Richieste[])selectedRows.toArray(new Richieste[selectedRows.size()]);
    }

    #webMethods-BPMS
    #webMethods
    #MWS-CAF-Task-Engine


  • 5.  RE: Binding webservice input list

    Posted Thu March 28, 2013 08:53 AM

    Hi Eric,
    I bound the data structure as you suggested me and I have no errors in the portlet when I invoke the “UpdateRequest” webservice but the flow service on Integration Server doesn’t work as I want.

    I tryed my flow service in Service Developement Perspective and it works fine. I put the debugLog activity in different point of flow service to understand step to step where is the problem. (see the Flowservice.png).
    When I select 2 rows of table and I call the webservice from portlet, I find only “approvazione” in Server.log

    I think that the data not arrives correctly from portlet to flow service.

    Thanks
    Bye


    #webMethods
    #MWS-CAF-Task-Engine
    #webMethods-BPMS


  • 6.  RE: Binding webservice input list

    Posted Tue April 02, 2013 05:27 AM

    Hi Eric,
    I solved. I made a mistake setting the scope of “GetRequests” web service and the content provider “Richieste”. I’d setted the scope as “request” instead of “session”.
    Now it works.
    Thanks a lot for your support.
    Bye
    Fabio


    #webMethods-BPMS
    #MWS-CAF-Task-Engine
    #webMethods


  • 7.  RE: Binding webservice input list

    Posted Sun March 22, 2015 08:59 AM

    I have a similar type of scenario.

    Have webservice with input as list,now I am trying to map value to ws input list value.But getting null pointer error.

    For ws input mapping I am using the below code

    getInsertFile().getParameters().getInsertFile()[0].setFileName(getFileItem().getName());

    Attached the below screen for ws Input set.

    Thanks
    wsInput Structure.PNG


    #webMethods-BPMS
    #webMethods
    #MWS-CAF-Task-Engine


  • 8.  RE: Binding webservice input list

    Posted Thu July 20, 2017 04:09 PM

    How to bind customer getter method as input… Please advise. I need it for my CAF page.


    #webMethods
    #webMethods-BPMS
    #MWS-CAF-Task-Engine