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
Expand all | Collapse all

Help needed on storedProcedure adapter server

  • 1.  Help needed on storedProcedure adapter server

    Posted Mon April 06, 2015 11:08 AM

    Hello All,

    I am having a stored Procedure with below syntax.

    Signature of StoredProcedure:

    CREATE PROCEDURE [aaa].[yyyyyyyyyyyyy] (
    @Nf INT,
    @XML_OUTPUT XML OUTPUT,
    @TLR INT OUTPUT,
    )

    what dataType should I select in webMethods adapter service under Parameter tab under ParamJDBCTYpe column if I wanted to go with storedProcedure style. And also as what data type should I select Under Output type column in output section.

    I don’t want to use storedProcedureWithSignature due to some reasons. Kindly help me to get the solution on this.

    Thanks,
    RP.


    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Help needed on storedProcedure adapter server

    Posted Tue April 07, 2015 09:43 AM

    Hi All,
    As I didn’t find any alternative, I converted XML to NVARCHAR in StoredProcedure, in SQL Server and specified it as OUPUT type. I am getting the results of StoredProcedure into wM. I am assigning the output of StoredProcedure to a variable of type String. When the storedProceudre is returning more than 43K characters, variable of String is unable to hold all the characters. Any suggestion or work around here.

    Thanks all for your time & help.

    Thanks,
    RP.


    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: Help needed on storedProcedure adapter server

    Posted Tue April 07, 2015 10:15 AM

    What is the need for SP here?

    Cant you handle the same in SELECT, INSERT, CUSTOM or DYNAMIC SQL template?


    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: Help needed on storedProcedure adapter server

    Posted Tue April 07, 2015 10:26 AM

    Thanks for your response Mahesh.

    I have some business Logic which I have to execute at db side, there are lot of benifits of using SP in my requirement. Let me know the solution for my problem.

    Thanks,
    RP.


    #Integration-Server-and-ESB
    #webMethods


  • 5.  RE: Help needed on storedProcedure adapter server

    Posted Tue April 07, 2015 02:11 PM

    Business logic/requirement? I will try to help you if I can.


    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: Help needed on storedProcedure adapter server

    Posted Tue April 07, 2015 02:12 PM

    Business logic/requirement? I will try to help you if I can.


    #Integration-Server-and-ESB
    #webMethods


  • 7.  RE: Help needed on storedProcedure adapter server

    Posted Tue April 07, 2015 02:34 PM

    Based on the input passed ( No of records ) have to connect to DB, join around 20 tables, selecting around 70 columns. And all these data to webMethods.

    Thanks,
    RP


    #Integration-Server-and-ESB
    #webMethods


  • 8.  RE: Help needed on storedProcedure adapter server

    Posted Wed April 08, 2015 09:09 AM

    Hi RP,

    You can achieve your requirement,If you follow the below steps.

    Step 1:
    A). Please try to change your output parameter from xml to NVARCHAR2(MAX) in your stored procedure.

     [b]ex: @xml_data  nvarchar(max) output[/b]
    

    B). Cast the xml data into NVARCHAR(MAX) from your query.

    Ex: SET @xml_data = (SELECT CAST(xml_data) as NVARCHAR(MAX) from <your_table>)

    Step2:
    As you mentioned in webMethods Adapter services,

    In Parameters Tab,Please select the paramJDBCType as LONGNVARCHAR for output type.
    In result Set Tab, Please choose JDBC Type as LONGNVARCHAR

    You can your service after that and will get you an expected result.

    Please let me know your response.


    #webMethods
    #Integration-Server-and-ESB


  • 9.  RE: Help needed on storedProcedure adapter server

    Posted Wed April 08, 2015 12:13 PM

    Yep this would do the trick with NVARCHAR unless both SP and AS to be changed.


    #Integration-Server-and-ESB
    #webMethods


  • 10.  RE: Help needed on storedProcedure adapter server

    Posted Wed April 08, 2015 03:53 PM

    Thanks Bhanu & RMG,

    I followed the same which resolved my issue.

    Thanks,
    RP.


    #Integration-Server-and-ESB
    #webMethods