on 06-18-2008 12:11 PM
Hi Guys,
I have previously created a RosettaNet interface to send messages to another server, however I now need to look at receiving RosettaNet messages.
I have created the relevent parties, business services and communication channels, observing the naming conventions.
What I'm now looking for is the URL to use when posting to XI.
I've tried posting to http://<XI server address>:<port>/MessagingSystem/receive/RNIFAdapter/RNIF
which returns a
401 Unauthorized
so I've added
?sap-user=<username>&sap-password=<password>
but with no luck.
Could anyone point me in the right direction?
Kind regards,
John Lambert
Hi John,
>
> I have previously created a RosettaNet interface to send messages to another server, however I now need to look at
receiving RosettaNet messages.
Do you mean to say you were able to use the RSTK to send a message to XI? If yes, can you describe how? We have been trying to post a message from the RSTK to XI for sometime now, but no luck.
> I've tried posting to http://<XI server address>:<port>/MessagingSystem/receive/RNIFAdapter/RNIF
> which returns a
> 401 Unauthorized
> so I've added
> ?sap-user=<username>&sap-password=<password>
> but with no luck.
Well I am stuck at this same point as well. We have been successful at posting a message from XI to the RSTK ( works like a charm ) but when RSTK tries to send back the business signal to XI, the CUT Url seems to be not picking up the password ( not sure where the password has to be provided either ) and we seem to have hit a dead end.
Any ideas or thoughts that you have picked up along the way?
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhavesh,
I'm not sending from RSTK.
The intention was to send from the SeeBeyond server that XI was sending messages to. In order to check the URL etc. that I wrote a short app in Perl to connect to the URL in the previous post and post a RosettaNet packet saved in a file.
I have sucessfully bypassed the authorisation problem when sending from Perl, but XI is complaining about the Start Boundary missing.
HTTP/1.1 400 Bad Request
Date: Thu, 19 Jun 2008 15:07:08 GMT
User-Agent: MessagingSystem/3.0
Server: SAP J2EE Engine/7.00
Content-Length: 126
Content-Type: text/plain; charset=UTF-8
Client-Date: Thu, 19 Jun 2008 15:07:08 GMT
Client-Peer: 10.70.212.65:8000
Client-Response-Num: 1
Set-Cookie: JSESSIONID=(datc850alp2x_AXD_00)ID0558361050DB01595898703172859443End; Version=1; Domain=.esb.ie; Path=/
Set-Cookie: saplb_*=(datc850alp2x_AXD_00)3583050; Version=1; Path=/
com.sap.aii.af.ra.ms.api.MessageFormatException: Missing start boundary: javax.mail.MessagingException: Missing start boundary.
Probably won't help, but the Perl Code looks like this:
use LWP::UserAgent;
use HTTP::Request::Common;
use URI::URL;
use HTTP::Headers;
my $userAgent = LWP::UserAgent->new(agent => 'perl post');
open FILE, 'c:/work/aim/xi/S98_20070827164731140' or die $!; binmode FILE;
my $contents;
{ local $/ = undef; # Read entire file at once
$contents = <FILE>; # Return file as one single `line'
} # $/ regains its old value
close FILE;
my $message=$contents;
my $ua = LWP::UserAgent->new(env_proxy => 1,
keep_alive => 1,
timeout => 30,
);
my $hdrs = new HTTP::Headers(Accept => 'text/plain', "Content-Type" => "application/xml");
my $req = HTTP::Request->new('POST', 'http://<server address>:<port>/MessagingSystem/receive/RNIFAdapter/RNIF', $hdrs,$message);
my $username="<username>";
my $password="<password>";
$req->authorization_basic($username, $password);
my $response = $ua->request($req);
print $response->error_as_HTML unless $response->is_success;
print $response->as_string;
Good luck, I suspect I will have the same problems with authorisation when attempting to connect from the Seebeyond Server.
John
Quick note Bavesh.
You probably know this, but the username and password for the authorisation are encoded in the HTTP header rather than being part of the URL, or passed in another fashion.
The HTTP header prefixing the call to the XI / RosettaNet looks like this
POST /MessagingSystem/receive/RNIFAdapter/RNIF HTTP/1.1
TE: deflate,gzip;q=0.3
Keep-Alive: 300
Connection: Keep-Alive, TE
Accept: text/plain
Authorization: Basic bGFtYmVydF9qOmluaXQxMw==
Host: <server name>:8000
User-Agent: libwww-perl/5.805
Content-Type: application/xml
Content-Length: 4906
John
Hello,
Check this link
http://help.sap.com/saphelp_nwpi71/helpdata/en/1f/4c531f04c07a428964175147017fc8/content.htm
*********Reward points,if found useweful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.