RFC 2617 API
Is there an API in Java 5 that will allow me to take an HTTP Authorization header and parse it according to RFC 2617?
Thank you for your help!
I think the point about the javax.servlet.http classes is that there are several implementations of them that already handle that header. And many of them are open-source, so their code for doing that is available.
However, if your requirement is to create the header, maybe you could use Apache HttpClient. Here is its writeup about authentication.
Similar Messages
-
Hi everybody,
when usinf the RFC lookUp API in UDF you get a whole XML Document as the response.
What is the easiest way to extract a special value from the InputStream .
(https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439)
Regards MarioHi Mario !
Check this weblog:
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
specially the LookupHandler, the RFC part, after the execution of the RFC
Regards,
Matias. -
RFC Lookup API error in PI 7.1?
Hi Guys,
The RFC lookup which has been developed in PI 7.0 using the lookup API is unable to find the CC defined in the directory for a business system. after upgrading to PI 7.1. We are getting the error as below. This look up works perfectly fine in Dev(PI 7.1) and QA(PI 7.1) but in Prod(PI 7.1). We are on PI 7.1 EHP1 SP03.
Errorcom.sap.aii.mapping.lookup.LookupException: Plain exception:Error when calling an adapter by using the communication channel In_RFC_SAPLookUp (Party: , Service: Test, Object ID: 74e5e47336133351bebcb8c6a6bc68c8) The channel with object ID 74e5e47336133351bebcb8c6a6bc68c8 could not be found in the Integration Server Java Cache. Check if the channel exists in the Integration Builder Directory and execute a refresh of the Java Cach.
We did the cache refresh and also restarted the prod server but the error still persists. We have tried connecting to the prod receiver sap system from QA and the lookup works perfectly fine. We dont understand why it dosent work in prod.
any help or suggestions would be really appreciated.
Thanks,
SriniHi Rajesh,
The CC has the correct business system. We have also tried even by creating a new cc and it always says it cannot find the defined cc from the RFC lookup. We are passing this value as a constant value to the RFC lookup.
I could not understand why it is not finding only this CC? Is this something that RFC lookup is unable to find the CC?
any help would be appreciated
Thanks,
Srini -
Hi Experts,
Can you please share with me the following document on XI Mapping lookups RFC API by Michal
[https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/xi%20mapping%20lookups%20rfc%20api.pdf]
the above link is not working.
Thanks,
MKHi
For Mapping Lookups~
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/mapping%20lookups:%20RFC%20API.pdf
The specified item was not found.
Use this crazy piece for any RFC Mapping Lookups!
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/801376c6-0501-0010-af8c-cb69aa29941c
Java Mapping
http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm
DOM parser API
http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/package-frame.html
On how to create XML docs with SAX and DOM go thruugh these links:
http://www.cafeconleche.org/books/xmljava/chapters/ch09.html
http://www.cafeconleche.org/books/xmljava/chapters/ch06.html
Also go through these Blogs....
SAX Parser
Java Mapping (Part I)
Java Mapping (Part II)
Java Mapping (Part III)
regards
srinivas -
Value Mapping Replication Vs RFC Lookup API Usage Pros and Cons
Hi Ananth,
Looking at the options you have, Value Mapping Replication might be a better option, because, by going the second route, you are just trying to simulate how a Value mapping replication works in reality.
But, when the VMR framework is readily available, why do we need to simulate it by using Java code?
Moreover, the java code approach will be triggered as many times and the number of messages that are triggered VS the number of times the VMR tables in the Java Runtime gets updated only when there is an entry that is added/modified in the SAP side (Which i feel is less frequent than the frequency of the messages being sent through XI).
Regards,
Ravi Kanth TalaganaHi,
There are more issues you need to consider here:
1) Is this static data or will it change often (the lookup data);
2) Wether it is a good approach to keep it in middle system? if so who takes the ownership of managing it i.e. update, delete etc from time to time
3) The tables don't seem small to me for value mapping
I am not a big expert but i am off the opinion going RFC way as it will keep loose-coupling in place.
However your issue for not using graphical RFC is not true though, you can pass all your line items as a single object which means only making ONE single call to ECC and then get the return the same way. Think along the lines of internal table as an object
regards, -
Hi all,
I m using look up through JCO and calling a RFC on backend R/3 for the particular validation.I m using UDF for that.In the UDF i have specified imports as:-
imports :-java.util.;java.lang.obj.;com.sap.aii.mapping.lookup.;com.sap.mw.jco.;java.io.*;
source code --
//write your code here
JCO.Repository myRepository;
// Change the logon information to your own system/user
JCO.Client myConnection = JCO.createClient(
// all the client information namely client ,user id pwd etc
myConnection.connect();
// create repository
myRepository = new JCO.Repository( "SAPLookup", myConnection );
// Create function
JCO.Function function = null;
IFunctionTemplate ft = mRepository.getFunctionTemplate("xxxxx"); //Name of RFC
function = ft.getFunction();
// Obtain parameter list for function
JCO.ParameterList input = function.getImportParameterList();
// Pass function parameters
input.setValue( a , "xxxxx" ); //import parameter of RFC, a is input argument.
myConnection.execute( function );
String ret = function.getExportParameterList().getString( "XXXX" ); //export param
myConnection.disconnect();
return ret;
however on test i m getting follwing error:
Source code has syntax error: D:/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map6df266d0f96411dbb2a4000bcd3f5f3d/source/com/sap/xi/tf/_MM_Source_To_Target_.java:157: 'class' or 'interface' expected public static void main(String[] args) throws Exception{/!_$ClNRep_/_MM_Source_To_Target_ st = new /!_$ClNRep_/_MM_Source_To_Target_(); st.testExecute(); }
Can anybody help me out in rectifying this Syntax errror.
Regards,
AshwinMYou are hardcoding the user id , password etc in your UDF. This is something will cause issues asyou move your objects across environments from Dev to Qaulity and production.
You cannot change the user id and passwordi n your mapping code in your Quality and Prodction. Use of RFC Lookup is strongly recommended with the RFC adapter.
I dont think using RFC Lookup API causes any perfromance degradations. We have used this feature multiple times in and have never faced performance constraints as a result of this.
Regards
Bhavesh -
RFC Lookup's in message mapping fail with RuntimeException for no reason
Hi guys,
We have developed interfaces that execute a lot of RFC's from Message Mapping, by making use of RFC Lookup API.
In ID, in the corresponding RFC Receiver Communication Channel we have set the number of maximum connections to 100.
However, when a big number of Idocs with lots of items is sent to XI some messages fail in XI because mapping fails with a runtime exception that is not correct, since there is a return value found from the execution of the RFC function. And when I am testing the mapping in Test mode of XI IR, the mapping is executed successfully.
Do you think that by increasing the maximum number of connections in Communication Channel, it will take effect?
EvaggelosHi Evaggelos,
DECREASE, may be til 10.
Regards,
Udo -
i have situation where i need to do rfc lookup importing 4 fileds and exporting 8 field , depend upon one of the field output i have to raise alert and cancel the processing otherwise i need to post idoc and update the sap table through proxy . at the same time we are unable to get output through UDF. can i get some input how to do this. we are using SP 10 .
Hi,
if you're doing the lookup (RFC) via an UDF then
RFC looup API doesn't work with SP10 (unless you're talking about SPS 10 for XI 7.0 <-- then RFC api works)
Regards,
michal -
Hi All,
Using the RFC SDK APIs, we are trying to implement RFC client programs(in C lang). For example to invoke BAPI_XMI_LOGON, we have used RfcCallReceive() function.
All the importing and exporting parameters are set. However even after the API succeeds(RFC_OK is returned), the exporting parameters are not getting updated with the output values.
Could anyone please let me know what could be the problem or any other steps are required to be done ?
Thanks in Advance,
DeviHi
Typical examples of RFC client programs are sapinfo.c, startrfc.c and srfctest.c which are included in the RFC SDK.
http://help.sap.com/printdocu/core/Print46c/EN/data/pdf/BCFESDE4/BCFESDE4.pdf
Regards -
Where to find documentation for RFCs / IDocs?
Hi all,
We're planning to implement some XI interfaces against the MM module - where can we find online docs for available RFCs/IDoc APIs?
Thanks very much in advance!
SteveHi,
have a look at this page:
http://help.sap.com/saphelp_nw04/helpdata/en/dc/6b7c9f43d711d1893e0000e8323c4f/frameset.htm
to find many MM interfaces: invoices, orders etc
some are not well documented (material movements)
so just ask an interface consultant about them
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a> -
How to invoke RFC function module from XI interface
Hi all,
I am having one question, How to invoke RFC function module from XI interface.
Please reply me as soon as possible.
Thanks in advance,
RadhikaHi,
To call the RFC in mapping u need to create the RFC lookups...check these links.
How we have to create the lookups?
Check this weblogs with some screenshots on how to achieve this:
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
/people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
/people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
/people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
lookups in xi
XI Design Guidelines
Re: RFC Lookup API
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
Regards,
Phani -
Hi,
The following are the features of iPlanet Web Server 6.0 which is enhanced from iPlanet Web Server 4.1 release.
You can implement sticky sessions by prefixing the name of the server host that generated the session to the JSESSIONID (the Servlets 2.2 API standard session cookie name). This enables the front-end load balancer to do sticky load balancing, such as forwarding future requests to the same host that generated the session.
Keep-alive handling now thousands of keep-alive connections can be maintained.
Added support for digest authentication as defined in RFC 2617. Digest authentication is used in conjunction with the iPlanet Directory Server 5.0 as an access authentication method that avoids passing the user name and password over the network in an unencrypted form.
Command Line Administration Tools.
Improved User Interface:-iPlanet Web Server 6.0 provides an improved user interface with the following features:
Magnus Editor ,Class Manager ,.htaccess Configuration
iPlanet Web Server currently provides support for Quality of Protection (QOP)= auth and algorithm = MD5 only.
iPlanet Web Server 6.0 features improved SSL performance and simplified server certificate acquisition from VeriSign.
In general, the authentication mechanisms provided by iPlanet Web Server 6.0, such as basic and digest authentication using LDAP, work across web applications (or servlet contexts). For FORM authentication, you can implement single sign-on using a cookie-based FORM login session created with a virtual-server-wide session manager. This FORM login session is available across all applications within the virtual server and is separate from the regular HTTP session which is limited to the servlet context
You can install iPlanet Web Server 6.0 on multiple machines using templatized installation.
Web Publishing is not supported in iPlanet Web Server 6.0.
Server-Side JavaScript (SSJS) /LiveWire is not supported in iPlanet Web Server 6.0.
Live Connect (LC) is not supported in iPlanet Web Server 6.0.
Regards
Selva -
Calling a webservice MessageBroker from PL/SQL
Hi gurus,
I'm a newby at this topic and I have a simple question about calling a webservice from pl/sql.
There is a SMS Service providing information by webservices. I want to acces them by PL/SQL.
Parameter:
user:password (after RFC 2617) = not required for simple respons
method = mbInfo
project = test
smsbalance = total
url with parameter:
http://rp.yoc.de/http/<project>/<method>/1.0/?smsbalance=<smsbalance>
url with parameter values:
http://rp.yoc.de/http/test/mbInfo/1.0/?smsbalance=total
<?xml version="1.0" encoding="utf-8" ?>
<result>
<processor>
<code>E07010001</code>
<message>Transaction not found (project_id=159 step_id=1002)</message>
<rid>-1</rid>
<testmode>0</testmode>
</processor>
<handler />
</result>I don't know how to start getting this simple result into a variable!
I tried a simple example from here: http://akdora.wordpress.com/2007/08/03/calling-a-web-service-by-plsql-utl_http/
But I do not understand how to use xmlns for my script or the function soap_api.get_return_value
CREATE OR REPLACE PACKAGE pkg_my_webservice IS
-- test parameter: 'http/test/mbInfo/1.0/?smsbalance=total'
FUNCTION call_myfuntion
(vp_parameter1 VARCHAR2) RETURN VARCHAR2;
END pkg_my_webservice;
/CREATE OR REPLACE PACKAGE BODY pkg_my_webservice IS
vg_funciton_fnc VARCHAR2(256) := 'myFunction';
vg_ws_address VARCHAR2(255) := 'http://rp.yoc.de/';
FUNCTION call_myfuntion(vp_parameter1 VARCHAR2)
RETURN VARCHAR2 AS
ol_req soap_api.t_request;
ol_resp soap_api.t_response;
BEGIN
-- we initilize a new request
ol_req := soap_api.new_request(vg_funciton_fnc,
'xmlns="' || vg_ws_address || vp_parameter1 || '"');
-- we started to add parameters
--soap_api.add_parameter(ol_req,
-- 'string1',
-- 'partns:string',
-- vp_parameter1);
--soap_api.add_parameter(ol_req,
-- 'string2',
-- 'partns:string',
-- vp_parameter1);
-- we call the web service
ol_resp := soap_api.invoke(ol_req, vg_ws_address, vg_funciton_fnc);
-- we get back the results
RETURN soap_api.get_return_value(ol_resp,
'result', -- result tag name
'xmlns:m="' || --can be change as "xmlns:n1"
vg_ws_address || '"');
END call_myfuntion;
END pkg_my_webservice;Thanks ahead!
Best regards,
TobiasHi !
declare
req utl_http.req;
resp utl_http.resp;
v_txt clob;
begin
req := UTL_HTTP.begin_request ('http://rp.yoc.de/http/test/mbInfo/1.0/?smsbalance=total','GET','HTTP/1.1');
resp := UTL_HTTP.get_response (req);
dbms_output.put_line(resp.status_code);
dbms_output.put_line(resp.reason_phrase);
utl_http.read_text(resp,v_txt);
dbms_output.put_line(v_txt);
UTL_HTTP.end_response(resp);
end;I'm not exactly sure what are you looking for .. but that response from your post you can get with my code ( it's tested ).
T
Edited by: ttt on 12.3.2010 5:10
My code is very "poor" , there is no error checks no header setup's no basic authentication no proxy settings ..... -
WD4J -- XI -- R/3 Scenario
Hello All
Currently I am working on a scenario which requires accessing of data from R/3 4.6C through BAPI with XI as middle ware from a webdynpro application in Java.
My query is that:
is it possible to perform RFC lookups directly from webdynpro using RFC lookup API?
bcoz so far what i have seen in different tutorials is to use lookup API in UDF (User defined function) for xml parsing and lookup! and use separate HTTP adapter from Webdynpro to communicate with XI to get the message from RFC adapter in IR.
Is it possible to eliminate this last step and call the RFC adapter for BAPI and access the reponse message of RFC adapter directly from WebDynpro Application, using something like RFC lookup API.!!
ThanksZahid
We have no provision to directly communicate with FM's available under R?3 system.Why because Java system canot able to directly communicate with R/3.that's why we r using JCO'S.
Regards
Hazrath.G -
Call ABAP FM from XI Java mapping
Can you please provide me some documentation on how to make a call to ABAP function module from Java mapping.
Basically this would be a RFC lookup from Java mapping.
Any recomendations on which one is a standard approach among ABAP Mapping vs JAVA mapping within XI.
Your responses are appreciated.
TNVHi TNV,
<i>I am more looking into using RFC call from java mapping.</i>
The article by Michal can be used to make the RFC lookup not only from an User Defined Function but also from a java mapping.
You can write any piece of java code inside the EXECUTE() method of your Java Mapping including the RFC Lookup API code in michal's article.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/xi%20mapping%20lookups%20rfc%20api.pdf
Regards.
Bhavesh
Maybe you are looking for
-
Use web service to invoke a new process execution
Hello, I'm using BPM 10g3, and i'm trying to invoke a fully automated process via a web service I've setup my web service http://<host>:<port>/albpmServices/<engine name>/ws/<process name>ServiceListener?wsdl I've accessed it from a C# application i
-
Sync iPod after Hard Drive crash
The Hard Drive in my daughter's Macbook recently died and was replaced. I was able to restore from Time Machine but the last time she backed up was about 6 months ago. She has several albums that she'd imported in the last 6 months and are now residi
-
MAS changes not reflecting in Baseline version
Hi All, I had to do some changes to Mobile Sales application and for that in MAS I created a new project oppt (Project type: SAP Mobile Solutions and Template: Laptop Solution). I did all the changes in this new solution and they are working fine. I
-
Question regarding magsafe connector
i would just like to ask if the magsafe connector which is a magnet accidentally touched the adapter for like 30 seconds? would it damage the adapter?
-
What file transfer speeds are possible over Gigabit Ethernet - Hatter?
Thanks in advance for taking the time to consider this. Our still photgraphic studio has a range of MACs all connected via a gigabit D-Link switch to a series of Buffalo NAS raids. Wiring is CAT5e, all devices have gigabit ethernet cards and the link