亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? 10.txt

?? 《JAVA WEB服務應用開發詳解》代碼
?? TXT
?? 第 1 頁 / 共 5 頁
字號:
102   
103           if (methodParameters != null) {
104                   int parametersCount = methodParameters.size ();
105                   args = new Object[parametersCount];
106                   argTypes = new Class[parametersCount];
107   
108                   for (int i = 0; i < parametersCount; i++) {
109                   Parameter param = (Parameter) methodParameters.elementAt (i);
110                           args[i] = param.getValue ();
111                           argTypes[i] = param.getType ();
112   
113                           if (respEncStyle == null) {
114                                  respEncStyle = param.getEncodingStyleURI ();
115                           }
116                   }
117           }
118   
119           if (respEncStyle == null) {
120             respEncStyle = Constants.NS_URI_SOAP_ENC;
121           }
122   
123           try {
124   
125        Method m = MethodUtils.getMethod (remoteObjRef, methodName, argTypes);
126                   Bean result = new Bean (m.getReturnType (),
127                   					 m.invoke (remoteObjRef, args));
128   
129   
130                   if (result.type != void.class) {
131                  ret = new Parameter (RPCConstants.ELEM_RETURN, result.type,
132                                                      result.value, null);
133                   }
134   
135   
136           } catch (InvocationTargetException e) {
137             System.err.println("Exception Caught upon method invocation attempt: "
138                   						 + e.getMessage());
139                   Throwable t = e.getTargetException ();
140             throw new SOAPException (Constants.FAULT_CODE_SERVER,
141             							 t.getMessage(), t);
142           }
143            catch (Throwable t) {
144             System.err.println("Exception Caught upon method invocation attempt: "
145                   							 + t.toString());
146                  throw new SOAPException (Constants.FAULT_CODE_SERVER,
147                   							 t.getMessage(), t);
148           }
149   
150           try {
151             Response resp = new Response( targetObjectURI,            
152             // URI
153                                  call.getMethodName(),       
154                                 		 // Method
155                                  (Parameter) ret,            
156                                  		// ReturnValue
157                                  null,                       
158                                  		// Params
159                                  null,                       
160                                  		// Header
161                                  respEncStyle,               
162                                  		// encoding
163                                  resContext );        
164                                  	// response soapcontext - not supported yet
165                     Envelope env = resp.buildEnvelope();
166                     StringWriter  sw = new StringWriter();
167                    env.marshall( sw, call.getSOAPMappingRegistry(), resContext );
168                     resContext.setRootPart( sw.toString(),
169                     	Constants.HEADERVAL_CONTENT_TYPE_UTF8);
170                   }
171                   catch( Exception e ) {
172                     if ( e instanceof SOAPException )
173                     			 throw (SOAPException ) e ;
174                  throw new SOAPException( Constants.FAULT_CODE_SERVER,
175                     						 e.toString() );
176                   }
177   }
178   
179   /**
180    * locate method comment.
181    */
182   public void locate(DeploymentDescriptor dd, 
183                      Envelope env, 
184                      Call call, 
185                      String methodName, 
186                      String targetObjectURI, 
187                      SOAPContext reqContext)
188                 throws org.apache.soap.SOAPException {
189   
190             HttpServlet servlet = (HttpServlet) 
191             		reqContext.getProperty( Constants.BAG_HTTPSERVLET );
192             HttpSession session = (HttpSession)
193             		reqContext.getProperty( Constants.BAG_HTTPSESSION );
194   
195    System.err.println( "===========================================" );
196             System.err.println( "In TemplateProvider.locate()" );
197             System.err.println( "URI: " + targetObjectURI );
198             System.err.println( "DD.ServiceClass: " + dd.getServiceClass() );
199             System.err.println( "DD.ProviderClass: " + dd.getProviderClass() );
200             System.err.println( "Call.MethodName: " + call.getMethodName() );
201   
202             this.dd              = dd ;
203             this.envelope        = env ;
204             this.call            = call ;
205             this.methodName      = methodName ;
206             this.targetObjectURI = targetObjectURI ;
207             this.servlet         = servlet ;
208             this.session         = session ;
209   
210             Hashtable props = dd.getProps();
211   
212   
213           String ContxtProviderURL = (String) props.get("ContextProviderURL");
214          String ContxtFactoryName = (String) props.get("FullContextFactoryName");
215   
216           if ((ContxtProviderURL != null) && (ContxtFactoryName != null))
217                   initialize(ContxtProviderURL, ContxtFactoryName);
218           else
219                   initialize();
220   
221          String homeInterfaceName = (String) props.get("FullHomeInterfaceName");
222           if (homeInterfaceName == null)
223                   throw new SOAPException(Constants.FAULT_CODE_SERVER,
224                   			"Error in Deployment Descriptor Property Settings");
225   
226           // From the Deployment Descriptor get the JNDI name
227           String jndiName = (String) props.get("JNDIName");
228           if ( jndiName == null ) jndiName = dd.getProviderClass();
229   
230           if ((jndiName != null) && (contxt != null)) {
231   
232                   try {
233   
234                       // Use service name to locate EJB home object via the contxt
235                        // EJBHome home = (EJBHome) contxt.lookup(jndiName);
236                     EJBHome home = (EJBHome) PortableRemoteObject.narrow(
237                    contxt.lookup(jndiName),Class.forName(homeInterfaceName));
238                     // call the 'create' method on the EJB home object, and store the
239                     //   ref to the EJB object.
240          Method createMethod = home.getClass().getMethod("create", new Class[0]);
241     remoteObjRef = (EJBObject) createMethod.invoke((Object) home, new Object[0]);
242   
243                   } catch (Exception e) {
244   
245                       System.out.println("Exception caught: " + e.toString());
246          throw new SOAPException(Constants.FAULT_CODE_SERVER,"Error in 
247          connecting to EJB", e);         }
248           }
249   
250           // Once previous steps have been successful, then we take the Call Object
251           // and extract the method name from it, and any parameters, and store them.
252           methodName = call.getMethodName();
253           methodParameters = call.getParams();
254   
255   
256   }
257   }
例程10-20
01   package samples.weblogic_ejb;
02   
03   /**
04    * This is an Enterprise Java Bean Remote Interface
05    */
06   public interface HelloService extends Javax.ejb.EJBObject {
07   
08   /**
09    *
10    * @return Java.lang.String
11    * @param phrase Java.lang.String
12    * @exception String The exception description.
13    */
14   Java.lang.String hello(Java.lang.String phrase) throws Java.rmi.RemoteException;
15   }
例程10-21
01   package samples.weblogic_ejb;
02   
03   /**
04    * This is a Home interface for the Session Bean
05    */
06   public interface HelloServiceHome extends Javax.ejb.EJBHome {
07   
08   /**
09    * create method for a session bean
10    * @return samples.HelloService
11    * @exception Javax.ejb.CreateException The exception description.
12    * @exception Java.rmi.RemoteException The exception description.
13    */
14   HelloService create() throws Javax.ejb.CreateException, Java.rmi.RemoteException;
15   }
例程10-22
01   package samples.weblogic_ejb;
02   
03   import Java.rmi.RemoteException;
04   import Java.security.Identity;
05   import Java.util.Properties;
06   import Javax.ejb.*;
07   
08   /**
09    * This is a Session Bean Class.
10    * It can be used with a stateless or stateful SOAP EJB provider.
11    *
12    * @author <a href="mailto:olivier@intraware.com">Olivier Brand</a>
13    * @version 1.0
14    * @since 1.0
15    * @see SessionBean
16    */
17   public class HelloServiceBean implements SessionBean {
18       private Javax.ejb.SessionContext mySessionCtx = null;
19   
20       // keeps track of the calls
21       private int nbcall = 0;
22   
23   /**
24    * ejbActivate method comment
25    * @exception Java.rmi.RemoteException The exception description.
26    */
27   public void ejbActivate() throws Java.rmi.RemoteException {}
28   /**
29    * ejbCreate method comment
30    * @exception Javax.ejb.CreateException The exception description.
31    * @exception Java.rmi.RemoteException The exception description.
32    */
33   public void ejbCreate() throws
34   			 Javax.ejb.CreateException, Java.rmi.RemoteException {}
35   
36   /**
37    * ejbPassivate method comment
38    * @exception Java.rmi.RemoteException The exception description.
39    */
40   public void ejbPassivate() throws Java.rmi.RemoteException {}
41   /**
42    * ejbRemove method comment
43    * @exception Java.rmi.RemoteException The exception description.
44    */
45   public void ejbRemove() throws Java.rmi.RemoteException {}
46   /**
47    * getSessionContext method comment
48    * @return Javax.ejb.SessionContext
49    */
50   public Javax.ejb.SessionContext getSessionContext() {
51           return mySessionCtx;
52   }
53   /**
54    * Insert the method's description here.
55    * Creation date: (10/31/00 1:44:19 PM)
56    * @return Java.lang.String
57    * @param phrase Java.lang.String
58    */
59   public String hello(String phrase)
60       {
61           try
62               {
63                   Thread.sleep(0);
64               }
65           catch(InterruptedException ex){}
66           finally
67               {
68                   return "HELLO!! You just said :" + phrase
69                   			 + " nb time: " + nbcall++;
70               }
71       }
72   /**
73    * setSessionContext method comment
74    * @param ctx Javax.ejb.SessionContext
75    * @exception Java.rmi.RemoteException The exception description.
76    */
77   public void setSessionContext(Javax.ejb.SessionContext ctx)
78   				 throws Java.rmi.RemoteException {
79           mySessionCtx = ctx;
80   }
81   }
例程10-23
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://Java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
<ejb-jar>
    <enterprise-beans>
      <session>
        <ejb-name>helloServiceSession</ejb-name>
        <home>samples.HelloServiceHome</home>
        <remote>samples.HelloService</remote>
        <ejb-class>samples.HelloServiceBean</ejb-class>
        <session-type>Stateful</session-type>
        <transaction-type>Container</transaction-type>
      </session>
    </enterprise-beans>
</ejb-jar>
例程10-24
01   <?xml version="1.0"?>
02   <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
03                id="urn:ejbhello">
04     <isd:provider type="org.apache.soap.providers.StatefulEJBProvider"
05                   scope="Application"
06                   methods="create">
07       <isd:Java class="samples.HelloService"/>
08     <isd:option key="FullHomeInterfaceName" value="samples.HelloServiceHome" />
09       <isd:option key="ContextProviderURL" value="t3://localhost:7001" />
10       <isd:option key="FullContextFactoryName"
11       		   value="weblogic.jndi.WLInitialContextFactory" />
12     </isd:provider>
13       <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
14   </isd:service>
例程10-25
01   //samples.weblogic_ejb.ejbtest.Java
02   package samples.weblogic_ejb;
03   
04   import Java.io.*;
05   import Java.net.*;
06   import Java.util.*;
07   import org.apache.soap.*;
08   import org.apache.soap.rpc.*;
09   
10   /**
11    * This sample class makes use of a stateful ejb service.
12    * The code contains a loop of 10 on one of the service's method to show that
13    * we are in a stateful mode.On the server side an instance variable (counter) 
14    * keeps track on how many time the service has been called.
15    *
16    * @author <a href="mailto:olivier@intraware.com">Olivier Brand</a>
17    * @version 1.0
18    * @since 1.0
19    */
20   public class ejb

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区电影在线播| 99在线精品免费| 99久久精品国产麻豆演员表| 精品视频1区2区| 国产亚洲欧美日韩日本| 日韩和欧美一区二区| 一本色道**综合亚洲精品蜜桃冫| 亚洲精品一区二区三区香蕉| 亚洲成人av福利| 色综合天天综合网国产成人综合天 | 国产三级欧美三级日产三级99| 一区二区视频免费在线观看| 成人免费视频免费观看| 久久国产精品色婷婷| 国产电影精品久久禁18| 欧美日韩电影一区| 中文字幕亚洲视频| 国产在线精品一区二区夜色| 欧美久久久久免费| 一区二区三区日韩欧美精品| 不卡欧美aaaaa| 国产日韩精品一区二区三区 | 蜜臀va亚洲va欧美va天堂| 色一区在线观看| 亚洲欧美自拍偷拍色图| 国产成人午夜视频| 久久九九久久九九| 国产一区二区三区黄视频 | 欧美日韩电影一区| 亚洲一区二区美女| 欧美影院午夜播放| 亚洲午夜国产一区99re久久| 欧美性大战久久久久久久蜜臀| 亚洲天堂成人网| 97久久人人超碰| 一区二区三区久久| 欧美性色黄大片手机版| 午夜精品视频一区| 56国语精品自产拍在线观看| 日韩av中文字幕一区二区三区| 欧美一区二区人人喊爽| 日本不卡免费在线视频| 日韩欧美资源站| 国产精品一线二线三线| 久久精品欧美一区二区三区不卡| 福利一区福利二区| 亚洲欧洲精品天堂一级| 色狠狠一区二区三区香蕉| 亚洲一区二区三区视频在线播放| 欧美高清视频不卡网| 久久99热99| 中文字幕在线视频一区| 91久久一区二区| 日韩二区三区四区| 久久久精品日韩欧美| 不卡欧美aaaaa| 五月天网站亚洲| 久久精品一区二区三区四区| 不卡一区二区中文字幕| 亚洲精品国产无套在线观| 欧美老肥妇做.爰bbww视频| 精品一区二区三区欧美| 亚洲欧洲日韩av| 欧美一区二区福利视频| 高清在线观看日韩| 亚洲国产精品视频| 久久久久久久久岛国免费| 色综合久久六月婷婷中文字幕| 日本va欧美va瓶| 国产精品久久久一本精品| 欧美日韩国产免费| 国产不卡在线视频| 婷婷成人激情在线网| 亚洲国产精品精华液ab| 欧美精品一卡两卡| 成人动漫一区二区在线| 乱中年女人伦av一区二区| 中文字幕一区二区三区在线观看 | 欧美三级电影网站| 国产精品主播直播| 亚洲国产精品久久久久婷婷884 | 欧美国产欧美综合| 欧美一区三区四区| 色噜噜夜夜夜综合网| 国产在线观看一区二区| 亚洲小说春色综合另类电影| 国产亚洲视频系列| 日韩视频永久免费| 欧美视频一区二区三区在线观看 | 亚洲三级在线观看| 久久一区二区视频| 欧美精品第1页| 91福利国产成人精品照片| 国产精品乡下勾搭老头1| 日本不卡高清视频| 午夜欧美大尺度福利影院在线看| 久久九九全国免费| 51久久夜色精品国产麻豆| 99re热这里只有精品免费视频| 久久电影网电视剧免费观看| 午夜精品影院在线观看| 亚洲精品国产成人久久av盗摄| 国产欧美精品一区二区色综合朱莉| 3d动漫精品啪啪一区二区竹菊| 日本精品一区二区三区四区的功能| 成人黄色国产精品网站大全在线免费观看| 蜜臀久久99精品久久久久宅男| 亚洲成人免费看| 亚洲电影欧美电影有声小说| 一区二区三区在线播放| 亚洲精品亚洲人成人网| 亚洲日本免费电影| 亚洲人成在线观看一区二区| 亚洲色欲色欲www| 亚洲女人****多毛耸耸8| 国产精品拍天天在线| 亚洲国产精品成人综合色在线婷婷 | 日韩视频免费观看高清完整版在线观看| 色综合久久中文字幕综合网| 日本精品一级二级| 欧美色视频在线| 日韩一区二区影院| 欧美r级在线观看| 国产亚洲欧美激情| 国产日韩影视精品| 《视频一区视频二区| 欧美成人高清电影在线| 欧美色综合网站| 欧美怡红院视频| 欧美色综合影院| 欧美一级久久久久久久大片| 欧美一区二区人人喊爽| 久久综合五月天婷婷伊人| 国产亚洲成av人在线观看导航 | 久久99国内精品| 国内精品免费在线观看| 成人在线视频首页| 日本精品一区二区三区高清 | 99re热这里只有精品免费视频| av网站免费线看精品| 欧美综合色免费| 91精品国产一区二区三区香蕉| 久久婷婷色综合| 成人免费在线播放视频| 亚洲妇熟xx妇色黄| 国产做a爰片久久毛片| 北条麻妃一区二区三区| 欧美色网站导航| 久久久久亚洲综合| 亚洲一区二区在线视频| 久久国产综合精品| 99精品一区二区三区| 6080yy午夜一二三区久久| 日本一区二区三区在线观看| 亚洲综合色视频| 欧美吞精做爰啪啪高潮| 精品美女一区二区三区| 亚洲精品乱码久久久久久日本蜜臀| 美国毛片一区二区| 99在线精品观看| 26uuu久久天堂性欧美| 亚洲美女免费视频| 国产精品一区二区x88av| 色综合久久99| 3d动漫精品啪啪| 成人免费在线播放视频| 91免费观看视频| 欧美精品一区二区在线播放| 一区二区三区在线视频播放| 国产精品1区2区3区在线观看| 色婷婷精品大在线视频| 国产三级三级三级精品8ⅰ区| 日本不卡一二三| 欧美在线啊v一区| 国产精品视频第一区| 精品一区二区三区在线播放视频| 欧美色老头old∨ideo| 《视频一区视频二区| 国产成人一区在线| 欧美电视剧免费全集观看| 午夜精品一区二区三区免费视频 | 一二三四区精品视频| 国产成a人亚洲精| 欧美一区二区国产| 亚洲一区二区三区不卡国产欧美 | 亚洲一区二区三区免费视频| 成人精品免费网站| 久久久久久亚洲综合影院红桃| 蜜桃视频免费观看一区| 欧美日韩aaaaaa| 亚洲激情网站免费观看| 99久久免费精品| 1区2区3区精品视频| 福利视频网站一区二区三区| 国产亚洲一二三区| 国产一区二区伦理| 久久这里只有精品首页| 狠狠色丁香久久婷婷综合_中| 精品国产一二三区| 国产一区二区中文字幕|