I may be doing something wrong here.
I have an existing set of schemas from which I use Castor to generate
JavaBeans. I then specify a typeMapping in the WSDD to use Castor
serializers.
I need these schemas available to the WSDL for message definition, however,
I do not want WSDL2Java to try and regenerate these JavaBeans based on the
default typeMapping. Therefore, it would seem that I should import these
schemas into my WSDL and give a "-n" option to WSDL2Java so that it does
not generate files for the imported types.
Here is what I have:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="http://ws.domino.mw.us.pwc.com"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns1="http://dto.ws.domino.mw.us.pwc.com"
xmlns:dto="http://dto.common.mw.us.pwc.com"
xmlns:intf="http://ws.domino.mw.us.pwc.com"
xmlns:impl="http://ws.domino.mw.us.pwc.com"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<wsdl:import namespace="http://dto.common.mw.us.pwc.com" location=
"allDataTypes.xsd"/>
<wsdl:types>
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:dto="http://dto.common.mw.us.pwc.com"
xmlns:tns1="http://dto.ws.domino.mw.us.pwc.com"
targetNamespace="http://dto.ws.domino.mw.us.pwc.com">
<element name="createPersonRequest" type=
"tns1:CreatePersonRequest"/>
<complexType name="CreatePersonRequest">
<sequence>
<element name="personDetail" nillable="true"
type="dto:PersonDetail"/>
</sequence>
</complexType>
...
</schema>
...
</wsdl:definitions>
allDataTypes.xsd:
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:dto="http://dto.common.mw.us.pwc.com"
targetNamespace="http://dto.common.mw.us.pwc.com">
<include schemaLocation="personDetail.xsd" />
...
</schema>
personDetail.xsd:
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:dto="http://dto.common.mw.us.pwc.com"
targetNamespace="http://dto.common.mw.us.pwc.com">
<element name="personDetail" type="dto:PersonDetail"/>
<complexType name="PersonDetail">
<sequence>
...
</sequence>
</complexType>
</schema>
WSDL2Java says:
wsdl2java:
[java] Parsing XML file: schema/firmDirectoryService.wsdl
[java] java.io.IOException: Type
{http://dto.common.mw.us.pwc.com}PersonDetail is referenced but not
defined.
[java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:522)
[java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:422)
[java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:408)
[java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:393)
[java] at
org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:245)
[java] at java.lang.Thread.run(Thread.java:536)
[java] Java Result: 1
Any thoughts would be greatly appriciated.
Cheers.
Steve Maring
_________________________________________________________________
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from any
computer.