users@jax-rpc.java.net

RE: modeler error: undeclared namespace prefix: ""

From: Kevin Jones <kevinj_at_develop.com>
Date: Mon, 6 Jun 2005 16:18:14 +0100

You can probably start with the schema definition, it doesn't have a tns or
a targetNamespace attribute

 

    <s:schema elementFormDefault="qualified"

xmlns:s=" http://www.w3.org/2001/XMLSchema"
targetNamespace="http://tempuri.org/"

      xmlns:tns="http://tempuri.org/">

 

except I wouldn't use the same tns for the WSDL and the Schema (the
namespaces are for different things so should be different values).

 

In the WSDL you have things like

 

element="tns:WSGetCatalog"

 

but the tns here is the target namespace of the WSDL not the target
namespace of the schema,

Kevin Jones
http://kevinj.develop.com/weblog

  _____

From: Brian Leonard [mailto:william.leonard_at_Sun.COM]
Sent: 06 June 2005 02:23
To: users_at_jax-rpc.dev.java.net
Cc: Robert Lee; Mark Basler
Subject: modeler error: undeclared namespace prefix: ""

 

The attached wsdl causes the following error when run through wscompile. As
far as I can see, all namespace prefixes are properly declared. Any
suggestions?

modeler error: undeclared namespace prefix: ""
        at
com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.buildModel(WSDLModele
rBase.java:276)
        at
com.sun.xml.rpc.processor.config.ModelInfo.buildModel(ModelInfo.java:88)
        at com.sun.xml.rpc.processor.Processor.runModeler(Processor.java:63)
        at
com.sun.xml.rpc.tools.wscompile.CompileTool.run(CompileTool.java:714)
        at com.sun.xml.rpc.util.ToolBase.run(ToolBase.java:43)
        at com.sun.xml.rpc.tools.wscompile.Main.main(Main.java:22)

CAUSE:

undeclared namespace prefix: ""
        at
com.sun.xml.rpc.wsdl.framework.ParserContext.translateQualifiedName(ParserCo
ntext.java:101)
        at
com.sun.xml.rpc.wsdl.parser.WSDLParser.parsePort(WSDLParser.java:1143)
        at
com.sun.xml.rpc.wsdl.parser.WSDLParser.parseService(WSDLParser.java:1114)
        at
com.sun.xml.rpc.wsdl.parser.WSDLParser.parseDefinitionsNoImport(WSDLParser.j
ava:459)
        at
com.sun.xml.rpc.wsdl.parser.WSDLParser.parseDefinitionsNoImport(WSDLParser.j
ava:380)
        at
com.sun.xml.rpc.wsdl.parser.WSDLParser.parseDefinitionsNoImport(WSDLParser.j
ava:335)
        at
com.sun.xml.rpc.wsdl.parser.WSDLParser.parseDefinitions(WSDLParser.java:225)
        at com.sun.xml.rpc.wsdl.parser.WSDLParser.parse(WSDLParser.java:214)
        at
com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.buildModel(WSDLModele
rBase.java:200)
        at
com.sun.xml.rpc.processor.config.ModelInfo.buildModel(ModelInfo.java:88)
        at com.sun.xml.rpc.processor.Processor.runModeler(Processor.java:63)
        at
com.sun.xml.rpc.tools.wscompile.CompileTool.run(CompileTool.java:714)
        at com.sun.xml.rpc.util.ToolBase.run(ToolBase.java:43)
        at com.sun.xml.rpc.tools.wscompile.Main.main(Main.java:22)
error: modeler error: undeclared namespace prefix: ""

-- 
Brian Leonard
NetBeans Evangelist 
408.404.6884 x68134 (Internal) 
 <http://www.netbeans.org/community/articles/javaone/2005/nb-day.html> 





image001.jpg
(image/jpeg attachment: image001.jpg)