cancel
Showing results for 
Search instead for 
Did you mean: 

Host a url on PI

Former Member
0 Kudos

Dear SCN

I need to host a url on PI server in the following manner:

http://ip/some PI services?var1=%p&var2=%a 

in short the third pary will send data in the 2 variables, but the url should be built in the above format.

Any pointers?

Regards

Monika

Accepted Solutions (1)

Accepted Solutions (1)

former_member184681
Active Contributor
0 Kudos

Hi Monika,

What is your PI version? With PI 7.3 and new Java-based sender HTTP adapter it is possible, simply choose the GET processing type. See more details in SAP Help here:

http://help.sap.com/saphelp_nw73ehp1/helpdata/en/03/e2d70a626342feaef7f2f9f04a1776/content.htm

In older versions of PI, use "Copy URL Parameters" setting on Advanced tab page, see more details here:

http://help.sap.com/saphelp_nwpi71/helpdata/en/43/64db4daf9f30b4e10000000a11466f/content.htm

Regards,

Greg

Former Member
0 Kudos

Dear GG

Yes we are on Pi 7.3. But how would the url be framed?in case of soap we used display wsdl or define web service option?

How about ESR? will the sender MT contain these 2 variables?

Regards

Monika

Former Member
0 Kudos

Dear GG

I am clear on the url which would be like this

"To trigger a call to the Java HTTP adapter on the sender channel use the URL: http://

<hostname:port> / <path> ? <query-string>

Where,

  • path = /HttpAdapter/HttpMessageServlet
  • query-string = ?interfaceNamespace= <interfaceNamespace> &interface= <interface> >& senderService= <senderService> &senderParty= <senderParty> &receiverParty=<receiverParty> &receiverService= <receiverService> &qos= <qos> &queueid=<queueid> &msgguid= <msgguid>

But in the end i also 2 variables var1 and var2

Regards

Monika

gagandeep_batra
Active Contributor
Former Member
0 Kudos

Dear GG

I have created a Receiver MT with 2 dummy nodes below it . On the sender CC, I have set ASMA and mentioned the names of url params in Parameter1 and Parameter2. I am using udf and by using Dynamic configuration i am fethcing the url params, i hope i am in right direction? How to test it. Also the Http service will expect some xml also, what to do so that it just accepts url and additional parameters and no xml in the body?

Regards

Monika

Former Member
0 Kudos

Dear GG

I am getting Dynamic Configuration parameters in sxmb_moni. however my response fields are not getting populated.

My udf is as follows:

public void fetchURLParameters(ResultList result, ResultList result2, Container container) throws StreamTransformationException{

AbstractTrace trace = container.getTrace();

DynamicConfiguration conf = (DynamicConfiguration) container

    .getTransformationParameters()

    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

if(conf == null){     

trace.addInfo("Unable to get dyncamic configurtion. Returning. ");}

trace.addInfo("Setting Values");

DynamicConfigurationKey param1 = DynamicConfigurationKey.create(

    "http://sap.com/xi/XI/System/HTTP","URLParamOne");

DynamicConfigurationKey param2 = DynamicConfigurationKey.create(

    "http://sap.com/xi/XI/System/HTTP","URLParamTwo");

String contactMobile = conf.get(param1);

String serviceMTNL = conf.get(param2);

result.addValue(contactMobile);

result2.addValue(serviceMTNL);

Regards

Monika

Answers (0)