This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes BEA/Weblogic and the fly likes Errors when using clientgen Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Errors when using clientgen" Watch "Errors when using clientgen" New topic
Author

Errors when using clientgen

aditi ray
Greenhorn

Joined: Nov 08, 2006
Posts: 13
I am getting foll errors when i tried to create client jars with ant command and build.xml .I am using weblogic 8.1 SP3 i have tried with 9.1 but same problem persists

generate-client:
[clientgen] Generating client jar for register.wsdl ...
[clientgen] weblogic.xml.schema.model.XSDException: Unable to resolve definition
for ['http://temp.openuri.org/register/register.xsd']:c2p:RegisterCallRxType pe
rhaps due to the lack of an import statement for namespace http://temp.openuri.o
rg/register/register.xsd
[clientgen] at weblogic.xml.schema.model.XSDSchema.getSchemaForName(XSDSchem
a.java:1062)
[clientgen] at weblogic.xml.schema.model.XSDSchema.lookupTopLevelObjectImpl(
XSDSchema.java:893)
[clientgen] at weblogic.xml.schema.model.XSDSchema.lookupTypeImpl(XSDSchema.
java:881)
[clientgen] at weblogic.xml.schema.model.XSDSchema.lookupType(XSDSchema.java
:872)
[clientgen] at weblogic.xml.schema.model.XSDObject.lookupType(XSDObject.java
:324)
[clientgen] at weblogic.xml.schema.model.XSDElement.getTypeObject(XSDElement
.java:75)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.
elementToProperty(SchemaInspector.java:1554)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.
contentModelToProperties(SchemaInspector.java:942)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.
fillBeanDescriptor(SchemaInspector.java:874)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.
createAddAndFillBeanDescriptor(SchemaInspector.java:478)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.
getDescriptors(SchemaInspector.java:417)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.
getDescriptors(SchemaInspector.java:365)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.
createDescriptorsFromElement(SchemaInspector.java:312)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.
createDescriptorForElement(SchemaInspector.java:185)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.
createDescriptors(SchemaInspector.java:132)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.Compiler.compile
(Compiler.java:281)
[clientgen] at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.ad
dTypesInSchemas(XSDTypeMappingBuilder.java:138)
[clientgen] at weblogic.xml.schema.binding.internal.TypeMappingBuilderBase.p
rocessSchemaTypes(TypeMappingBuilderBase.java:310)
[clientgen] at weblogic.webservice.tools.build.internal.Schema2JavaImpl.doTy
peMapping(Schema2JavaImpl.java:297)
[clientgen] at weblogic.webservice.tools.build.internal.Schema2JavaImpl.run(
Schema2JavaImpl.java:187)
[clientgen] at weblogic.webservice.tools.build.internal.WSDL2JavaImpl.run(WS
DL2JavaImpl.java:192)
[clientgen] at weblogic.webservice.tools.build.internal.ClientGenImpl.getTyp
eMappingFromWSDL(ClientGenImpl.java:726)
[clientgen] at weblogic.webservice.tools.build.internal.ClientGenImpl.doClie
ntGenFromWsdl(ClientGenImpl.java:400)
[clientgen] at weblogic.webservice.tools.build.internal.ClientGenImpl.run(Cl
ientGenImpl.java:340)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.doC
lientGen(ClientGenTask.java:351)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.exe
cute(ClientGenTask.java:208)
[clientgen] at org.apache.tools.ant.Task.perform(Task.java:341)
[clientgen] at org.apache.tools.ant.Target.execute(Target.java:309)
[clientgen] at org.apache.tools.ant.Target.performTasks(Target.java:336)
[clientgen] at org.apache.tools.ant.Project.executeTarget(Project.java:1339)

