cancel
Showing results for 
Search instead for 
Did you mean: 

make html form send xml

Former Member
0 Kudos

hi,

i am facing a bsp-development in XI-context. As the XI expects xml-input via http-channel I need to set up forms which can send the query-string as xml.

eg

thisPageToXI.htm?name=john&job=nap&age=34&...

I was looking in my WAS and found a couple of function modules, which can convert stuff to xml - most of them derived from crm apparently. But they're all a bit unhandy.

How would you deal with that task?

thanx in advance,

matthias

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You mean to have your page display XML instead of HTML. Quite easy check out this great article.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/set your was 6 10 system to work - transport tracking with rss

Former Member
0 Kudos

Dear Craig,

2 points for taking action , but: nope - misunderstanding. Still I took a glance on DJ Adams (cool name) article, but the xml-part in it is not really what I am looking for, maybe I just did not get it right.

I only need to convert the querystring to xml and then send it to the receiving XI, because I can't just send it like it is - otherwise the XI will throw errors.

I mean I have to convert the name/value pairs into a xml-structure...

I am considering building my own concatenation (onInputProcessing), which means, splitting the string and then concatenate into a receiving variable.

Finally I shall have to actually send, maybe via a second BSP-page?

anyway, I thought before rebuilding everything new, I might pick standard functionality...

thanx for any further idea...

matthias

ps: found a page where my task is described in asp.

http://www.bauer.uh.edu/parks/xml3.htm

Message was edited by: matthias kasig

Former Member
0 Kudos

It's the fun that we have shooting in the dark

You just need to convert the Query string to XML, I'lll have to think about it. I've not done it before maybe in the mean time someone else will pop in with some ideas.

Former Member
0 Kudos

I took a look at the ASP example you found:

http://disc-nt.cba.uh.edu/students/parks/echoxml2test.htm

The form example, that can be accomplish just as DJ explains in his article.

As for the first example, I'm still not sure I have it 100% yet.

Former Member
0 Kudos

<i>As for the first example, I'm still not sure I have it 100% yet.</i>

which example? in the asp-article or DJs? or my question?

matthias

Former Member
0 Kudos

Sorry the ASP example. The second one was clear and very easy to do in BSP the first example I wasn't exactly sure what they were accomplishing.

But I would remedy that I am looking at it right now.

Former Member
0 Kudos

OK eyes open now.

The ASP is doing bascially what DJ did sending the page as XML instead of HTML.

former_member181879
Active Contributor
0 Kudos

> ps: found a page where my task is described in asp.

> http://www.bauer.uh.edu/parks/xml3.htm

NO. You are not right. You actually found an example that can be written in any type of xSP technology. ASP plays zero role in this example.

The actual VB script is executed in the browser. You can just as easily have written this script in JavaScript. Same thing, just a different syntax. Just do a "view source" on the page in your browser to see the actual VB code. There is nothing that prevents you from running this (type of) code from a BSP page.

Answers (1)

Answers (1)

former_member181879
Active Contributor
0 Kudos

Matthias,

Always in these discussions confusion is abound because questions is not formulated perfectly.

First you write: "I need to set up forms which can send the query-string as xml". In this picture I have a browser, and when the request leaves the browser to go somewhere, you expect the payload to be in XML format.

But then you write this example: "?name=john&job=nap&...". Hmmm.. here things are just simple name/value pairs. No XML.

And then suddenly you write "I was looking in my WAS ...can convert stuff to xml". So now we are suddenly on the server, without XML in hand, but wanted it.

All confusion. So let we first draw a picture:


(1) browser --XML--> XI
(2) browser --name/values--> WebAS(BSP) --XML--> XI

In scenario 1, the browser prepares the XML document directly, and sends it directly to the XI server. I know of no technique to achieve this form HTML. Your posted examples using the ActiveX XML object in the browser is probably the only way to go. Will just require some JavaScript to find all the correct formfields, and feed all of this into XML object.

In scenario two you just submit a normal request to the server. You use something such as get_form_fields and concatenate to build the XML string. Then you make an outgoing HTTP connection to XI using the HTTP Client. Somewhere we have examples of how this can be done.

But first, for me at least, is the question of what you wish to achieve.

b.