Difference between Apache CXF and Axis

Keep in mind, I’m completely biased (PMC Chair of CXF), but my thoughts: From a strictly “can the project do what I need it to do” perspective, both are pretty equivalent. There some “edge case” things that CXF can do that Axis 2 cannot and vice versa. But for 90% of the use cases, either … Read more

Generating a WSDL from an XSD file

You cannot – a XSD describes the DATA aspects e.g. of a webservice – the WSDL describes the FUNCTIONS of the web services (method calls). You cannot typically figure out the method calls from your data alone. These are really two separate, distinctive parts of the equation. For simplicity’s sake you would often import your … Read more

RESTful Services – WSDL Equivalent

The Web Application Description Language (WADL) is basically the equivalent to WSDL for RESTful services but there’s been an ongoing controversy whether something like this is needed at all. Joe Gregorio has written a nice article about that topic which is worth a read.

Can I disable SOP (Same Origin Policy) on any browser for development?

UPDATE 6/2012: This used to work at the time of the writing, but obviously no more. Sorry. In Firefox (might apply to other Gecko-based browsers as well) you can use the following JavaScript snippet to allow cross-domain calls: if (navigator.userAgent.indexOf(“Firefox”) != -1) { try { netscape.security.PrivilegeManager.enablePrivilege(“UniversalBrowserRead”); } catch (e) { alert(“Permission UniversalBrowserRead denied — not … Read more

How to avoid the need to specify the WSDL location in a CXF or JAX-WS generated webservice client?

I finally figured out the right answer to this question today. <plugin> <groupId>org.apache.cxf</groupId> <artifactId>cxf-codegen-plugin</artifactId> <version>${cxf.version}</version> <executions> <execution> <id>generate-sources</id> <phase>generate-sources</phase> <configuration> <sourceRoot>${project.build.directory}/generated-sources/cxf</sourceRoot> <wsdlOptions> <wsdlOption> <wsdl>${project.basedir}/src/main/resources/wsdl/FooService.wsdl</wsdl> <wsdlLocation>classpath:wsdl/FooService.wsdl</wsdlLocation> </wsdlOption> </wsdlOptions> </configuration> <goals> <goal>wsdl2java</goal> </goals> </execution> </executions> </plugin> Notice that I have prefixed the value in wsdlLocation with classpath:. This tells the plugin that the wsdl will be on … Read more

How to use a WSDL

I would fire up Visual Studio, create a web project (or console app – doesn’t matter). For .Net Standard: I would right-click on the project and pick “Add Service Reference” from the Add context menu. I would click on Advanced, then click on Add Service Reference. I would get the complete file path of the … Read more