Couple thoughts: 1) you could copy the wsdl locally, maybe even bundle it into the client jar, and just use it that way. You can override the URL it's going to hit at runtime via:
((BindingProvider)port).getRequestContext().put( BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://blah.blah/blah"); 2) You can do: Service service = Service.create(servName); service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, "http://blah.blah/blah"); ServicePort port = service.getPort(portName, ServicePort.class); Dan On Wed April 8 2009 12:10:13 pm [email protected] wrote: > Hi everyone, > > I'm in trouble using cxf. > > I'm looking for a way to send a request from a client, which cannot see the > wsdL; > first, is that possible ? > > In fact, i've developped a service using wsdl2java, but the client will not > be able to see the wsdl (security rules..) > > So, I don't know how to make the code work, and how to get a port to send > my requests. > > > for informations, here is the way a get a port, when I hava access to my > wsdl : > > my service : > > @WebServiceClient(name = "Service", > wsdlLocation = "wsdl/theWSDL.wsdl", > targetNamespace = "http://target.com") > > public class A64A extends Service { > > public final static URL WSDL_LOCATION; > public final static QName SERVICE = new QName("http://target.com", > "Service"); > public final static QName A64APort = new QName("http://target.com", > "ServicePort"); > static { > URL url = null; > try { > url = new URL("wsdl/theWSDL.wsdl"); > } catch (MalformedURLException e) { > System.err.println("Can not initialize the default > wsdl"); // e.printStackTrace(); > } > WSDL_LOCATION = url; > } > > public Service(URL wsdlLocation, QName serviceName) { > super(wsdlLocation, serviceName); > } > > ... > } > > > how I get my port : > > Service ss = new Service (Service .WSDL_LOCATION, Service .SERVICE); > Service Port port = ss.getServicePort(); > > > > Is there a way to explain that I whant to connect to some endpoint, but > where I will not be able to see the wsdl ? > > > hope you can help me, hope this is understandable. > > thx struts users ! -- Daniel Kulp [email protected] http://www.dankulp.com/blog
