KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > wsrp > mocks > MockWSRPService


1 /*
2 * Copyright 2001-2004 The eXo platform SARL All rights reserved.
3 * Please look at license.txt in info directory for more license detail.
4 */

5
6 package org.exoplatform.services.wsrp.mocks;
7
8
9 import javax.xml.rpc.ServiceException JavaDoc;
10 import javax.xml.rpc.Call JavaDoc;
11 import javax.xml.rpc.handler.HandlerRegistry JavaDoc;
12 import javax.xml.rpc.encoding.TypeMappingRegistry JavaDoc;
13 import javax.xml.namespace.QName JavaDoc;
14 import org.exoplatform.services.wsrp.bind.WSRP_v1_Markup_Binding_SOAPImpl;
15 import org.exoplatform.services.wsrp.bind.WSRP_v1_PortletManagement_Binding_SOAPImpl;
16 import org.exoplatform.services.wsrp.bind.WSRP_v1_Registration_Binding_SOAPImpl;
17 import org.exoplatform.services.wsrp.bind.WSRP_v1_ServiceDescription_Binding_SOAPImpl;
18 import org.exoplatform.services.wsrp.intf.WSRP_v1_Markup_PortType;
19 import org.exoplatform.services.wsrp.intf.WSRP_v1_PortletManagement_PortType;
20 import org.exoplatform.services.wsrp.intf.WSRP_v1_Registration_PortType;
21 import org.exoplatform.services.wsrp.intf.WSRP_v1_ServiceDescription_PortType;
22 import org.exoplatform.services.wsrp.wsdl.WSRPService;
23 import org.exoplatform.services.wsrp.wsdl.WSRPServiceLocator;
24 import java.net.URL JavaDoc;
25 import java.rmi.Remote JavaDoc;
26 import java.util.Iterator JavaDoc;
27
28 /*
29  * @author Mestrallet Benjamin
30  * benjmestrallet@users.sourceforge.net
31  * Date: 3 févr. 2004
32  * Time: 02:59:48
33  */

34
35 public class MockWSRPService extends WSRPServiceLocator implements WSRPService {
36   private WSRP_v1_ServiceDescription_Binding_SOAPImpl serviceDescriptionInterface;
37   private WSRP_v1_Registration_Binding_SOAPImpl registrationOperationsInterface;
38   private WSRP_v1_Markup_Binding_SOAPImpl markupOperationsInterface;
39   private WSRP_v1_PortletManagement_Binding_SOAPImpl portletManagementOperationsInterface;
40
41   public MockWSRPService() {
42     serviceDescriptionInterface = new WSRP_v1_ServiceDescription_Binding_SOAPImpl();
43     registrationOperationsInterface = new WSRP_v1_Registration_Binding_SOAPImpl();
44     markupOperationsInterface = new WSRP_v1_Markup_Binding_SOAPImpl();
45     portletManagementOperationsInterface = new WSRP_v1_PortletManagement_Binding_SOAPImpl();
46   }
47
48   public String JavaDoc getWSRPPortletManagementServiceAddress() {
49     return "Mock";
50   }
51
52   public WSRP_v1_PortletManagement_PortType getWSRPPortletManagementService() throws ServiceException JavaDoc {
53     return portletManagementOperationsInterface;
54   }
55
56   public WSRP_v1_PortletManagement_PortType getWSRPPortletManagementService(URL JavaDoc portAddress) throws ServiceException JavaDoc {
57     return portletManagementOperationsInterface;
58   }
59
60   public String JavaDoc getWSRPRegistrationServiceAddress() {
61     return "Mock";
62   }
63
64   public WSRP_v1_Registration_PortType getWSRPRegistrationService() throws ServiceException JavaDoc {
65     return registrationOperationsInterface;
66   }
67
68   public WSRP_v1_Registration_PortType getWSRPRegistrationService(URL JavaDoc portAddress) throws ServiceException JavaDoc {
69     return registrationOperationsInterface;
70   }
71
72   public String JavaDoc getWSRPBaseServiceAddress() {
73     return "Mock";
74   }
75
76   public WSRP_v1_Markup_PortType getWSRPBaseService() throws ServiceException JavaDoc {
77     return markupOperationsInterface;
78   }
79
80   public WSRP_v1_Markup_PortType getWSRPBaseService(URL JavaDoc portAddress) throws ServiceException JavaDoc {
81     return markupOperationsInterface;
82   }
83
84   public String JavaDoc getWSRPServiceDescriptionServiceAddress() {
85     return "Mock";
86   }
87
88   public WSRP_v1_ServiceDescription_PortType getWSRPServiceDescriptionService() throws ServiceException JavaDoc {
89     return serviceDescriptionInterface;
90   }
91
92   public WSRP_v1_ServiceDescription_PortType getWSRPServiceDescriptionService(URL JavaDoc portAddress) throws ServiceException JavaDoc {
93     return serviceDescriptionInterface;
94   }
95
96
97
98   ///not necessary to implement
99

100
101   public Remote JavaDoc getPort(QName JavaDoc qName, Class JavaDoc aClass) throws ServiceException JavaDoc {
102     return null; //To change body of implemented methods use File | Settings | File Templates.
103
}
104
105   public Remote JavaDoc getPort(Class JavaDoc aClass) throws ServiceException JavaDoc {
106     return null; //To change body of implemented methods use File | Settings | File Templates.
107
}
108
109   public Call JavaDoc[] getCalls(QName JavaDoc qName) throws ServiceException JavaDoc {
110     return new Call JavaDoc[0]; //To change body of implemented methods use File | Settings | File Templates.
111
}
112
113   public Call JavaDoc createCall(QName JavaDoc qName) throws ServiceException JavaDoc {
114     return null; //To change body of implemented methods use File | Settings | File Templates.
115
}
116
117   public Call JavaDoc createCall(QName JavaDoc qName, QName JavaDoc qName1) throws ServiceException JavaDoc {
118     return null; //To change body of implemented methods use File | Settings | File Templates.
119
}
120
121   public Call JavaDoc createCall(QName JavaDoc qName, String JavaDoc string) throws ServiceException JavaDoc {
122     return null; //To change body of implemented methods use File | Settings | File Templates.
123
}
124
125   public Call JavaDoc createCall() throws ServiceException JavaDoc {
126     return null; //To change body of implemented methods use File | Settings | File Templates.
127
}
128
129   public QName JavaDoc getServiceName() {
130     return null; //To change body of implemented methods use File | Settings | File Templates.
131
}
132
133 /* public Iterator getPorts() throws ServiceException {
134     return null; //To change body of implemented methods use File | Settings | File Templates.
135   }*/

136
137   public URL JavaDoc getWSDLDocumentLocation() {
138     return null; //To change body of implemented methods use File | Settings | File Templates.
139
}
140
141   public TypeMappingRegistry JavaDoc getTypeMappingRegistry() {
142     return null; //To change body of implemented methods use File | Settings | File Templates.
143
}
144
145   public HandlerRegistry JavaDoc getHandlerRegistry() {
146     return null; //To change body of implemented methods use File | Settings | File Templates.
147
}
148 }
149
Popular Tags