KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > wsrp > mock > 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.mock;
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 java.net.URL JavaDoc;
24 import java.rmi.Remote JavaDoc;
25 import java.util.Iterator JavaDoc;
26
27 /*
28  * @author Mestrallet Benjamin
29  * benjmestrallet@users.sourceforge.net
30  * Date: 3 févr. 2004
31  * Time: 02:59:48
32  */

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

99
100   public Remote JavaDoc getPort(QName JavaDoc qName, Class JavaDoc aClass) throws ServiceException JavaDoc {
101     return null; //To change body of implemented methods use File | Settings | File Templates.
102
}
103
104   public Remote JavaDoc getPort(Class JavaDoc aClass) throws ServiceException JavaDoc {
105     return null; //To change body of implemented methods use File | Settings | File Templates.
106
}
107
108   public Call JavaDoc[] getCalls(QName JavaDoc qName) throws ServiceException JavaDoc {
109     return new Call JavaDoc[0]; //To change body of implemented methods use File | Settings | File Templates.
110
}
111
112   public Call JavaDoc createCall(QName JavaDoc qName) throws ServiceException JavaDoc {
113     return null; //To change body of implemented methods use File | Settings | File Templates.
114
}
115
116   public Call JavaDoc createCall(QName JavaDoc qName, QName JavaDoc qName1) throws ServiceException JavaDoc {
117     return null; //To change body of implemented methods use File | Settings | File Templates.
118
}
119
120   public Call JavaDoc createCall(QName JavaDoc qName, String JavaDoc string) throws ServiceException JavaDoc {
121     return null; //To change body of implemented methods use File | Settings | File Templates.
122
}
123
124   public Call JavaDoc createCall() throws ServiceException JavaDoc {
125     return null; //To change body of implemented methods use File | Settings | File Templates.
126
}
127
128   public QName JavaDoc getServiceName() {
129     return null; //To change body of implemented methods use File | Settings | File Templates.
130
}
131
132   public Iterator JavaDoc getPorts() throws ServiceException JavaDoc {
133     return null; //To change body of implemented methods use File | Settings | File Templates.
134
}
135
136   public URL JavaDoc getWSDLDocumentLocation() {
137     return null; //To change body of implemented methods use File | Settings | File Templates.
138
}
139
140   public TypeMappingRegistry JavaDoc getTypeMappingRegistry() {
141     return null; //To change body of implemented methods use File | Settings | File Templates.
142
}
143
144   public HandlerRegistry JavaDoc getHandlerRegistry() {
145     return null; //To change body of implemented methods use File | Settings | File Templates.
146
}
147 }
148
Popular Tags