cancel
Showing results for 
Search instead for 
Did you mean: 

Http to RFC Sync ,testing HTTP client

Former Member
0 Kudos

Hi,

I have downloaded the HTTP client from SDN and trying to test my HTTP to RFC sync Scenario but nothing is happening when I click send in HTTP client.but it says

Line:38

Char;5

error;system cannot locate the resource specified.

I have double checked my parameters given are correct.like service,interface,namspace etc.

I tested in RWB able to send the message succesfully,but here too I have a problem,I cannot see any messages in SXMB_MONI or RWB->message Monitoing .

is that a problem with my scen or it won't show any messages for the testing in RWB with test messages option?

and this is the payload I have given in HTTP client testing

<ns0:Z*********_MT xmlns:ns0="http://xyz/abcccc">

<ABC>1234568</ABC>

<DEF>D</DEF>

</ns0:Z******_MT>

I removed <........UTF....> tag as one of the threads in SDN suggseted to try without <......UTF.....> tag.

but no luck.

so what might be the probem in HTTP client testing and what might be the problem not able to see anymessages in SXMB_MONI or RWB->Mess Moni when I test the scen in RWB with Test Message option?

thank you,

Babu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hey babu

i m not sure which HTTP client you have donwloaded but i used the one in the following thread and it worked just fine

/thread/26215 [original link is broken]

make sure that you are using Internate explorer and have disabled the pop-up blocker.

also u dont have to drop the <---UTF---> line,just try with the client i gave and let us know if u have any problem

Thanx

Aamir suhail

Former Member
0 Kudos

Aamir,

I am using the same client what you have given me in the thread.I will try one more time.

And about the other problem do you think the message should appear in SXMB_MONI when we test the mesage in RWB after providing the service,interface and name space?

Even I enabled the logging parameters in SXMB_ADM for the synchronous messages.

thank you.

Former Member
0 Kudos

Aamir ,

I tried that again but no luck again. it says the same error message I have mentioned above.

line:38

char:5

error: .........

any suggestions?

thank you.

Former Member
0 Kudos

Babu

1.) Try to see if ActiveX Controls are blocked when you start the HTTP Client..if its blocked then your HTTP Client will not send data to XI...Make sure to allow ActiveX Controls..

2.) when you send messages either from HTTP Client or RWB( Integration Server>Test Messages) messages must appear in SXMB_MONI

I have tested HTTP Client to File scenario yesterday...it worked....so i am confident about the above issues...can you post what data provided in HTTP Client so that i can give few more suggestions

Former Member
0 Kudos

Guru,

thank you for your reply.

1)I have enabled all in the browser and tried,but same problem persists with HTTP client testing.

I am giving Server host,client,sender service,sender interface,server port :8000,QOS:BE,sender namespace,usr name:Appl user Pass: retry:1.

and the payload is similar to the above mentioned stuff.

I think problem is in the first step,HTTP client cant initiate the call to XI.

it always says error in the page.

2)but I didnt get the message in SXMB_MONI when i tested it from RWB,even i tried with successful scenarios for them too I didnt get messages in MONI.

what might be the reason for this?

what should be the send message to URL there ?

I have like http://HOST:port/Mssaging System/receiver/AFW/XI

or do I need to add more logging parameters in SXMB_MONI?

thank you for your help.

Babu

Former Member
0 Kudos

Babu

In RWB ..you must send messages in the following...

RWB>Integration Server>Integration Engine>Test Messages

Fill in the sender details and logon parameters here, Complete mapping payload in the "Payload" area...In the "Send message To" field the value should like http://host:8000/sap/xi/engine?type=entry.

Give me your email i will try to send HTTP Client i tested..you can try it on

Former Member
0 Kudos

I tried with your URL in RWB,now atleast I could see atleast error message in SXMB_MONI.

[Removed by the moderator.]

thank you for that.

Former Member
0 Kudos

I have sent the test client to you....whats the error on monitor

Former Member
0 Kudos

SXMB_MONI message says no mapping program found.

I know is failing to fiind out the response mapping prog.I am looking into it now.

ands I tested with your client too,infact I am using the same.but I tested with your client.

I am getting

line:32

char:3

error:permission denied in the webbrowser itself.

so something wrong with action in web browser.

any ideas now?

thank you.

Former Member
0 Kudos

Hey Babu

try giving the IP address of XI server instead of giving the Host name.

thanx

Aamir

Former Member
0 Kudos

yes,I have been trying with ip address only from the begining.

Former Member
0 Kudos

Try this

when you open RWB in browser you will have url like

http://host:port/blah.blah.

Now take the "host" from the url(text) and paste it in the Server text box and use 8000 as port

Former Member
0 Kudos

Guru,

I tried with your option too ,but same problem.

it says the same error like

Line:32

char:3

error:permission denied

GOV,

I am not familiar with JAVA stuff,thank you for that though.

Former Member
0 Kudos

Babu

This thread has the same problem i guess...check it out

Message was edited by:

Guru

Former Member
0 Kudos

GURU,

looks like links might help me out.

And ,I am using Business Service for HTTP requester. do you think its the problem?or do I need to create Business system in SLD?

