You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Robins, Joe" <jo...@teachforamerica.org> on 2009/09/09 17:24:53 UTC
Error generating Java code from WSDL
Hi,
I searched the archives, and couldn't find any info on this. I'm far from an expert with web services, so I hope this isn't a dumb question, but even if it is, any help would be appreciated.
I am trying to generate Java code using CXF to work with a third-party tool which they provide as a web service. I have attached the WSDL for their service to this message. When I try to run the wsdl2java tool on it (using either CXF 2.0.5, which we've used before, and currently use for one other project, or with 2.2.3, which I downloaded when I started having problems), I get a NullPointerException with no useful error message:
jrobins@yggdrasil,11:10am,[~/tmp/newcxf/apache-cxf-2.2.3/bin]% ./wsdl2java -d /tmp/harcourt -client -verbose /tmp/harcourt/HarcourtWS.wsdl
Loading FrontEnd jaxws ...
Loading DataBinding jaxb ...
wsdl2java -d /tmp/harcourt -client -verbose /tmp/harcourt/HarcourtWS.wsdl
wsdl2java - Apache CXF 2.2.3
WSDLToJava Error: java.lang.NullPointerException
org.apache.cxf.tools.common.ToolException: java.lang.NullPointerException
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:271)
at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
Caused by: java.lang.NullPointerException
at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.FaultProcessor.processFault(FaultProcessor.java:96)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.FaultProcessor.process(FaultProcessor.java:54)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.OperationProcessor.process(OperationProcessor.java:66)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.PortTypeProcessor.process(PortTypeProcessor.java:143)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.wsdlDefinitionToJavaModel(WSDLToJavaProcessor.java:88)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.process(WSDLToJavaProcessor.java:60)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:229)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:127)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:263)
... 4 more
There is no indication here as to what the problem is, and searching the web and the users@cxf archives, I don't find anything that seems related to this error.
When I try running with -validate to see if the WSDL is valid, it gives me the following error:
jrobins@yggdrasil,11:17am,[~/tmp/newcxf/apache-cxf-2.2.3/bin]% ./wsdl2java -d /tmp/harcourt -validate -verbose /tmp/harcourt/HarcourtWS.wsdl
Loading FrontEnd jaxws ...
Loading DataBinding jaxb ...
wsdl2java -d /tmp/harcourt -validate -verbose /tmp/harcourt/HarcourtWS.wsdl
wsdl2java - Apache CXF 2.2.3
WSDLToJava Error: WSI-BP-1.0 R2205 violation: In Message SubmitRequestFault, part ExceptionId must specify a 'element' attribute
org.apache.cxf.tools.common.ToolException: WSI-BP-1.0 R2205 violation: In Message SubmitRequestFault, part ExceptionId must specify a 'element' attribute
at org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WSDL11Validator.java:140)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.validate(JAXWSDefinitionBuilder.java:201)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.validate(JAXWSDefinitionBuilder.java:61)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:166)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:127)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:263)
at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
So it seems like there is an issue with conforming to the WS-I Basic Profile. However, I was under the impression that conforming to the BP was optional, and that a WSDL can still be valid even if it does not conform. I am sort of assuming that CXF is providing this message as informational, rather than as a requirement, but I don't know. Is it possible that this violation is what's causing the NullPointerException? And since this WSDL seems to be valid WSDL, even if it doesn't conform to the Basic Profile (it passes the validation at http://www.validwsdl.com/, for example), is there a way to get CXF not to require that it conform, and still generate Java client code? Since this is a third-party tool, we don't have the option of changing the WSDL or the service, so I'm hoping I can find a way to make this work.
Thank you in advance for any help or advice you can offer.
Joe Robins
Director, Systems & Software Development
Teach For America
Email: joe.robins@teachforamerica.org
Phone: 212-279-2080, x368
One day, all children in this nation will have the opportunity to attain an excellent education.
http://www.teachforamerica.org/
____________________________________________
This communication and any file transmitted with it may contain information that is confidential, privileged and exempt from disclosure under applicable law. It is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are hereby notified that any use, dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender. Thank you for your cooperation.
RE: Error generating Java code from WSDL
Posted by "Robins, Joe" <jo...@teachforamerica.org>.
OK, will do. I just wasn't sure if this should be entered as an issue, because I wasn't sure if I was doing something dumb.
Thanks,
Joe Robins
Director, Systems & Software Development
Teach For America
Email: joe.robins@teachforamerica.org
Phone: 212-279-2080, x368
>One day, all children in this nation will have the opportunity to attain an excellent education.
http://www.teachforamerica.org/
-----Original Message-----
From: Benson Margulies [mailto:bimargulies@gmail.com]
Sent: Wednesday, September 09, 2009 1:43 PM
To: users@cxf.apache.org
Subject: Re: Error generating Java code from WSDL
Please file a JIRA and attach the wsdl.
On Wed, Sep 9, 2009 at 11:24 AM, Robins, Joe <joe.robins@teachforamerica.org
> wrote:
> Hi,
>
> I searched the archives, and couldn't find any info on this. I'm far
> from an expert with web services, so I hope this isn't a dumb
> question, but even if it is, any help would be appreciated.
>
> I am trying to generate Java code using CXF to work with a third-party
> tool which they provide as a web service. I have attached the WSDL
> for their service to this message. When I try to run the wsdl2java
> tool on it (using either CXF 2.0.5, which we've used before, and
> currently use for one other project, or with 2.2.3, which I downloaded
> when I started having problems), I get a NullPointerException with no useful error message:
>
> jrobins@yggdrasil,11:10am,[~/tmp/newcxf/apache-cxf-2.2.3/bin]%
> ./wsdl2java -d /tmp/harcourt -client -verbose
> /tmp/harcourt/HarcourtWS.wsdl Loading FrontEnd jaxws ...
> Loading DataBinding jaxb ...
> wsdl2java -d /tmp/harcourt -client -verbose
> /tmp/harcourt/HarcourtWS.wsdl wsdl2java - Apache CXF 2.2.3
>
>
> WSDLToJava Error: java.lang.NullPointerException
>
> org.apache.cxf.tools.common.ToolException: java.lang.NullPointerException
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:271)
> at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
> at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
> at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
> at
> org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
> Caused by: java.lang.NullPointerException
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.FaultProcessor.processFault(FaultProcessor.java:96)
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.FaultProcessor.process(FaultProcessor.java:54)
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.OperationProcessor.process(OperationProcessor.java:66)
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.PortTypeProcessor.process(PortTypeProcessor.java:143)
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.wsdlDefinitionToJavaModel(WSDLToJavaProcessor.java:88)
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.process(WSDLToJavaProcessor.java:60)
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:229)
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:127)
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:263)
> ... 4 more
>
>
> There is no indication here as to what the problem is, and searching
> the web and the users@cxf archives, I don't find anything that seems
> related to this error.
>
> When I try running with -validate to see if the WSDL is valid, it
> gives me the following error:
>
> jrobins@yggdrasil,11:17am,[~/tmp/newcxf/apache-cxf-2.2.3/bin]%
> ./wsdl2java -d /tmp/harcourt -validate -verbose
> /tmp/harcourt/HarcourtWS.wsdl Loading FrontEnd jaxws ...
> Loading DataBinding jaxb ...
> wsdl2java -d /tmp/harcourt -validate -verbose
> /tmp/harcourt/HarcourtWS.wsdl wsdl2java - Apache CXF 2.2.3
>
>
> WSDLToJava Error: WSI-BP-1.0 R2205 violation: In Message
> SubmitRequestFault, part ExceptionId must specify a 'element'
> attribute
>
>
>
> org.apache.cxf.tools.common.ToolException: WSI-BP-1.0 R2205 violation:
> In Message SubmitRequestFault, part ExceptionId must specify a 'element'
> attribute
>
>
> at
> org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WSDL11Validator.java:140)
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.validate(JAXWSDefinitionBuilder.java:201)
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.validate(JAXWSDefinitionBuilder.java:61)
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:166)
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:127)
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:263)
> at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
> at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
> at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
> at
> org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
>
>
> So it seems like there is an issue with conforming to the WS-I Basic
> Profile. However, I was under the impression that conforming to the
> BP was optional, and that a WSDL can still be valid even if it does
> not conform. I am sort of assuming that CXF is providing this message
> as informational, rather than as a requirement, but I don't know. Is
> it possible that this violation is what's causing the
> NullPointerException? And since this WSDL seems to be valid WSDL,
> even if it doesn't conform to the Basic Profile (it passes the
> validation at *http://www.validwsdl.com/*<http://www.validwsdl.com/>,
> for example), is there a way to get CXF not to require that it
> conform, and still generate Java client code? Since this is a
> third-party tool, we don't have the option of changing the WSDL or the
> service, so I'm hoping I can find a way to make this work.
>
> Thank you in advance for any help or advice you can offer.
>
>
>
> Joe Robins
> Director, Systems & Software Development Teach For America
> Email: joe.robins@teachforamerica.org
> Phone: 212-279-2080, x368
> One day, all children in this nation will have the opportunity to
> attain an excellent education.
> *http://www.teachforamerica.org/* <http://www.teachforamerica.org/>
>
>
>
>
> ____________________________________________
> This communication and any file transmitted with it may contain
> information that is confidential, privileged and exempt from
> disclosure under applicable law. It is intended solely for the use of
> the individual or entity to which it is addressed. If you are not the
> intended recipient, you are hereby notified that any use,
> dissemination or copying of this communication is strictly prohibited.
> If you have received this communication in error, please notify the sender. Thank you for your cooperation.
>
____________________________________________
This communication and any file transmitted with it may contain information that is confidential, privileged and exempt from disclosure under applicable law. It is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are hereby notified that any use, dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender. Thank you for your cooperation.
Re: Error generating Java code from WSDL
Posted by Benson Margulies <bi...@gmail.com>.
Please file a JIRA and attach the wsdl.
On Wed, Sep 9, 2009 at 11:24 AM, Robins, Joe <joe.robins@teachforamerica.org
> wrote:
> Hi,
>
> I searched the archives, and couldn't find any info on this. I'm far from
> an expert with web services, so I hope this isn't a dumb question, but even
> if it is, any help would be appreciated.
>
> I am trying to generate Java code using CXF to work with a third-party tool
> which they provide as a web service. I have attached the WSDL for their
> service to this message. When I try to run the wsdl2java tool on it (using
> either CXF 2.0.5, which we've used before, and currently use for one other
> project, or with 2.2.3, which I downloaded when I started having problems),
> I get a NullPointerException with no useful error message:
>
> jrobins@yggdrasil,11:10am,[~/tmp/newcxf/apache-cxf-2.2.3/bin]% ./wsdl2java
> -d /tmp/harcourt -client -verbose /tmp/harcourt/HarcourtWS.wsdl
> Loading FrontEnd jaxws ...
> Loading DataBinding jaxb ...
> wsdl2java -d /tmp/harcourt -client -verbose /tmp/harcourt/HarcourtWS.wsdl
> wsdl2java - Apache CXF 2.2.3
>
>
> WSDLToJava Error: java.lang.NullPointerException
>
> org.apache.cxf.tools.common.ToolException: java.lang.NullPointerException
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:271)
> at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
> at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
> at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
> at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
> Caused by: java.lang.NullPointerException
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.FaultProcessor.processFault(FaultProcessor.java:96)
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.FaultProcessor.process(FaultProcessor.java:54)
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.OperationProcessor.process(OperationProcessor.java:66)
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.PortTypeProcessor.process(PortTypeProcessor.java:143)
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.wsdlDefinitionToJavaModel(WSDLToJavaProcessor.java:88)
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.process(WSDLToJavaProcessor.java:60)
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:229)
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:127)
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:263)
> ... 4 more
>
>
> There is no indication here as to what the problem is, and searching the
> web and the users@cxf archives, I don't find anything that seems related
> to this error.
>
> When I try running with -validate to see if the WSDL is valid, it gives me
> the following error:
>
> jrobins@yggdrasil,11:17am,[~/tmp/newcxf/apache-cxf-2.2.3/bin]% ./wsdl2java
> -d /tmp/harcourt -validate -verbose /tmp/harcourt/HarcourtWS.wsdl
> Loading FrontEnd jaxws ...
> Loading DataBinding jaxb ...
> wsdl2java -d /tmp/harcourt -validate -verbose /tmp/harcourt/HarcourtWS.wsdl
> wsdl2java - Apache CXF 2.2.3
>
>
> WSDLToJava Error: WSI-BP-1.0 R2205 violation: In Message
> SubmitRequestFault, part ExceptionId must specify a 'element' attribute
>
>
>
> org.apache.cxf.tools.common.ToolException: WSI-BP-1.0 R2205 violation: In
> Message SubmitRequestFault, part ExceptionId must specify a 'element'
> attribute
>
>
> at
> org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WSDL11Validator.java:140)
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.validate(JAXWSDefinitionBuilder.java:201)
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.validate(JAXWSDefinitionBuilder.java:61)
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:166)
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:127)
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:263)
> at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
> at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
> at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
> at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
>
>
> So it seems like there is an issue with conforming to the WS-I Basic
> Profile. However, I was under the impression that conforming to the BP was
> optional, and that a WSDL can still be valid even if it does not conform. I
> am sort of assuming that CXF is providing this message as informational,
> rather than as a requirement, but I don't know. Is it possible that this
> violation is what's causing the NullPointerException? And since this WSDL
> seems to be valid WSDL, even if it doesn't conform to the Basic Profile (it
> passes the validation at *http://www.validwsdl.com/*<http://www.validwsdl.com/>,
> for example), is there a way to get CXF not to require that it conform, and
> still generate Java client code? Since this is a third-party tool, we don't
> have the option of changing the WSDL or the service, so I'm hoping I can
> find a way to make this work.
>
> Thank you in advance for any help or advice you can offer.
>
>
>
> Joe Robins
> Director, Systems & Software Development
> Teach For America
> Email: joe.robins@teachforamerica.org
> Phone: 212-279-2080, x368
> One day, all children in this nation will have the opportunity to attain an
> excellent education.
> *http://www.teachforamerica.org/* <http://www.teachforamerica.org/>
>
>
>
>
> ____________________________________________
> This communication and any file transmitted with it may contain information
> that is confidential, privileged and exempt from disclosure under applicable
> law. It is intended solely for the use of the individual or entity to which
> it is addressed. If you are not the intended recipient, you are hereby
> notified that any use, dissemination or copying of this communication is
> strictly prohibited. If you have received this communication in error,
> please notify the sender. Thank you for your cooperation.
>
Re: Error generating Java code from WSDL
Posted by Daniel Kulp <dk...@apache.org>.
> So it seems like there is an issue with conforming to the WS-I Basic
> Profile. However, I was under the impression that conforming to the BP
> was optional, and that a WSDL can still be valid even if it does not
> conform.
Yes, a wsdl can still be "valid" according the wsdl schema, but that doesn't
mean it would be usable for generating valid soap messages. The point of
the WSI-BP was to define extra rules that make sure the various soap stacks
and such could properly work together.
In this specific case, even if it COULD generate the code, the runtime
wouldn't know what to do with it and would likely not generate a message that
is valid for that service.
My suggestion would be to take the wsdl they provide and modify it a bit to
make it conform to WSI-BP standards and match the soap messages that they
expect. (would need a sample soap message from them) That would most
likely involve adding some element declarations to the schema and changing the
parts from type=".." to element="..."
Dan
On Wed September 9 2009 11:24:53 am Robins, Joe wrote:
> Hi,
>
> I searched the archives, and couldn't find any info on this. I'm far from
> an expert with web services, so I hope this isn't a dumb question, but
> even if it is, any help would be appreciated.
>
> I am trying to generate Java code using CXF to work with a third-party tool
> which they provide as a web service. I have attached the WSDL for their
> service to this message. When I try to run the wsdl2java tool on it
> (using either CXF 2.0.5, which we've used before, and currently use for
> one other project, or with 2.2.3, which I downloaded when I started having
> problems), I get a NullPointerException with no useful error message:
>
> jrobins@yggdrasil,11:10am,[~/tmp/newcxf/apache-cxf-2.2.3/bin]% ./wsdl2java
> -d /tmp/harcourt -client -verbose /tmp/harcourt/HarcourtWS.wsdl Loading
> FrontEnd jaxws ...
> Loading DataBinding jaxb ...
> wsdl2java -d /tmp/harcourt -client -verbose /tmp/harcourt/HarcourtWS.wsdl
> wsdl2java - Apache CXF 2.2.3
>
>
> WSDLToJava Error: java.lang.NullPointerException
>
> org.apache.cxf.tools.common.ToolException: java.lang.NullPointerException
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContaine
> r.java:271) at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:10
> 3) at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113) at
> org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86) at
> org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184) Caused
> by: java.lang.NullPointerException
> at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.FaultProcess
> or.processFault(FaultProcessor.java:96) at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.FaultProcess
> or.process(FaultProcessor.java:54) at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.OperationPro
> cessor.process(OperationProcessor.java:66) at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.PortTypeProc
> essor.process(PortTypeProcessor.java:143) at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.w
> sdlDefinitionToJavaModel(WSDLToJavaProcessor.java:88) at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.p
> rocess(WSDLToJavaProcessor.java:60) at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaCont
> ainer.java:229) at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContaine
> r.java:127) at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContaine
> r.java:263) ... 4 more
>
>
> There is no indication here as to what the problem is, and searching the
> web and the users@cxf archives, I don't find anything that seems related
> to this error.
>
> When I try running with -validate to see if the WSDL is valid, it gives me
> the following error:
>
> jrobins@yggdrasil,11:17am,[~/tmp/newcxf/apache-cxf-2.2.3/bin]% ./wsdl2java
> -d /tmp/harcourt -validate -verbose /tmp/harcourt/HarcourtWS.wsdl Loading
> FrontEnd jaxws ...
> Loading DataBinding jaxb ...
> wsdl2java -d /tmp/harcourt -validate -verbose /tmp/harcourt/HarcourtWS.wsdl
> wsdl2java - Apache CXF 2.2.3
>
>
> WSDLToJava Error: WSI-BP-1.0 R2205 violation: In Message
> SubmitRequestFault, part ExceptionId must specify a 'element' attribute
>
>
>
> org.apache.cxf.tools.common.ToolException: WSI-BP-1.0 R2205 violation: In
> Message SubmitRequestFault, part ExceptionId must specify a 'element'
> attribute
>
>
> at
> org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WSDL11Vali
> dator.java:140) at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.v
> alidate(JAXWSDefinitionBuilder.java:201) at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.v
> alidate(JAXWSDefinitionBuilder.java:61) at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaCont
> ainer.java:166) at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContaine
> r.java:127) at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContaine
> r.java:263) at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:10
> 3) at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113) at
> org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86) at
> org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
>
>
> So it seems like there is an issue with conforming to the WS-I Basic
> Profile. However, I was under the impression that conforming to the BP
> was optional, and that a WSDL can still be valid even if it does not
> conform. I am sort of assuming that CXF is providing this message as
> informational, rather than as a requirement, but I don't know. Is it
> possible that this violation is what's causing the NullPointerException?
> And since this WSDL seems to be valid WSDL, even if it doesn't conform to
> the Basic Profile (it passes the validation at http://www.validwsdl.com/,
> for example), is there a way to get CXF not to require that it conform,
> and still generate Java client code? Since this is a third-party tool, we
> don't have the option of changing the WSDL or the service, so I'm hoping I
> can find a way to make this work.
>
> Thank you in advance for any help or advice you can offer.
>
>
>
>
> Joe Robins
> Director, Systems & Software Development
> Teach For America
> Email: joe.robins@teachforamerica.org
> Phone: 212-279-2080, x368
>
> One day, all children in this nation will have the opportunity to attain an
> excellent education. http://www.teachforamerica.org/
>
>
>
>
> ____________________________________________
> This communication and any file transmitted with it may contain information
> that is confidential, privileged and exempt from disclosure under
> applicable law. It is intended solely for the use of the individual or
> entity to which it is addressed. If you are not the intended recipient,
> you are hereby notified that any use, dissemination or copying of this
> communication is strictly prohibited. If you have received this
> communication in error, please notify the sender. Thank you for your
> cooperation.
>
--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog