on 04-07-2009 1:58 PM
Hi experts,
I am getting below error when i am doing http-rfc. I tried out all the means like RBW test mesg through IE and aslo through http client in this in status bar i am getting error on page. Even i checked all other forms but i didnt find correct answer to my probs
HTTP 401 - Unauthorized</br><p> Ihr SAP Internet Communication Framework Team</p></td></tr></table></body></html>
please help me .
Hi,
give the userid the role SAP_XI_APPL_SERV_USER and then rerun your scenario.....moreover userid and password should be correct and the user should not be locked......so ask your basis guys to check it for you.
Regards,
Rajeev Gupta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
by giving the above role, you should be able to send a HTTP req msg to XI.......so are you getting a msg in SXMB_MONI for your this HTTP req msg in XI or not?..........i think you will be getting a msg in SXMB_MONI with no error..........now in RWB in component monitoring in adapter engine in comm channel monitoring, are you getting this 401 unauthorized error in your reciver RFC comm channel - if this is the case, then check the user used in the reciver RFC comm channel, this user should be defined in your R/3 system having the roles required for executing RFCs which you can ask your basis guys to do it for you...........
Regards,
Rajeev Gupta
Hi,
i am getting below error when i checked in communication channel monitor.
Receiver channel u2018cc_ariu2019 for party, service u2018arlsapariu2019(internal name u2018RfcClient[cc_ari]u2019)
Client data: {jco.client.lang = EN,jco.client.snc_mode =0,jco.cleint.client=800,
Jco.client.passwd=*****,jco.webas.ignore_jdsr_error_1,jco.client.user=SAPATL2,
JCO.CLIENT.SYSNR=00,JCO.CLIENT.ASHOST=ATLSAPARI}
Respository data: : {jco.client.lang = EN,jco.client.snc_mode =0,jco.cleint.client=800,
Jco.client.passwd=*****,jco.webas.ignore_jdsr_error_1,jco.client.user=SAPATL2,
JCO.CLIENT.SYSNR=00,JCO.CLIENT.ASHOST=ATLSAPARI}
Current pool size:0, maximum poolsize: 1
Hi,
in your reciver RFC channel, you have used user SAPATL2............just change the maximum connections to 5 or 10 or 15................
ask your basis guys to check in SAP ECC R/3 system that user SAPATL2 exists in R/3 system, it should not be locked and it should have the roles required for RFC invokation which they can easily check as there should be some service users in R/3 system which are being used in RFC connection...so ask your basis guys to assign these roles to SAPATL2 user also......
then re-run your scenario..........
Regards,
Rajeev Gupta
Edited by: RAJEEV GUPTA on Apr 8, 2009 10:17 AM
Hi,
Sorry to ask this question once again because I am not getting solution as u said earlier i am getting below error in sxmb_moni after trying all the ways u said moreover i did file to rfc it is working but when http to rfc (BAPI_COMPANYCODE_GETDETAILS) i am getting this error.
HTTP response contains status code 401 with the description Unauthorized Authorization error while sending by HTTP (error code: 401, error text: Unauthorized
XI server is installed for the first time in our company so for basis people aslo it is new.
can u help me out.
Hi,
Below is the error in sxmb_moni
<SAP:Code area="INTERNAL">HTTP_RESP_STATUS_CODE_NOT_OK</SAP:Code>
<SAP:P1>401</SAP:P1>
<SAP:P2>Unauthorized</SAP:P2>
in sxmb_moni it is displaying two times first time with sender service next time with receiver service but actually both should display at once if i am not wrong.
Can you do the following by putting your scenario a side............to investigate the actual issue
create a temporary mapping in IR in between any two message types. create a UDF with the following code. While creating UDF give java.io.;com.sap.aii.mapping.lookup.; in the imports text box.
In below code change this statement "Channel channel = LookupService.getChannel("YourRFCBusinessSyste>" , "YourRFCChannel");" according to your RFC business system and RFC channel.
UDF Code:
String content = "";
MappingTrace importanttrace;
importanttrace = container.getTrace() ;
//Filling the string with our RFC-XML (With Values)
String m = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns0:BAPI_BANK_GETDETAIL xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\"><BANKCOUNTRY>IND</BANKCOUNTRY><BANKKEY>999</BANKKEY></ns0:BAPI_BANK_GETDETAIL>";
RfcAccessor accessor = null;
ByteArrayOutputStream out = null;
try
{
//1. Determine a channel (Business System, Communication channel)
Channel channel = LookupService.getChannel("YourRFCBusinessSyste>" , "YourRFCChannel");
//2. Get a RFC accesor for a channel.
accessor = LookupService.getRfcAccessor(channel);
//3. Create a xml input stream representing the FM request message.
InputStream inputstream = new ByteArrayInputStream(m.getBytes());
//4. Create xml Payload
XmlPayload payload = LookupService.getXmlPayload(inputstream);
//5. Execute Lookup
Payload result = accessor.call(payload);
InputStream in = result.getContent();
out = new ByteArrayOutputStream(1024);
byte[] buffer = new byte[1024];
for (int read = in.read(buffer); read > 0; read = in.read(buffer)) {
out.write(buffer, 0, read);
}
content = out.toString();
}
catch(LookupException e)
{
importanttrace.addWarning("Error while lookup " + e.getMessage() );
}
catch(IOException e)
{
importanttrace.addWarning("Error " + e.getMessage() );
}
finally
{
if (out!=null) {
try {
out.close();
} catch (IOException e) {
importanttrace.addWarning("Error while closing stream " + e.getMessage() );
}
}
// 7. close the accessor in order to free resources.
if (accessor!=null) {
try {
accessor.close();
} catch (LookupException e) {
importanttrace.addWarning("Error while closing accessor " + e.getMessage() );
}
}
}
//returning the result u2013 RFC-XML.response
return content;
Use the UDF in between one of the source and target fields. Go to Message Mapping Test Tab and click test. Lets know what kind of response you are getting.
Regds,
- Gujjeti.
Hi,
Sorry for deley to give response as our xi server was done. After creating the UDF and testing i am getting this below error
Source code has syntax error: D:/usr/sap/PI7/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapab258c2124ec11de98ec001ec9546bab/source/com/sap/xi/tf/_mm1_.java:3: <identifier> expected import com.sap.aii.mappingtool.tf3.;import com.sap.aii.mappingtool.tf3.rt.;import java.util.;import java.io.; import java.lang.reflect.;import java.io.;import com.sap.aii.mapping.lookup.; ^ D:/usr/sap/PI7/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapab258c2124ec11de98ec001ec9546bab/source/com/sap/xi/tf/_mm1_.java:3: <identifier> expected import com.sap.aii.mappingtool.tf3.;import com.sap.aii.mappingtool.tf3.rt.;import java.util.;import java.io.; import java.lang.reflect.;import java.io.;import com.sap.aii.mapping.lookup.; ^ 2 errors
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.