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.  http Headers in SOAP calls

    Posted Sun August 03, 2008 08:39 PM

    Is there a way to edit/pass variables in httpHeaders through pub.client.soapClient?
    I need to pass two variables in the http header. Is there any other way to accomplish this.

    The WSD generated from the WSDL consumed uses a pub.client.soapClient but I dont see any option to add http Headers in it.

    I am using WM7.1.1 and consuming a webservice.

    Thanks in advance,
    Ravi


    #webMethods
    #soa
    #API-Management


  • 2.  RE: http Headers in SOAP calls

    Posted Mon August 04, 2008 03:51 PM

    Ravi, I am not sure what do you mean by soapClient service.
    But you can pass HTTP headers through pub.client.soapHTTP service.

    While invoking soapHTTP service, add a document named “header” in the Pipeline In and append name-value pairs for the variables you want to pass in that document. The soapHTTP service will recognize it as HTTP header and pass it as header information.

    Hope this helps. It worked for me. Let us know if it works for you.


    #API-Management
    #soa
    #webMethods


  • 3.  RE: http Headers in SOAP calls

    Posted Mon August 04, 2008 10:13 PM

    It seems like WM 7.1.1 uses pub.client.soapClient service ( as an equivalant for the combination of createSoapData and soapHTTP in WM 6.1 )

    As you suggested I tried in WM 6.1 which has the soapHTTP service call. Once I create a document named ‘header’ with two string variables where do I need to link the document to in the ServiceInput?
    I also tried creating the ‘header’ document with variables and hardcode them in ‘Servie In’ of soapHTTP but no luck.

    So could you please explain me in detail what you have done and on what version.

    Is there a way I can see the populated HTTP header infomation in WM?


    #soa
    #webMethods
    #API-Management


  • 4.  RE: http Headers in SOAP calls

    Posted Mon August 04, 2008 10:23 PM

    No need to map header document to anything. Populate it and keep in the pipeline. soapHTTP service will recognize it. You can use tools like tcpTrace/tcpMonitor to see the header information.

    It should work.


    #webMethods
    #soa
    #API-Management


  • 5.  RE: http Headers in SOAP calls

    Posted Tue August 05, 2008 02:13 AM

    Hi dhimate,
    I tried this.
    Before the call to pub.client.soapHTTP
    Placed a Map step
    In the output of the map step Created a document named ‘header’ with 2 string variables(username, password) in it and hardcoded the values.

    The next step is pub.client.soapHTTP

    After invoking the soapHTTP when I check the variables in the Results
    I dont see the variables I pass in the header.
    There are several other variables showing up ike

    header
    Lines
    Date
    Server…
    Status
    Status Message

    I dont see the variables(username, password) that I passed in.
    Please help


    #webMethods
    #API-Management
    #soa


  • 6.  RE: http Headers in SOAP calls

    Posted Tue August 05, 2008 03:20 PM

    Ravi,
    My bad. The document name should be “headers” and not “header”. Just add the document with the subfields as username and password. Don’t map it to anything. It will appear in the HTTP header. See the attachment for reference.
    Header.zip (69.2 KB)


    #webMethods
    #API-Management
    #soa


  • 7.  RE: http Headers in SOAP calls

    Posted Tue August 05, 2008 06:02 PM

    Thanks dhimate!!!
    It worked in 6.1 but not working in 7.1 with pub.client:soapClient. I will research on it.

    How did you know that there is such an input called ‘headers’ which soapHTTP recognizes ??? Will it be in the documentation somewhere?
    Let me know, so that It helps me research on pub.client.soapClient

    Once again thanks a lot!!!
    Ravi


    #soa
    #API-Management
    #webMethods


  • 8.  RE: http Headers in SOAP calls

    Posted Tue August 05, 2008 06:10 PM

    Someone told me about this. I haven’t seen anything like this in documentation. Great it helped.


    #webMethods
    #soa
    #API-Management