!"# $% "
''(
&
) '* +
,+ " 1" ! " + %+"
!" " 1 1# + / ) - .
. "!
.# " - "
/ 0 + + 1" / / !" "/ )2 " !" " /-
-
! . 0 / - "% / 0 + + !" "0 o o o o o
4 +
" + /0 0 + 5 + " / /0 ! " " 6-" % ) "0 " 6 %% / & / /0 " + / - 2 0 + " % "- / !" % "
./! % "
3
! ) . 4 " / " / o ! . 4 7 " / " / o . . 4 7 " / " o 0" 4 . 4 7 " / " " o / ). 4 7 /7 o
%% 7 -
+ !" "0 "
"!
% " " " %+ 0" 4
) + /
3 +
") / % ) %
+
"! 0 ) "
+
% " +
"/ 0
!"
"
" /
-
. ' & 83 . ' ! + + / "- 6 + 6 $, % "- " # . '# / " "
- / - " "! + ! # / / / /6 "6 / ) " !" " / -
+ / 9 / %" + ! "! 1 1 " %%" )" " " %+ + " % "9 40 / " % 0 + .
. "- /
+
"! ! % / - "% 0 + 1 -
% ! 1" % / " / . "- / ,"
+
/" " % / " / "% " /
'
!" / - "% "
"
%+
% " : / 0 - "% "
3
"!
/ # " -
&6 ;*
0 ) "/ + " + / + / 0" 4 // 5 < 5 / !! "!" " ) %" %%" " 6/ ! / " / " #0 4 ! #! ? " # / " + / %%" 0 ) "/ 1 1 "0 - 5 ) < 6/ %% " ) +" + / " 0 1" " 0" 4 . "! % % ! !
+
" -
!
"
- - ! "/
+
!
/
!"
# $%% # $ '
# + /" ! % " %% +"/# @! , A / +"/ " / !!
&
%$!
&
0
%$&$
"
%% + / " # "
+ " % -" -" 0 4 6 %! "
) + ! 4 " "! + !
# $%% #
? o = % + o & o " 1
" 1"
? % ") o & / + ? "! o $ ) / 1 )" o $ ! " 9) 1"/ $ ! // " "! ""/ " !
"
$ # ! )
/" 7
"
&! / " 0 "! "
/ + ? "! )" )# ) 4 + / ! "
! ! "
/7 + / "/ 6 " % + 1+ 46" 3
(
) % !!$# #
* $ . +0 + % " " - " B " + + / % / "! ) % " " 4B 1
%% -
" / / !" + + "" "/ ! / ") "! %" "/
" #0 C 4 $ .# " "! 4 $ . /
% 3 $ .
/ !" / ) %"" " /"+ %
$ . . / 4B '
"
%" / password, String newPassword) $ .
" + +"/ 3
" / ? /# / ! 0" 4 % "- / ,+ ! 0" 4 + / " % !
!" +
-
" / " #
/ / "
/"
" Authenticate(String login,String
dauga2 0000 ""
•
//
•
+ & " %" / " + $ . - // # . %" /! % + % http://192.168.200.108:5555/soap/rpcrouter
serviceUrl
serviceNamespace + % uri:luxdeal
+
$ .
/ %"
/ +" / %
!) %
" $ + %,
$&
-$ $
public static String SERVER_IP= null; public static String PORT_IP= null; /** * The HttpTransport used for all SOAP rpc calls. It should be initialized * once before the first call. */ static public HttpTransport transport; /** * This SoapObject represents the request soap message */ static private SoapObject request; /** * This service name space is used for all soap requests. It should be * initialized once before the first call. */ static public String serviceNamespace= null; /** * This service url is used for the initialisation of HttpTransport.If should * be initialized once before the initialisation of HttpTransport. */ static public String serviceUrl= null; /** * Restart the http transport with the current IP/Port/Url ans spacename */ static void restartHttpTransport() { try { // set the URL and methode name VirtualServer.transport= new HttpTransport( VirtualServer.SERVER_IP + ":" + VirtualServer.PORT_IP + serviceUrl, ""); } catch (Exception e) { System.out.println("setHttpTransport error"); e.printStackTrace(); System.out.println("Request: \n" + VirtualServer.transport.requestDump); } //end try/catch }
$ VirtualServer.SERVER_IP = "http://192.168.200.108"; VirtualServer.PORT_IP = "5555"; VirtualServer.serviceUrl = "/soap/servlet/rpcrouter"; VirtualServer.restartHttpTransport(); // should be called from a thread
+ && + %,
$&
*
% !!$#
-$ $
/** *
* Set the current HttpTransport with the specified method name. * After this call, user can add parameters as many as he/she wants and * should use the call after. *
* * @param methodName * is the methode name set in the SOAP's enveloppe * @see #callWithCurrentTransport() */ private static void setMethodeName(String methodName) { try { // create the soap object request= new SoapObject(serviceNamespace, methodName); } catch (Exception e) { System.out.println("setHttpTransport error"); e.printStackTrace(); System.out.println("Request: \n" + transport.requestDump); } //end try/catch } //end callService()
*
%
.
%$$&& $ . $.. $
%$!
setMethodeName("Authenticate"); request.addProperty( new PropertyInfo("username", String.class), "dauga2"); request.addProperty( new PropertyInfo("password", String.class), "0000");
/
$&& $ . #
+ %,
$&
! &
-$ $
/** *
* Makes the call with the current HttpTransport and return the SoapObject. * The HttpTransport object should be set previously with the * setMethodeName method. *
* * @see #setMethodeName(String) * @return the SoapObject of the result of this call */ private static Object callWithCurrentTransport() { Object result= null; try { result= transport.call(request); } catch (Exception e) { System.out.println("callWithCurrentTransport error"); e.printStackTrace(); System.out.println("Request: \n" + transport.requestDump); System.out.println("Response: \n" + transport.responseDump); result= null; } //end try/catch return result; }
.
$&& $ . #
! & 0 $!! % # 1! $ !
# $&
String objResult= (String)callWithCurrentTransport();
.'
$% &
0 + + " / - " /" +" + " ! " # " "
-
&
$&
" 1$&9 "
C %%" " / " " % #0
!
! &2
% ) ,+ %% "
)# + 3 ,+ ! 4 +
" !" 7 0 + - 0" +" ,+ ! " / " " + +" + "/ "+ - + !" 7 /
% "% ) #45 # "
/ !! " %" / !3
!" " +
+ ) ?
%%
# / .+" .+" # 0 CD
+
/** *
* Send to the server a request to return all available countries. * The request is done with the call to "getCountryList" SOAP method without * parameter.
*
* SoapObject result is a String[size] array, and the first property * indicates the array size. So structure of result :
* - Property(0) : array size
* - Property(1) : error code
* - Property(2) : CountryName1
* - Property(4) : CountryName2
* ....
*
* * @return a array of string representing the available countries */ static String[] getCountries() { String[] result= null; setMethodeName("getCountryList"); //service call SoapObject objResult= (SoapObject)callWithCurrentTransport(); /* * SoapObject structure : * - Property(0) : array size * - Property(1) : error code * - Property(2) : CountryName1 * - Property(4) : CountryName2 * .... */ if (objResult != null && Long.parseLong((String)objResult.getProperty(1)) >= 0) { result=new String[Integer.parseInt((String)objResult.getProperty(0)) - 2]; for (int i= result.length; i-- > 0;) result[i]= (String)objResult.getProperty(i + 2); } else { // no category result= new String[0]; } //end if ( objResult != null ) return result; }
> " ) ) "4 + /+ / / 0 / +"0 + !" "0 /
) ,+ "3
6!"" % +
# /
6 / 6" ) % " +% " +
" "! -; ' !" - % !"
!" $ % &' ( ) *$ & )+ ,+ > ) % 4 % "- / -; ' % " " " 0+ + % "- / o 1 6 / " ) o - 6 / + ! + o " 6 / o ,0" %+
o
"
-
!
# '
"
)% " %+ ! + !" "0 ! 3 % " "! -; 'E " +" + & + /- & + " E 3&
o G*H "!
#
F&1(F 8F
*
!
E
"-
#
>
% 4
"
"
% "
+
- 2
E F&1(F('F
*E
E
o D" 4 " " . - !" . # " "! # ,+ % !" " "! > +"0 " " 0 0 / " % ) 0+ " %" > /"0 " / / ! " +
6 &$
/&
" # 0+
$ # " / D /"0 # / 6"% 0 + / % + + > % " % "- / /6 "6 / 0 0 + % % !" " ) !"" % ,+ - " "! %3 " 4 + " % " " ! % "/ 0 + " %+" %%" + + "" > "0 + ! " % # 0 + - +" " + . . ' ,+ +" + " / ) / / + "! " " # / + + "! > " # . ' /" C %%" )" # # +)% 4 " " " " " " / ) "+ -
$
& $!
,+ " % % ! 0
9
"! + 0 + + - , " ,+ " D .
" ,+ % % %
'
$ $9
& !!
& !!
&)
39
D ,"" 4 "0 ,+ - " "! + "" 4 ! ) + " " ) !" + D / ) ,D &" / % &6 8* // %%" !" 1 1 !" %" %%" # 0 + &6 I ,+ > " ) !" D /"0 / "
&)
: /;:
%
D ,"" 4 !" /" 2 D ,"" 4 # . / "!! .1 " ,+ . + ) " .1 .+" / / + . % "- / # + ,1.< .# / =,,. % " " " %%"
// "
)#
/
+
%%" - " / 0" 4
!! > !" D /"0 % !"
/
+ .G'' / -
" !"
D
,"" 4
'
.
** / &
> !" D /"0 ' D
'
%
!
" % !"
:'
> !" D /"0 % !" /" /# "
0
'
! '
0 + " ) "! " 0 !" / " %%" " ) D /"0 / " $ #" ,+ ! 0 % "- / / " 0 "
" +
0" 4 ")-
%
+ # " - " !" - )0
" " 6 "
"
D,> )
&
%
%
," + >C# 0 0" / " 0 + "! + - " /"0 " / + " # 0 !" + " ) + "" 3 @% " / 0 +" -" ) / 0 + - / "%% / + " + "" " + - 4 % " ) + / " " % / " %% " ; ' J 0 +" 7 % 6 ,+ / " 0 3 """ IJ'# " ) " .G''# "4 J' # / ! / D,> LD &,M
# -
+ " " 0 " !)A / @ "A ,+ 0 0 + - +" % %
/ !
# D,>
" % &$
7
% # "
+
"3
set PROJBINDIR=..\..\..\bin copy emulator.propertiesSUN ..\simulators\WTK21\wtklib\emulator.properties cd ..\simulators\WTK21\bin emulator -classpath %PROJBINDIR%\LuxDeal.jar Xdescriptor:%PROJBINDIR%\LuxDeal.jad cd %PROJBINDIR%
"
% 3
&$ B@:
9
3
'$ &
( ) $ @:66