Hans Loeblich-2 wrote: > > I am attempting a web service integration with a third party. They have > provided a jar that was built using CXF, which I am having some trouble > using.
You shouldn't need it (ideally)--they should give you a WSDL with any imported XSD's, and you run wsdl2java to create your client stubs. It seems that the classes in the jar are looking for the wsdl on a hard-coded absolute path which does not exist on my computer. Does CXF typically hard-code this location as part of the wsdl2java step? Yes, both Metro and CXF do that by default. However, your *Service.java class (JAX-WS artifact generated by wsdl2java) should have a constructor that allows you to plug in the WSDL address. See [1], Step #1, substep #2, method "doubleItWorksWithPositiveNumbers()". [1] http://www.jroller.com/gmazza/date/20080904 Unfortunately I don't have access to their source, so it's making debugging difficult. That's why you should ideally be working with the WSDL directly. If they are giving you the compiled code, they should also be giving you the source code so you can make source path modifications in the *Service.java class (and then recompile it). I've been looking for some way to configure this wsdl path, and as I understand it, this may be possible through editing cxf.xml. The documentation regarding cxf.xml is confusing to me. I've been trying to adapt examples from pages such as http://cwiki.apache.org/CXF20DOC/jax-ws-configuration.html with little luck so far. See link I gave above for changing the WSDL location runtime, or modify the *Source.java file with the new WSDL location. cxf.xml can be used for altering the SOAP address, but that's not your concern here, you need the WSDL location changed. BTW, it is quite possible that you do not even need a cxf.xml file (you can rely on defaults), and your usage of it is confusing things. Another thing I don't quite understand is why the wsdl file is even still necessary after the code has been generated. http://blogs.sun.com/arungupta/date/20071108 Does editing the wsdl after running wsdl2java have any effect on the running code? Can/Must I edit cxf.xml to deal with this situation as well? Client-side, it should most definitely result in a different SOAP address used (provided you altered the soap:address in the wsdl:service section.) (Service-side, the wsdl:address in the service's copy of the WSDL is largely overwritten by the web service stack runtime) If a different address is not being used, it is most likely because your client is still using the *Service.class compiled file in what you were provided, and that it is using the old URL within that class. cxf.xml is not very relevant here. If you need, you can also change the SOAP address (which, again, is a different issue from pointing to the WSDL) using the API as follows: http://www.jroller.com/gmazza/entry/using_the_ebay_shopping_api1#clientcode (see BindingProvider.ENDPOINT_ADDRESS_PROPERTY in source code above). HTH, Glen -- View this message in context: http://www.nabble.com/Specifying-wsdl-path%2C-configuring-cxf.xml%2C-using-alternate-URLs-tp19421460p19422262.html Sent from the cxf-user mailing list archive at Nabble.com.
