on 10-21-2010 9:21 PM
Hi Experts
I have developped a custom login module to authenticate in portal fron external application.
This external application is developped in ASP, and i need to pass some information from this page to my login module.
According to the SAP Document [http://help.sap.com/saphelp_nw70/helpdata/en/46/3ce9402f3f8031e10000000a1550b0/content.htm|http://help.sap.com/saphelp_nw70/helpdata/en/46/3ce9402f3f8031e10000000a1550b0/content.htm] i create and configure my login module and test. All is OK. But when i try to get the parameters comming from ASP page, i always get null value.
This is my code to get parameter:
HttpGetterCallback hgc = new HttpGetterCallback();
hgc3.setName("ASPPARAM");
hgc3.setType(HttpGetterCallback.REQUEST_PARAMETER);
try {
this._callback_handler.handle(new Callback[] { hgc });
} catch (Exception e) {
onthewayexc = e;
}
String[] aspParam = ((String[]) hgc.getValue());
LOCATION.debugT("login", "req param[] has value " + aspParam[0]);
The attribute aspParam always is null
I saw the http header of this request and i get the follow value:
POST /irj HTTP/1.1
ASPUSERID2
Referer: http://192.168.14.15:50001/post1.asp
Accept-Language: en-US,pt-BR;q=0.5
Content-Type: application/x-www-form-urlencoded
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
Host: 164.164.164.159:50000
Content-Length: 275
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: ASPSESSIONIDQACQBSQS=GAGFHFBANKGOLBELONFABKII; ASPSESSIONIDCASDDDBA=OBKLPLEAOIEHDAONPDJDJKDI
ASPPARAM=001251228695263&ASPBINARYCODE=001010010000101000100100
As you can see, the parameter ASPARAM is in Request.
Could someone help how to solve this?
Thanks and regards
Marcos Brandao
Hi Marcos.
Cookie: ASPSESSIONIDQACQBSQS=GAGFHFBANKGOLBELONFABKII; ASPSESSIONIDCASDDDBA=OBKLPLEAOIEHDAONPDJDJKDI
ASPPARAM=001251228695263&ASPBINARYCODE=001010010000101000100100
As for me it seems that ASPPARAM is a name of a cookie, so try to read a cookie information:
HttpGetterCallback hgc = new HttpGetterCallback();
hgc.setType(HttpGetterCallback.COOKIE);
hgc.setName("ASPPARAM");
CallbackHandler.handle(new Callback[] { hgc });
Object aspParam = hgc.getValue();
Best regards,
Aliaksandr Zhukau
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the sample code you posted it looks as though you mixed up two variables, 'hgc' and 'hgc3'. (You set the type and name in 'hgc3', but then you ignored 'hgc3' and used 'hgc' in the rest of your sample code).
If that bug exists in the code that you were running on NetWeaver then that would explain why you always got a null result. (But if that bug is only in the code that you posted to this forum, not in the code that you were actually running, then no, sorry, I don't know what the problem is).
User | Count |
---|---|
96 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.