wsdl2java error

2008-03-10 Thread mattrpav

cxf-2.0.4-incubator, running wsdl2java.  Thoughts?  

[INFO] [cxf-codegen:wsdl2java {execution: default}]
Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
loadPlugin
INFO: Loading plugin
jar:file:/Users/mpav/Desktop/sm-eclipse/apache-maven-2.0.8/repo/org/apache/cxf/cxf-tools-wsdlto-frontend-jaxws/2.0.4-incubator/cxf-tools-wsdlto-frontend-jaxws-2.0.4-incubator.jar!/META-INF/tools-plugin.xml
Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
loadPlugin
INFO: Found 1 frontends in jaxws plugin.
Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
loadPlugin
INFO: Loading jaxws frontend from jaxws plugin.
Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
loadPlugin
INFO: Loading plugin
jar:file:/Users/mpav/Desktop/sm-eclipse/apache-maven-2.0.8/repo/org/apache/cxf/cxf-tools-wsdlto-databinding-jaxb/2.0.4-incubator/cxf-tools-wsdlto-databinding-jaxb-2.0.4-incubator.jar!/META-INF/tools-plugin.xml
Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
loadPlugin
INFO: Found 1 databindings in jaxb plugin.
Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
loadPlugin
INFO: Loading jaxb databinding from jaxb plugin.
Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
loadBuilder
SEVERE: Can not load processor
org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Can not load processor
org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder

org.apache.xerces.dom.DeferredDocumentTypeImpl
-- 
View this message in context: 
http://www.nabble.com/wsdl2java-error-tp15950999p15950999.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: wsdl2java error

2008-03-10 Thread Glen Mazza
I think you're using Maven.  Trying using the goal of mvn
generate-sources instead, to see if that works.  ([1], Maven Notes #2
at the very bottom.)

HTH,
Glen

[1] http://www.jroller.com/gmazza/date/20070929

Am Montag, den 10.03.2008, 11:01 -0700 schrieb mattrpav:
 cxf-2.0.4-incubator, running wsdl2java.  Thoughts?  
 
 [INFO] [cxf-codegen:wsdl2java {execution: default}]
 Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
 loadPlugin
 INFO: Loading plugin
 jar:file:/Users/mpav/Desktop/sm-eclipse/apache-maven-2.0.8/repo/org/apache/cxf/cxf-tools-wsdlto-frontend-jaxws/2.0.4-incubator/cxf-tools-wsdlto-frontend-jaxws-2.0.4-incubator.jar!/META-INF/tools-plugin.xml
 Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
 loadPlugin
 INFO: Found 1 frontends in jaxws plugin.
 Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
 loadPlugin
 INFO: Loading jaxws frontend from jaxws plugin.
 Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
 loadPlugin
 INFO: Loading plugin
 jar:file:/Users/mpav/Desktop/sm-eclipse/apache-maven-2.0.8/repo/org/apache/cxf/cxf-tools-wsdlto-databinding-jaxb/2.0.4-incubator/cxf-tools-wsdlto-databinding-jaxb-2.0.4-incubator.jar!/META-INF/tools-plugin.xml
 Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
 loadPlugin
 INFO: Found 1 databindings in jaxb plugin.
 Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
 loadPlugin
 INFO: Loading jaxb databinding from jaxb plugin.
 Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
 loadBuilder
 SEVERE: Can not load processor
 org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder
 [INFO]
 
 [ERROR] BUILD ERROR
 [INFO]
 
 [INFO] Can not load processor
 org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder
 
 org.apache.xerces.dom.DeferredDocumentTypeImpl



Re: wsdl2java error

2008-03-10 Thread Daniel Kulp

FYI: I talked him through this on IRC

Basically, he had some wacky dependency issues that were sucking in 
multiple versions of xerces as well as the older xmlParserAPI's.   
Getting some exclusions setup so that the in-jdk versions were picked up 
allowed everything to work.

Dan


On Monday 10 March 2008, mattrpav wrote:
 cxf-2.0.4-incubator, running wsdl2java.  Thoughts?

 [INFO] [cxf-codegen:wsdl2java {execution: default}]
 Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
 loadPlugin
 INFO: Loading plugin
 jar:file:/Users/mpav/Desktop/sm-eclipse/apache-maven-2.0.8/repo/org/ap
ache/cxf/cxf-tools-wsdlto-frontend-jaxws/2.0.4-incubator/cxf-tools-wsdl
to-frontend-jaxws-2.0.4-incubator.jar!/META-INF/tools-plugin.xml Mar
 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
 loadPlugin
 INFO: Found 1 frontends in jaxws plugin.
 Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
 loadPlugin
 INFO: Loading jaxws frontend from jaxws plugin.
 Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
 loadPlugin
 INFO: Loading plugin
 jar:file:/Users/mpav/Desktop/sm-eclipse/apache-maven-2.0.8/repo/org/ap
ache/cxf/cxf-tools-wsdlto-databinding-jaxb/2.0.4-incubator/cxf-tools-ws
dlto-databinding-jaxb-2.0.4-incubator.jar!/META-INF/tools-plugin.xml
 Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
 loadPlugin
 INFO: Found 1 databindings in jaxb plugin.
 Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
 loadPlugin
 INFO: Loading jaxb databinding from jaxb plugin.
 Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
 loadBuilder
 SEVERE: Can not load processor
 org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuild
