on 09-19-2005 8:06 AM
Hi,
I have created a Client Java Bean for a web service (an automatically created Service from a Bapi) that requires username and password. How can I pass username and password in the code?
Thank you!
Julia
This is my code:
public Z_FlightGetlist port;
/**
Business Method.
*/
public String test1234() {
try{
BAPI_FLIGHT_GETLIST list = new BAPI_FLIGHT_GETLIST();
list.setAIRLINE("KLM");
port.BAPI_FLIGHT_GETLIST(list);
return "ok";
}
catch(Throwable e){
return "error"+e;
}
}
public void ejbCreate() throws CreateException {
try{
InitialContext ic = new InitialContext();
Z_FlightGetlistService s = (Z_FlightGetlistService)ic.lookup ("java:comp/env/FlightProxy");
Z_FlightGetlist vi = (Z_FlightGetlist)s.getLogicalPort(Z_FlightGetlist.class);
this.port = vi;
}
catch(Throwable e)
{
}
}
Hello Julia,
Check this document
http://help.sap.com/saphelp_nw04/helpdata/en/50/a5d13f83a14d21e10000000a1550b0/frameset.htm
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.