1 5 6 package org.exoplatform.services.wsrp.mock; 7 8 9 import javax.xml.rpc.ServiceException ; 10 import javax.xml.rpc.Call ; 11 import javax.xml.rpc.handler.HandlerRegistry ; 12 import javax.xml.rpc.encoding.TypeMappingRegistry ; 13 import javax.xml.namespace.QName ; 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 ; 24 import java.rmi.Remote ; 25 import java.util.Iterator ; 26 27 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 getWSRPPortletManagementServiceAddress() { 48 return "Mock"; 49 } 50 51 public WSRP_v1_PortletManagement_PortType getWSRPPortletManagementService() throws ServiceException { 52 return portletManagementOperationsInterface; 53 } 54 55 public WSRP_v1_PortletManagement_PortType getWSRPPortletManagementService(URL portAddress) throws ServiceException { 56 return portletManagementOperationsInterface; 57 } 58 59 public String getWSRPRegistrationServiceAddress() { 60 return "Mock"; 61 } 62 63 public WSRP_v1_Registration_PortType getWSRPRegistrationService() throws ServiceException { 64 return registrationOperationsInterface; 65 } 66 67 public WSRP_v1_Registration_PortType getWSRPRegistrationService(URL portAddress) throws ServiceException { 68 return registrationOperationsInterface; 69 } 70 71 public String getWSRPBaseServiceAddress() { 72 return "Mock"; 73 } 74 75 public WSRP_v1_Markup_PortType getWSRPBaseService() throws ServiceException { 76 return markupOperationsInterface; 77 } 78 79 public WSRP_v1_Markup_PortType getWSRPBaseService(URL portAddress) throws ServiceException { 80 return markupOperationsInterface; 81 } 82 83 public String getWSRPServiceDescriptionServiceAddress() { 84 return "Mock"; 85 } 86 87 public WSRP_v1_ServiceDescription_PortType getWSRPServiceDescriptionService() throws ServiceException { 88 return serviceDescriptionInterface; 89 } 90 91 public WSRP_v1_ServiceDescription_PortType getWSRPServiceDescriptionService(URL portAddress) throws ServiceException { 92 return serviceDescriptionInterface; 93 } 94 95 96 97 99 100 public Remote getPort(QName qName, Class aClass) throws ServiceException { 101 return null; } 103 104 public Remote getPort(Class aClass) throws ServiceException { 105 return null; } 107 108 public Call [] getCalls(QName qName) throws ServiceException { 109 return new Call [0]; } 111 112 public Call createCall(QName qName) throws ServiceException { 113 return null; } 115 116 public Call createCall(QName qName, QName qName1) throws ServiceException { 117 return null; } 119 120 public Call createCall(QName qName, String string) throws ServiceException { 121 return null; } 123 124 public Call createCall() throws ServiceException { 125 return null; } 127 128 public QName getServiceName() { 129 return null; } 131 132 public Iterator getPorts() throws ServiceException { 133 return null; } 135 136 public URL getWSDLDocumentLocation() { 137 return null; } 139 140 public TypeMappingRegistry getTypeMappingRegistry() { 141 return null; } 143 144 public HandlerRegistry getHandlerRegistry() { 145 return null; } 147 } 148 | Popular Tags |