er [INFO]
 --
-- [ERROR] BUILD ERROR
 [INFO]
 --
-- [INFO] Can not load processor
 org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuild
er

 org.apache.xerces.dom.DeferredDocumentTypeImpl



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog


Re: WSDL2Java error when using jaxb:serializable/ binding customization

2008-03-06 Thread Jesse McLaughlin


Done.  https://issues.apache.org/jira/browse/CXF-1465

Jesse.



jim ma wrote:
 
 Go ahead,  Jesse.
 
 Wsdl2java tool will use different class to process customization(binding
 file), so we need
 to process the URI contains spaces before it invokes
 JAXWSDefinitionBuilder
 class.
 
 Cheers
 
 Jim Ma
 
 
 
 On Wed, Mar 5, 2008 at 10:56 PM, Jesse McLaughlin [EMAIL PROTECTED]
 wrote:
 

 Cool.  Thanks Ian.  I changed my setup so as to avoid any spaces in the
 full
 project path, and everything started working as expected.  So I take it
 this
 means there is a bug there... ie. you can't have spaces in your project
 path
 if you want to use a binding customization such as this (where as
 normally,
 leaving out the binding file, spaces pose no issue).

 Unless there are any objections, or unless a similar bug has already been
 logged, I'll add this one into JIRA.

 Cheers,
 Jesse.



 ianroberts wrote:
 
  Jesse McLaughlin wrote:
  Hi Jim,
 
  No, there's no strange characters in the full path.  There are spaces,
  but
  that's about as strange as it gets.
 
  You can't have spaces in a java.net.URI, they have to be escaped as
 %20.
I'm not sure whose responsibility it is to do this though...
 
  Ian
 
  --
  Ian Roberts   | Department of Computer Science
  [EMAIL PROTECTED]  | University of Sheffield, UK
 
 

 --
 View this message in context:
 http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Aserializable-%3E-binding-customization-tp15786637p15852009.html
 Sent from the cxf-user mailing list archive at Nabble.com.


 
 

-- 
View this message in context: 
http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Aserializable-%3E-binding-customization-tp15786637p15869690.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: WSDL2Java error when using jaxb:serializable/ binding customization

2008-03-05 Thread Jesse McLaughlin
?
 
  Cheers,
  Jesse.
 
  jim ma wrote:
   Hi Jesse,
  
   Can you also paste  the error stacktrace for the details?
  
   Thanks
  
   Jim Ma
  
  
   On Tue, Mar 4, 2008 at 5:42 PM, Jesse McLaughlin
   [EMAIL PROTECTED]
  
   wrote:
   Thanks for the suggestion Dan.  Now I am getting a different error
   from WSDL2Java.  I tried the following exact binding file based on
   what you suggested:
  
   jxb:bindings version=1.0
xmlns:jxb=http://java.sun.com/xml/ns/jaxb;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
   jxb:bindings schemaLocation=types.xsd node=/xs:schema
  jxb:globalBindings
  jxb:serializable/
  /jxb:globalBindings
  /jxb:bindings
   /jxb:bindings
  
   And the error I get is:
  
  WSDLToJava Error : java.lang.RuntimeException: Fail to create
   wsdl definition [...path-to-project
   ommitted...]/src/main/test/test.wsdl
  
   This must be a fairly common case, but I can't find any way to make
   it work
   (and I have tried a few variations).
  
   Is there any further help out there on this issue?
  
   Thanks and regards,
   Jesse.
  
   dkulp wrote:
It should just be something like:
   
   
jxb:bindings version=1.0
  xmlns:jxb=http://java.sun.com/xml/ns/jaxb;
  xmlns:xs=http://www.w3.org/2001/XMLSchema;
jxb:bindings schemaLocation=MySchema.xsd
node=/xs:schema jaxb:globalBindings
jaxb:serializable/
/jaxb:globalBindings
/jxb:bindings
/jxb:bindings
   
   
Dan
   
On Monday 03 March 2008, Jesse McLaughlin wrote:
Thanks Jim.  I've figured out why it didn't work for me.  It
seems that this binding file won't work because I am importing
my type definitions (which are in a seperate xsd file) as
opposed to including them inline in the WSDL document itself.
Here's what the preamble of my WSDL looks like:
   
?xml version=1.0 encoding=utf-8?
definitions
targetNamespace=http://www.test.com/TestService/;
xmlns:tns=http://www.test.com/TestService/;
xmlns:test=http://www.test.com/test;
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns=http://schemas.xmlsoap.org/wsdl/;
   
import namespace=http://www.test.com/test;
location=types.xsd/
   
...
   
I verified this by removing the import and in-lining my types,
and everything works.
   
My problem is that I don't know how to construct a binding file
that works when an import is used.  Do I now need to specify a
schemaLocation attribute? If so, what is the value?  And what
would be the proper value for the node attribute on the
jaxb:bindings element in this case?
   
