Skip to Content

HTTP receiver comm channel with dynamic URL parameters?

Hi All, I have already looked at the posts on SDN regarding this topic.

Im using PI 7.1 HTTP Sender >> PI >> HTTP receiver.

On the receiver channel i have selected adapter specific attributes and checked apply URL parameters.

For parameter 1 i have defiend myCustomParam.

In the ESR I have defined a Synch interface (1 inbound + 1 outbound)

In the operation mapping i have a Request Message mapping and a response message mapping

I have defined a UDF where i used dynamic configuration to set "URLParamOne" with value XXXXXX

I used this UDF in the request message mapping.

Here is what PI is posting to the HTTP Servlet

POST /<path defined in ID receiver comm channel> HTTP/1.0

I was expecting

POST /<path defined in ID receiver comm channel>?myCustomParam=XXXXXX  HTTP/1.0

Have I missed any thing?

Thanks in advance for your input

Kind Regards

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    Mar 30, 2012 at 11:59 AM

    Hi All I have found the problem, it was a case sensitive parameter.

    I changed URLParamOne to UrlParamOne.

    Unfortunatly the SAP documentation is incorrect.

    See copy from help.sap.com

    http://help.sap.com/saphelp_nwpi71/helpdata/en/43/64dbb0af9f30b4e10000000a11466f/frameset.htm

    12.      If you want to use URL parameters, select Use URL Parameters and enter the parameters in the fields
    Parameter 1 to Parameter 6.
    The parameters are included in the HTTP request under the names specified here.
    The technical

    names of the fields are URLParamOne,
    …, URLParamSix
    .

    Thank you all for you time. I hope this helps others.

    Kind regards

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 29, 2012 at 06:39 AM

    Hi Juan,

    You should first cross check whether 'Dynamic Configuration' has changed the value properly. To do that, check in the sxmb_moni for messgae and for particular message, check the Dynamic configuration header values, you should able to see, which are the parameter that are changed through Dynamic configuration programming. By that way you can confirm or cross check the UDF.

    Thanks,

    RK

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Juan Janse

      Hi Juan,

      Ok, once you are able to see proper value in the 'Dynamic configuration' header, i am sure you will able to get expected values. Let us know the result.

      Regards,

      RK

  • Mar 29, 2012 at 06:43 AM

    Hi,

    Have you followed the note 1386621?

    http://www.saptechno.com/sap-notes.html?view=sapnote&id=1386621

    Regards.

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Inaki,

      Thanks for your feedback

      I have not followed this note specifically but on review of it, it covers the steps I have followed for the solution.

      Perhaps one other note, I have tested with success setting the full URL. This is one solution but i would rather like to use  just setting the parameter.

      Thanks Kind Regards

  • Mar 29, 2012 at 08:50 PM

    Hi All, OK i tested.

    After running the scenario the following was checked.

    HTTP Receiver config

    - MSMA - Checked , Apply URL Parameters Checked, Parameter 1 = postpath.

    1) In the request message on the CENTRAL client >> Request message mapping >> Dynamic configuration  >> SOAP Header I found this :

    This is the value I set in the UDF

    <SAP:Record namespace="http://sap.com/xi/XI/System/HTTP" name="URLParamOne">/test/wowo/one</SAP:Record>

      </SAP:DynamicConfiguration>

    also after doing a search in the main document for the parameter I defined in the channel "postpath" i found it here :

    - <SAP:ChannelAttributes>

    - <SAP:AdapterTypeData>

    - <SAP:Attribute>

    - <SAP:Attribute>

      <SAP:Name>firstURLParamRcvr</SAP:Name>

      <SAP:Value>postpath</SAP:Value>

      </SAP:Attribute>

    When inspecting the the POST from PI i only get this.

    POST /com.innflow~tc~j~http~servlet~test/MyHttpServlet HTTP/1.0
    content-type: text/xml; charset=UTF-8
    content-length: 163
    connection: close
    accept: */*
    user-agent: SAP NetWeaver Application Server (1.0;711)
    host: localhost:1234
    accept-encoding: gzip

    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:DummyRequest xmlns:ns0="/test/test/mehttp://innflow.com/IFL_SOA_TRAIN/HttpPOSTGET"><dummmt>/test/test/me</dummmt></ns0:DummyRequest>

    In conclusion, Dynamamic config is working as the value is being set, the parameter definition is saved as it is available during mapping but still the post does not contain the parameter postpath=/test/test/me

    expected POST

    POST /com.innflow~tc~j~http~servlet~test/MyHttpServlet?postpath=/test/test/me HTTP/1.0

    content-type: text/xml; charset=UTF-8
    content-length: 163
    connection: close
    accept: */*
    user-agent: SAP NetWeaver Application Server (1.0;711)
    host: localhost:1234
    accept-encoding: gzip

    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:DummyRequest xmlns:ns0="/test/test/mehttp://innflow.com/IFL_SOA_TRAIN/HttpPOSTGET"><dummmt>/test/test/me</dummmt></ns0:DummyRequest>

    Kind regards

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      in HTTP receiver adapter, after checking ASMA and apply URL parameters, save and activate it. then rerun the scenario and see if your URL parameter comes in HTTP post msg.

  • Mar 30, 2012 at 11:44 AM

    Hi all,

    @Not Active Contributor RAJEEV GUPTA

    Yes after each change i do save and activate.

    @Greg : i have upto this point not checked the option you suggested.

    I have now used that option "Fail if adapter...." but now get the following error.

    <SAP:Code area="PLAINHTTP_ADAPTER">ATTRIBUTE_MISSING_PARAMS</SAP:Code><SAP:P1 />

    Above is the current config.

    Kind regards

    Add comment
    10|10000 characters needed characters exceeded

    • Dear Juan,

      In general, your config looks OK to me. I believe you should use the first option for the UDF, out of the examples you provided - one with "URLParamOne" key name.

      I know it might sound silly, but try changing "URLParamOne" to "UrlParamOne". This is what I've found to be used, and I guess these keys can appear case sensitive...

      Hope this helps,
      Greg