@Test public void testConfigureApexBindingSetsEndpoint() { final ApexPortType binding = this.apexBindingCache.getBinding(); assertEquals("https: getEndpoint(binding)); this.configurer.configureApexBinding(binding, new BindingConfig(new Id("012345678901234"), "session", "http: "http: assertEquals("https: }
void configureApexBinding(ApexPortType binding, BindingConfig bindingConfig) { WSBindingProvider apexWsBindingProvider = (WSBindingProvider) binding; this.configureRequestContextConnectionParams(apexWsBindingProvider); com.palominolabs.crm.sf.soap.jaxwsstub.apex.SessionHeader sessionHeader = new com.palominolabs.crm.sf.soap.jaxwsstub.apex.SessionHeader(); sessionHeader.setSessionId(bindingConfig.getSessionId()); List<Header> headers = new ArrayList<Header>(); com.palominolabs.crm.sf.soap.jaxwsstub.apex.CallOptions apexCallOpts = new com.palominolabs.crm.sf.soap.jaxwsstub.apex.CallOptions(); apexCallOpts.setClient(this.partnerKey); DebuggingHeader apexDebug = new DebuggingHeader(); apexDebug.setDebugLevel(LogType.PROFILING); for (LogCategory category : LogCategory.values()) { LogInfo logInfo = new LogInfo(); logInfo.setCategory(category); logInfo.setLevel(LogCategoryLevel.DEBUG); apexDebug.getCategories().add(logInfo); } headers.add(Headers.create(this.apexJaxbContext, sessionHeader)); headers.add(Headers.create(this.apexJaxbContext, apexCallOpts)); headers.add(Headers.create(this.apexJaxbContext, apexDebug)); apexWsBindingProvider.setOutboundHeaders(headers); apexWsBindingProvider.getRequestContext() .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, bindingConfig.getApexServerUrl()); logger.exit("User " + bindingConfig.getUsername() + ", session id " + bindingConfig.getSessionId() + " on apex server" + bindingConfig.getApexServerUrl()); }
BindingConfigurer { void configureApexBinding(ApexPortType binding, BindingConfig bindingConfig) { WSBindingProvider apexWsBindingProvider = (WSBindingProvider) binding; this.configureRequestContextConnectionParams(apexWsBindingProvider); com.palominolabs.crm.sf.soap.jaxwsstub.apex.SessionHeader sessionHeader = new com.palominolabs.crm.sf.soap.jaxwsstub.apex.SessionHeader(); sessionHeader.setSessionId(bindingConfig.getSessionId()); List<Header> headers = new ArrayList<Header>(); com.palominolabs.crm.sf.soap.jaxwsstub.apex.CallOptions apexCallOpts = new com.palominolabs.crm.sf.soap.jaxwsstub.apex.CallOptions(); apexCallOpts.setClient(this.partnerKey); DebuggingHeader apexDebug = new DebuggingHeader(); apexDebug.setDebugLevel(LogType.PROFILING); for (LogCategory category : LogCategory.values()) { LogInfo logInfo = new LogInfo(); logInfo.setCategory(category); logInfo.setLevel(LogCategoryLevel.DEBUG); apexDebug.getCategories().add(logInfo); } headers.add(Headers.create(this.apexJaxbContext, sessionHeader)); headers.add(Headers.create(this.apexJaxbContext, apexCallOpts)); headers.add(Headers.create(this.apexJaxbContext, apexDebug)); apexWsBindingProvider.setOutboundHeaders(headers); apexWsBindingProvider.getRequestContext() .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, bindingConfig.getApexServerUrl()); logger.exit("User " + bindingConfig.getUsername() + ", session id " + bindingConfig.getSessionId() + " on apex server" + bindingConfig.getApexServerUrl()); } }
BindingConfigurer { void configureApexBinding(ApexPortType binding, BindingConfig bindingConfig) { WSBindingProvider apexWsBindingProvider = (WSBindingProvider) binding; this.configureRequestContextConnectionParams(apexWsBindingProvider); com.palominolabs.crm.sf.soap.jaxwsstub.apex.SessionHeader sessionHeader = new com.palominolabs.crm.sf.soap.jaxwsstub.apex.SessionHeader(); sessionHeader.setSessionId(bindingConfig.getSessionId()); List<Header> headers = new ArrayList<Header>(); com.palominolabs.crm.sf.soap.jaxwsstub.apex.CallOptions apexCallOpts = new com.palominolabs.crm.sf.soap.jaxwsstub.apex.CallOptions(); apexCallOpts.setClient(this.partnerKey); DebuggingHeader apexDebug = new DebuggingHeader(); apexDebug.setDebugLevel(LogType.PROFILING); for (LogCategory category : LogCategory.values()) { LogInfo logInfo = new LogInfo(); logInfo.setCategory(category); logInfo.setLevel(LogCategoryLevel.DEBUG); apexDebug.getCategories().add(logInfo); } headers.add(Headers.create(this.apexJaxbContext, sessionHeader)); headers.add(Headers.create(this.apexJaxbContext, apexCallOpts)); headers.add(Headers.create(this.apexJaxbContext, apexDebug)); apexWsBindingProvider.setOutboundHeaders(headers); apexWsBindingProvider.getRequestContext() .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, bindingConfig.getApexServerUrl()); logger.exit("User " + bindingConfig.getUsername() + ", session id " + bindingConfig.getSessionId() + " on apex server" + bindingConfig.getApexServerUrl()); } BindingConfigurer(@Nonnull String partnerKey, MetricRegistry metricRegistry); }
BindingConfigurer { void configureApexBinding(ApexPortType binding, BindingConfig bindingConfig) { WSBindingProvider apexWsBindingProvider = (WSBindingProvider) binding; this.configureRequestContextConnectionParams(apexWsBindingProvider); com.palominolabs.crm.sf.soap.jaxwsstub.apex.SessionHeader sessionHeader = new com.palominolabs.crm.sf.soap.jaxwsstub.apex.SessionHeader(); sessionHeader.setSessionId(bindingConfig.getSessionId()); List<Header> headers = new ArrayList<Header>(); com.palominolabs.crm.sf.soap.jaxwsstub.apex.CallOptions apexCallOpts = new com.palominolabs.crm.sf.soap.jaxwsstub.apex.CallOptions(); apexCallOpts.setClient(this.partnerKey); DebuggingHeader apexDebug = new DebuggingHeader(); apexDebug.setDebugLevel(LogType.PROFILING); for (LogCategory category : LogCategory.values()) { LogInfo logInfo = new LogInfo(); logInfo.setCategory(category); logInfo.setLevel(LogCategoryLevel.DEBUG); apexDebug.getCategories().add(logInfo); } headers.add(Headers.create(this.apexJaxbContext, sessionHeader)); headers.add(Headers.create(this.apexJaxbContext, apexCallOpts)); headers.add(Headers.create(this.apexJaxbContext, apexDebug)); apexWsBindingProvider.setOutboundHeaders(headers); apexWsBindingProvider.getRequestContext() .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, bindingConfig.getApexServerUrl()); logger.exit("User " + bindingConfig.getUsername() + ", session id " + bindingConfig.getSessionId() + " on apex server" + bindingConfig.getApexServerUrl()); } BindingConfigurer(@Nonnull String partnerKey, MetricRegistry metricRegistry);  }
BindingConfigurer { void configureApexBinding(ApexPortType binding, BindingConfig bindingConfig) { WSBindingProvider apexWsBindingProvider = (WSBindingProvider) binding; this.configureRequestContextConnectionParams(apexWsBindingProvider); com.palominolabs.crm.sf.soap.jaxwsstub.apex.SessionHeader sessionHeader = new com.palominolabs.crm.sf.soap.jaxwsstub.apex.SessionHeader(); sessionHeader.setSessionId(bindingConfig.getSessionId()); List<Header> headers = new ArrayList<Header>(); com.palominolabs.crm.sf.soap.jaxwsstub.apex.CallOptions apexCallOpts = new com.palominolabs.crm.sf.soap.jaxwsstub.apex.CallOptions(); apexCallOpts.setClient(this.partnerKey); DebuggingHeader apexDebug = new DebuggingHeader(); apexDebug.setDebugLevel(LogType.PROFILING); for (LogCategory category : LogCategory.values()) { LogInfo logInfo = new LogInfo(); logInfo.setCategory(category); logInfo.setLevel(LogCategoryLevel.DEBUG); apexDebug.getCategories().add(logInfo); } headers.add(Headers.create(this.apexJaxbContext, sessionHeader)); headers.add(Headers.create(this.apexJaxbContext, apexCallOpts)); headers.add(Headers.create(this.apexJaxbContext, apexDebug)); apexWsBindingProvider.setOutboundHeaders(headers); apexWsBindingProvider.getRequestContext() .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, bindingConfig.getApexServerUrl()); logger.exit("User " + bindingConfig.getUsername() + ", session id " + bindingConfig.getSessionId() + " on apex server" + bindingConfig.getApexServerUrl()); } BindingConfigurer(@Nonnull String partnerKey, MetricRegistry metricRegistry);   }