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

SOAP Header generation problem

  • 1.  SOAP Header generation problem

    Posted Fri April 04, 2008 01:13 PM

    I have a SAP soap service available and I’m expected to generate a SOAP request message that exactly resembles the following -

    <s:Envelope xmlns:s=“http://schemas.xmlsoap.org/soap/envelope/”>
    <s:Header>
    https://www.customername.com/qa-SAPCustomerService
    GetCustomerInfo
    </s:Header>
    <s:Body>

    PHILADELPHIA 2

    PHILADELPHIA
    PA

    US

    </s:Body>
    </s:Envelope>

    The url mentioned above in the header is
    [URL=“https://www.customername.com/qa-SAPCustomerService”]https://www.customername.com/qa-SAPCustomerService[/URL]

    When i open the above URL in a browser,
    i get an instruction on how to invoke upon this service

    =============================================================

    To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:

    svcutil.exe [URL=“http://vm-etsweb9.ecommerce.enterasys.com:8080/Enterasys.Services.SAP.Host/SAPCustomerService.svc?wsdl”]http://vm-etsweb9.ecommerce.customername.com:8080/Customername.Services.SAP.Host/SAPCustomerService.svc?wsdl[/URL]

    ======================================================

    I’m not having access to the wsdl as the URL is not returning me any WSDL back. I was told that if i generate the SOAP message as per the example provided above, i should be able to get a good response back.

    I’m trying to use soapHTTP service of webMethods to accomplish this task. When i’m trying to add the header info using addHeaderEntry service, i’m sending in the following header data -

    <?xml version="1.0" encoding="UTF-8"?>

    https://www.customername.com/qa-SAPCustomerService
    GetCustomerInfo
    I’m suppling the following body data to the addBodyEntry service -

    <?xml version="1.0" encoding="UTF-8"?> PHILADELPHIA 2 PHILADELPHIA PA US

    The resulting soapData that’s being passed to the soapHTTP call is as follows -
    [FONT=verdana,geneva,lucida,‘lucida grande’,arial,helvetica,sans-serif]

    <?xml version="1.0" encoding="UTF-8"?>

    <SOAP-ENV:Envelope xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:SOAP-ENC=“http://schemas.xmlsoap.org/soap/encoding/” xmlns:xsd=“http://www.w3.org/2001/XMLSchema” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>[/font]

    <SOAP-ENV:Header xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/”>
    https://www.customername.com/qa-SAPCustomerService
    GetCustomerInfo
    </SOAP-ENV:Header>

    SOAP-ENV:Body

    PHILADELPHIA 2

    PHILADELPHIA
    PA

    US

    </SOAP-ENV:Body>

    </SOAP-ENV:Envelope>

    As we can see above additional xmlns:SOAP-ENV tag is getting added to the

    element in the header and the soap service is not liking it. Its throwing a soapStatus = 2
    status=400, statusMessage=BadRequest

    [FONT=verdana,geneva,lucida,‘lucida grande’,arial,helvetica,sans-serif]Can someone throw some light on what’s going wrong here?

    - Jayadev.
    [/font]


    #soa
    #webMethods
    #API-Management


  • 2.  RE: SOAP Header generation problem

    Posted Tue December 29, 2009 06:58 AM

    It is behaving the way it is supposed to. That is the format of the SOAP message which has the header.

    I am not sure what is the problem here?


    #soa
    #webMethods
    #API-Management