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

Namespaces in reponse message

  • 1.  Namespaces in reponse message

    Posted Fri May 17, 2013 07:42 AM

    Hi,

    I have created a provider webservice on the IS which is called by an external consumer.
    The WSDL file imports an XSD schema which contains the request and response message types. This XSD schema imports several other XSD schemas as well. So, there are several namespaces defined.

    What I see now is that for each element in the reponse soap message, the namespace is defined again. Which leads to a serious increase of message size.

    This is how my reponse message looks like:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
    <msg:getInformationResponse xmlns:msg="http://schemas.company.com/InformationMessage_v1">
    <msg:status>SUCCESS</msg:status>
    <msg:Generalities>
    <contact:IDNumber xmlns:contact="http://schemas.company.com/Namespace1_v1">2132434</contact:IDNumber>
    </msg:Generalities>
    <msg:Contact>
    <contact:name xmlns:contact="http://schemas.company.com/Namespace1_v1">A</contact:name>
    <contact:lastname xmlns:contact="http://schemas.company.com/Namespace1_v1">B</contact:lastname>
    <contact:street xmlns:contact="http://schemas.company.com/Namespace1_v1">C</contact:street>
    <contact:houseNumber xmlns:contact="http://schemas.company.com/Namespace1_v1">D</contact:houseNumber>
    <contact:zipcode xmlns:contact="http://schemas.company.com/Namespace1_v1">E</contact:zipcode>
    </msg:Contact>
    <msg:Declaration>
    <contact:codeTypeDeclaration xmlns:contact="http://schemas.company.com/Namespace1_v1">zfsfsd</contact:codeTypeDeclaration>
    <contact:dateDeDeclaration xmlns:contact="http://schemas.company.com/Namespace1_v1">qsdqsdq</contact:dateDeDeclaration>
    </msg:Declaration>
    <msg:agreementSummary>
    <agreement:codeDomain xmlns:agreement="http://schemas.company.com/Namespace2_v1">DFDF</agreement:codeDomain>
    <agreement:date xmlns:agreement="http://schemas.company.com/Namespace2_v1">DFDSFDS</agreement:date>
    <agreement:flag xmlns:agreement="http://schemas.company.com/Namespace2_v1">TRUE</agreement:flag>
    </msg:agreementSummary>
    </msg:getInformationResponse>
    </soapenv:Body>
    </soapenv:Envelope>

    Does anyone have a solution to remove the unnecessary namespace declarations?
    Many thanks!

    Regards,
    Maarten


    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Namespaces in reponse message

    Posted Fri May 17, 2013 11:28 AM

    you can specify the nsdecls param when you convert from XML document to String parsing…that should take care of the response string handling the name space for the documentTypeName you are outputting.

    Is that what you are looking?


    #Integration-Server-and-ESB
    #webMethods