Hello all,
In preparation for the Metro-based version of the stocktrader demo I have
crawled around the Java code. A first past plan is (no attempt to
do any code sharing or refactoring at this time):
- Create the service side Java artifacts from the WSDLs at
contrib/stocktrader/java/business_service/resources/META-INF
contrib/stocktrader/java/order_processor/processor-service/resources/[ msec |
nosec ]/META-INF/
- Adapt hand-written code at
contrib/stocktrader/java/business_service/src/org/wso2/stocktrader/
contrib/stocktrader/java/order_processor/processor-service/src/org/wso2/stocktrader/
to work with Metro (initially using MSSQL).
In other words, create the services from WSDL then supplying the
business/DB logic using hand-written code (and NOT attempting to use
ANY of the generated code).
Does that plan sound reasonable?
Also, can someone point out the place in the code where one service
calls another, AND the initial client call that starts things moving?
Finally, I have created a map of the Java code below. Could someone
comment on this map and answer the embedded questions?
Thanks,
Harold
--------------------------------------------------
contrib/stocktrader/java/business_service/resources/META-INF
*****
*.wsdl *.xsd
The service seems to be generated from WSDL (rather from Java).
Is that correct?
What is services.xml for?
Why checkin a generated file?
contrib/stocktrader/java/business_service/src/com/ibm/websphere/samples/trade/
GENERATED CODE
Why checkin generated code rather than just building it?
contrib/stocktrader/java/business_service/src/com/microsoft/schemas/_2003/_10/serialization/
GENERATED CODE
contrib/stocktrader/java/business_service/src/org/tempuri/
GENERATED CODE
contrib/stocktrader/java/business_service/src/org/wso2/interop/stocktrader/
GENERATED CODE
contrib/stocktrader/java/business_service/src/org/wso2/stocktrader/
***** The real "business" logic, connection to DB, services *****
contrib/stocktrader/java/business_service/src/traderorderhost/trade/
GENERATED CODE
--------------------------------------------------
contrib/stocktrader/java/config_service/
***** Configuration code written in Javascript *****
--------------------------------------------------
contrib/stocktrader/java/documents/
Config UI and Java StockTrader installation guides
--------------------------------------------------
contrib/stocktrader/java/order_processor/processor-service/resources
msec : service with security
nosec : service without security
contrib/stocktrader/java/order_processor/processor-service/resources/[ msec |
nosec ]/META-INF/
*****
*.wsdl *.xsd
The service seems to be generated from WSDL (rather from Java).
Is that correct?
Both msec and nosec/META-INF contain identical files except
nosec/META-INF/stock-trader.properties. Why?
contrib/stocktrader/java/order_processor/processor-service/src/com/ibm/websphere/samples/trade/
GENERATED CODE
Seems to be identical with
contrib/stocktrader/java/business_service/src/com/ibm/websphere/samples/trade/
Why have identical (generated) code?
contrib/stocktrader/java/order_processor/processor-service/src/com/microsoft/schemas/_2003/_10/serialization/
GENERATED CODE
Seems to be identical with
contrib/stocktrader/java/business_service/src/com/microsoft/schemas/_2003/_10/serialization/
contrib/stocktrader/java/order_processor/processor-service/src/org/tempuri/
GENERATED CODE
contrib/stocktrader/java/order_processor/processor-service/src/org/wso2/stocktrader/
***** The "real" business logic ****
Has much code that is duplicated from
contrib/stocktrader/java/business_service/src/org/wso2/stocktrader/
contrib/stocktrader/java/order_processor/processor-service/src/traderorderhost/trade/
GENERATED CODE
;;; End of file.