Another related question just arose when the web service was changed on the .NET side by adding a method returning DataTable. WSDL included the following bit which is causing grief for NetBeans now:
<s:element name="GetProductsResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GetProductsResult">
<s:complexType>
<s:sequence>
<s:any minOccurs="0" maxOccurs="unbounded" namespace="http://www.w3.org/2001/XMLSchema" processContents="lax"/>
<s:any minOccurs="1" namespace="urn:schemas-microsoft-com:xml-diffgram-v1" processContents="lax"/>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
We realize that specific .NET classes cannot be easily consumed in Java and not going to even use the method returning that class, but we still need to continue consuming the web service as a whole. NetBeans is throwing the following error when refreshing web reference:
Web service client cannot be created by JAXWS:wsimport utility.
Reason: property 'Any' is already defined. Use <:jaxb:property> to
resolve this conflict.
There might be a problem during java artifacts creation: for example a
name conflict in generated classes. To detect the problem see also the
error message in output window. You may be able to fix the problem in
WSDL customization dialogue. (Edit web service attributes section) or
by manual editing of the local wsdl or schema files, using JAXB
customization (local wsdl and schema files are located in
xml-resources directory)
Can we manually edit out offending methods out of WSDL and put WSDL file into NetBeans project directory?
Or should we just delete web reference and re-create, providing path to downloaded WSDL file?