Timour, You can ignore my last mail. Now I got it. I had defined all the types under one schema whose target namespace was not matching with the one I was using. Now I have broken my wsdl in to different schemas with proper target namespaces and everything works fine.
Thanks a lot for giving me a direction to think. Both XML & Webservices are new for me so it is taking some time to figure out such simple issues. Dheeraj -----Original Message----- From: Soti, Dheeraj [mailto:[EMAIL PROTECTED] Sent: Friday, March 11, 2005 10:34 AM To: '[email protected]' Subject: RE: Any idea about this error that I get when I run WSDL2Java. Timour, Thanks a lot for your reply. After changing to impl wsdl2java works without error but all the classes (for complex types) are not getting generated. I changed the namespaces after sending the mail. My target namespace is "services.hrs.harris.com". I plan to put other classes to be generated under services folder with proper package structure. Pardon me for such na�ve question but my understanding is that the target namespace is where the classes are going to be generated. That way it should be Ok to use the impl.content.services.hrs.harris.com. The wsdl is attached again. Right now it only generates the following classes: AddContent, ContentService, ContentServiceStub, HRSWebService, HRSWebServiceLocator. Other classes for complex types like MediaImpl, TimeCodeImpl are all missing. Thanks Dheeraj New WSDL -------- <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions targetNamespace="http://services.hrs.harris.com/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://services.hrs.harris.com/" xmlns:intf="http://services.hrs.harris.com/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="http://services.hrs.harris.com/" xmlns:content="http://content.services.hrs.harris.com/" xmlns:contentimpl="http://impl.content.services.hrs.harris.com/" xmlns:media="http://media.services.hrs.harris.com/" xmlns:mediaimpl="http://impl.media.services.hrs.harris.com/" xmlns:device="http://device.services.hrs.harris.com/" xmlns:storage="http://storage.services.hrs.harris.com/" xmlns:storageimpl="http://impl.storage.services.hrs.harris.com/" xmlns:time="http://timecode.services.hrs.harris.com/" xmlns:timealgorithm="http://algorithm.timecode.services.hrs.harris.com/" xmlns:config="http://config.services.hrs.harris.com/" xmlns:contentelement="http://elements.content.services.hrs.harris.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <!--WSDL created by Apache Axis version: 1.2RC2 Built on Nov 16, 2004 (12:19:44 EST)--> <wsdl:types> <schema targetNamespace="http://services.hrs.harris.com/" xmlns="http://www.w3.org/2001/XMLSchema"> <complexType name="ImmutableFrameTime"> <complexContent> <element name="frameCount" type="xsd:long"/> <element name="frameRate" type="xsd:double" /> </complexContent> </complexType> <complexType name="TimeCodeImpl"> <complexContent> <element name="frameTime" nillable="true" type="impl:ImmutableFrameTime"/> </complexContent> </complexType> <!--complexType name="timeCodeType"> <choice> <element name="TimeCodeImpl" type="impl:TimeCodeImpl"/> </choice> </complexType--> <complexType name="ContentRealizationImpl"> <complexContent> <element name="contentMetadata" type="impl:ContentImpl"/> <element name="id" type="xsd:long"/> <element name="name" type="xsd:string"/> <element name="description" nillable="true" type="soapenc:string"/> </complexContent> </complexType> <complexType name="DeviceVendorImpl"> <complexContent> <element name="name" type="xsd:string"/> <element name="storageHandlerId" type="xsd:string"/> </complexContent> </complexType> <complexType name="StorageFileImpl"> <complexContent> <element name="id" type="xsd:long"/> <element name="pathName" type="xsd:string"/> <element name="volume" type="impl:StorageVolumeImpl"/> </complexContent> </complexType> <complexType name="MediaImpl"> <complexContent> <element name="id" type="xsd:long"/> <element name="storageFile" type="impl:StorageFileImpl"/> <element name="som" type="impl:ImmutableFrameTime"/> <element name="resolution" type="xsd:int"/> </complexContent> </complexType> <complexType name="ContentAssociationImpl"> <complexContent> <element name="contentRealization" type="impl:ContentRealizationImpl"/> <element name="som" type="impl:ImmutableFrameTime"/> <element name="duration" type="impl:ImmutableFrameTime"/> <element name="id" type="xsd:long"/> </complexContent> </complexType> <!--complexType name="ArrayOfContentRealization"> <complexContent> <restriction base="soapenc:Array"> <attribute ref="soapenc:arrayType" wsdl:arrayType="contentimpl:ContentRealizationImpl[]" /> </restriction> </complexContent> </complexType--> <!--complexType name="ArrayOfContentRealization"> <complexContent> <sequence> <element name="ContentRealizationImpl" minOccurs="0" maxOccurs="unbounded" type="contentimpl:ContentRealizationImpl" /> </sequence> </complexContent> </complexType--> <complexType name="ContentImpl"> <complexContent> <sequence> <!--element name="contentRealizations" nillable="true" type="ArrayOfContentRealization"/--> <element name="description" nillable="true" type="soapenc:string"/> <element name="estimatedDuration" nillable="true" type="impl:ImmutableFrameTime"/> <element name="houseId" nillable="true" type="soapenc:string"/> <element name="id" type="xsd:long"/> <element name="title" nillable="true" type="soapenc:string"/> </sequence> </complexContent> </complexType> <complexType name="ProgramContentImpl"> <complexContent> <extension base="impl:ContentImpl"> <sequence> <element name="episodeNumber" nillable="true" deafult="" type="xsd:string"/> <element name="numberProgramSegments" nillable="true" default="1" type="xsd:int"/> <element name="umid" nillable="true" type="xsd:string" default=""/> <element name="episodeTitle" nillable="true" type="xsd:string" default=""/> </sequence> </extension> </complexContent> </complexType> <complexType name="CommercialContentImpl"> <complexContent> <extension base="impl:ContentImpl"> <sequence> <element name="isci" nillable="true" deafult="" type="xsd:string"/> </sequence> </extension> </complexContent> </complexType> <complexType name="StorageVolumeImpl"> <complexContent> <sequence> <element name="id" type="xsd:long"/> <element name="storageDevice" type="impl:StorageDeviceImpl"/> </sequence> </complexContent> </complexType> <complexType name="ArrayOfStorageVolumes"> <complexContent> <sequence> <element name="StorageVolume" minOccurs="0" maxOccurs="unbounded" type="impl:StorageVolumeImpl" /> </sequence> </complexContent> </complexType> <complexType name="StorageDeviceImpl"> <complexContent> <element name="id" type="xsd:long"/> <element name="name" type="xsd:string"/> <element name="volumes" type="impl:ArrayOfStorageVolumes"/> <element name="deviceVendorName" type="xsd:string"/> <element name="iPAddress" type="xsd:string"/> <element name="protocol" type="xsd:string"/> <element name="username" type="xsd:string"/> <element name="password" type="xsd:string"/> </complexContent> </complexType> <complexType name="ArrayOfMedia"> <complexContent> <sequence> <element name="" minOccurs="0" maxOccurs="unbounded" type="impl:MediaImpl" /> </sequence> </complexContent> </complexType> <complexType name="ContentContainerImpl"> <complexContent> <extension base="impl:ContentRealizationImpl"> <sequence> <element name="mediaList" type="impl:ArrayOfMedia"/> <element name="directOriginator" type="impl:ContentContainerImpl"/> </sequence> </extension> </complexContent> </complexType> <complexType name="addContent"> <element name="content" type="impl:ContentImpl"/> </complexType> </schema> </wsdl:types> <wsdl:message name="createContentRequest"> <wsdl:part name="in0" type="intf:addContent"/> </wsdl:message> <wsdl:message name="createContentResponse"> <wsdl:part name="createContentReturn" type="xsd:boolean"/> </wsdl:message> <wsdl:portType name="ContentService"> <wsdl:operation name="createContent" parameterOrder="in0"> <wsdl:input message="impl:createContentRequest" name="createContentRequest"/> <wsdl:output message="impl:createContentResponse" name="createContentResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="ContentService" type="impl:ContentService"> <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="createContent"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="createContentRequest"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:ContentService" use="encoded"/> </wsdl:input> <wsdl:output name="createContentResponse"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:ContentService" use="encoded"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="HRSWebService"> <wsdl:port binding="impl:ContentService" name="ContentService"> <wsdlsoap:address location="http://localhost:8080/hrsApp/services/ContentService"/> </wsdl:port> </wsdl:service> </wsdl:definitions> -----Original Message----- From: Timour Mouratov [mailto:[EMAIL PROTECTED] Sent: Friday, March 11, 2005 7:21 AM To: [email protected] Subject: Re: Any idea about this error that I get when I run WSDL2Java. Dheeraj, Can you try to change prefix for <type="contentimpl:CommercialContentImpl"> to <type="impl:CommercialContentImpl">. It looks to me that your wsdl defines "CommercialContentImpl" in "http://ws.hrs.harris.com/" but not in "http://impl.content.hrs.harris.com/". Timour On Thu, 10 Mar 2005 18:30:41 -0500, Soti, Dheeraj <[EMAIL PROTECTED]> wrote: > This is the error I get on running org.apache.axis.wsdl.WSDL2Java on > this wsdl although I have defined it correctly. Am I missing something > very basic here. > > Thanks > > Dheeraj > > Error > ----- > java.io.IOException: Type > {http://impl.content.hrs.harris.com/}CommercialContent > Impl is referenced but not defined. > at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(Symbol > Table.java:653) > at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:533 > ) > at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav > a:506) > at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav > a:483) > at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:356) > at java.lang.Thread.run(Unknown Source) > > WSDL > ---- > <?xml version="1.0" encoding="UTF-8"?> > <wsdl:definitions targetNamespace="http://ws.hrs.harris.com/" > xmlns:apachesoap="http://xml.apache.org/xml-soap" > xmlns:impl="http://ws.hrs.harris.com/" > xmlns:intf="http://ws.hrs.harris.com/" > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" > xmlns:tns1="http://ws.hrs.harris.com/" > xmlns:content="http://content.hrs.harris.com/" > xmlns:contentimpl="http://impl.content.hrs.harris.com/" > xmlns:media="http://media.hrs.harris.com/" > xmlns:mediaimpl="http://impl.media.hrs.harris.com/" > xmlns:device="http://device.hrs.harris.com/" > xmlns:storage="http://storage.hrs.harris.com/" > xmlns:storageimpl="http://impl.storage.hrs.harris.com/" > xmlns:time="http://timecode.hrs.harris.com/" > xmlns:timealgorithm="http://algorithm.timecode.hrs.harris.com/" > xmlns:config="http://config.hrs.harris.com/" > xmlns:contentelement="http://elements.content.hrs.harris.com/" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > <!--WSDL created by Apache Axis version: 1.2RC2 Built on Nov 16, 2004 (12:19:44 > EST)--> > <wsdl:types> > <schema targetNamespace="http://ws.hrs.harris.com/" > xmlns="http://www.w3.org/2001/XMLSchema"> > <complexType abstract="true" name="Content"/> > <complexType abstract="true" name="ProgramContent"> > <extension base="content:Content"/> > </complexType> > <complexType abstract="true" name="CommercialContent"> > <extension base="content:Content"/> > </complexType> > <complexType abstract="true" name="ContentRealization"/> > <complexType abstract="true" name="ContentAssociation"/> > <complexType abstract="true" name="ContentElement"> > <extension base="content:ContentRealization"/> > </complexType> > <complexType abstract="true" name="ContentSegment"> > <extension base="content:ContentElement"/> > </complexType> > <complexType abstract="true" name="MultiSegment"> > <extension base="contentelement:ContentSegment"/> > </complexType> > <complexType abstract="true" name="Overlay"> > <extension base="content:ContentElement"/> > </complexType> > <complexType abstract="true" name="RestrictedArea"> > <extension base="content:ContentElement"/> > </complexType> > <complexType abstract="true" name="ContentContainer"> > <extension base="content:ContentRealization"/> > </complexType> > <complexType abstract="true" name="EnhancedContentContainer"> > <extension base="content:ContentContainer"/> > </complexType> > <complexType abstract="true" name="FrameTime"/> > <complexType abstract="true" name="DeviceVendor"/> > <complexType abstract="true" name="Storage"/> > <complexType abstract="true" name="StorageDevice"/> > <complexType abstract="true" name="StorageFile"/> > <complexType abstract="true" name="StorageDirectory"> > <element name="SEPARATOR" type="xsd:string" fixed="/"/> > </complexType> > <complexType abstract="true" name="StorageVolume"/> > <complexType abstract="true" name="MediaCopy"/> > <complexType abstract="true" name="AnalogMediaCopy"> > <extension base="media:MediaCopy"/> > </complexType> > <complexType abstract="true" name="DigitalMediaCopy"> > <extension base="media:MediaCopy"/> > </complexType> > <complexType abstract="true" name="MultiReelMediaCopy"> > <extension base="media:MediaCopy"/> > </complexType> > <complexType name="FrameRate"> > <complexContent> > <element name="frameRate" type="xsd:double" default="0"/> > </complexContent> > </complexType> > <complexType name="TimeCode"> > <complexContent> > <extension base="time:FrameTime"> > <element name="HOUR_FIELD" type="xsd:int" fixed="0"/> > <element name="MINUTE_FIELD" type="xsd:int" fixed="1"/> > <element name="SECOND_FIELD" type="xsd:int" fixed="2"/> > <element name="FRAME_FIELD" type="xsd:int" > fixed="3" /> > > </extension> > </complexContent> > </complexType> > <complexType abstact="true" name="TimeCodeFormat"/> > <complexType name="TimeCodeFormatImpl"> > <complexContent> > <extension base="time:TimeCodeFormat"> > <element name="frameRate" type="time:TimeCodeImpl"/> > </extension> > </complexContent> > </complexType> > <complexType name="TimeCodeImpl"> > <complexContent> > <extension base="time:TimeCode"> > <!--element name="frameTime" nillable="true" > type="time:TimeCodeImpl"/--> > <element name="timeCodeAlgorithm" nillable="true" > type="timealgorithm:TimeCodeAlgorithm"/> > </extension> > </complexContent> > </complexType> > <complexType name="TimeCodeAlgorithm"> > <complexContent> > <element name="HOUR_FIELD" type="xsd:int" fixed="0"/> > <element name="MINUTE_FIELD" type="xsd:int" fixed="1"/> > <element name="SECOND_FIELD" type="xsd:int" fixed="2"/> > <element name="FRAME_FIELD" type="xsd:int" fixed="3" > /> > > <element name="MILLISECONDS_PER_HOUR" type="xsd:long" > fixed="3600000"/> > <element name="MILLISECONDS_PER_MINUTE" > type="xsd:long" fixed="60000"/> > <element name="MILLISECONDS_PER_SECOND" > type="xsd:long" fixed="1000"/> > </complexContent> > </complexType> > <!--complexType name="timeCodeType"> > <choice> > <element name="TimeCodeImpl" type="intf:TimeCodeImpl"/> > </choice> > </complexType--> > > <complexType name="DeviceVendorImpl"> > <complexContent> > <extension base="device:DeviceVendor"> > <element name="name" type="xsd:string"/> > <element name="storageHandlerId" type="xsd:string"/> > </extension> > </complexContent> > </complexType> > <complexType name="MediaImpl"> > <complexContent> > <extension base="media:MediaCopy"> > <element name="id" type="xsd:long"/> > <element name="storageFile" > type="content:ContentRealization"/> > <element name="som" type="time:TimeCodeImpl"/> > <element name="resolution" type="xsd:int"/> > </extension> > </complexContent> > </complexType> > > <complexType name="ContentAssociationImpl"> > <complexContent> > <extension base="content:ContentAssociation"> > <element name="contentRealization" > type="content:ContentRealization"/> > <element name="som" type="intf:timeCodeType"/> > <element name="duration" type="time:TimeCodeImpl"/> > <element name="id" type="xsd:long"/> > </extension> > </complexContent> > </complexType> > <complexType name="ContentRealizationImpl"> > <complexContent> > <extension base="content:ContentRealization"> > <element name="contentMetadata" type="content:Content"/> > <element name="id" type="xsd:long"/> > <element name="name" type="xsd:string"/> > <element name="description" nillable="true" > type="soapenc:string"/> > </extension> > </complexContent> > </complexType> > <complexType name="ArrayOfContentRealization"> > <complexContent> > <sequence> > <element name="ContentRealizationImpl" > minOccurs="0" maxOccurs="unbounded" type="contentimp:ContentRealizationImpl" /> > </sequence> > </complexContent> > </complexType> > <complexType name="ContentImpl"> > <complexContent> > <extension base="content:Content"> > <sequence> > <element name="contentRealizations" > nillable="true" type="ArrayOfContentRealization"/> > <element name="description" nillable="true" > type="soapenc:string"/> > <element name="estimatedDuration" > nillable="true" type="time:TimeCodeImpl"/> > <element name="houseId" nillable="true" > type="soapenc:string"/> > <element name="id" type="xsd:long"/> > <element name="title" nillable="true" > type="soapenc:string"/> > </sequence> > </extension> > </complexContent> > </complexType> > <complexType name="ProgramContentImpl"> > <complexContent> > <extension base="content:ContentImpl"> > <sequence> > <element name="episodeNumber" nillable="true" > deafult="" type="xsd:string"/> > <element name="numberProgramSegments" > nillable="true" default="1" type="xsd:int"/> > <element name="umid" nillable="true" > type="xsd:string" default=""/> > <element name="episodeTitle" nillable="true" > type="xsd:string" default=""/> > </sequence> > </extension> > </complexContent> > </complexType> > <complexType name="CommercialContentImpl"> > <complexContent> > <extension base="content:ContentImpl"> > <sequence> > <element name="isci" nillable="true" > deafult="" type="xsd:string"/> > </sequence> > </extension> > </complexContent> > </complexType> > <complexType name="StorageVolumeImpl"> > <complexContent> > <extension base="storage:StorageVolume"> > <sequence> > <element name="id" type="xsd:long"/> > <element name="storageDevice" > type="storage:StorageDevice"/> > </sequence> > </extension> > </complexContent> > </complexType> > <complexType name="ArrayOfStorageVolume"> > <complexContent> > <sequence> > <element name="StorageVolume" minOccurs="0" > maxOccurs="unbounded" type="storage:StorageVolume" /> > </sequence> > </complexContent> > </complexType> > <complexType name="StorageDeviceImpl"> > <complexContent> > <extension base="storage:StorageDevice"> > <element name="id" type="xsd:long"/> > <element name="name" type="xsd:string"/> > <element name="volumes" > type="storage:ArrayOfStorageVolumes"/> > <element name="deviceVendorName" type="xsd:string"/> > <element name="iPAddress" type="xsd:string"/> > <element name="protocol" type="xsd:string"/> > <element name="username" type="xsd:string"/> > <element name="password" type="xsd:string"/> > </extension> > </complexContent> > </complexType> > <complexType name="StorageFileImpl"> > <complexContent> > <extension base="storage:StorageFile"> > <element name="id" type="xsd:long"/> > <element name="pathName" type="xsd:string"/> > <element name="volume" type="storage:StorageVolume"/> > </extension> > </complexContent> > </complexType> > > <complexType name="ArrayOfMedia"> > <complexContent> > <sequence> > <element name="" minOccurs="0" > maxOccurs="unbounded" type="mediaimpl:MediaCopyImpl" /> > </sequence> > </complexContent> > </complexType> > <complexType name="ContentContainerImpl"> > <complexContent> > <extension base="contentimpl:ContentRealizationImpl"> > <sequence> > <element name="mediaList" type="intf:ArrayOfMedia"/> > <element name="directOriginator" > type="content:ContentContainer"/> > </sequence> > </extension> > </complexContent> > </complexType> > <complexType name="addContent"> > <choice> > <element name="CommercialContentImpl" > type="contentimpl:CommercialContentImpl"/> > <element name="ProgramContentImpl" > type="contentimpl:ProgramContentImpl"/> > </choice> > </complexType> > > </schema> > </wsdl:types> > > <wsdl:message name="createContentRequest"> > > <wsdl:part name="in0" type="intf:addContent"/> > > </wsdl:message> > > <wsdl:message name="createContentResponse"> > > <wsdl:part name="createContentReturn" type="xsd:boolean"/> > > </wsdl:message> > <wsdl:portType name="ContentService"> > > <wsdl:operation name="createContent" parameterOrder="in0"> > > <wsdl:input message="impl:createContentRequest" > name="createContentRequest"/> > > <wsdl:output message="impl:createContentResponse" > name="createContentResponse"/> > > </wsdl:operation> > > </wsdl:portType> > > <wsdl:binding name="ContentService" type="impl:ContentService"> > > <wsdlsoap:binding style="rpc" > transport="http://schemas.xmlsoap.org/soap/http"/> > > <wsdl:operation name="createContent"> > > <wsdlsoap:operation soapAction=""/> > > <wsdl:input name="createContentRequest"> > > <wsdlsoap:body > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" > namespace="urn:ContentService" use="encoded"/> > > </wsdl:input> > > <wsdl:output name="createContentResponse"> > > <wsdlsoap:body > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" > namespace="urn:ContentService" use="encoded"/> > > </wsdl:output> > > </wsdl:operation> > > </wsdl:binding> > <wsdl:service name="HRSWebService"> > > <wsdl:port binding="impl:ContentService" name="ContentService"> > > <wsdlsoap:address > location="http://localhost:8080/hrsApp/services/ContentService"/> > > </wsdl:port> > > </wsdl:service> > > </wsdl:definitions> >
