There is no element named "boolean" in the XML Schema namespace, only
a type named boolean.  You have to provide an element QName for the
message part in a doc/lit web service, so you must define an element
that is of type boolean if that's the type you want.  It must be in
some namespace you control.  There is no way to modify the XML Schema
namespace even if it were legal to do so, which it isn't.

Jeff

On Sat, Sep 6, 2008 at 8:20 AM, nivox <[EMAIL PROTECTED]> wrote:
> I'm trying to generate the Java code from a document-literal WSDL.
> Initailly I was able to write a fulli WS-I compiant WSDL and generate
> the code with wsdl2java without any problem.
>
> I then modified a portion of the wsdl from:
>
> <wsdl:message name="editGeneralSubscriptionResponse">
>  <wsdl:part name="return" element="impl:BooleanResponse" />
> </wsdl:message>
>
> to:
>
> <wsdl:message name="editGeneralSubscriptionResponse">
>  <wsdl:part name="return" element="xsd:boolean" />
> </wsdl:message>
>
> Now if I try to run wsdl2java it fail with an NullPointerException as
> you cas see here:
> ------------------------------------------------------------------------
> [axis-wsdl2java] 6-set-2008 16.43.47 org.apache.axis.utils.JavaUtils
> isAttachmentSupported
> [axis-wsdl2java] AVVERTENZA: Unable to find required classes
> (javax.activation.DataHandler and javax.mail.internet.MimeMultipart).
> Attachment support is disabled.
> [axis-wsdl2java] WSDL2Java
> /home/nivox/Dati/Programming/Workspace/LiquidPublicationNG/wsdl/SubscriptionService.wsdl
> [axis-wsdl2java] Parsing XML file:
> /home/nivox/Dati/Programming/Workspace/LiquidPublicationNG/wsdl/SubscriptionService.wsdl
> [axis-wsdl2java] Retrieving document at 'SearchService.wsdl', relative
> to
> 'file:/home/nivox/Dati/Programming/Workspace/LiquidPublicationNG/wsdl/SubscriptionService.wsdl'.
> [axis-wsdl2java] Retrieving schema at 'SearchService.xsd', relative to
> 'file:/home/nivox/Dati/Programming/Workspace/LiquidPublicationNG/wsdl/SearchService.wsdl'.
> [axis-wsdl2java] Retrieving schema at 'SearchService.xsd', relative to
> 'file:/home/nivox/Dati/Programming/Workspace/LiquidPublicationNG/wsdl/SubscriptionService.wsdl'.
> [axis-wsdl2java] {http://www.w3.org/2001/XMLSchema}boolean already exists
> [axis-wsdl2java] {http://liquidpublication.it/SearchService}ID already
> exists
> [axis-wsdl2java] {http://liquidpublication.it/SearchService}DateRange
> already exists
> [axis-wsdl2java]
> {http://liquidpublication.it/SearchService}SearchCriteria already exists
> [axis-wsdl2java] Running Wsdl2javaAntTask with parameters:
> [axis-wsdl2java]        verbose:true
> [axis-wsdl2java]        debug:true
> [axis-wsdl2java]        quiet:false
> [axis-wsdl2java]        server-side:true
> [axis-wsdl2java]        skeletonDeploy:true
> [axis-wsdl2java]        helperGen:false
> [axis-wsdl2java]        factory:null
> [axis-wsdl2java]        nsIncludes:[]
> [axis-wsdl2java]        nsExcludes:[]
> [axis-wsdl2java]        factoryProps:[]
> [axis-wsdl2java]        testCase:false
> [axis-wsdl2java]        noImports:false
> [axis-wsdl2java]        NStoPkg:{}
> [axis-wsdl2java]
> output:/home/nivox/Dati/Programming/Workspace/LiquidPublicationNG/wsdl/srcSkel
> [axis-wsdl2java]        protocolHandlerPkgs:
> [axis-wsdl2java]        deployScope:
> [axis-wsdl2java]
> URL:/home/nivox/Dati/Programming/Workspace/LiquidPublicationNG/wsdl/SubscriptionService.wsdl
> [axis-wsdl2java]        all:false
> [axis-wsdl2java]        typeMappingVersion:1.2
> [axis-wsdl2java]        timeout:45000
> [axis-wsdl2java]        failOnNetworkErrors:false
> [axis-wsdl2java]        printStackTraceOnFailure:true
> [axis-wsdl2java]        namespaceMappingFile:null
> [axis-wsdl2java]        username:null
> [axis-wsdl2java]        :passwordnull
> [axis-wsdl2java]        :noWrappedfalse
> [axis-wsdl2java]        :allowInvalidURLfalse
> [axis-wsdl2java]        :implementationClassNamenull
> [axis-wsdl2java]        :classpathnull
> [axis-wsdl2java]        http.proxyHost=null
> [axis-wsdl2java]        http.proxyPort=null
> [axis-wsdl2java]        http.proxyUser=null
> [axis-wsdl2java]        http.proxyPassword=null
> [axis-wsdl2java]        socks.proxyHost=null
> [axis-wsdl2java]        socks.proxyPort=null
> [axis-wsdl2java] java.lang.NullPointerException
> [axis-wsdl2java]        at
> org.apache.axis.wsdl.toJava.Utils.getParameterTypeName(Utils.java:994)
> [axis-wsdl2java]        at
> org.apache.axis.wsdl.toJava.JavaGeneratorFactory.constructSignature(JavaGeneratorFactory.java:1455)
> [axis-wsdl2java]        at
> org.apache.axis.wsdl.toJava.JavaGeneratorFactory.constructSignatures(JavaGeneratorFactory.java:1420)
> [axis-wsdl2java]        at
> org.apache.axis.wsdl.toJava.JavaGeneratorFactory.generatorPass(JavaGeneratorFactory.java:213)
> [axis-wsdl2java]        at
> org.apache.axis.wsdl.gen.Parser.generate(Parser.java:425)
> [axis-wsdl2java]        at
> org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
> [axis-wsdl2java]        at
> org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
> [axis-wsdl2java]        at java.lang.Thread.run(Thread.java:619)
>
> BUILD FAILED
> /home/nivox/Dati/Programming/Workspace/LiquidPublicationNG/wsdl/build.xml:74:
> WSDL processing error for
> /home/nivox/Dati/Programming/Workspace/LiquidPublicationNG/wsdl/SubscriptionService.wsdl
> :
>  null
> ------------------------------------------------------------------------
>
> It's this my fault or it this an wsdl2java bug?
>
> Assuming the problem is caused by me, how can I get a service
> operation that returns a simple type (like java.lang.boolean) instead
> having to return a wrapper type that contains only a boolean value?
>
> Thanks,
> Andrea Zito
> --
> nivox
>
> Linux Registered User #290686
> Powered by: Debian Testing/Unstable
> JABBER: [EMAIL PROTECTED]
> GPG Key ID: 0xC6A50D8D (info: www.gnupg.org)
> GPG Keyserver: http://keyserver.linux.it
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to