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.


#TechXchangePresenter
 View Only
Expand all | Collapse all

How to change SOAP envelope tag

  • 1.  How to change SOAP envelope tag

    Posted Tue October 03, 2006 06:20 AM

    I am using WM 6.5 and the default SOAP data generates the SOAP tag as “SOAP-ENV”. My problem is I need the tag as “env”. How do I achieve this.
    checked docs and as well settings in CreateSoapData but did not get any help.

    URGENT Pls help, thanks in advance.

    <?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=“XML Schema” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>
    SOAP-ENV:Body
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>


    #webMethods
    #API-Management
    #soa


  • 2.  RE: How to change SOAP envelope tag

    Posted Wed October 04, 2006 05:25 AM

    Oops looks like no one knows this or has not come across such a problem till date!!!


    #API-Management
    #webMethods
    #soa


  • 3.  RE: How to change SOAP envelope tag

    Posted Thu October 05, 2006 06:56 AM

    “SOAP-ENV” is not a tag or element name, it is a prefix name. You can’t change this default for the built-in services.

    XML dictates that any prefix can be used so long as it is associated with the correct namespace.

    For example:

    <Foo:Envelope  xmlns:Foo="http://schemas.xmlsoap.org/soap/envelope/">

    is equivalent to

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

    Although you can’t change the envelope created by the built-in services, you can create a soap envelope using different prefixes by starting with the one created by the pub.soap.utils:createSoapData built-in service, changing its prefixes to suit your taste and then feeding that XML string into the pub.soap.utils:stringToSoapData service.

    HTH,

    Mark


    #webMethods
    #API-Management
    #soa


  • 4.  RE: How to change SOAP envelope tag

    Posted Fri October 06, 2006 05:36 AM

    Thanks a lot Mark.


    #webMethods
    #soa
    #API-Management


  • 5.  RE: How to change SOAP envelope tag

    Posted Mon November 07, 2011 07:55 PM

    thanks for this, great solution!


    #webMethods
    #soa
    #API-Management