Layer7 API Management

 View Only
  • 1.  Namespace is missing in response body

    Posted Jul 07, 2020 09:11 PM
    Team,
    we are currently migrating data power policies to CA apigateway. we almost 80% completed. currently i having issue with one of the policy where i test the same policy through data power it is working and getting proper response. but when we test the same with apigateway url one name space is missing in response due to that in UI it is showing error.


    here is the response with apigateway url - bad response.



    here s the response with data power url - good response

    <ns0:SearchResponse            xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:ns0="http://www.taaw.com/schemas/storeops/tuxLeads/1.0.0">

    is there any way to fix this namespace issue in apigateway?

    Thanks,
    Raj


  • 2.  RE: Namespace is missing in response body

    Broadcom Employee
    Posted Jul 08, 2020 06:29 PM
    Can you provide the full sample messages and the Layer 7 policy? One can always add a namespace declaration using a regular expression, but that should not be necessary.

    ------------------------------
    Jay MacDonald - Adoption Architect - Broadcom API Management (Layer 7)
    ------------------------------



  • 3.  RE: Namespace is missing in response body

    Posted Jul 08, 2020 06:45 PM
    Hi Jay,
    here is the sample request. same request is working when it is going through datapower.

    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <env:Header>
    <Header xmlns="http://xmlns.tmw.com/Schemas/Common/header/1.0.0">
    <Source>INT</Source>
    <Domain>STOREOPS</Domain>
    <ReferenceID>TestId</ReferenceID>
    <CompanyID>TMW</CompanyID>
    <ServiceName>TUXLeads</ServiceName>
    <ServiceFunction>Search</ServiceFunction>
    </Header>
    </env:Header>
    <env:Body>
    <SearchRequest xmlns="http://www.tmw.com/schemas/storeops/tuxLeads/1.0.0">
    <BrandId>TMW</BrandId>
    <FirstName>HOWARD</FirstName>
    <LastName>RIGDON</LastName>
    <Addr1/>
    <City/>
    <ZipCode/>
    <Country>USA</Country>
    <Phone>4404148230</Phone>
    <E-mail/>
    <FuzzyNameSearch>Y</FuzzyNameSearch>
    <LimitRows>50</LimitRows>
    </SearchRequest>
    </env:Body>
    </env:Envelope>


  • 4.  RE: Namespace is missing in response body

    Broadcom Employee
    Posted Jul 08, 2020 06:40 PM
    Dear Raj,
    Where is the response generated? on gateway, or on backend server?
    General speaking, the bug in the response should be fixed by the one generate it. 
    If it's due to the backend server, it should fix it, fix the server bug on gateway makes stronger coupling between gateway and server, it's not a good practice.

    Although, the gateway can modify the response -- assign the mainpart of the response to a context variable, use regular assertion, or xslt assertion, etc. to modify the mainpart, and then return new response by return template response assertion.

    Regards,
    Mark


  • 5.  RE: Namespace is missing in response body

    Posted Jul 08, 2020 07:05 PM
    Hi Zhijun,
    here is the flow DMZ gateway--> internalgateway--> tibco(backend)
    response is generating from tibco. 
    same is working DMZgateway-->internal Data power --> tibco

    do you have any examples to modify response using xslt or regular assertion?

    Thanks,
    Raj


  • 6.  RE: Namespace is missing in response body
    Best Answer

    Broadcom Employee
    Posted Jul 08, 2020 07:26 PM
    Again, I don't like the idea, you see the disadvantage, if it was fixed on tibco at the beginning, (I believe it was fixed on Data power), then you don't need to do it again on gateway.

    Here is an example to use regular assertion to modify the response,

    Regards,
    Mark


  • 7.  RE: Namespace is missing in response body

    Posted Jul 08, 2020 08:15 PM
    Hi Mark,
    Thanks for your suggestion I will ask tibco team to make the necessary changes at their end, if possible.

    Thanks,
    Raj