No, that only defines the "wsse" namespace prefix in your wsdl. You
need something like:
<wsdl:types>
<xs:schema elementFormDefault="qualified"
targetNamespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss
-wssecurity-secext-1.0.xsd
<http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-sece
xt-1.0.xsd> ">
<xs:include schemaLocation="WS-Security.xsd"/>
</xs:schema>
</wsdl:types>
________________________________
From: Ariel Janson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 23, 2008 6:22 AM
To: [email protected]
Subject: Re: No type was mapped to the name Security (WS-Security)
At the top of the WSDL I have a wsdl definitions tag with a xmlns:wsse
pointing to the xsd like this:
<wsdl:definitions ...
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse
curity-secext-1.0.xsd">
...
</wsdl:definitions>
Isnt that enough?
Ariel
On Wed, Apr 23, 2008 at 5:27 AM, Vinh Nguyen (vinguye2)
<[EMAIL PROTECTED]> wrote:
Do you have the "wsse:Security" element defined/imported in your
wsdl? It's referenced by your "Header" message.
________________________________
From: Ariel Janson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 22, 2008 1:32 PM
To: [email protected]
Subject: No type was mapped to the name Security (WS-Security)
I'm experiencing this weird error when I try to run wsdl2java on
a
WS-Security enabled web service.
Here is the full error:
Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException:
org.apache.axis2.wsdl.codegen.CodeGenerationException:
org.apache.axis2.wsdl.databinding.UnmatchedTypeException: No
type was mapped
to the name Security with namespace
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secex
t-1.0.xsd
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerati
onEngine.java:265)
at
org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at
org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by:
org.apache.axis2.wsdl.codegen.CodeGenerationException:
org.apache.axis2.wsdl.databinding.UnmatchedTypeException: No
type was mapped
to the name Security with namespace
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secex
t-1.0.xsd
at
org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitt
er.emitStub(AxisServiceBasedMultiLanguageEmitter.java:532)
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerati
onEngine.java:254)
... 2 more
Caused by:
org.apache.axis2.wsdl.databinding.UnmatchedTypeException: No type
was mapped to the name Security with namespace
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secex
t-1.0.xsd
at
org.apache.axis2.wsdl.databinding.TypeMappingAdapter.getTypeMappingName(
TypeMappingAdapter.java:82)
at
org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitt
er.getParameterElementList(AxisServiceBasedMultiLanguageEmitter.java:314
0)
at
org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitt
er.getInputElement(AxisServiceBasedMultiLanguageEmitter.java:2633)
at
org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitt
er.generateMethodElement(AxisServiceBasedMultiLanguageEmitter.java:2196)
at
org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitt
er.loadOperations(AxisServiceBasedMultiLanguageEmitter.java:2122)
at
org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitt
er.createDOMDocumentForCallbackHandler(AxisServiceBasedMultiLanguageEmit
ter.java:1149)
at
org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitt
er.writeCallBackHandlers(AxisServiceBasedMultiLanguageEmitter.java:1115)
at
org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitt
er.emitStub(AxisServiceBasedMultiLanguageEmitter.java:495)
... 3 more
The WSDL has this defined at the header:
xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secex
t-1.0.xsd
"
and then this:
<wsdl:message name="Header">
<wsdl:part name="Security" element="wsse:Security"/>
</wsdl:message>
Any ideas?
Ariel