Forum Discussion

mytherf's avatar
mytherf
New Contributor
16 years ago

relative path

I have a wsdl file which contains several xsd files. This web service was deployed on Websphere application server.

 
<xsd:import namespace="http://planning.fmr.com/types" schemaLocation="projectService_schema1.xsd" />
<xsd:import namespace="http://planning.fmr.com/service/types" schemaLocation="projectService_schema2.xsd" />


when i create a new soapui project using this wsdl, it throws errors.
initial WSDL/WADL is : http://10.0.45.64:9080/myproject/projectService?wsdl


Mon Dec 06 18:04:08 CST 2010:DEBUG:Getting wsdl component from [http://10.0.45.64:9080/myproject/projectService?wsdl]
Mon Dec 06 18:04:08 CST 2010:INFO:BaseURI was redirected to [http://10.0.45.64:9080/myproject/projectService/projectService.wsdl]
Mon Dec 06 18:04:08 CST 2010:DEBUG:Getting wsdl component from [http://10.0.45.64:9080/myproject/projectService_schema1.xsd]
Mon Dec 06 18:04:08 CST 2010:ERROR:Failed to load url [http://10.0.45.64:9080/myproject/projectService_schema1.xsd]
Mon Dec 06 18:04:08 CST 2010:ERROR:Loading of definition failed for [http://10.0.45.64:9080/myproject/projectService?wsdl]; org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA
Mon Dec 06 18:04:08 CST 2010:ERROR:An error occured [error: Unexpected element: CDATA], see error log for details
Mon Dec 06 18:04:08 CST 2010:ERROR:Error importing wsdl: java.lang.Exception: org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA
Mon Dec 06 18:04:08 CST 2010:ERROR:An error occured [org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA], see error log for details
Mon Dec 06 18:04:08 CST 2010:ERROR:An error occured [Error importing wsdl], see error log for details


I found projectService_schema1.xsd can be access at http://10.0.45.64:9080/myproject/projectService/projectService_schema1.xsd
not http://10.0.45.64:9080/myproject/projec ... chema1.xsd

I tried another way, i download wsdl files to local directory, It's ok.

2 Replies

  • mytherf's avatar
    mytherf
    New Contributor
    I built soapui from source code based on 3.6.1 version, and modified below two classes.
    Now i can import wsdl successfully.
    what i worried is these changes may bring something else issues.
    Does soapui team have test cases/suits for testing it?

    SchemaUtils.java

    wsdlUrl = loader.getBaseURI();
    existing.put(wsdlUrl, xmlObject);


    AbstractDefinitionCache.java

    definitionCache.setRootPart(loader.getFirstNewURI());
  • rrb's avatar
    rrb
    New Contributor
    Hello mytherf,

    Where did you get the source from? I am having trouble to get the source code to build. I tried the svn url svn://svn.eviware.com/soapui/trunk/core

    but this is what i get

    Checkout from svn://svn.eviware.com/soapui/trunk/core, revision HEAD, Fully recursive, Externals included
    Can't connect to host 'svn.eviware.com': A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

    Any help is appreciated
    thanks