I'm trying to use wscompile with a WSDL file and XSDs and it keeps failing with the following error. The error is "[exec] error: modeler error: model error: invalid entity name: "EntityIdType" (in namespace: "http://ns.hr-xml.org/2004-08-02")" The type EntityIdType is defined in one of the included XSDs. The XSDs that I'm trying to use is for the HR-XML spec, so I don't really have any control over the XSDs themselves, but I tend to assume that the XSDs should be valid. I've got the WSDL file and XSDs available at http://quasistatic.com/webservices if anyone would be able to check them out for me. As a side note, I am able to use WSDL2Java from Axis on these files and it works fine. The command that I'm executing is "wscompile.bat -gen:server -f:documentliteral -mapping ${basedir}/generated/jaxrpc-mapping.xml -d ${basedir}/generated -s ${basedir}/generated/src -verbose -keep ${basedir}/wscompile-config.xml" and the wscompile-config.xml file contains:
<?xml version="1.0" encoding="UTF-8"?>
<configuration
xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
<xsd:element name="AssessmentResultResponse" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Root element for AssessmentResultResponse, which is designed to hold data necessary to convey information on the results of the assessment addition</xsd:documentation>
</xsd:annotation>
</xsd:element>
All the XSDs are actually out there, but the directory structure is confusing. If you go to http://www.quasistatic.com/webservices/hrxml/CPO/EntityIdType.xsd you will see the XSD you were interested in. If you look at the main XSD (i.e. AssessmentResult.xsd), you'll see that it does the following to include the EntityIdType.xsd:
I thought the absense of a prefix was wierd too, but I thought it was ok because the namespace declarations specify the xmlns and targetNamespace as the same as the ones in the EntityIdType.xsd file.
Ok. I see that all the schema's are there as part of hrxml.zip. I think its bug in jaxrpc.
Please submit a bug at https://jax-rpc.dev.java.net/servlets/ProjectIssues. When we have a fix will post the jaxrpc build on this site.
This is where active discussion about jaxrpc takes place. Please join dev@jax-rpc.dev.java.net mailing list and post any problem issues related with it.
I would be more than happy to post a bug regarding this issue, but I'm afraid I don't fully understand what the bug is. Do you think it's the way that wscompile handles included XSDs and their respective namespaces? If you could give me a little bit of an idea what to post the bug as, I'll go ahead and post it.
I am getting the exact same error that Jesse was getting. I was wondering if this is really a bug in JAX-RPC and if yes then has it been fixed in JWSDP 1.6?
I am using JWSDP 1.6 and am getting the exact same error. I am fairly certain my WSDL and imported schemas are valid (everything validates in XMLSpy 2005). Would someone from Sun please post an update on this issue and let me know if there is a workaround?