[clientgen] at org.apache.tools.ant.Project.executeTargets(Project.java:1255
)
[clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:609)
[clientgen] at org.apache.tools.ant.Main.start(Main.java:196)
[clientgen] at org.apache.tools.ant.Main.main(Main.java:235)
[clientgen] --------------- nested within: ------------------
[clientgen] weblogic.xml.schema.binding.BindingException: schema error - with ne
sted exception:
[clientgen] [weblogic.xml.schema.model.XSDException: Unable to resolve definitio
n for ['http://temp.openuri.org/register/register.xsd']:c2p:RegisterCallRxType p
erhaps due to the lack of an import statement for namespace http://temp.openuri.
org/register/register.xsd]
[clientgen] at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.
createDescriptors(SchemaInspector.java:148)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.Compiler.compile
(Compiler.java:281)
[clientgen] at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.ad
dTypesInSchemas(XSDTypeMappingBuilder.java:138)
[clientgen] at weblogic.xml.schema.binding.internal.TypeMappingBuilderBase.p
rocessSchemaTypes(TypeMappingBuilderBase.java:310)
[clientgen] at weblogic.webservice.tools.build.internal.Schema2JavaImpl.doTy
peMapping(Schema2JavaImpl.java:297)
[clientgen] at weblogic.webservice.tools.build.internal.Schema2JavaImpl.run(
Schema2JavaImpl.java:187)
[clientgen] at weblogic.webservice.tools.build.internal.WSDL2JavaImpl.run(WS
DL2JavaImpl.java:192)
[clientgen] at weblogic.webservice.tools.build.internal.ClientGenImpl.getTyp
eMappingFromWSDL(ClientGenImpl.java:726)
[clientgen] at weblogic.webservice.tools.build.internal.ClientGenImpl.doClie
ntGenFromWsdl(ClientGenImpl.java:400)
[clientgen] at weblogic.webservice.tools.build.internal.ClientGenImpl.run(Cl
ientGenImpl.java:340)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.doC
lientGen(ClientGenTask.java:351)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.exe
cute(ClientGenTask.java:208)
[clientgen] at org.apache.tools.ant.Task.perform(Task.java:341)
[clientgen] at org.apache.tools.ant.Target.execute(Target.java:309)
[clientgen] at org.apache.tools.ant.Target.performTasks(Target.java:336)
[clientgen] at org.apache.tools.ant.Project.executeTarget(Project.java:1339)

[clientgen] at org.apache.tools.ant.Project.executeTargets(Project.java:1255
)
[clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:609)
[clientgen] at org.apache.tools.ant.Main.start(Main.java:196)
[clientgen] at org.apache.tools.ant.Main.main(Main.java:235)