cos,in the links you have given me, there Prateek was telling to main the correct URL in SLD for the integration server,which i dont have ,cos my service is Business service not a business system.

thank you.

Former Member
0 Kudos

I dont think that will matter..since we are not using communication channel at all for the sender...

Former Member
0 Kudos

Hey babu

i remember having this error once working with HTTP tool but it went off by itself once i started using Internet explorer.

anyways have u changed the values in the JavaScript code or not?i m talking about changing the values of business system,message interface,namespace etc.

for e.g

change the following line in the code

value="YourServer" size="20" /> </td>

with

value="xxx.xxx.xxx.xxx" size="20" /> </td>

similarly make all the changes as requested in the code,dont just rely on filling in the values .

please make all these changes, and once again save the file in .html format and try using Internet explorer with pop-ups disabled and security level reduced to minimum.

Thanx

Aamir

Former Member
0 Kudos

Aamir,

I tried with your orpint too,like changing the values with my actual values of host,sender interface etc...

still gettting the same error

Line:32

char:3

error:permission denied

I checked the roles assgned to the user i have given in the HTTP client ,it has

SAP_XI_APPL_SERV_USER role.

I don't know where the problem is.

and in ID I have created service for the Http requester.there i can see some options like sender interface,receiver interface,users etc...

whata re they meant for?

even i have tried mentioning my value there but no use.

still any more suggestions?

Former Member
0 Kudos

damn...I so stupid...

giving the wrong IP address of XI system.

no I am able to ping the Xi with my HTTP request.

thank you Aamir and GURU.

Answers (1)

Answers (1)

former_member182290
Participant
0 Kudos

You can may use HTTP java Client Code:

HTTP Java Client:

Software Requirement:Jakarta HTTPClient Jar file,Log4j and CODEC.

The code below reads two set of files.

1.xml data from a file to send it has XML payload

2.XI server , port, username ,password and details about Outbound service.

import java.io.File;

import java.io.FileInputStream;

import java.io.FileNotFoundException;

import java.io.IOException;

import java.net.URL;

import java.util.Properties;

import org.apache.commons.httpclient.Credentials;

import org.apache.commons.httpclient.HttpClient;

import org.apache.commons.httpclient.HttpException;

import org.apache.commons.httpclient.UsernamePasswordCredentials;

import org.apache.commons.httpclient.auth.AuthScope;

import org.apache.commons.httpclient.methods.InputStreamRequestEntity;

import org.apache.commons.httpclient.methods.PostMethod;

/**

  • @author C20999165

*

  • To change the template for this generated type comment go to

  • Window>Preferences>Java>Code Generation>Code and Comments

*/

public class HttpClientTest {

/**

  • @param a

  • @throws HttpException

  • @throws IOException

*/

public static void main(String[] a) throws HttpException, IOException {

Properties prop = loadProperties();

String xi_server=prop.getProperty("XI_SERVER");

String port=prop.getProperty("PORT");

String namespace=prop.getProperty("INTERFACE_NAMESPACE");

String senderService = prop.getProperty("SENDER_SERVICE");

String qualit_service = prop.getProperty("QOS");;

String senderInterface = prop.getProperty("INTERFACE");

String userName = prop.getProperty("USER_NAME");

String password = prop.getProperty("PASSWORD");

String qos=prop.getProperty("QOS");

String sapClient=prop.getProperty("SAP-CLIENT");

String sapLan=prop.getProperty("SAP-LAN");

File payLoad = getPayLoad();

HttpClient client = new HttpClient();

client.getParams().setAuthenticationPreemptive(true);

Credentials defaultcreds =

new UsernamePasswordCredentials(userName, password);

client.getState().setCredentials(

new AuthScope(

xi_server,

Integer.parseInt(port),

AuthScope.ANY_REALM),

defaultcreds);

PostMethod method =

new PostMethod(

"http://sgsndxi1.standardbank.co.za:8000"

+ "/sap/xi/adapter_plain?"

+ "namespace="+namespace

+ "&interface="+senderInterface

+ "&service="+senderService

+ "&party="

+ "&agency="

+ "&scheme="

+ "&qos="+qos

+ "&sap-user="+userName

+ "&sap-password="+password

+ "&sap-client="+sapClient

+ "&sap-language="+sapLan);

method.setRequestHeader(

"Content-type", "text/xml; UTF-8");

method.setRequestEntity(new InputStreamRequestEntity(new FileInputStream(payLoad), payLoad.length()));

int statusCode = client.executeMethod(method);

System.out.println(statusCode);

System.out.println(method.getResponseBodyAsString());

}

/**

  • Load Properties

  • @return

  • @throws FileNotFoundException

  • @throws IOException

*/

private static Properties loadProperties()

throws FileNotFoundException, IOException {

Properties prop = null;

URL url =

ClassLoader.getSystemResource(

"httpserver.properties");

prop = new Properties();

prop.load(new FileInputStream(new File(url.getFile())));

System.out.println("PROPERTIES: "prop"\n\n");

return prop;

}

/**

  • Read OUTBOUND INPUT DATA from a file

  • @return File object with XML

*/

private static File getPayLoad() {

File input = new File("test.xml");

return input;

}

}