on 09-07-2015 3:56 PM
Hi,
I want to create a data server in SAP MII via a BLS transaction.
So my understanding is that this can be done by using the following url:
http://:/XMII/Illuminator?service=Configuration&mode=DataServers&type=Import&payload=<xml>
I have tried to use the HTTP Post action block but I can seem to pass the correct payload.
I got a sample payload by running via an http post action block:
http://:/XMII/Illuminator?service=Configuration&mode=DataServers&type=Export
Do I
a.) Pass it into the URL or
b.) Post command block
So passing it in the URL I get an error of invalid characters
Passing it into the Post field I just get an error that I need to supply the correct fields.
Has anybody done this ? and how do I pass in the payload ?
Thanks
Hi ,
Thanks for the help. I figured it out. It was not as much the issue of encoding the XML but rather encoding the xml payload to URL encoding. so that worked
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Ok so I can create a data server from a web page via http post as per the example below:
var myxml = "<?xml version='1.0' encoding='UTF-8' standalone='no'?><Servers Version='12.2.3.182'><Server Connector='IDBC' ConnectorID='' ConnectorType='SQL' DatePrefix='' DateSuffix='' DaysRetention='7' Description='Online Project Database' Enabled='T' InitCommand='' InternalDateFormat='yyyy-MM-dd HH:mm:ss' JDBCDriver='com.microsoft.sqlserver.jdbc.SQLServerDriver' MaxRetryCount='5' Name='00_TEST' Password='UGezc3cwcmQ=' PoolMax='500' PoolSize='100' RetryInterval='60000' ServerPackage='com.sap.xmii.Illuminator.connectors.IDBC' ServerURL='jdbc:sqlserver://localhost:1433;databaseName=SRD_MASTER' Timeout='15' UseCount='256' UserName='xmiiuser' ValidationQuery='SELECT GETDATE()' WaitTime='120'/></Servers>"
$.ajax("http://localhost:50000/XMII/Illuminator", {
type: 'POST',
data: { service: 'Configuration', mode: 'DataServers', type: 'Import', payload : myxml},
success: function( data, textStatus, jQxhr ){
alert(data);
}
});
So how does one simulate this in the BLS http post action block ?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You probably need to encode the payload xml to be able to pass it in the url. There should be a function in the link editor to do that.
Regards,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for the reply.
I used the xmlencode function but I stil get the error :
[ERROR] Post Action: error occured while trying to connect to the server Exception: [Illegal character in URL]
Is there a special way of how the payload must be posted via the http post command or is there another way to do this ?
Regards
User | Count |
---|---|
13 | |
6 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.