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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
Expand all | Collapse all

find out HTTP response code in Service

  • 1.  find out HTTP response code in Service

    Posted 10/22/15 06:53 AM

    Hi
    I have a consumer and a provide SOAP web service created from Webservice descriptors in Designer . I am trying to get the HTTP response code whe this services are called.

    ARe there any built in services to use them for this purpose?
    Thanks


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: find out HTTP response code in Service

    Posted 10/22/15 07:35 AM

    Peter – Your question is quite not clear, you try to make use of pub.client:http

    Thanks,


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 3.  RE: find out HTTP response code in Service

    Posted 10/22/15 09:05 AM

    Hi, thanks

    In Webservice Descriptors generally , there are no calls for the pub.client.http. but for the pub.soap.client.
    I need a kind of feauture, which gives me the message context in whole which is in the IS runtime at the HTTP communication level (I think so ?)


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 4.  RE: find out HTTP response code in Service

    Posted 10/22/15 09:28 AM

    Hi Peter,

    did you introspect the response document being returned by the soap call?

    There should be a header document containing the http response.

    Regards,
    Holger


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: find out HTTP response code in Service

    Posted 10/22/15 09:37 AM

    hi Holger
    Let give an example and say, I will create a generic service which can be reused in any service. This feature should be added to any Flow (Web service Descriptor consumer, Provider) and provides the HTTP response details for this Web service.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 6.  RE: find out HTTP response code in Service

    Posted 10/22/15 09:49 AM

    Hi Peter,

    can you explain this a bit more in detail please.

    Additionally you can check for the pub.flow:getTransportInfo.

    Regards,
    Holger


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 7.  RE: find out HTTP response code in Service

    Posted 10/22/15 09:56 AM

    a-We have few Web services
    b-some of them works on fire and forget principal
    b-I need for these services provide a custom response
    So I can check the Http code returned to say what happened on the call
    d-and log this response in a DB


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 8.  RE: find out HTTP response code in Service

    Posted 10/22/15 04:12 PM

    when you use the WSDL file to generate the client code, the generated service under the connectors folder is actually doing the WS call. you can open connector service, edit it, the very last steps in the service, the header is dropped, you can remove the dropping step, so the http header will be kept when you call the service.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 9.  RE: find out HTTP response code in Service

    Posted 10/23/15 09:28 AM

    Hi, thank
    I wont to manipulate the generated codes, but have a service, add it to the flow (the flwo which calls the connector or the provider descriptor) providing header information.
    ?


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 10.  RE: find out HTTP response code in Service

    Posted 10/23/15 12:43 PM

    Hi,

    Why do you want to manipulate the generated header codes? while Tong says the header is dropped in the connector services …so you can remove the dropping step in order for http header will be kept when you call the service and downstream you can utilize it for your logging etc… is that make sense?

    HTH,
    RMG


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 11.  RE: find out HTTP response code in Service

    Posted 10/23/15 01:33 PM

    Hi Peter,

    your approach will only work with Consumer Services.

    But in this case you will still have to follow Tongs and RMGs suggestion otherwise the header data is not available outside of the generated connector service.

    For Provider Services they are invoked in reverse order:
    The generated provider service invokes your custom service.

    Regards,
    Holger


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 12.  RE: find out HTTP response code in Service

    Posted 10/26/15 04:35 AM

    Hi
    Meantime I have some progress by using the consumer and using getTransportInfo
    But I have another issue regarding using http POST method in pub.client.http
    In successful cases there is no a status code / string in the response

    ??


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 13.  RE: find out HTTP response code in Service

    Posted 10/26/15 09:58 AM

    Hi Peter,

    there are 2 types of Status-values:

    • Soap-Status
    • Http-Status

    If Soap-Status is 0, then Http-Status is 200, meaning complete success.
    If Soap-Status is 1, then Http-Status is 200, meaning transport success, but Soap-Fault.
    If Soap-Status is 2, then Http-Status has a meaningful value for Http-Transport error.

    The http-information can be found under the header-structure of the reponse.

    Regards,
    Holger


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 14.  RE: find out HTTP response code in Service

    Posted 10/28/15 07:29 AM

    Thanks guys,
    I got the idea how to create the helper service
    BestRg


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services