on 04-15-2014 6:49 PM
Hello experts...
Somebody knows how to create a Scenario with
a HTTP Call with method POST and test it with a
some data in XML file or other way to probe
the POST method??
Regards. Enrique
Hello Enrique,
please check B1i Online documentation and search fro term "Call HTTP Atom":
As result you get:
The following example is handing over a Business Partner CardCode towards another HTTP System (second B1i system) using the HTTP POST method (using the ssl trustStoreURI is only neccessary for https related calls):
<xsl:template name="transform">
<call xmlns="">
<query id="identifier" value="value"/>
<!--optional - define your own query parameters - multiple elements allowed-->
<connect>
<!--the connect section is optional - you can also define a reference to the sld-->
<destProtocol>http</destProtocol>
<destHost>xxxx</destHost>
<destPort>8080</destPort>
<destPath>B1iXcellerator/exec/ipo/vP.001sap0000.in_HCSX/com.sap.b1i.vplatform.runtime/INB_HT_CALL_SYNC_XPT/INB_HT_CALL_SYNC_XPT.ipo/proc</destPath>
<query/>
<proxyHost/>
<proxyPort/>
<method>POST</method>
<authentification>NONE</authentification>
<user/>
<password/>
<user2query/>
<password2query/>
<sslTruststorePath/>
<sslTruststorePassword></sslTruststorePassword>
<trustStoreURI></trustStoreURI>
<keyStoreURI/>
</connect>
<dtd>
<!--optional - document type definition-->
</dtd>
<pltype></pltype>
<payload>
<!--optional - in case of POST request you specify here your request document-->
<BusinessPartner>
<row>
<CardCode>EDI</CardCode>
</row>
</BusinessPartner>
</payload>
<htta>
<par id="httpheader.???" value="">
<!--<par id="httpheader.Content-Type" value="application/x-www-form-urlencoded;charset=UTF-8">-->
<!--optional - you can specify here your own http header definitions - multiple elements allowed-->
</par>
<par id="htta.returnpltypeforce" value="">
<!--optional-->
</par>
<par id="htta.returnpltypedefault" value="">
<!--optional-->
</par>
</htta>
</call>
</xsl:template>
Best regards
Bastian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please compare to following thread about the GET method: Get CSV file from a call http atom
Please check the B1i message log for your HTTP Call result, activating debugging gives you additional information within the HTTP Call attom.
Best regards
Bastian
Hi Enrique,
the parameters should be filled in field <query>:
<query>getCSV=CSVTest0000.csv&parameter2=parameter2value&parameter3=parameter3value</query>
in this example following parameter are handed over via HTML Header:
please use
"&"
as delimiter for your parameters, it will be translated automatically.
If you want to handover URL parameters containing special characters, you must URL encode the string. The integration framework provides the encode Java function in the utils2 namespace. To ensure that the function works correctly, cast the string with the string XPath function.
Define the call as follows:
<xsl:variable name="var">{"myPar":"myVal"}</xsl:variable>
<query id="json" value="{utils2:encode(string($var))}"/>
Best regards
Bastian
Hi Bastian...
Thank so much for the support, finally i can see, in the Message Log, the parameters i sent through HTML form with POST method, but i have another question...
You can help me or give me a orientation to how to do the XSLT transformation to obtain only the values of the parameters i sent from the HTML form?
THANKS!!!
Best regards
Enrique
Hi Enrique,
it seems that I misunderstood you before.
You're not sending a HTTP POST via B1i: You're receiving a HTTP Post with B1i!
Please check online Help for "HTTP Inbound".
To read out e.g. the first attribute from the payload Role=S, just add an XFORM transformation atom und use XSLT logic:
/vpf:Msg/vpf:Body/vpf:Payload[./@Role='S']/bfa:io/bfa:key[./@name='user']/@value
Best regards
Bastian
User | Count |
---|---|
89 | |
8 | |
7 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.