BUILD FAILED
file:E:/click/build.xml:6: weblogic.webservice.tools.build.WSBuildException: Fai
led to do type mapping - with nested exception:
[weblogic.xml.schema.binding.BindingException: schema error - with nested except
ion:
[weblogic.xml.schema.model.XSDException: Unable to resolve definition for ['http
://temp.openuri.org/register/register.xsd']:c2p:RegisterCallRxType perhaps due t
o the lack of an import statement for namespace http://temp.openuri.org/register
/register.xsd]]

Total time: 3 seconds

E:\click>ant
Buildfile: build.xml

generate-client:
[clientgen] Generating client jar for register.wsdl ...
[clientgen] weblogic.xml.schema.model.XSDException: Unable to resolve definition for ['http://temp.openuri.org/register/register.xsd']:c2p:breezeAuthenticationE
lementsType perhaps due to the lack of an import statement for namespace http://temp.openuri.org/register/register.xsd
[clientgen] at weblogic.xml.schema.model.XSDSchema.getSchemaForName(XSDSchem
a.java:1062)
[clientgen] at weblogic.xml.schema.model.XSDSchema.lookupTopLevelObjectImpl(
XSDSchema.java:893)
[clientgen] at weblogic.xml.schema.model.XSDSchema.lookupTypeImpl(XSDSchema.
java:881)
[clientgen] at weblogic.xml.schema.model.XSDSchema.lookupType(XSDSchema.java
:872)
[clientgen] at weblogic.xml.schema.model.XSDObject.lookupType(XSDObject.java
:324)
[clientgen] at weblogic.xml.schema.model.XSDElement.getTypeObject(XSDElement
.java:75)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.
elementToProperty(SchemaInspector.java:1554)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.
contentModelToProperties(SchemaInspector.java:942)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.
fillBeanDescriptor(SchemaInspector.java:874)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.
createAddAndFillBeanDescriptor(SchemaInspector.java:478)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.
getDescriptors(SchemaInspector.java:417)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.
getDescriptors(SchemaInspector.java:365)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.
createDescriptorsFromElement(SchemaInspector.java:312)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.
createDescriptorForElement(SchemaInspector.java:185)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.
createDescriptors(SchemaInspector.java:132)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.Compiler.compile
(Compiler.java:281)
[clientgen] at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.ad
dTypesInSchemas(XSDTypeMappingBuilder.java:138)
[clientgen] at weblogic.xml.schema.binding.internal.TypeMappingBuilderBase.p
rocessSchemaTypes(TypeMappingBuilderBase.java:310)
[clientgen] at weblogic.webservice.tools.build.internal.Schema2JavaImpl.doTy
peMapping(Schema2JavaImpl.java:297)
[clientgen] at weblogic.webservice.tools.build.internal.Schema2JavaImpl.run(
Schema2JavaImpl.java:187)
[clientgen] at weblogic.webservice.tools.build.internal.WSDL2JavaImpl.run(WS
DL2JavaImpl.java:192)
[clientgen] at weblogic.webservice.tools.build.internal.ClientGenImpl.getTyp
eMappingFromWSDL(ClientGenImpl.java:726)
[clientgen] at weblogic.webservice.tools.build.internal.ClientGenImpl.doClie
ntGenFromWsdl(ClientGenImpl.java:400)
[clientgen] at weblogic.webservice.tools.build.internal.ClientGenImpl.run(Cl
ientGenImpl.java:340)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.doC
lientGen(ClientGenTask.java:351)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.exe
cute(ClientGenTask.java:208)
[clientgen] at org.apache.tools.ant.Task.perform(Task.java:341)
[clientgen] at org.apache.tools.ant.Target.execute(Target.java:309)
[clientgen] at org.apache.tools.ant.Target.performTasks(Target.java:336)
[clientgen] at org.apache.tools.ant.Project.executeTarget(Project.java:1339)

[clientgen] at org.apache.tools.ant.Project.executeTargets(Project.java:1255
)
[clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:609)
[clientgen] at org.apache.tools.ant.Main.start(Main.java:196)
[clientgen] at org.apache.tools.ant.Main.main(Main.java:235)
[clientgen] --------------- nested within: ------------------
[clientgen] weblogic.xml.schema.binding.BindingException: schema error - with nested exception:
[clientgen] [weblogic.xml.schema.model.XSDException: Unable to resolve definition for ['http://temp.openuri.org/register/register.xsd']:c2p:breezeAuthentication
ElementsType perhaps due to the lack of an import statement for namespace http://temp.openuri.org/register/register.xsd]
[clientgen] at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.
createDescriptors(SchemaInspector.java:148)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.Compiler.compile
(Compiler.java:281)
[clientgen] at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.ad
dTypesInSchemas(XSDTypeMappingBuilder.java:138)
[clientgen] at weblogic.xml.schema.binding.internal.TypeMappingBuilderBase.p
rocessSchemaTypes(TypeMappingBuilderBase.java:310)
[clientgen] at weblogic.webservice.tools.build.internal.Schema2JavaImpl.doTy
peMapping(Schema2JavaImpl.java:297)
[clientgen] at weblogic.webservice.tools.build.internal.Schema2JavaImpl.run(
Schema2JavaImpl.java:187)
[clientgen] at weblogic.webservice.tools.build.internal.WSDL2JavaImpl.run(WS
DL2JavaImpl.java:192)
[clientgen] at weblogic.webservice.tools.build.internal.ClientGenImpl.getTyp
eMappingFromWSDL(ClientGenImpl.java:726)
[clientgen] at weblogic.webservice.tools.build.internal.ClientGenImpl.doClie
ntGenFromWsdl(ClientGenImpl.java:400)
[clientgen] at weblogic.webservice.tools.build.internal.ClientGenImpl.run(Cl
ientGenImpl.java:340)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.doC
lientGen(ClientGenTask.java:351)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.exe
cute(ClientGenTask.java:208)
[clientgen] at org.apache.tools.ant.Task.perform(Task.java:341)
[clientgen] at org.apache.tools.ant.Target.execute(Target.java:309)
[clientgen] at org.apache.tools.ant.Target.performTasks(Target.java:336)
[clientgen] at org.apache.tools.ant.Project.executeTarget(Project.java:1339)

[clientgen] at org.apache.tools.ant.Project.executeTargets(Project.java:1255
)
[clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:609)
[clientgen] at org.apache.tools.ant.Main.start(Main.java:196)
[clientgen] at org.apache.tools.ant.Main.main(Main.java:235)

BUILD FAILED
file:E:/click/build.xml:6: weblogic.webservice.tools.build.WSBuildException: Failed to do type mapping - with nested exception:
[weblogic.xml.schema.binding.BindingException: schema error - with nested exception:[weblogic.xml.schema.model.XSDException: Unable to resolve definition for ['http://temp.openuri.org/register/register.xsd']:c2p:breezeAuthenticationElementsType perhaps due to the lack of an import statement for namespace http://temp.openuri.org/register/register.xsd]]

Total time: 1 second
[ November 12, 2006: Message edited by: aditi ray ]
gopinathang nathan
Ranch Hand

Joined: Oct 28, 2006
Posts: 41
can you please post the wsdl?
aditi ray
Greenhorn

Joined: Nov 08, 2006
Posts: 13
Thanks for the reply.

here is my wsdl

<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/" xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:jms="http://www.openuri.org/2001/01/wsdl/jms/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns0="http://temp.openuri.org/register/registerservice.xsd" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.openuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.openuri.org/">
<types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://temp.openuri.org/register/registerservice.xsd" xmlns:c2p="http://temp.openuri.org/register/register.xsd" targetNamespace="http://temp.openuri.org/register/registerservice.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified">

<!-- faults -->

<xs:element name="authenticationException">

<xs:complexType>

<xs:sequence>

<xs:element name="authenticationException" type="c2p:RegisterExceptionType" minOccurs="1" maxOccurs="1"/>

</xs:sequence>

</xs:complexType>

</xs:element>


<!-- RegisterCall messages-->

<xs:element name="RegisterCallRequest">

<xs:complexType>

<xs:sequence>

<xs:element name="authenticationPart" type="c2p:breezeAuthenticationElementsType" minOccurs="1" maxOccurs="1"/>

<xs:element name="clientPart" type="c2p:breezeClientElementsType" minOccurs="1" maxOccurs="1"/>

<xs:element name="transactionPart" type="c2p:RegisterCallTxType" minOccurs="1" maxOccurs="1"/>

</xs:sequence>

</xs:complexType>

</xs:element>



<xs:element name="RegisterCallResponse">

<xs:complexType>

<xs:sequence>

<xs:element name="responsePart" type="c2p:RegisterCallRxType" minOccurs="1" maxOccurs="1"/>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:schema>

</types>
<message name="RegisterCallSoapIn">
<part name="parameters" element="ns0:RegisterCallRequest"/>
</message>
<message name="RegisterCallSoapOut">
<part name="parameters" element="ns0:RegisterCallResponse"/>
</message>


<portType name="clickSoap">
<operation name="RegisterCall">
<input message="s0:RegisterCallSoapIn"/>
<output message="s0:RegisterCallSoapOut"/>
</operation>
</portType>
<binding name="clickSoap" type="s0:clickSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="RegisterCall">
<soap peration soapAction="http://www.openuri.org/RegisterCall" style="document"/>
<cw:transition phase="start"/>
<input>
<soap:body use="literal"/>
<soap:header xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" wsdl:required="true" message="s0:StartHeader_literal" part="StartHeader" use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>

</binding>
<service name="click">
<port name="clickSoap" binding="s0:clickSoap">
<soap:address location="http://wc2c1:80/RegisterWeb/click.jws"/>
</port>
</service>
</definitions>



My error message for the same
BUILD FAILED
file:E:/click/build.xml:6: weblogic.webservice.tools.build.WSBuildException: Failed to do type mapping - with nested exception:
[weblogic.xml.schema.binding.BindingException: schema error - with nested exception:
[weblogic.xml.schema.model.XSDException: Unable to resolve definition for ['http://temp.openuri.org/register/register.xsd']:c2p:breezeAuthenticationElementsType perhaps due to the lack of an import statement for namespace http://temp.openuri.org/register/register.xsd]]

Total time: 1 second
gopinathang nathan
Ranch Hand

Joined: Oct 28, 2006
Posts: 41
For me it seems to be issue with the wsdl. i also get the same issue. i could not see the definition for few complex type in the wsdl.
aditi ray
Greenhorn

Joined: Nov 08, 2006
Posts: 13
Thanks for the reply
gopinathang nathan
Ranch Hand

Joined: Oct 28, 2006
Posts: 41
From the wsdl, i converted the complex to string, now things works fine. so you might need to define other complex types.
aditi ray
Greenhorn

Joined: Nov 08, 2006
Posts: 13
How do i define the complex type since changing to string may change my schema.I am new to wsdl hence unable to do so.Pls help
gopinathang nathan
Ranch Hand

Joined: Oct 28, 2006
Posts: 41
WSDL definition :


XSD Definition[complex type]


complex type attributes, you need to include as per your requirement.
gopinathang nathan
Ranch Hand

Joined: Oct 28, 2006
Posts: 41
- copy the wsdl to a file b.wsdl and xsd definition to a file a.xsd.
- keep both b.wsdl and a.xsd in the same folder and run clientgen
aditi ray
Greenhorn

Joined: Nov 08, 2006
Posts: 13
Thank you so much.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Errors when using clientgen
 
Similar Threads
Error generating proxy using clientgen
Exception while doing servicegen
Please help...I can't solve this web services error (ConfigException)
WebService for checking a dictionary word
Getting error while making java proxy using clientgen