Could someone provide an example of a binding file that would
work?
   
Thanks,
Jesse.
   
jim ma wrote:
 Hi Jesse,

 I just tried this binding file with hello_world.wsdl and it
 works.

 Can you check if there is some typo/error in your wsdl and
 make sure the

 xpath expression is right for your wsdl .

 Cheers

 Jim Ma


 On Sun, Mar 2, 2008 at 7:13 PM, Jesse McLaughlin
 [EMAIL PROTECTED]

 wrote:
 Hi there,

 I am trying to use CXF to generate a JAXB client from a WSDL,
 and I want all
 the generated objects to implement java.io.Serializable.  To
 do this, I pass
 the following bindings file to WSDL2Java, using the -b
 option:

 ?xml version=1.0 encoding=UTF-8?
 jaxws:bindings node=wsdl:definitions/wsdl:types/xsd:schema
  xmlns:jaxws=http://java.sun.com/xml/ns/jaxws;
  xmlns:jaxb=http://java.sun.com/xml/ns/jaxb;
  xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
  xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 jaxb:globalBindings
jaxb:serializable/
 /jaxb:globalBindings
 /jaxws:bindings

 When I run WSDL2Java, it gives me the following error:

WSDLToJava Error : Could not find any node with the XPath
 expression: //wsdl:definitions/wsdl:types/xsd:schema

 The client is generated normally if I don't pass this file.
 I am using CXF
 2.0.4 with JDK5 on OS X.

 Note that I have read on JIRA that since CXF 2.0.3, neither
 the wsdlLocation
 nor schemaLocation attributes are required when doing this
 sort of customization
 (https://issues.apache.org/jira/browse/CXF-1094).

 Does anyone know what I am doing wrong here or why it does
 not work?

 Thanks,
 Jesse.


 --
 View this message in context:
 http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Ase
rializ able-%3E-binding-customization-tp15786637p15786637.html
 Sent from the cxf-user mailing list archive at Nabble.com.
   
--
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Re: WSDL2Java error when using jaxb:serializable/ binding customization

2008-03-05 Thread jim ma
  the wsdlLocation
  nor schemaLocation attributes are required when doing this
  sort of customization
  (https://issues.apache.org/jira/browse/CXF-1094).
 
  Does anyone know what I am doing wrong here or why it does
  not work?
 
  Thanks,
  Jesse.
 
 
  --
  View this message in context:
  http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Ase
 rializ able-%3E-binding-customization-tp15786637p15786637.html
  Sent from the cxf-user mailing list archive at Nabble.com.

 --
 J. Daniel Kulp
 Principal Engineer, IONA
 [EMAIL PROTECTED]
 http://www.dankulp.com/blog
   
--
View this message in context:
http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Aserializ
   able-%3E-binding-customization-tp15786637p15823617.html Sent from
the cxf-user mailing list archive at Nabble.com.
  
  
  
   --
   J. Daniel Kulp
   Principal Engineer, IONA
   [EMAIL PROTECTED]
   http://www.dankulp.com/blog
  
  
 
  --
  View this message in context:
 
 http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Aserializable-%3E-binding-customization-tp15786637p15833082.html
  Sent from the cxf-user mailing list archive at Nabble.com.
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Aserializable-%3E-binding-customization-tp15786637p15845940.html
 Sent from the cxf-user mailing list archive at Nabble.com.




Re: WSDL2Java error when using jaxb:serializable/ binding customization

2008-03-05 Thread Jesse McLaughlin

Cool.  Thanks Ian.  I changed my setup so as to avoid any spaces in the full
project path, and everything started working as expected.  So I take it this
means there is a bug there... ie. you can't have spaces in your project path
if you want to use a binding customization such as this (where as normally,
leaving out the binding file, spaces pose no issue).

Unless there are any objections, or unless a similar bug has already been
logged, I'll add this one into JIRA.

Cheers,
Jesse.



ianroberts wrote:
 
 Jesse McLaughlin wrote:
 Hi Jim,
 
 No, there's no strange characters in the full path.  There are spaces,
 but
 that's about as strange as it gets.
 
 You can't have spaces in a java.net.URI, they have to be escaped as %20. 
   I'm not sure whose responsibility it is to do this though...
 
 Ian
 
 -- 
 Ian Roberts   | Department of Computer Science
 [EMAIL PROTECTED]  | University of Sheffield, UK
 
 

-- 
View this message in context: 
http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Aserializable-%3E-binding-customization-tp15786637p15852009.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: WSDL2Java error when using jaxb:serializable/ binding customization

2008-03-05 Thread jim ma
Go ahead,  Jesse.

Wsdl2java tool will use different class to process customization(binding
file), so we need
to process the URI contains spaces before it invokes JAXWSDefinitionBuilder
class.

Cheers

Jim Ma



On Wed, Mar 5, 2008 at 10:56 PM, Jesse McLaughlin [EMAIL PROTECTED]
wrote:


 Cool.  Thanks Ian.  I changed my setup so as to avoid any spaces in the
 full
 project path, and everything started working as expected.  So I take it
 this
 means there is a bug there... ie. you can't have spaces in your project
 path
 if you want to use a binding customization such as this (where as
 normally,
 leaving out the binding file, spaces pose no issue).

 Unless there are any objections, or unless a similar bug has already been
 logged, I'll add this one into JIRA.

 Cheers,
 Jesse.



 ianroberts wrote:
 
  Jesse McLaughlin wrote:
  Hi Jim,
 
  No, there's no strange characters in the full path.  There are spaces,
  but
  that's about as strange as it gets.
 
  You can't have spaces in a java.net.URI, they have to be escaped as %20.
I'm not sure whose responsibility it is to do this though...
 
  Ian
 
  --
  Ian Roberts   | Department of Computer Science
  [EMAIL PROTECTED]  | University of Sheffield, UK
 
 

 --
 View this message in context:
 http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Aserializable-%3E-binding-customization-tp15786637p15852009.html
 Sent from the cxf-user mailing list archive at Nabble.com.




Re: WSDL2Java error when using jaxb:serializable/ binding customization

2008-03-04 Thread Jesse McLaughlin

Thanks for the suggestion Dan.  Now I am getting a different error from
WSDL2Java.  I tried the following exact binding file based on what you
suggested:

jxb:bindings version=1.0 
  xmlns:jxb=http://java.sun.com/xml/ns/jaxb; 
  xmlns:xs=http://www.w3.org/2001/XMLSchema; 
jxb:bindings schemaLocation=types.xsd node=/xs:schema 
jxb:globalBindings 
jxb:serializable/ 
/jxb:globalBindings 
/jxb:bindings 
/jxb:bindings

And the error I get is:

WSDLToJava Error : java.lang.RuntimeException: Fail to create wsdl
definition [...path-to-project ommitted...]/src/main/test/test.wsdl

This must be a fairly common case, but I can't find any way to make it work
(and I have tried a few variations).

Is there any further help out there on this issue?

Thanks and regards,
Jesse.



dkulp wrote:
 
 
 It should just be something like:
 
 
 jxb:bindings version=1.0
   xmlns:jxb=http://java.sun.com/xml/ns/jaxb;
   xmlns:xs=http://www.w3.org/2001/XMLSchema;
 jxb:bindings schemaLocation=MySchema.xsd node=/xs:schema
 jaxb:globalBindings
 jaxb:serializable/
 /jaxb:globalBindings
 /jxb:bindings
 /jxb:bindings
 
 
 Dan
 
 
 
 On Monday 03 March 2008, Jesse McLaughlin wrote:
 Thanks Jim.  I've figured out why it didn't work for me.  It seems
 that this binding file won't work because I am importing my type
 definitions (which are in a seperate xsd file) as opposed to including
 them inline in the WSDL document itself.  Here's what the preamble of
 my WSDL looks like:

 ?xml version=1.0 encoding=utf-8?
 definitions
 targetNamespace=http://www.test.com/TestService/;
 xmlns:tns=http://www.test.com/TestService/;
 xmlns:test=http://www.test.com/test;
 xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
 xmlns=http://schemas.xmlsoap.org/wsdl/;

 import namespace=http://www.test.com/test;
 location=types.xsd/

 ...

 I verified this by removing the import and in-lining my types, and
 everything works.

 My problem is that I don't know how to construct a binding file that
 works when an import is used.  Do I now need to specify a
 schemaLocation attribute? If so, what is the value?  And what would be
 the proper value for the node attribute on the jaxb:bindings element
 in this case?

 Could someone provide an example of a binding file that would work?

 Thanks,
 Jesse.

 jim ma wrote:
  Hi Jesse,
 
  I just tried this binding file with hello_world.wsdl and it works.
 
  Can you check if there is some typo/error in your wsdl and make sure
  the
 
  xpath expression is right for your wsdl .
 
  Cheers
 
  Jim Ma
 
 
  On Sun, Mar 2, 2008 at 7:13 PM, Jesse McLaughlin
  [EMAIL PROTECTED]
 
  wrote:
  Hi there,
 
  I am trying to use CXF to generate a JAXB client from a WSDL, and I
  want all
  the generated objects to implement java.io.Serializable.  To do
  this, I pass
  the following bindings file to WSDL2Java, using the -b option:
 
  ?xml version=1.0 encoding=UTF-8?
  jaxws:bindings node=wsdl:definitions/wsdl:types/xsd:schema
   xmlns:jaxws=http://java.sun.com/xml/ns/jaxws;
   xmlns:jaxb=http://java.sun.com/xml/ns/jaxb;
   xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
   xmlns:xsd=http://www.w3.org/2001/XMLSchema;
  jaxb:globalBindings
 jaxb:serializable/
  /jaxb:globalBindings
  /jaxws:bindings
 
  When I run WSDL2Java, it gives me the following error:
 
 WSDLToJava Error : Could not find any node with the XPath
  expression: //wsdl:definitions/wsdl:types/xsd:schema
 
  The client is generated normally if I don't pass this file.  I am
  using CXF
  2.0.4 with JDK5 on OS X.
 
  Note that I have read on JIRA that since CXF 2.0.3, neither the
  wsdlLocation
  nor schemaLocation attributes are required when doing this sort of
  customization (https://issues.apache.org/jira/browse/CXF-1094).
 
  Does anyone know what I am doing wrong here or why it does not
  work?
 
  Thanks,
  Jesse.
 
 
  --
  View this message in context:
  http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Aserializ
 able-%3E-binding-customization-tp15786637p15786637.html Sent from
  the cxf-user mailing list archive at Nabble.com.
 
 
 
 -- 
 J. Daniel Kulp
 Principal Engineer, IONA
 [EMAIL PROTECTED]
 http://www.dankulp.com/blog
 
 

-- 
View this message in context: 
http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Aserializable-%3E-binding-customization-tp15786637p15823617.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: WSDL2Java error when using jaxb:serializable/ binding customization

2008-03-04 Thread jim ma
Hi Jesse,

Can you also paste  the error stacktrace for the details?

Thanks

Jim Ma


On Tue, Mar 4, 2008 at 5:42 PM, Jesse McLaughlin [EMAIL PROTECTED]
wrote:


 Thanks for the suggestion Dan.  Now I am getting a different error from
 WSDL2Java.  I tried the following exact binding file based on what you
 suggested:

 jxb:bindings version=1.0
  xmlns:jxb=http://java.sun.com/xml/ns/jaxb;
  xmlns:xs=http://www.w3.org/2001/XMLSchema;
 jxb:bindings schemaLocation=types.xsd node=/xs:schema
jxb:globalBindings
jxb:serializable/
/jxb:globalBindings
/jxb:bindings
 /jxb:bindings

 And the error I get is:

WSDLToJava Error : java.lang.RuntimeException: Fail to create wsdl
 definition [...path-to-project ommitted...]/src/main/test/test.wsdl

 This must be a fairly common case, but I can't find any way to make it
 work
 (and I have tried a few variations).

 Is there any further help out there on this issue?

 Thanks and regards,
 Jesse.



 dkulp wrote:
 
 
  It should just be something like:
 
 
  jxb:bindings version=1.0
xmlns:jxb=http://java.sun.com/xml/ns/jaxb;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
  jxb:bindings schemaLocation=MySchema.xsd node=/xs:schema
  jaxb:globalBindings
  jaxb:serializable/
  /jaxb:globalBindings
  /jxb:bindings
  /jxb:bindings
 
 
  Dan
 
 
 
  On Monday 03 March 2008, Jesse McLaughlin wrote:
  Thanks Jim.  I've figured out why it didn't work for me.  It seems
  that this binding file won't work because I am importing my type
  definitions (which are in a seperate xsd file) as opposed to including
  them inline in the WSDL document itself.  Here's what the preamble of
  my WSDL looks like:
 
  ?xml version=1.0 encoding=utf-8?
  definitions
  targetNamespace=http://www.test.com/TestService/;
  xmlns:tns=http://www.test.com/TestService/;
  xmlns:test=http://www.test.com/test;
  xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
  xmlns=http://schemas.xmlsoap.org/wsdl/;
 
  import namespace=http://www.test.com/test;
  location=types.xsd/
 
  ...
 
  I verified this by removing the import and in-lining my types, and
  everything works.
 
  My problem is that I don't know how to construct a binding file that
  works when an import is used.  Do I now need to specify a
  schemaLocation attribute? If so, what is the value?  And what would be
  the proper value for the node attribute on the jaxb:bindings element
  in this case?
 
  Could someone provide an example of a binding file that would work?
 
  Thanks,
  Jesse.
 
  jim ma wrote:
   Hi Jesse,
  
   I just tried this binding file with hello_world.wsdl and it works.
  
   Can you check if there is some typo/error in your wsdl and make sure
   the
  
   xpath expression is right for your wsdl .
  
   Cheers
  
   Jim Ma
  
  
   On Sun, Mar 2, 2008 at 7:13 PM, Jesse McLaughlin
   [EMAIL PROTECTED]
  
   wrote:
   Hi there,
  
   I am trying to use CXF to generate a JAXB client from a WSDL, and I
   want all
   the generated objects to implement java.io.Serializable.  To do
   this, I pass
   the following bindings file to WSDL2Java, using the -b option:
  
   ?xml version=1.0 encoding=UTF-8?
   jaxws:bindings node=wsdl:definitions/wsdl:types/xsd:schema
xmlns:jaxws=http://java.sun.com/xml/ns/jaxws;
xmlns:jaxb=http://java.sun.com/xml/ns/jaxb;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
   jaxb:globalBindings
  jaxb:serializable/
   /jaxb:globalBindings
   /jaxws:bindings
  
   When I run WSDL2Java, it gives me the following error:
  
  WSDLToJava Error : Could not find any node with the XPath
   expression: //wsdl:definitions/wsdl:types/xsd:schema
  
   The client is generated normally if I don't pass this file.  I am
   using CXF
   2.0.4 with JDK5 on OS X.
  
   Note that I have read on JIRA that since CXF 2.0.3, neither the
   wsdlLocation
   nor schemaLocation attributes are required when doing this sort of
   customization (https://issues.apache.org/jira/browse/CXF-1094).
  
   Does anyone know what I am doing wrong here or why it does not
   work?
  
   Thanks,
   Jesse.
  
  
   --
   View this message in context:
   http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Aserializ
  able-%3E-binding-customization-tp15786637p15786637.html Sent from
   the cxf-user mailing list archive at Nabble.com.
 
 
 
  --
  J. Daniel Kulp
  Principal Engineer, IONA
  [EMAIL PROTECTED]
  http://www.dankulp.com/blog
 
 

 --
 View this message in context:
 http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Aserializable-%3E-binding-customization-tp15786637p15823617.html
 Sent from the cxf-user mailing list archive at Nabble.com.




Re: WSDL2Java error when using jaxb:serializable/ binding customization

2008-03-04 Thread Jesse McLaughlin
/xml/ns/jaxws;
xmlns:jaxb=http://java.sun.com/xml/ns/jaxb;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
   jaxb:globalBindings
  jaxb:serializable/
   /jaxb:globalBindings
   /jaxws:bindings
  
   When I run WSDL2Java, it gives me the following error:
  
  WSDLToJava Error : Could not find any node with the XPath
   expression: //wsdl:definitions/wsdl:types/xsd:schema
  
   The client is generated normally if I don't pass this file.  I am
   using CXF
   2.0.4 with JDK5 on OS X.
  
   Note that I have read on JIRA that since CXF 2.0.3, neither the
   wsdlLocation
   nor schemaLocation attributes are required when doing this sort of
   customization (https://issues.apache.org/jira/browse/CXF-1094).
  
   Does anyone know what I am doing wrong here or why it does not
   work?
  
   Thanks,
   Jesse.
  
  
   --
   View this message in context:
   http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Aserializ
  able-%3E-binding-customization-tp15786637p15786637.html Sent from
   the cxf-user mailing list archive at Nabble.com.
 
 
 
  --
  J. Daniel Kulp
  Principal Engineer, IONA
  [EMAIL PROTECTED]
  http://www.dankulp.com/blog
 
 

 --
 View this message in context:
 http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Aserializable-%3E-binding-customization-tp15786637p15823617.html
 Sent from the cxf-user mailing list archive at Nabble.com.


 
 

-- 
View this message in context: 
http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Aserializable-%3E-binding-customization-tp15786637p15828525.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: WSDL2Java error when using jaxb:serializable/ binding customization

2008-03-04 Thread Daniel Kulp
.  To
do this, I pass
the following bindings file to WSDL2Java, using the -b
option:
   
?xml version=1.0 encoding=UTF-8?
jaxws:bindings node=wsdl:definitions/wsdl:types/xsd:schema
 xmlns:jaxws=http://java.sun.com/xml/ns/jaxws;
 xmlns:jaxb=http://java.sun.com/xml/ns/jaxb;
 xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema;
jaxb:globalBindings
   jaxb:serializable/
/jaxb:globalBindings
/jaxws:bindings
   
When I run WSDL2Java, it gives me the following error:
   
   WSDLToJava Error : Could not find any node with the XPath
expression: //wsdl:definitions/wsdl:types/xsd:schema
   
The client is generated normally if I don't pass this file. 
I am using CXF
2.0.4 with JDK5 on OS X.
   
Note that I have read on JIRA that since CXF 2.0.3, neither
the wsdlLocation
nor schemaLocation attributes are required when doing this
sort of customization
(https://issues.apache.org/jira/browse/CXF-1094).
   
Does anyone know what I am doing wrong here or why it does
not work?
   
Thanks,
Jesse.
   
   
--
View this message in context:
http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Ase
   rializ able-%3E-binding-customization-tp15786637p15786637.html
Sent from the cxf-user mailing list archive at Nabble.com.
  
   --
   J. Daniel Kulp
   Principal Engineer, IONA
   [EMAIL PROTECTED]
   http://www.dankulp.com/blog
 
  --
  View this message in context:
  http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Aserializ
 able-%3E-binding-customization-tp15786637p15823617.html Sent from
  the cxf-user mailing list archive at Nabble.com.



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog


Re: WSDL2Java error when using jaxb:serializable/ binding customization

2008-03-04 Thread Jesse McLaughlin
-to-project
 ommitted...]/src/main/test/test.wsdl

 Is there some way to get the stack trace information?

 Cheers,
 Jesse.

 jim ma wrote:
  Hi Jesse,
 
  Can you also paste  the error stacktrace for the details?
 
  Thanks
 
  Jim Ma
 
 
  On Tue, Mar 4, 2008 at 5:42 PM, Jesse McLaughlin
  [EMAIL PROTECTED]
 
  wrote:
  Thanks for the suggestion Dan.  Now I am getting a different error
  from WSDL2Java.  I tried the following exact binding file based on
  what you suggested:
 
  jxb:bindings version=1.0
   xmlns:jxb=http://java.sun.com/xml/ns/jaxb;
   xmlns:xs=http://www.w3.org/2001/XMLSchema;
  jxb:bindings schemaLocation=types.xsd node=/xs:schema
 jxb:globalBindings
 jxb:serializable/
 /jxb:globalBindings
 /jxb:bindings
  /jxb:bindings
 
  And the error I get is:
 
 WSDLToJava Error : java.lang.RuntimeException: Fail to create
  wsdl definition [...path-to-project
  ommitted...]/src/main/test/test.wsdl
 
  This must be a fairly common case, but I can't find any way to make
  it work
  (and I have tried a few variations).
 
  Is there any further help out there on this issue?
 
  Thanks and regards,
  Jesse.
 
  dkulp wrote:
   It should just be something like:
  
  
   jxb:bindings version=1.0
 xmlns:jxb=http://java.sun.com/xml/ns/jaxb;
 xmlns:xs=http://www.w3.org/2001/XMLSchema;
   jxb:bindings schemaLocation=MySchema.xsd
   node=/xs:schema jaxb:globalBindings
   jaxb:serializable/
   /jaxb:globalBindings
   /jxb:bindings
   /jxb:bindings
  
  
   Dan
  
   On Monday 03 March 2008, Jesse McLaughlin wrote:
   Thanks Jim.  I've figured out why it didn't work for me.  It
   seems that this binding file won't work because I am importing
   my type definitions (which are in a seperate xsd file) as
   opposed to including them inline in the WSDL document itself. 
   Here's what the preamble of my WSDL looks like:
  
   ?xml version=1.0 encoding=utf-8?
   definitions
   targetNamespace=http://www.test.com/TestService/;
   xmlns:tns=http://www.test.com/TestService/;
   xmlns:test=http://www.test.com/test;
   xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
   xmlns=http://schemas.xmlsoap.org/wsdl/;
  
   import namespace=http://www.test.com/test;
   location=types.xsd/
  
   ...
  
   I verified this by removing the import and in-lining my types,
   and everything works.
  
   My problem is that I don't know how to construct a binding file
   that works when an import is used.  Do I now need to specify a
   schemaLocation attribute? If so, what is the value?  And what
   would be the proper value for the node attribute on the
   jaxb:bindings element in this case?
  
   Could someone provide an example of a binding file that would
   work?
  
   Thanks,
   Jesse.
  
   jim ma wrote:
Hi Jesse,
   
I just tried this binding file with hello_world.wsdl and it
works.
   
Can you check if there is some typo/error in your wsdl and
make sure the
   
xpath expression is right for your wsdl .
   
Cheers
   
Jim Ma
   
   
On Sun, Mar 2, 2008 at 7:13 PM, Jesse McLaughlin
[EMAIL PROTECTED]
   
wrote:
Hi there,
   
I am trying to use CXF to generate a JAXB client from a WSDL,
and I want all
the generated objects to implement java.io.Serializable.  To
do this, I pass
the following bindings file to WSDL2Java, using the -b
option:
   
?xml version=1.0 encoding=UTF-8?
jaxws:bindings node=wsdl:definitions/wsdl:types/xsd:schema
 xmlns:jaxws=http://java.sun.com/xml/ns/jaxws;
 xmlns:jaxb=http://java.sun.com/xml/ns/jaxb;
 xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema;
jaxb:globalBindings
   jaxb:serializable/
/jaxb:globalBindings
/jaxws:bindings
   
When I run WSDL2Java, it gives me the following error:
   
   WSDLToJava Error : Could not find any node with the XPath
expression: //wsdl:definitions/wsdl:types/xsd:schema
   
The client is generated normally if I don't pass this file. 
I am using CXF
2.0.4 with JDK5 on OS X.
   
Note that I have read on JIRA that since CXF 2.0.3, neither
the wsdlLocation
nor schemaLocation attributes are required when doing this
sort of customization
(https://issues.apache.org/jira/browse/CXF-1094).
   
Does anyone know what I am doing wrong here or why it does
not work?
   
Thanks,
Jesse.
   
   
--
View this message in context:
http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Ase
   rializ able-%3E-binding-customization-tp15786637p15786637.html
Sent from the cxf-user mailing list archive at Nabble.com.
  
   --
   J. Daniel Kulp
   Principal Engineer, IONA
   [EMAIL PROTECTED]
   http://www.dankulp.com/blog
 
  --
  View this message in context:
  http://www.nabble.com

Re: WSDL2Java error when using jaxb:serializable/ binding customization

2008-03-04 Thread jim ma

 The client is generated normally if I don't pass this file.
 I am using CXF
 2.0.4 with JDK5 on OS X.

 Note that I have read on JIRA that since CXF 2.0.3, neither
 the wsdlLocation
 nor schemaLocation attributes are required when doing this
 sort of customization
 (https://issues.apache.org/jira/browse/CXF-1094).

 Does anyone know what I am doing wrong here or why it does
 not work?

 Thanks,
 Jesse.


 --
 View this message in context:
 http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Ase
rializ able-%3E-binding-customization-tp15786637p15786637.html
 Sent from the cxf-user mailing list archive at Nabble.com.
   
--
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog
  
   --
   View this message in context:
   http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Aserializ
  able-%3E-binding-customization-tp15786637p15823617.html Sent from
   the cxf-user mailing list archive at Nabble.com.
 
 
 
  --
  J. Daniel Kulp
  Principal Engineer, IONA
  [EMAIL PROTECTED]
  http://www.dankulp.com/blog
 
 

 --
 View this message in context:
 http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Aserializable-%3E-binding-customization-tp15786637p15833082.html
 Sent from the cxf-user mailing list archive at Nabble.com.




Re: WSDL2Java error when using jaxb:serializable/ binding customization

2008-03-02 Thread jim ma
Hi Jesse,

I just tried this binding file with hello_world.wsdl and it works.

Can you check if there is some typo/error in your wsdl and make sure the

xpath expression is right for your wsdl .

Cheers

Jim Ma


On Sun, Mar 2, 2008 at 7:13 PM, Jesse McLaughlin [EMAIL PROTECTED]
wrote:


 Hi there,

 I am trying to use CXF to generate a JAXB client from a WSDL, and I want
 all
 the generated objects to implement java.io.Serializable.  To do this, I
 pass
 the following bindings file to WSDL2Java, using the -b option:

 ?xml version=1.0 encoding=UTF-8?
 jaxws:bindings node=wsdl:definitions/wsdl:types/xsd:schema
  xmlns:jaxws=http://java.sun.com/xml/ns/jaxws;
  xmlns:jaxb=http://java.sun.com/xml/ns/jaxb;
  xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
  xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 jaxb:globalBindings
jaxb:serializable/
 /jaxb:globalBindings
 /jaxws:bindings

 When I run WSDL2Java, it gives me the following error:

WSDLToJava Error : Could not find any node with the XPath expression:
 //wsdl:definitions/wsdl:types/xsd:schema

 The client is generated normally if I don't pass this file.  I am using
 CXF
 2.0.4 with JDK5 on OS X.

 Note that I have read on JIRA that since CXF 2.0.3, neither the
 wsdlLocation
 nor schemaLocation attributes are required when doing this sort of
 customization (https://issues.apache.org/jira/browse/CXF-1094).

 Does anyone know what I am doing wrong here or why it does not work?

 Thanks,
 Jesse.


 --
 View this message in context:
 http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Aserializable-%3E-binding-customization-tp15786637p15786637.html
 Sent from the cxf-user mailing list archive at Nabble.com.




WSDL2Java error message 2.0.4-INCUBATOR

2008-02-06 Thread mattrpav
(DefaultLifecycleExecutor.java:151)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:220)
at 
org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:813)
at
org.maven.ide.eclipse.embedder.Maven2Executor.main(Maven2Executor.java:85)
Caused by: java.lang.NullPointerException
at
org.apache.cxf.binding.soap.SoapTransportFactory.registerWithBindingManager(SoapTransportFactory.java:175)
... 35 more
Feb 6, 2008 4:39:02 PM
org.springframework.context.support.AbstractApplicationContext doClose
INFO: Closing [EMAIL PROTECTED]:
display name [EMAIL PROTECTED];
startup date [Wed Feb 06 16:38:56 CST 2008]; root of context hierarchy
Feb 6, 2008 4:39:02 PM
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry
destroySingletons
INFO: Destroying singletons in
[EMAIL PROTECTED]:
defining beans
[cxf,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.binding.xml.XMLBindingFactory,org.apache.cxf.transport.jbi.JBITransportFactory,org.apache.cxf.binding.jbi.JBIBindingFactory];
root of factory hierarchy
[INFO]

[INFO] BUILD SUCCESSFUL
com.airband.sitews:sitews-cxfse-su:jbi-service-unit:1.0 (  task-segment:
[generate-sources] )
[INFO]

[INFO] Total time: 17 second
[INFO] Finished at: Wed Feb 06 16:39:03 CST 2008
[INFO] Memory 19M/43M
[INFO]

[INFO]

[INFO] Building SiteWS :: CXF BC
[INFO]task-segment: [generate-sources]
[INFO]

[INFO]

[INFO] BUILD SUCCESSFUL
com.airband.sitews:sitews-cxfbc-su:jbi-service-unit:1.0 (  task-segment:
[generate-sources] )
[INFO]

[INFO] Total time: 0 second
[INFO] Finished at: Wed Feb 06 16:39:03 CST 2008
[INFO] Memory 19M/43M
[INFO]

[INFO]

[INFO] Building SiteWS :: SA
[INFO]task-segment: [generate-sources]
[INFO]

[INFO]

[INFO] BUILD SUCCESSFUL
com.airband.sitews:sitews-sa:jbi-service-assembly:1.0 (  task-segment:
[generate-sources] )
[INFO]

[INFO] Total time: 0 second
[INFO] Finished at: Wed Feb 06 16:39:03 CST 2008
[INFO] Memory 19M/43M
[INFO]


-- 
View this message in context: 
http://www.nabble.com/WSDL2Java-error-message-2.0.4-INCUBATOR-tp15319961p15319961.html
Sent from the cxf-user mailing list archive at Nabble.com.