[jboss-user] [Beginners Corner] - Unable to parse WSDL with wsconsume
do-not-reply at jboss.com
Tue Aug 4 08:05:12 EDT 2009
I am working on JBoss-4.2.2 server. I have a WSDL given by external system and I want to create java artifacts using wsconsume. When I try the command "wsconsume -k Prov_OMITStatusUpdates.wsdl", I get the following error :anonymous wrote :
| [ERROR] Failed to read the WSDL document: file:/C:/TEMP/Test/Gateway%20OMITs/SID0003041/SID0003041,264/Prov_OMITStatusUpdates.xsd, beca
| use 1) could not find the document; /2) the document could not be read; 3) the root element of the document is not <wsdl:definitions>.
| unknown location
The problem here is that the WSDL has the schemas as :<types>
| <schema xmlns="http://www.w3.org/2001/XMLSchema">
| <import namespace="http://xmlns.oracle.com/Prov_OMITStatusUpdates" schemaLocation="SID0003041/SID0003041,264/Prov_OMITStatusUpdates.xsd"/>
| <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
| <xsd:import namespace="http://www.provision.com/ns/OMITUpdate" schemaLocation="SID0003041/SID0003041,265/OMITUpdates.xsd"/>
The part "264" in the schema location "SID0003041,264" is a counter which will be updated everytime the WSDL is refreshed. Hence, the schema location changes everytime the WSDL is fetched. It was informed (by the external system developers) that this change in the schema location was required by their system.
When I tried creating a webservice client using NetBeans 6, I found that it was fetching the xsd into the location : ../SID0003041/SID0003041_264/Prov_OMITStatusUpdates.xsd (It converts the comma to an underscore !!) Hence, when it later tries to access the wsdl, it wont find the folder name with SID0003041,264. Hence, the "no document found" error.
In Netbeans, I have edited the imported wsdl and replaced the comma with an underscore. Now this code is deployed and it works for a while. However, JBoss refreshes the WSDL on its own and it starts failing again.
I am not sure as to how to handle this situation. When wsconsume itself fails, its difficult to think how an IDE alone would fix the issue.
Please suggest any alternatives.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247834#4247834
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247834
More information about the jboss-user