Integrating .NET & J2EE With Web Services
by David Houlding and Sekar Govindasamy

Example 1:

/**
* @ejb.bean
* name="FinanceService"
* jndi-name="FinanceService"
* local-jndi-name="LocalSecurityService"
* type="Stateless"
*/

Example 2:
CookieContainer cookies = new CookieContainer(); 
SecurityServiceWebServiceService securityService = new 
  SecurityServiceWebServiceService();
FinanceServiceWebServiceService financeService = new 
  FinanceServiceWebServiceService();
securityService.CookieContainer = cookies; 
financeService.CookieContainer = cookies;
// Session cookie gets set in cookie container after successful login. 
// Session cookie gets sent with requests for other web services that 
// have the same cookie container.double stockPrice = financeService.getStockQuote ("MSFT");


Example 3:

  <soapenv:Fault>
   <faultcode 
xmlns:ns1="http://xml.apache.org/axis/">ns1:Server.userException</faultcode>
   <faultstring>security.InvalidLogin: code:1001,Invalid user 
id</faultstring>
   <detail>
    <ns2:stackTrace 
xmlns:ns2="http://xml.apache.org/axis/">...</ns2:stackTrace>
   </detail>
  </soapenv:Fault>





1


