List of usage examples for javax.xml.ws BindingProvider ENDPOINT_ADDRESS_PROPERTY
String ENDPOINT_ADDRESS_PROPERTY
To view the source code for javax.xml.ws BindingProvider ENDPOINT_ADDRESS_PROPERTY.
Click Source Link
From source file:org.apache.juddi.samples.JuddiAdminService.java
void pingAll() throws Exception { List<Node> uddiNodeList = clerkManager.getClientConfig().getUDDINodeList(); UDDIReplicationPortType uddiReplicationPort = new UDDIService().getUDDIReplicationPort(); TransportSecurityHelper.applyTransportSecurity((BindingProvider) uddiReplicationPort); for (Node currenteNode : uddiNodeList) { try {/* ww w. java 2 s . co m*/ String replicationUrl = clerkManager.getClientConfig().getUDDINode(currenteNode.getName()) .getReplicationUrl(); ((BindingProvider) uddiReplicationPort).getRequestContext() .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, replicationUrl); long now = System.currentTimeMillis(); String doPing = uddiReplicationPort.doPing(new DoPing()); System.out.println(replicationUrl + " " + currenteNode.getName() + " says it's node id is " + doPing + " (took " + (System.currentTimeMillis() - now) + "ms)"); } catch (Exception ex) { System.out.println("Error! " + currenteNode.getName() + " " + currenteNode.getReplicationUrl()); ex.printStackTrace(); } } }
From source file:org.apache.juddi.samples.UddiReplication.java
public UddiReplication(UDDIClient client, String nodename) throws ConfigurationException { uddiReplicationPort = new UDDIService().getUDDIReplicationPort(); ((BindingProvider) uddiReplicationPort).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, client.getClientConfig().getUDDINode(nodename).getReplicationUrl()); }
From source file:org.apache.juddi.v3.client.cli.JuddiAdminService.java
/** * gets replication high water mark values * @param transport// ww w . j a va 2 s. c om * @param authtoken * @throws Exception */ void printStatus(Transport transport, String authtoken) throws Exception { JUDDIApiPortType juddiApiService = transport.getJUDDIApiService(); System.out.println("fetching..."); ReplicationConfiguration replicationNodes = null; try { replicationNodes = juddiApiService.getReplicationNodes(authtoken); } catch (Exception ex) { System.out.println("Error getting replication config"); ex.printStackTrace(); replicationNodes = new ReplicationConfiguration(); } UDDIReplicationPortType uddiReplicationPort = new UDDIService().getUDDIReplicationPort(); for (Operator o : replicationNodes.getOperator()) { System.out.println("*******************\n\rstats for node " + o.getOperatorNodeID()); ((BindingProvider) uddiReplicationPort).getRequestContext() .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, o.getSoapReplicationURL()); List<ChangeRecordIDType> highWaterMarks = uddiReplicationPort.getHighWaterMarks(); for (ChangeRecordIDType cr : highWaterMarks) { JAXB.marshal(cr, System.out); } } }
From source file:org.apache.juddi.v3.client.transport.JAXWSTransport.java
public UDDIInquiryPortType getUDDIInquiryService(String endpointURL) throws TransportException { try {// www . ja va 2 s .c om if (inquiryService == null) { if (endpointURL == null) { UDDIClient client = UDDIClientContainer.getUDDIClient(clientName); endpointURL = client.getClientConfig().getUDDINode(nodeName).getInquiryUrl(); } UDDIService service = new UDDIService(); inquiryService = service.getUDDIInquiryPort(); } Map<String, Object> requestContext = ((BindingProvider) inquiryService).getRequestContext(); requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL); setCredentials(requestContext); } catch (Exception e) { throw new TransportException(e.getMessage(), e); } return inquiryService; }
From source file:org.apache.juddi.v3.client.transport.JAXWSTransport.java
public UDDISecurityPortType getUDDISecurityService(String endpointURL) throws TransportException { try {/*from www . j a v a2 s .c o m*/ if (securityService == null) { if (endpointURL == null) { UDDIClient client = UDDIClientContainer.getUDDIClient(clientName); endpointURL = client.getClientConfig().getUDDINode(nodeName).getSecurityUrl(); } UDDIService service = new UDDIService(); securityService = service.getUDDISecurityPort(); } if (endpointURL != null) { Map<String, Object> requestContext = ((BindingProvider) securityService).getRequestContext(); requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL); setCredentials(requestContext); } } catch (Exception e) { throw new TransportException(e.getMessage(), e); } return securityService; }
From source file:org.apache.juddi.v3.client.transport.JAXWSTransport.java
public UDDIPublicationPortType getUDDIPublishService(String endpointURL) throws TransportException { try {//w w w .j a v a2s.c o m if (publishService == null) { if (endpointURL == null) { UDDIClient client = UDDIClientContainer.getUDDIClient(clientName); endpointURL = client.getClientConfig().getUDDINode(nodeName).getPublishUrl(); } UDDIService service = new UDDIService(); publishService = service.getUDDIPublicationPort(); } Map<String, Object> requestContext = ((BindingProvider) publishService).getRequestContext(); requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL); setCredentials(requestContext); } catch (Exception e) { throw new TransportException(e.getMessage(), e); } return publishService; }
From source file:org.apache.juddi.v3.client.transport.JAXWSTransport.java
public UDDISubscriptionPortType getUDDISubscriptionService(String endpointURL) throws TransportException { try {/*from www . j a va 2s .c om*/ if (subscriptionService == null) { if (endpointURL == null) { UDDIClient client = UDDIClientContainer.getUDDIClient(clientName); endpointURL = client.getClientConfig().getUDDINode(nodeName).getSubscriptionUrl(); } UDDIService service = new UDDIService(); subscriptionService = service.getUDDISubscriptionPort(); } if (endpointURL != null) { Map<String, Object> requestContext = ((BindingProvider) subscriptionService).getRequestContext(); requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL); setCredentials(requestContext); } } catch (Exception e) { throw new TransportException(e.getMessage(), e); } return subscriptionService; }
From source file:org.apache.juddi.v3.client.transport.JAXWSTransport.java
public UDDISubscriptionListenerPortType getUDDISubscriptionListenerService(String endpointURL) throws TransportException { try {//from w w w . jav a 2 s .com if (subscriptionListenerService == null) { if (endpointURL == null) { UDDIClient client = UDDIClientContainer.getUDDIClient(clientName); endpointURL = client.getClientConfig().getUDDINode(nodeName).getSubscriptionListenerUrl(); } UDDIService service = new UDDIService(); subscriptionListenerService = service.getUDDISubscriptionListenerPort(); } if (endpointURL != null) { Map<String, Object> requestContext = ((BindingProvider) subscriptionListenerService) .getRequestContext(); requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL); setCredentials(requestContext); } } catch (Exception e) { throw new TransportException(e.getMessage(), e); } return subscriptionListenerService; }
From source file:org.apache.juddi.v3.client.transport.JAXWSTransport.java
public UDDICustodyTransferPortType getUDDICustodyTransferService(String endpointURL) throws TransportException { try {/*from w w w . j a v a 2 s. co m*/ if (custodyTransferService == null) { if (endpointURL == null) { UDDIClient client = UDDIClientContainer.getUDDIClient(clientName); endpointURL = client.getClientConfig().getUDDINode(nodeName).getCustodyTransferUrl(); } UDDIService service = new UDDIService(); custodyTransferService = service.getUDDICustodyPort(); } if (endpointURL != null) { Map<String, Object> requestContext = ((BindingProvider) custodyTransferService).getRequestContext(); requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL); setCredentials(requestContext); } } catch (Exception e) { throw new TransportException(e.getMessage(), e); } return custodyTransferService; }
From source file:org.apache.juddi.v3.client.transport.JAXWSTransport.java
/** * This is a jUDDI specific API/*from www .j a v a 2 s. co m*/ */ public JUDDIApiPortType getJUDDIApiService(String endpointURL) throws TransportException { try { if (publisherService == null) { if (endpointURL == null) { UDDIClient client = UDDIClientContainer.getUDDIClient(clientName); endpointURL = client.getClientConfig().getUDDINode(nodeName).getJuddiApiUrl(); } JUDDIApiService service = new JUDDIApiService(); publisherService = (JUDDIApiPortType) service.getPort(JUDDIApiPortType.class); } if (endpointURL != null) { Map<String, Object> requestContext = ((BindingProvider) publisherService).getRequestContext(); requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL); setCredentials(requestContext); } } catch (Exception e) { throw new TransportException(e.getMessage(), e); } return publisherService; }