cancel
Showing results for 
Search instead for 
Did you mean: 

Business Connector, Posting an XML document

Former Member
0 Kudos

HI,

I've got a service : Z_ASN_CREATE, and an XML file which works fine for this service when I use the 'Test\send xml file' tool to test this service from BC DEVELOPPER.

My Question is : What should I do now to post this XML file from outisde the BC, from a browser for example ?

Thanks.

Vincent

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vincent,

If you want to send a request to a BC Service using just a browser and html (without any activex Objects), review the code below. You will notice that you send it as a string called xmlData. In you input service you should have a input variable called exactly xmlData (case sensitive). Then convert it to document using <i>stringToDocument</i> and from document to record using <i>documentToRecord</i> (pretty straightforward, is it? ).

good luck,

David R.

<html>

<head></head>

<body>

<form name="frm2BC" action="http://localhost:5555/invoke/Default/you_service_name">

<textarea name="xmlData" rows="10" cols="60"><?xml version="1.0" encoding="UTF-8" ?><test>Send me!!</test></textarea>

<br>

<input type="submit" value="Send" >

</form>

</body>

Former Member
0 Kudos

Thank you very much David. Your solution works fine.

Former Member
0 Kudos

Hi,

David - I found your solution here in this post and it works so far, but it won't send xml's which are very long. Is there a way to also send very long xml's with this solution?

Thanks in forward for your answer!

Kai

Answers (0)