@Test public void testConfigureMetadataBindingSetsEndpoint() { final MetadataPortType binding = this.metadataBindingCache.getBinding(); assertEquals("https: getEndpoint(binding)); final String mdEndpt = "http: this.configurer.configureMetadataBinding(binding, new BindingConfig(new Id("012345678901234"), "session", "endpt", mdEndpt, "user")); assertEquals(mdEndpt, getEndpoint(binding)); }
void configureMetadataBinding(@Nonnull MetadataPortType metadataBinding, @Nonnull BindingConfig bindingConfig) { WSBindingProvider metadataWsBindingProvider = (WSBindingProvider) metadataBinding; this.configureRequestContextConnectionParams(metadataWsBindingProvider); com.palominolabs.crm.sf.soap.jaxwsstub.metadata.SessionHeader sessionHeader = new com.palominolabs.crm.sf.soap.jaxwsstub.metadata.SessionHeader(); sessionHeader.setSessionId(bindingConfig.getSessionId()); List<Header> headers = new ArrayList<Header>(); com.palominolabs.crm.sf.soap.jaxwsstub.metadata.CallOptions metadataCallOpts = new com.palominolabs.crm.sf.soap.jaxwsstub.metadata.CallOptions(); metadataCallOpts.setClient(this.partnerKey); headers.add(Headers.create(this.metadataJaxbContext, sessionHeader)); headers.add(Headers.create(this.metadataJaxbContext, metadataCallOpts)); metadataWsBindingProvider.setOutboundHeaders(headers); metadataWsBindingProvider.getRequestContext() .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, bindingConfig.getMetadataServerUrl()); logger.exit("User " + bindingConfig.getUsername() + ", session id " + bindingConfig.getSessionId() + " on metadata server" + bindingConfig.getMetadataServerUrl()); }
BindingConfigurer { void configureMetadataBinding(@Nonnull MetadataPortType metadataBinding, @Nonnull BindingConfig bindingConfig) { WSBindingProvider metadataWsBindingProvider = (WSBindingProvider) metadataBinding; this.configureRequestContextConnectionParams(metadataWsBindingProvider); com.palominolabs.crm.sf.soap.jaxwsstub.metadata.SessionHeader sessionHeader = new com.palominolabs.crm.sf.soap.jaxwsstub.metadata.SessionHeader(); sessionHeader.setSessionId(bindingConfig.getSessionId()); List<Header> headers = new ArrayList<Header>(); com.palominolabs.crm.sf.soap.jaxwsstub.metadata.CallOptions metadataCallOpts = new com.palominolabs.crm.sf.soap.jaxwsstub.metadata.CallOptions(); metadataCallOpts.setClient(this.partnerKey); headers.add(Headers.create(this.metadataJaxbContext, sessionHeader)); headers.add(Headers.create(this.metadataJaxbContext, metadataCallOpts)); metadataWsBindingProvider.setOutboundHeaders(headers); metadataWsBindingProvider.getRequestContext() .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, bindingConfig.getMetadataServerUrl()); logger.exit("User " + bindingConfig.getUsername() + ", session id " + bindingConfig.getSessionId() + " on metadata server" + bindingConfig.getMetadataServerUrl()); } }
BindingConfigurer { void configureMetadataBinding(@Nonnull MetadataPortType metadataBinding, @Nonnull BindingConfig bindingConfig) { WSBindingProvider metadataWsBindingProvider = (WSBindingProvider) metadataBinding; this.configureRequestContextConnectionParams(metadataWsBindingProvider); com.palominolabs.crm.sf.soap.jaxwsstub.metadata.SessionHeader sessionHeader = new com.palominolabs.crm.sf.soap.jaxwsstub.metadata.SessionHeader(); sessionHeader.setSessionId(bindingConfig.getSessionId()); List<Header> headers = new ArrayList<Header>(); com.palominolabs.crm.sf.soap.jaxwsstub.metadata.CallOptions metadataCallOpts = new com.palominolabs.crm.sf.soap.jaxwsstub.metadata.CallOptions(); metadataCallOpts.setClient(this.partnerKey); headers.add(Headers.create(this.metadataJaxbContext, sessionHeader)); headers.add(Headers.create(this.metadataJaxbContext, metadataCallOpts)); metadataWsBindingProvider.setOutboundHeaders(headers); metadataWsBindingProvider.getRequestContext() .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, bindingConfig.getMetadataServerUrl()); logger.exit("User " + bindingConfig.getUsername() + ", session id " + bindingConfig.getSessionId() + " on metadata server" + bindingConfig.getMetadataServerUrl()); } BindingConfigurer(@Nonnull String partnerKey, MetricRegistry metricRegistry); }
BindingConfigurer { void configureMetadataBinding(@Nonnull MetadataPortType metadataBinding, @Nonnull BindingConfig bindingConfig) { WSBindingProvider metadataWsBindingProvider = (WSBindingProvider) metadataBinding; this.configureRequestContextConnectionParams(metadataWsBindingProvider); com.palominolabs.crm.sf.soap.jaxwsstub.metadata.SessionHeader sessionHeader = new com.palominolabs.crm.sf.soap.jaxwsstub.metadata.SessionHeader(); sessionHeader.setSessionId(bindingConfig.getSessionId()); List<Header> headers = new ArrayList<Header>(); com.palominolabs.crm.sf.soap.jaxwsstub.metadata.CallOptions metadataCallOpts = new com.palominolabs.crm.sf.soap.jaxwsstub.metadata.CallOptions(); metadataCallOpts.setClient(this.partnerKey); headers.add(Headers.create(this.metadataJaxbContext, sessionHeader)); headers.add(Headers.create(this.metadataJaxbContext, metadataCallOpts)); metadataWsBindingProvider.setOutboundHeaders(headers); metadataWsBindingProvider.getRequestContext() .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, bindingConfig.getMetadataServerUrl()); logger.exit("User " + bindingConfig.getUsername() + ", session id " + bindingConfig.getSessionId() + " on metadata server" + bindingConfig.getMetadataServerUrl()); } BindingConfigurer(@Nonnull String partnerKey, MetricRegistry metricRegistry);  }
BindingConfigurer { void configureMetadataBinding(@Nonnull MetadataPortType metadataBinding, @Nonnull BindingConfig bindingConfig) { WSBindingProvider metadataWsBindingProvider = (WSBindingProvider) metadataBinding; this.configureRequestContextConnectionParams(metadataWsBindingProvider); com.palominolabs.crm.sf.soap.jaxwsstub.metadata.SessionHeader sessionHeader = new com.palominolabs.crm.sf.soap.jaxwsstub.metadata.SessionHeader(); sessionHeader.setSessionId(bindingConfig.getSessionId()); List<Header> headers = new ArrayList<Header>(); com.palominolabs.crm.sf.soap.jaxwsstub.metadata.CallOptions metadataCallOpts = new com.palominolabs.crm.sf.soap.jaxwsstub.metadata.CallOptions(); metadataCallOpts.setClient(this.partnerKey); headers.add(Headers.create(this.metadataJaxbContext, sessionHeader)); headers.add(Headers.create(this.metadataJaxbContext, metadataCallOpts)); metadataWsBindingProvider.setOutboundHeaders(headers); metadataWsBindingProvider.getRequestContext() .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, bindingConfig.getMetadataServerUrl()); logger.exit("User " + bindingConfig.getUsername() + ", session id " + bindingConfig.getSessionId() + " on metadata server" + bindingConfig.getMetadataServerUrl()); } BindingConfigurer(@Nonnull String partnerKey, MetricRegistry metricRegistry);   }