I want a working example on developing a webservices using JAX-WS Top Down Approach.Actually I have an application which provides two webservices. For one of the webservices it deals with SAAJ. The request and response xml both contain SOAP attachment. The problem is that there is some error showing in both WSDL and XSD.
I have the same problem, with jaxws-rt 2.2.3 / Java5, except that for me the message was only a warning and the build finished successfully.
>[WARNING] src-resolve: Cannot resolve the name 'swaRef:swaRef' to a(n) 'type definition' component.
With Java6, a little more message in the console :
[WARNING] schema_reference.4: Failed to read schema document 'http://ws-i.org/pr
ofiles/basic/1.1/swaref.xsd', because 1) could not find the document; 2) the doc
ument could not be read; 3) the root element of the document is not <xsd:schema>
So here is a workaround I found : in my XSD attached to my WSDL, I changed :
<xs:import namespace="http://ws-i.org/profiles/basic/1.1/xsd" schemaLocation="http://ws-i.org/profiles/basic/1.1/swaref.xsd"/>
<xs:import namespace="http://ws-i.org/profiles/basic/1.1/xsd" schemaLocation="swaref.xsd"/>
However, it is a poor workaround, as it requires to modify the WSDL/XSD (what we should'nt have to do). I tried to use a catalog file (configuration of the jaxws-maven-plugin) : works for some WSDL, but not for all of them...
So questions for you :
- Do you access internet from your maven build ? Does it require a proxy configuration ?
- Do you use a catalog file ?
- Does the previous workaround is valid for you too ?