This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Within an EJB, if developer adds a WS client, the path to the WSDL/schema is a hardcoded path. This results in the path that existed at development time required to be present in the run-time environment. We are using Netbeans with GlassfishESB. I have opened this as a netbean issue based on the assumption that the probably is caused by the IDE placing the hardcoded path into the jar.
I have a sample to demonstrate issue, but it is too large to attach.
Reassigning to web services.
The jax-ws-catalog.xml file should help. This is a mechanism to map remote/local xml resources to local files located in project, under WEB-INF/wsdl. Can you please, at least, copy those hard coded paths to this issue ?
I have uploaded sample to my ftp server. You can download from there: ftp://ftp.agilexhealth.com/outgoing/NHINC/SampleForSun/WSDLClientFileIssue_OldESB.zip user: FTPOut password: Ag1l3xHC0ut! Inside the zip is a readme. This is "issue 2" explained in there. The hardcoded path can be seen here in the wsdlLocation attribute: <target name="wsimport-client-uddi_v3_service" depends="wsimport-init,wsimport-client-check-uddi_v3_service" unless="wsimport-client-uddi_v3_service.notRequired"> <wsimport xendorsed="true" sourcedestdir="${build.generated.dir}/wsimport/client" extension="true" destdir="${build.generated.dir}/wsimport/binaries" wsdl="${basedir}/${meta.inf}/xml-resources/web-service-references/uddi_v3_service/wsdl/uddi_v3_service.wsdl" wsdlLocation="file:/C:/projects/nhinc/Current/Product/Production/Tutorials/WSDLClientFileIssue/WSDLInterfaces/src/wsdl/uddi_v3_service.wsdl" catalog="catalog.xml"/> <copy todir="${classes.dir}"> <fileset dir="${build.generated.dir}/wsimport/binaries" includes="**/*.xml"/> </copy> </target>
There is a workaround for that even in 6.5: wsdlLocation can be changed in : WS Client node -> Edit WS Attributes action -> Wsimport tab Just specify wsdlLocation value there. Anyway, after implementing jax-ws-catalog.xml mechanism this - additional step will not be required. Thank You for your patience.
Thank you, we will try the workaround
Can you point me to some documentation on how to utilize the catalog?
See: https://jax-ws.dev.java.net/nonav/2.1.5/docs/UsersGuide.html (Catalog section)
Thanks for the documentation. I have a question that came from one of our developers on the workaround: We are doing this under Netbeans bundled with Glassfish ESB. The catalog file (catalog.xml) is generated for us automatically. Is it okay for us to modify the catalog file? Doesn't this file get regenerated automatically based on certain actions?
Yes, you can simply copy the catalog.xml file to WEB-INF(META-INF), rename the copy to jax-ws-catalog.xml. Then copy the wsdl (and schema files) into WEB-INF(META-INF)/wsdl and replace relative references in jax-ws-catalog.xml. You don't need to care about catalog.xml file. It is used by wsimport utility sometimes. (Clean & Build). Example of jax-ws-catalog.xml(located in META-INF): <?xml version="1.0" encoding="UTF-8" standalone="no"?> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system"> <system systemId="file:/space/home/mkuchtiak/Documents/wsdl/Hello.wsdl" uri="wsdl/Hello.wsdl"/> </catalog> (Hello.wsdl file is located in META-INF/wsdl)
Fixed: http://hg.netbeans.org/main?cmd=changeset;node=880e0af72618 See also the issue 149790.
Integrated into 'main-golden', will be available in build *200902180201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/880e0af72618 User: mkuchtiak@netbeans.org Log: #158226, #158231, #149790 implement jax-ws-catalog for Ant projects