[Resolved] Schema validation fails for MockService
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2012
05:42 AM
05-04-2012
05:42 AM
[Resolved] Schema validation fails for MockService
I have created a MockService in soapUI 4.0.1 (and 4.5), based on an existing WSDL. Now that I'm connecting to this webservice through my application, it errors on the following line:
I'm getting the following error:
After some searching, I found that the generated WSDL of the MockService contains these lines:
Now the keen eyes sees that it contains &interface=, where & should be & amp;. I did not generate this, soapUI does and the original WSDL does not have this either. How can I make soapUI generate a proper WSDL? Or what am I doing wrong?
SchemaValidationFeature feature = new SchemaValidationFeature();
WSInterface connection = cdctService.getWSPort(feature);
I'm getting the following error:
org.xml.sax.SAXParseException: The reference to entity "interface" must end with the ';' delimiter.
After some searching, I found that the generated WSDL of the MockService contains these lines:
<xsd:import namespace="http://schemas.company.com/Messages/ServiceRequest-v0103" schemaLocation="/MockService?WSDL&interface=WS-Binding&part=ServiceRequest-v0103-b00.xsd" />
Now the keen eyes sees that it contains &interface=, where & should be & amp;. I did not generate this, soapUI does and the original WSDL does not have this either. How can I make soapUI generate a proper WSDL? Or what am I doing wrong?
3 REPLIES 3
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2013
11:43 AM
12-19-2013
11:43 AM
Did you ever find a cause/solution for this problem? I'm seeing the same sort of url being generated by SoapUI for my mock service:
and I'm getting a parsing error when trying to generate a client from the wsdl (using axis2-wsdl2code-maven-plugin:1.6.1):
schemaLocation="mockMyServicePortBinding?WSDL&interface=MyServicePortBinding&part=myservice.xsd"
and I'm getting a parsing error when trying to generate a client from the wsdl (using axis2-wsdl2code-maven-plugin:1.6.1):
[Fatal Error] myservice.wsdl:5:73: The reference to entity "interface" must end with the ';' delimiter.
org.xml.sax.SAXParseException; systemId: file:/.../target/classes/myservice.wsdl; lineNumber: 5; columnNumber: 73; The reference to entity "interface" must end with the ';' delimiter.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2013
12:06 PM
12-19-2013
12:06 PM
I am having a similar problem.
My workaround was to use double escapes in the pom.xml property that specified my schemaLocation="" value. For example, instead of:
I used:
This allowed a filtered wsdl file to work with axis2 (1.6.1) wsdl2code.
My workaround was to use double escapes in the pom.xml property that specified my schemaLocation="" value. For example, instead of:
&
I used:
&amp;
This allowed a filtered wsdl file to work with axis2 (1.6.1) wsdl2code.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2015
07:32 AM
11-02-2015
07:32 AM
Has anyone found a solution that does not involve pom.xml? We do not use that. The xsd:import statement in our wsdl does not contain any ampersands. SoapUI is rewriting the import specified in the wsdl and adding the unescaped ampersand. This worked fine with Java 6. We noticed the SaxParseException only after upgrading to Java 7 with the same version of SoapUI.
