Friday, February 17, 2006

More on WSDL Design

This is kind of a strange thing to happen but if you run into it this might help. I was importing xml schema into some wsdl using http as the location and got a exception when using Axis 1.3 from the command line and with Eclipse. Here is the import statement:


Very common import statement, so I couldn't figure out why the error was being thrown. Turns out I was hosting the .xsd schema on an Apache Tomcat server that I haven't defined the content-type for xsd or wsdl as xml. So the response header coming back from the server had no content-type specified. Easy to fix just modify the web.xml either in the individual project or in the global conf/web.xml file.

This is why interoperability testing is important. This same wsdl consumed by other platforms ie .Net and webMethods did not have a problem with the content-type being absence.

No comments: