Description
When building and deploying a JSR168 Portlet that consumes a JCAPS Web Service to Web Space Server, portlet deployment fails with a WSDL file not found error. The problem is because the static code in CalculatorWSService.java is pointing to an absolute path on disk for the WSDL rather than a relative path within the WAR package.
Solution
There are two workarounds for this issue:
Create the desired directory hierarchy on the Web Space Server host and copy the WSDL file there.
Manually adjust the Wsimport options (CalculatorPortlet->Web Service References->CalculatorWSService->Edit Web Service Attributes) to specify the correct wsdlLocation; for example:
wsdlLocation=http://jcaps-node1:8080/CalculatorApp/CalculatorWSService?wsdl |