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

webservice consumer - SOAP Request name space position to root

  • 1.  webservice consumer - SOAP Request name space position to root

    Posted Fri September 07, 2018 04:33 AM

    Hi,

    Product webMethods Integration Server
    Version 9.10.0.0
    Updates IS_9.10_Core_Fix11

    Issue: In the webservice consumer, when we invokes the connector, the soap request sent by IS contains name space declaration at each wsdl complex types. This results in creating a SOAP request with higher payload size.

    Can we make the namespace declaration at root element rather than declaring at individual element complex types? This is controlled by the IS and not sure any config could be made for this to modify
    I got a reference from empower which talk about the SOAP response namespace setting. But I would like to see if we can do such config for SOAP request sent by IS.

    I have set the property as watt.server.SOAP.setNamespaceURIsToRoot=true, but this is not making any difference on the ws soap request sent by IS.

    empower link for SOAP response name space declartion:
    [url]https://empower.softwareag.com/sl24sec/SecuredServices/KCFullTextASP/viewing/view.asp?KEY=105296-17525743&DSN=PIVOTAL&DST=TCD&HL=1&QUERY=soap|namespace&SessionID=253943847[/url]

    Could you please help to share your thoughts if we can make all the name space declarations to root element (soapenv:Envelope) ?

    Regards,
    Vishnu


    #soa
    #API-Management
    #webMethods


  • 2.  RE: webservice consumer - SOAP Request name space position to root

    Posted Fri September 07, 2018 07:22 AM

    Do you see the same behaviour calling the WS outside webMethods via SOAP UI or JMeter


    #webMethods
    #API-Management
    #soa


  • 3.  RE: webservice consumer - SOAP Request name space position to root

    Posted Fri September 07, 2018 10:30 AM

    Outside IS, we can pass the SOAP message with name space declared either at root element or individual elements. Both will work. we can edit the soap message the way we need.

    The issue is the soap message having the same name space declared at all complex type elemnts. If the namespace was declared to root level, the declartion was needed only once and remove the ned of declaring again at each complex type elements. effectively reduces the soap payload size as well.

    An example below to elaborate this:

    SOAP request send by IS via SOAP consumer connector as below:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
    <ns1:complexType1 [b]xmlns:ns1="http://www.ns1.com/"[/b]>
    <ns1:filed1></ns1:filed1>         
    <ns1:filed2>false</ns1:filed2>
    </ns1:complexType1>
    <ns1:complexType2 [b]xmlns:ns1="http://www.ns1.com/"[/b]>
    <ns1:filed1></ns1:filed1>         
    <ns1:filed2>false</ns1:filed2>
    </ns1:complexType2>
    </soapenv:Body>
    </soapenv:Envelope>

    But if we can control the name space declaration at root level like below, it will help to save payload size:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" [b]xmlns:ns1="http://www.ns1.com/"[/b]>
    <soapenv:Body>
    <ns1:complexType1 >
    <ns1:filed1></ns1:filed1>         
    <ns1:filed2>false</ns1:filed2>
    </ns1:complexType1>
    <ns1:complexType2 >
    <ns1:filed1></ns1:filed1>         
    <ns1:filed2>false</ns1:filed2>
    </ns1:complexType2>
    </soapenv:Body>
    </soapenv:Envelope>

    So I am looking for the option/configuration to handle this in IS (outbound soap calls).


    #webMethods
    #soa
    #API-Management


  • 4.  RE: webservice consumer - SOAP Request name space position to root

    Posted Sat September 08, 2018 12:41 AM

    Share me a copy of WSDL here or to my email. I can check else we can create a soap request programmatically.


    #soa
    #webMethods
    #API-Management


  • 5.  RE: webservice consumer - SOAP Request name space position to root

    Posted Mon September 17, 2018 03:05 AM

    Hi,

    You can take any wsdl and create a consumer wsd out of it. The SOAP request generated by IS will have name space declaration at child elements (or where the first occurrence of the complex type in the SOAP request);

    For ex:
    WSDL: [url]http://www.holidaywebservice.com//HolidayService_v2/HolidayService2.asmx?wsdl[/url]
    If you create consumer wsd out of this wsdl and send a sample soap request for the operation getHoldayDate, you can see the SOAP request sent by IS will be as below:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
    <tns:GetHolidayDate xmlns:tns="http://www.holidaywebservice.com/HolidayService_v2/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <tns:countryCode>Canada</tns:countryCode>
    <tns:holidayCode>sample</tns:holidayCode>
    <tns:year>2018</tns:year>
    </tns:GetHolidayDate>
    </soapenv:Body>
    </soapenv:Envelope>

    If I want to move the name space declaration tns to root (at Envelope), is it possible to achive?

    I m looking to generate a SOAP request as below:

    
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://www.holidaywebservice.com/HolidayService_v2/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
    <tns:GetHolidayDate >
    <tns:countryCode>Canada</tns:countryCode>
    <tns:holidayCode>HK</tns:holidayCode>
    <tns:year>2018</tns:year>
    </tns:GetHolidayDate>
    </soapenv:Body>
    </soapenv:Envelope>

    The placing of the namespaces to root will become significant if the SOAP operation have multiple complex types. IS will declare the namespace at each complex type level instead of declaring only at one place.

    Thanks.


    #soa
    #webMethods
    #API-Management