cancel
Showing results for 
Search instead for 
Did you mean: 

PI 7.1 HTTP Adapter - overwritte Prolog dynamically

swen_watzlawzyk
Explorer
0 Kudos

I use a HTTP Adapter to send XML Data via HTTP as form field. Therefore i use the prolog constant. Example: xmlfile=.... Now i need two new parameter (user and password) as post parameters. I can change to prolog like user=...&password=....&xmlfile=.. But in this case the prolog with the user is hard coded. in my scenaria the user and password should dynamically load from Message Mapping. The solution with the dynamic URL Parameter 1-6 could not be used, because this values are GET Parameters which are visible in der URI!

Is there a solution for post parameters dynamically via HTTP Adapter?

Accepted Solutions (1)

Accepted Solutions (1)

swen_watzlawzyk
Explorer
0 Kudos

Ok the JAVA Mapping now works fine. In the first step i have a message mapping from source to destination. In the second step the Output from first mapping is merged with the constant Prolog user=...&password=....

Now i have the next problem, how can i get access from JAVA Mapping to the fields user and password from my Source XML structure? I think in the JAVA Mapping i can only get access to the output from the first mapping. And in this structure this fields should not be included?

Can i store the values anywhere and get access from Java Mapping?

stefan_grube
Active Contributor
0 Kudos

You can store the parameters in the dynamic header fields. You have to write a UDF in the graphical mapping to store the values. The Java Mapping can read them.

If you do not want to do this in the graphical mapping, a pre-mapping could do this as well.

Regards

Stefan

Answers (3)

Answers (3)

swen_watzlawzyk
Explorer
0 Kudos

Thanks, problem is solved now!

Best Regards

Swen

Former Member
0 Kudos

Hi Swen,

I have the same scenario as this but instead of using user and password as post parameter we need site_id=...&service_name=...&efx_request=XMLdata... I am new in using the HTTP adapter as HTTPS via HTTP Destination. Is it possible for you to share the steps in using the Java mapping including the java codes to make use of the Prolog dynamically?

Please kindly help.

Thanks

Rogie

swen_watzlawzyk
Explorer
0 Kudos

Java Mapping? Give me please a short description, how i can add a additional java mapping to my existing message mapping.In moment i have a message mapping and a Operation Mapping. In the Operation mapping i have the Source Message and the Target Message and the necessary Message Mapping. How can i add a new java mapping?

bhavesh_kantilal
Active Contributor
0 Kudos

The operation mapping aka Interface mapping's need not only use 1 single mapping.

In the interface mapping you can add multiple message mappings and / or other mapping programs.

The mappings get executed sequentially and the output of first mapping is input to second mapping and so on.

In this case, write a java mapping that will take the input as the output of your graphical mapping; add the prolog to this and make it the output of your Java Mapping and this is the final output of your Operation mapping!

Regards

Bhavesh

stefan_grube
Active Contributor
0 Kudos

You can create the prolog with help of a Java mapping. The Java mapping can be added after the regular mapping, just to add the prolog.

Regards

Stefan