protected void setServiceProperties() { MethodDispatcher md = getMethodDispatcher(); getService().put(MethodDispatcher.class.getName(), md); for (Class<?> c : md.getClass().getInterfaces()) { getService().put(c.getName(), md); } if (properties != null) { getService().putAll(properties); } setOldMethodDispatcherProperty(); }
public Endpoint createEndpoint(EndpointInfo ei) throws EndpointException { Endpoint ep = new EndpointImpl(getBus(), getService(), ei); sendEvent(Event.ENDPOINT_CREATED, ei, ep, getServiceClass()); return ep; }
setServiceProperties(); sendEvent(Event.SERVICE_SET, getService()); for (ServiceInfo si : getService().getServiceInfos()) { si.setProperty(EXTRA_CLASS, cls);
setServiceProperties(); sendEvent(Event.SERVICE_SET, getService()); for (ServiceInfo si : getService().getServiceInfos()) { si.setProperty(EXTRA_CLASS, cls);
protected void setServiceProperties() { MethodDispatcher md = getMethodDispatcher(); getService().put(MethodDispatcher.class.getName(), md); for (Class<?> c : md.getClass().getInterfaces()) { getService().put(c.getName(), md); } if (properties != null) { getService().putAll(properties); } setOldMethodDispatcherProperty(); }
public Endpoint createEndpoint(EndpointInfo ei) throws EndpointException { Endpoint ep = new EndpointImpl(getBus(), getService(), ei); sendEvent(Event.ENDPOINT_CREATED, ei, ep, getServiceClass()); return ep; }
protected void initializeFaultInterceptors() { getService().getOutFaultInterceptors().add(new FaultOutInterceptor()); }
protected void initializeFaultInterceptors() { getService().getOutFaultInterceptors().add(new FaultOutInterceptor()); }
@Deprecated protected void setOldMethodDispatcherProperty() { //Try adding the MethodDispatcher using the old interface MethodDispatcher md = getMethodDispatcher(); if (getService().get("org.apache.cxf.frontend.MethodDispatcher") == null) { try { Class<?> cls = ClassLoaderUtils.loadClass("org.apache.cxf.frontend.MethodDispatcher", getClass()); Object o = Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class[] {cls}, new ReflectionInvokationHandler(md)); getService().put("org.apache.cxf.frontend.MethodDispatcher", o); } catch (Exception ex) { //ignore } } }
@Deprecated protected void setOldMethodDispatcherProperty() { //Try adding the MethodDispatcher using the old interface MethodDispatcher md = getMethodDispatcher(); if (getService().get("org.apache.cxf.frontend.MethodDispatcher") == null) { try { Class<?> cls = ClassLoaderUtils.loadClass("org.apache.cxf.frontend.MethodDispatcher", getClass()); Object o = Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class[] {cls}, new ReflectionInvokationHandler(md)); getService().put("org.apache.cxf.frontend.MethodDispatcher", o); } catch (Exception ex) { //ignore } } }
public EndpointInfo getEndpointInfo() { return getService().getEndpointInfo(getEndpointName()); }
public EndpointInfo getEndpointInfo() { return getService().getEndpointInfo(getEndpointName()); }
@Override public synchronized Service create() { reset(); sendEvent(Event.START_CREATE); initializeServiceConfigurations(); initializeServiceModel(); initializeDefaultInterceptors(); if (invoker != null) { getService().setInvoker(getInvoker()); } else { getService().setInvoker(createInvoker()); } if (getExecutor() != null) { getService().setExecutor(getExecutor()); } if (getDataBinding() != null) { getService().setDataBinding(getDataBinding()); } getService().put(MethodDispatcher.class.getName(), getMethodDispatcher()); createEndpoints(); fillInSchemaCrossreferences(); Service serv = getService(); sendEvent(Event.END_CREATE, serv); return serv; }
@Override public synchronized Service create() { reset(); sendEvent(Event.START_CREATE); initializeServiceConfigurations(); initializeServiceModel(); initializeDefaultInterceptors(); if (invoker != null) { getService().setInvoker(getInvoker()); } else { getService().setInvoker(createInvoker()); } if (getExecutor() != null) { getService().setExecutor(getExecutor()); } if (getDataBinding() != null) { getService().setDataBinding(getDataBinding()); } getService().put(MethodDispatcher.class.getName(), getMethodDispatcher()); createEndpoints(); fillInSchemaCrossreferences(); Service serv = getService(); sendEvent(Event.END_CREATE, serv); return serv; }
protected InterfaceInfo getInterfaceInfo() { if (getEndpointInfo() != null) { return getEndpointInfo().getInterface(); } QName qn = this.getInterfaceName(); for (ServiceInfo si : getService().getServiceInfos()) { if (qn.equals(si.getInterface().getName())) { return si.getInterface(); } } throw new ServiceConstructionException(new Message("COULD_NOT_FIND_PORTTYPE", LOG, qn)); }
protected InterfaceInfo getInterfaceInfo() { if (getEndpointInfo() != null) { return getEndpointInfo().getInterface(); } QName qn = this.getInterfaceName(); for (ServiceInfo si : getService().getServiceInfos()) { if (qn.equals(si.getInterface().getName())) { return si.getInterface(); } } throw new ServiceConstructionException(new Message("COULD_NOT_FIND_PORTTYPE", LOG, qn)); }
Service service = getService(); for (ServiceInfo serviceInfo : service.getServiceInfos()) { SchemaCollection schemaCollection = serviceInfo.getXmlSchemaCollection();
Service service = getService(); for (ServiceInfo serviceInfo : service.getServiceInfos()) { SchemaCollection schemaCollection = serviceInfo.getXmlSchemaCollection();
protected void createEndpoints() { Service service = getService(); BindingFactoryManager bfm = getBus().getExtension(BindingFactoryManager.class); for (ServiceInfo inf : service.getServiceInfos()) { for (EndpointInfo ei : inf.getEndpoints()) { for (BindingOperationInfo boi : ei.getBinding().getOperations()) { updateBindingOperation(boi); } try { bfm.getBindingFactory(ei.getBinding().getBindingId()); } catch (BusException e1) { continue; } try { Endpoint ep = createEndpoint(ei); service.getEndpoints().put(ei.getName(), ep); } catch (EndpointException e) { throw new ServiceConstructionException(e); } } } }
protected void createEndpoints() { Service service = getService(); BindingFactoryManager bfm = getBus().getExtension(BindingFactoryManager.class); for (ServiceInfo inf : service.getServiceInfos()) { for (EndpointInfo ei : inf.getEndpoints()) { for (BindingOperationInfo boi : ei.getBinding().getOperations()) { updateBindingOperation(boi); } try { bfm.getBindingFactory(ei.getBinding().getBindingId()); } catch (BusException e1) { continue; } try { Endpoint ep = createEndpoint(ei); service.getEndpoints().put(ei.getName(), ep); } catch (EndpointException e) { throw new ServiceConstructionException(e); } } } }