on 07-16-2008 8:02 AM
Hi all,
I have created Client Java proxy. I am trying to write a stand alone java class to call this proxy. Can anybody help me for the code.?
Thanks
Sheetal
Hi madhu,
Thanks for ur quick reply.
but the document which u have given , i am trying the same example. for client proxy. but its not working .
it gives errors when we call response object
Thanks
Sheetal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
http://help.sap.com/saphelp_nw04s/helpdata/en/b6/55e3952a902447847066a0df27b0d6/frameset.htm
Code example for server proxies
package com.sap.xi.xI.demo.airline;
public class FlightSeatAvailabilityQueryIn_PortTypeImpl
extends com.sap.aii.proxy.xiruntime.core.AbstractProxy
implements FlightSeatAvailabilityQueryIn_PortType {
public
com.sap.xi.xI.demo.airline.FlightSeatAvailabilityResponse_Type
flightSeatAvailabilityQueryIn
(com.sap.xi.xI.demo.airline.FlightSeatAvailabilityQuery_Type
flightSeatAvailabilityQuery)
throws
com.sap.xi.xI.demo.airline.FlightNotFound_Message_Exception,
com.sap.aii.proxy.xiruntime.core.SystemFaultException,
com.sap.aii.proxy.xiruntime.core.ApplicationFaultException{
boolean error = false;
String errorText = "";
// get input parameters
FlightID_Type flightID = flightSeatAvailabilityQuery.getFlightID();
String airlineID = flightID.getAirlineID();
String connectionID = flightID.getConnectionID();
java.util.Calendar flightDate = flightID.getFlightDate();
// check input parameters
if (airlineID.length()==0) {
error = true;
errorText = "airline ID is missing";
}
if (connectionID.length()==0) {
error = true;
errorText = "connection ID is missing";
}
if (error){
com.sap.xi.xI.demo.agency.ExchangeFaultData_Type standard =
new com.sap.xi.xI.demo.agency.ExchangeFaultData_Type();
FlightNotFound_Type flightNotFoundType =
new FlightNotFound_Type();
FlightNotFound_Message flightNotFoundMessage =
new FlightNotFound_Message();
FlightNotFound_Message_Exception flightNotFound =
new FlightNotFound_Message_Exception();
// put error text to fault message
standard.setFaultText(errorText);
flightNotFoundType.setStandard(standard);
flightNotFoundMessage.setFlightNotFound(flightNotFoundType);
flightNotFound.setFlightNotFound_Message(flightNotFoundMessage);
// throw flight not found message exception
throw flightNotFound;
} else {
// provide output parameters
// (just return any fix values)
FlightSeatAvailabilityResponse_Type response =
new FlightSeatAvailabilityResponse_Type();
response.setBusinessFreeSeats(18);
response.setBusinessMaxSeats(20);
response.setEconomyFreeSeats(188);
response.setEconomyMaxSeats(200);
response.setFirstFreeSeats(12);
response.setFirstMaxSeats(15);
return response;
}
}
}
Thanks,
Madhu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.