cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1374262 - /cxf/trunk/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/WSDiscoveryClient.java
Date Fri, 17 Aug 2012 13:55:29 GMT
Author: dkulp
Date: Fri Aug 17 13:55:29 2012
New Revision: 1374262

URL: http://svn.apache.org/viewvc?rev=1374262&view=rev
Log:
Add a constructor for managed mode

Modified:
    cxf/trunk/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/WSDiscoveryClient.java

Modified: cxf/trunk/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/WSDiscoveryClient.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/WSDiscoveryClient.java?rev=1374262&r1=1374261&r2=1374262&view=diff
==============================================================================
--- cxf/trunk/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/WSDiscoveryClient.java
(original)
+++ cxf/trunk/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/WSDiscoveryClient.java
Fri Aug 17 13:55:29 2012
@@ -22,6 +22,7 @@ package org.apache.cxf.ws.discovery;
 import java.io.Closeable;
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
 
@@ -47,6 +48,7 @@ import org.apache.cxf.ws.addressing.Attr
 import org.apache.cxf.ws.addressing.ContextUtils;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 import org.apache.cxf.ws.addressing.JAXWSAConstants;
+import org.apache.cxf.ws.addressing.WSAddressingFeature;
 import org.apache.cxf.ws.addressing.impl.AddressingPropertiesImpl;
 import org.apache.cxf.ws.discovery.wsdl.AppSequenceType;
 import org.apache.cxf.ws.discovery.wsdl.ByeType;
@@ -71,7 +73,10 @@ public class WSDiscoveryClient implement
     
     public WSDiscoveryClient() {
     }
-    
+    public WSDiscoveryClient(String address) {
+        this.address = address;
+        adHoc = false;
+    }
     private synchronized JAXBContext getJAXBContext() {
         if (jaxbContext == null) {
             try {
@@ -90,6 +95,7 @@ public class WSDiscoveryClient implement
             }
             factory.setBindingId(SOAPBinding.SOAP12HTTP_BINDING);
             factory.setAddress(address);
+            factory.setFeatures(Arrays.asList(new WSAddressingFeature()));
             client = factory.create(DiscoveryProxy.class);
             ((BindingProvider)client).getRequestContext()
                 .put("thread.local.request.context", Boolean.TRUE);



Mime
View raw message