Re: How to make classes created from wsdl2java implements serializable?

2008-01-24 Thread Akos Kiss

I had exactly the same problem with cxf and swf. And here is the solution you
need:

?xml version=1.0 encoding=UTF-8?
jaxws:bindings wsdlLocation=YOUR_WSDL_LOCATION
xmlns:jaxws=http://java.sun.com/xml/ns/jaxws;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns:jxb=http://java.sun.com/xml/ns/jaxb;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
jaxws:bindings

node=wsdl:definitions/wsdl:types/xs:[EMAIL PROTECTED]'YOUR_TARGET_NAMESPACE']
jxb:globalBindings xmlns:jxb=http://java.sun.com/xml/ns/jaxb;
xmlns:xs=http://www.w3.org/2001/XMLSchema; 
jxb:serializable/
/jxb:globalBindings
/jaxws:bindings
/jaxws:bindings

I hope it works for you too.

Regards,
Akos



daniel.mfreitas wrote:
 
 Hello. I want to use wsdl2java to generate the client stubs to be used by
 my client web application. I am using Spring Web Flow and it requires that
 objects used in the flow are Serializable.
 
 I successfully generated Serializable classes using the following bindings
 file and Metro JAXWS RI implementation:
 
 ?xml version=1.0 encoding=UTF-8?
 xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema;
 xmlns:jaxb=http://java.sun.com/xml/ns/jaxb;
   xmlns:xjc=http://java.sun.com/xml/ns/jaxb/xjc;
 elementFormDefault=qualified attributeFormDefault=unqualified
   jaxb:extensionBindingPrefixes=xjc jaxb:version=1.0
   xs:annotation
   xs:appinfo
   jaxb:globalBindings
   xjc:serializable uid=-6026937020915831338/
   /jaxb:globalBindings
   /xs:appinfo
   /xs:annotation
 /xs:schema
 
 But because of some limitations of Metro RI, we want to switch to CXF.
 When calling wsdl2java from a maven build file and we try to supply the
 above binding file, cfx throws
 
 WSDLToJava Error : Unknown external binding files:
 
 This is not a FileNotFoundError. wsdl2java does find the file, but it
 seems it does not understand its contents. I wanted to use CXF for
 everything including java2wsdl and wsdl2java. We have bad experiences to
 set up JAXWS Metro RI and for some developers it is a pain to put it to
 work. 
 
 So how can I make the entities stubs to implement serializable with
 wsdl2java?
 

-- 
View this message in context: 
http://www.nabble.com/How-to-make-classes-created-from-wsdl2java-implements-serializable--tp14246207p15062180.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: How to make classes created from wsdl2java implements serializable?

2008-01-24 Thread daniel.mfreitas

Thanks Akos, I will try this a later time. For this project we will keep
using metro RI, we don't have time to change that as we are close to the end
of the project.

1 quick question though: the wsdlLocation=YOUR_WSDL_LOCATION should point
to the final destination of your wsdls or is it used just to generate the
serializable classes? Can I provide it the WSDL in my disk as it is created
by Maven and expect things to work when moved to production and the wsdl
location changes to http://watever?

[]s
Daniel

Akos Kiss wrote:
 
 I had exactly the same problem with cxf and swf. And here is the solution
 you need:
 
 ?xml version=1.0 encoding=UTF-8?
 jaxws:bindings wsdlLocation=YOUR_WSDL_LOCATION
   xmlns:jaxws=http://java.sun.com/xml/ns/jaxws;
   xmlns:xs=http://www.w3.org/2001/XMLSchema;
   xmlns:jxb=http://java.sun.com/xml/ns/jaxb;
   xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
   jaxws:bindings
   
 node=wsdl:definitions/wsdl:types/xs:[EMAIL 
 PROTECTED]'YOUR_TARGET_NAMESPACE']
   jxb:globalBindings xmlns:jxb=http://java.sun.com/xml/ns/jaxb;
   xmlns:xs=http://www.w3.org/2001/XMLSchema; 
   jxb:serializable/
   /jxb:globalBindings
   /jaxws:bindings
 /jaxws:bindings
 
 I hope it works for you too.
 
 Regards,
 Akos
 
 
 
 daniel.mfreitas wrote:
 
 Hello. I want to use wsdl2java to generate the client stubs to be used by
 my client web application. I am using Spring Web Flow and it requires
 that objects used in the flow are Serializable.
 
 I successfully generated Serializable classes using the following
 bindings file and Metro JAXWS RI implementation:
 
 ?xml version=1.0 encoding=UTF-8?
 xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema;
 xmlns:jaxb=http://java.sun.com/xml/ns/jaxb;
  xmlns:xjc=http://java.sun.com/xml/ns/jaxb/xjc;
 elementFormDefault=qualified attributeFormDefault=unqualified
  jaxb:extensionBindingPrefixes=xjc jaxb:version=1.0
  xs:annotation
  xs:appinfo
  jaxb:globalBindings
  xjc:serializable uid=-6026937020915831338/
  /jaxb:globalBindings
  /xs:appinfo
  /xs:annotation
 /xs:schema
 
 But because of some limitations of Metro RI, we want to switch to CXF.
 When calling wsdl2java from a maven build file and we try to supply the
 above binding file, cfx throws
 
 WSDLToJava Error : Unknown external binding files:
 
 This is not a FileNotFoundError. wsdl2java does find the file, but it
 seems it does not understand its contents. I wanted to use CXF for
 everything including java2wsdl and wsdl2java. We have bad experiences to
 set up JAXWS Metro RI and for some developers it is a pain to put it to
 work. 
 
 So how can I make the entities stubs to implement serializable with
 wsdl2java?
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-make-classes-created-from-wsdl2java-implements-serializable--tp14246207p15065628.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: How to make classes created from wsdl2java implements serializable?

2008-01-24 Thread Daniel Kulp

Daniel,

The binding file is ONLY used at code generation time as an option passed 
to wsdl2java.   It's not used at runtime at all.   Thus, it should point 
to whatever the development time location would be.

Dan


On Thursday 24 January 2008, daniel.mfreitas wrote:
 Thanks Akos, I will try this a later time. For this project we will
 keep using metro RI, we don't have time to change that as we are close
 to the end of the project.

 1 quick question though: the wsdlLocation=YOUR_WSDL_LOCATION should
 point to the final destination of your wsdls or is it used just to
 generate the serializable classes? Can I provide it the WSDL in my
 disk as it is created by Maven and expect things to work when moved to
 production and the wsdl location changes to http://watever?

 []s
 Daniel

 Akos Kiss wrote:
  I had exactly the same problem with cxf and swf. And here is the
  solution you need:
 
  ?xml version=1.0 encoding=UTF-8?
  jaxws:bindings wsdlLocation=YOUR_WSDL_LOCATION
  xmlns:jaxws=http://java.sun.com/xml/ns/jaxws;
  xmlns:xs=http://www.w3.org/2001/XMLSchema;
  xmlns:jxb=http://java.sun.com/xml/ns/jaxb;
  xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
  jaxws:bindings
 
  node=wsdl:definitions/wsdl:types/xs:[EMAIL PROTECTED]'YOUR_T
 ARGET_NAMESPACE'] jxb:globalBindings
  xmlns:jxb=http://java.sun.com/xml/ns/jaxb;
  xmlns:xs=http://www.w3.org/2001/XMLSchema;
  jxb:serializable/
  /jxb:globalBindings
  /jaxws:bindings
  /jaxws:bindings
 
  I hope it works for you too.
 
  Regards,
  Akos
 
  daniel.mfreitas wrote:
  Hello. I want to use wsdl2java to generate the client stubs to be
  used by my client web application. I am using Spring Web Flow and
  it requires that objects used in the flow are Serializable.
 
  I successfully generated Serializable classes using the following
  bindings file and Metro JAXWS RI implementation:
 
  ?xml version=1.0 encoding=UTF-8?
  xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema;
  xmlns:jaxb=http://java.sun.com/xml/ns/jaxb;
 xmlns:xjc=http://java.sun.com/xml/ns/jaxb/xjc;
  elementFormDefault=qualified attributeFormDefault=unqualified
 jaxb:extensionBindingPrefixes=xjc jaxb:version=1.0
 xs:annotation
 xs:appinfo
 jaxb:globalBindings
 xjc:serializable uid=-6026937020915831338/
 /jaxb:globalBindings
 /xs:appinfo
 /xs:annotation
  /xs:schema
 
  But because of some limitations of Metro RI, we want to switch to
  CXF. When calling wsdl2java from a maven build file and we try to
  supply the above binding file, cfx throws
 
  WSDLToJava Error : Unknown external binding files:
 
  This is not a FileNotFoundError. wsdl2java does find the file, but
  it seems it does not understand its contents. I wanted to use CXF
  for everything including java2wsdl and wsdl2java. We have bad
  experiences to set up JAXWS Metro RI and for some developers it is
  a pain to put it to work.
 
  So how can I make the entities stubs to implement serializable with
  wsdl2java?



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


Re: How to make classes created from wsdl2java implements serializable?

2007-12-10 Thread daniel.mfreitas

Nothing so far...

I'm feeling stupid right now. I think I will have to go back and learn more
about XML. Problem is, time is not something we can afford :/. Is there any
other way to make them Serializable (without, of course, having to write our
own solution to add that manually)?


Jim Ma-3 wrote:
 
 
 serializable element is in wrong namespace , you need to change it  
 to  jaxb:serializable uid=-6026937020915831338 /.
 
 daniel.mfreitas wrote:
 Well, the file that worked for me is this:

 ?xml version=1.0 encoding=UTF-8?
 jaxws:bindings wsdlLocation=mywsdl.wsdl
 xmlns:jaxws=http://java.sun.com/xml/ns/jaxws;
 xmlns:xs=http://www.w3.org/2001/XMLSchema;
 xmlns:jaxb=http://java.sun.com/xml/ns/jaxb;
 xmlns:xjc=http://java.sun.com/xml/ns/jaxb/xjc;
 xs:annotation
 xs:appinfo
 jaxb:globalBindings
 xjc:serializable uid=-6026937020915831338 /
 /jaxb:globalBindings
 /xs:appinfo
 /xs:annotation
 /jaxws:bindings

 Problem is the classes are still not Serializable. I think
 jaxws:bindings
 dot not recognize xs:appinfo or xjc:serializable.

 Ok let's forget about binding files for a moment. Let's get to the basic
 problem. I want the generated stubs to implement Serializable. That's all
 I
 need. How can I make this happen?


 James Mao wrote:
   
 You have to make sure all your xmls are well-formed, probably caused by 
 a missing closing tag, or such
 You can check it with your browser

 James

 
 Well, the file you provided as an example throws

 WSDLToJava Error : The binding file: file:/jaxb-bindings.xml references
 a
 not well-formed xml document.

 The file that I provided as an example and that works with JAXWS RI
 looks
 quite different from the jaxws:bindings/ file I've seen around. For
 example the root of the document is xs:schema/. Also in the file I
 provided I do not have to specify my WSDL file, which makes sense for
 me
 sisnce all I want to do is that the entity stubs implement
 Serializable.
 I
 need them to be serializable so I can use them with other frameworks
 that
 requires it.




 Jim Ma-3 wrote:
   
   
 Hi ,
 Add the wsdlLocation and Xpath express  to provide which schema you
 want 
 to customize , try the following binding file
  to see if it works for your wsdl:

 jaxws:bindings wsdlLocation=${your.wsdl}
   xmlns:jaxws=http://java.sun.com/xml/ns/jaxws;
   xmlns:xs=http://www.w3.org/2001/XMLSchema;
   xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
   jaxws:bindings  node=wsdl:definitions/wsdl:types/xs:schema
jaxb:globalBindings
 xjc:serializable 
 uid=-6026937020915831338/
   /jaxb:globalBindings
   /jaxws:bindings
 /jaxws:bindings

 Regards
 Jim


 daniel.mfreitas wrote:
 
 
 Hello. I want to use wsdl2java to generate the client stubs to be
 used
 by
 my
 client web application. I am using Spring Web Flow and it requires
 that
 objects used in the flow are Serializable.

 I successfully generated Serializable classes using the following
 bindings
 file and Metro JAXWS RI implementation:

 ?xml version=1.0 encoding=UTF-8?
 xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema;
 xmlns:jaxb=http://java.sun.com/xml/ns/jaxb;
  xmlns:xjc=http://java.sun.com/xml/ns/jaxb/xjc;
 elementFormDefault=qualified attributeFormDefault=unqualified
  jaxb:extensionBindingPrefixes=xjc jaxb:version=1.0
  xs:annotation
  xs:appinfo
  jaxb:globalBindings
  xjc:serializable uid=-6026937020915831338/
  /jaxb:globalBindings
  /xs:appinfo
  /xs:annotation
 /xs:schema

 But because of some limitations of Metro RI, we want to switch to
 CXF.
 When
 calling wsdl2java from a maven build file and we try to supply the
 above
 binding file, cfx throws

 WSDLToJava Error : Unknown external binding files:

 This is not a FileNotFoundError. wsdl2java does find the file, but it
 seems
 it does not understand its contents. I wanted to use CXF for
 everything
 including java2wsdl and wsdl2java. We have bad experiences to set up
 JAXWS
 Metro RI and for some developers it is a pain to put it to work. 

 So how can I make the entities stubs to implement serializable with
 wsdl2java?
   
   
   
 
 
   
   

 

   
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-make-classes-created-from-wsdl2java-implements-serializable--tp14246207p14254632.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: How to make classes created from wsdl2java implements serializable?

2007-12-10 Thread daniel.mfreitas

Sad, but I will have to keep using Metro RI wsimport instead of CXF
wsdl2java.


daniel.mfreitas wrote:
 
 Nothing so far...
 
 I'm feeling stupid right now. I think I will have to go back and learn
 more about XML. Problem is, time is not something we can afford :/. Is
 there any other way to make them Serializable (without, of course, having
 to write our own solution to add that manually)?
 
 
 Jim Ma-3 wrote:
 
 
 serializable element is in wrong namespace , you need to change it  
 to  jaxb:serializable uid=-6026937020915831338 /.
 
 daniel.mfreitas wrote:
 Well, the file that worked for me is this:

 ?xml version=1.0 encoding=UTF-8?
 jaxws:bindings wsdlLocation=mywsdl.wsdl
 xmlns:jaxws=http://java.sun.com/xml/ns/jaxws;
 xmlns:xs=http://www.w3.org/2001/XMLSchema;
 xmlns:jaxb=http://java.sun.com/xml/ns/jaxb;
 xmlns:xjc=http://java.sun.com/xml/ns/jaxb/xjc;
 xs:annotation
 xs:appinfo
 jaxb:globalBindings
 xjc:serializable uid=-6026937020915831338 /
 /jaxb:globalBindings
 /xs:appinfo
 /xs:annotation
 /jaxws:bindings

 Problem is the classes are still not Serializable. I think
 jaxws:bindings
 dot not recognize xs:appinfo or xjc:serializable.

 Ok let's forget about binding files for a moment. Let's get to the basic
 problem. I want the generated stubs to implement Serializable. That's
 all I
 need. How can I make this happen?


 James Mao wrote:
   
 You have to make sure all your xmls are well-formed, probably caused by 
 a missing closing tag, or such
 You can check it with your browser

 James

 
 Well, the file you provided as an example throws

 WSDLToJava Error : The binding file: file:/jaxb-bindings.xml
 references a
 not well-formed xml document.

 The file that I provided as an example and that works with JAXWS RI
 looks
 quite different from the jaxws:bindings/ file I've seen around. For
 example the root of the document is xs:schema/. Also in the file I
 provided I do not have to specify my WSDL file, which makes sense for
 me
 sisnce all I want to do is that the entity stubs implement
 Serializable.
 I
 need them to be serializable so I can use them with other frameworks
 that
 requires it.




 Jim Ma-3 wrote:
   
   
 Hi ,
 Add the wsdlLocation and Xpath express  to provide which schema you
 want 
 to customize , try the following binding file
  to see if it works for your wsdl:

 jaxws:bindings wsdlLocation=${your.wsdl}
   xmlns:jaxws=http://java.sun.com/xml/ns/jaxws;
   xmlns:xs=http://www.w3.org/2001/XMLSchema;
   xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
   jaxws:bindings  node=wsdl:definitions/wsdl:types/xs:schema
jaxb:globalBindings
 xjc:serializable 
 uid=-6026937020915831338/
   /jaxb:globalBindings
   /jaxws:bindings
 /jaxws:bindings

 Regards
 Jim


 daniel.mfreitas wrote:
 
 
 Hello. I want to use wsdl2java to generate the client stubs to be
 used
 by
 my
 client web application. I am using Spring Web Flow and it requires
 that
 objects used in the flow are Serializable.

 I successfully generated Serializable classes using the following
 bindings
 file and Metro JAXWS RI implementation:

 ?xml version=1.0 encoding=UTF-8?
 xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema;
 xmlns:jaxb=http://java.sun.com/xml/ns/jaxb;
 xmlns:xjc=http://java.sun.com/xml/ns/jaxb/xjc;
 elementFormDefault=qualified attributeFormDefault=unqualified
 jaxb:extensionBindingPrefixes=xjc jaxb:version=1.0
 xs:annotation
 xs:appinfo
 jaxb:globalBindings
 xjc:serializable 
 uid=-6026937020915831338/
 /jaxb:globalBindings
 /xs:appinfo
 /xs:annotation
 /xs:schema

 But because of some limitations of Metro RI, we want to switch to
 CXF.
 When
 calling wsdl2java from a maven build file and we try to supply the
 above
 binding file, cfx throws

 WSDLToJava Error : Unknown external binding files:

 This is not a FileNotFoundError. wsdl2java does find the file, but
 it
 seems
 it does not understand its contents. I wanted to use CXF for
 everything
 including java2wsdl and wsdl2java. We have bad experiences to set up
 JAXWS
 Metro RI and for some developers it is a pain to put it to work. 

 So how can I make the entities stubs to implement serializable with
 wsdl2java?
   
   
   
 
 
   
   

 

   
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-make-classes-created-from-wsdl2java-implements-serializable--tp14246207p14260132.html
Sent from the cxf-user mailing list archive at Nabble.com.



How to make classes created from wsdl2java implements serializable?

2007-12-09 Thread daniel.mfreitas

Hello. I want to use wsdl2java to generate the client stubs to be used by my
client web application. I am using Spring Web Flow and it requires that
objects used in the flow are Serializable.

I successfully generated Serializable classes using the following bindings
file and Metro JAXWS RI implementation:

?xml version=1.0 encoding=UTF-8?
xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns:jaxb=http://java.sun.com/xml/ns/jaxb;
xmlns:xjc=http://java.sun.com/xml/ns/jaxb/xjc;
elementFormDefault=qualified attributeFormDefault=unqualified
jaxb:extensionBindingPrefixes=xjc jaxb:version=1.0
xs:annotation
xs:appinfo
jaxb:globalBindings
xjc:serializable uid=-6026937020915831338/
/jaxb:globalBindings
/xs:appinfo
/xs:annotation
/xs:schema

But because of some limitations of Metro RI, we want to switch to CXF. When
calling wsdl2java from a maven build file and we try to supply the above
binding file, cfx throws

WSDLToJava Error : Unknown external binding files:

This is not a FileNotFoundError. wsdl2java does find the file, but it seems
it does not understand its contents. I wanted to use CXF for everything
including java2wsdl and wsdl2java. We have bad experiences to set up JAXWS
Metro RI and for some developers it is a pain to put it to work. 

So how can I make the entities stubs to implement serializable with
wsdl2java?
-- 
View this message in context: 
http://www.nabble.com/How-to-make-classes-created-from-wsdl2java-implements-serializable--tp14246207p14246207.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: How to make classes created from wsdl2java implements serializable?

2007-12-09 Thread Jim Ma

Hi ,
Add the wsdlLocation and Xpath express  to provide which schema you want 
to customize , try the following binding file

to see if it works for your wsdl:

jaxws:bindings wsdlLocation=${your.wsdl}
 xmlns:jaxws=http://java.sun.com/xml/ns/jaxws;
 xmlns:xs=http://www.w3.org/2001/XMLSchema;
 xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
 jaxws:bindings  node=wsdl:definitions/wsdl:types/xs:schema
  jaxb:globalBindings
   xjc:serializable 
uid=-6026937020915831338/

 /jaxb:globalBindings
 /jaxws:bindings
/jaxws:bindings

Regards
Jim


daniel.mfreitas wrote:

Hello. I want to use wsdl2java to generate the client stubs to be used by my
client web application. I am using Spring Web Flow and it requires that
objects used in the flow are Serializable.

I successfully generated Serializable classes using the following bindings
file and Metro JAXWS RI implementation:

?xml version=1.0 encoding=UTF-8?
xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns:jaxb=http://java.sun.com/xml/ns/jaxb;
xmlns:xjc=http://java.sun.com/xml/ns/jaxb/xjc;
elementFormDefault=qualified attributeFormDefault=unqualified
jaxb:extensionBindingPrefixes=xjc jaxb:version=1.0
xs:annotation
xs:appinfo
jaxb:globalBindings
xjc:serializable uid=-6026937020915831338/
/jaxb:globalBindings
/xs:appinfo
/xs:annotation
/xs:schema

But because of some limitations of Metro RI, we want to switch to CXF. When
calling wsdl2java from a maven build file and we try to supply the above
binding file, cfx throws

WSDLToJava Error : Unknown external binding files:

This is not a FileNotFoundError. wsdl2java does find the file, but it seems
it does not understand its contents. I wanted to use CXF for everything
including java2wsdl and wsdl2java. We have bad experiences to set up JAXWS
Metro RI and for some developers it is a pain to put it to work. 


So how can I make the entities stubs to implement serializable with
wsdl2java?
  


Re: How to make classes created from wsdl2java implements serializable?

2007-12-09 Thread daniel.mfreitas

Well, the file you provided as an example throws

WSDLToJava Error : The binding file: file:/jaxb-bindings.xml references a
not well-formed xml document.

The file that I provided as an example and that works with JAXWS RI looks
quite different from the jaxws:bindings/ file I've seen around. For
example the root of the document is xs:schema/. Also in the file I
provided I do not have to specify my WSDL file, which makes sense for me
sisnce all I want to do is that the entity stubs implement Serializable. I
need them to be serializable so I can use them with other frameworks that
requires it.




Jim Ma-3 wrote:
 
 Hi ,
 Add the wsdlLocation and Xpath express  to provide which schema you want 
 to customize , try the following binding file
  to see if it works for your wsdl:
 
 jaxws:bindings wsdlLocation=${your.wsdl}
   xmlns:jaxws=http://java.sun.com/xml/ns/jaxws;
   xmlns:xs=http://www.w3.org/2001/XMLSchema;
   xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
   jaxws:bindings  node=wsdl:definitions/wsdl:types/xs:schema
jaxb:globalBindings
 xjc:serializable 
 uid=-6026937020915831338/
   /jaxb:globalBindings
   /jaxws:bindings
 /jaxws:bindings
 
 Regards
 Jim
 
 
 daniel.mfreitas wrote:
 Hello. I want to use wsdl2java to generate the client stubs to be used by
 my
 client web application. I am using Spring Web Flow and it requires that
 objects used in the flow are Serializable.

 I successfully generated Serializable classes using the following
 bindings
 file and Metro JAXWS RI implementation:

 ?xml version=1.0 encoding=UTF-8?
 xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema;
 xmlns:jaxb=http://java.sun.com/xml/ns/jaxb;
  xmlns:xjc=http://java.sun.com/xml/ns/jaxb/xjc;
 elementFormDefault=qualified attributeFormDefault=unqualified
  jaxb:extensionBindingPrefixes=xjc jaxb:version=1.0
  xs:annotation
  xs:appinfo
  jaxb:globalBindings
  xjc:serializable uid=-6026937020915831338/
  /jaxb:globalBindings
  /xs:appinfo
  /xs:annotation
 /xs:schema

 But because of some limitations of Metro RI, we want to switch to CXF.
 When
 calling wsdl2java from a maven build file and we try to supply the above
 binding file, cfx throws

 WSDLToJava Error : Unknown external binding files:

 This is not a FileNotFoundError. wsdl2java does find the file, but it
 seems
 it does not understand its contents. I wanted to use CXF for everything
 including java2wsdl and wsdl2java. We have bad experiences to set up
 JAXWS
 Metro RI and for some developers it is a pain to put it to work. 

 So how can I make the entities stubs to implement serializable with
 wsdl2java?
   
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-make-classes-created-from-wsdl2java-implements-serializable--tp14246207p14246608.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: How to make classes created from wsdl2java implements serializable?

2007-12-09 Thread Jim Ma


serializable element is in wrong namespace , you need to change it  
to  jaxb:serializable uid=-6026937020915831338 /.


daniel.mfreitas wrote:

Well, the file that worked for me is this:

?xml version=1.0 encoding=UTF-8?
jaxws:bindings wsdlLocation=mywsdl.wsdl
xmlns:jaxws=http://java.sun.com/xml/ns/jaxws;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns:jaxb=http://java.sun.com/xml/ns/jaxb;
xmlns:xjc=http://java.sun.com/xml/ns/jaxb/xjc;
xs:annotation
xs:appinfo
jaxb:globalBindings
xjc:serializable uid=-6026937020915831338 /
/jaxb:globalBindings
/xs:appinfo
/xs:annotation
/jaxws:bindings

Problem is the classes are still not Serializable. I think jaxws:bindings
dot not recognize xs:appinfo or xjc:serializable.

Ok let's forget about binding files for a moment. Let's get to the basic
problem. I want the generated stubs to implement Serializable. That's all I
need. How can I make this happen?


James Mao wrote:
  
You have to make sure all your xmls are well-formed, probably caused by 
a missing closing tag, or such

You can check it with your browser

James



Well, the file you provided as an example throws

WSDLToJava Error : The binding file: file:/jaxb-bindings.xml references a
not well-formed xml document.

The file that I provided as an example and that works with JAXWS RI looks
quite different from the jaxws:bindings/ file I've seen around. For
example the root of the document is xs:schema/. Also in the file I
provided I do not have to specify my WSDL file, which makes sense for me
sisnce all I want to do is that the entity stubs implement Serializable.
I
need them to be serializable so I can use them with other frameworks that
requires it.




Jim Ma-3 wrote:
  
  

Hi ,
Add the wsdlLocation and Xpath express  to provide which schema you want 
to customize , try the following binding file

 to see if it works for your wsdl:

jaxws:bindings wsdlLocation=${your.wsdl}
  xmlns:jaxws=http://java.sun.com/xml/ns/jaxws;
  xmlns:xs=http://www.w3.org/2001/XMLSchema;
  xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
  jaxws:bindings  node=wsdl:definitions/wsdl:types/xs:schema
   jaxb:globalBindings
xjc:serializable 
uid=-6026937020915831338/

  /jaxb:globalBindings
  /jaxws:bindings
/jaxws:bindings

Regards
Jim


daniel.mfreitas wrote:



Hello. I want to use wsdl2java to generate the client stubs to be used
by
my
client web application. I am using Spring Web Flow and it requires that
objects used in the flow are Serializable.

I successfully generated Serializable classes using the following
bindings
file and Metro JAXWS RI implementation:

?xml version=1.0 encoding=UTF-8?
xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns:jaxb=http://java.sun.com/xml/ns/jaxb;
xmlns:xjc=http://java.sun.com/xml/ns/jaxb/xjc;
elementFormDefault=qualified attributeFormDefault=unqualified
jaxb:extensionBindingPrefixes=xjc jaxb:version=1.0
xs:annotation
xs:appinfo
jaxb:globalBindings
xjc:serializable uid=-6026937020915831338/
/jaxb:globalBindings
/xs:appinfo
/xs:annotation
/xs:schema

But because of some limitations of Metro RI, we want to switch to CXF.
When
calling wsdl2java from a maven build file and we try to supply the
above
binding file, cfx throws

WSDLToJava Error : Unknown external binding files:

This is not a FileNotFoundError. wsdl2java does find the file, but it
seems
it does not understand its contents. I wanted to use CXF for everything
including java2wsdl and wsdl2java. We have bad experiences to set up
JAXWS
Metro RI and for some developers it is a pain to put it to work. 


So how can I make the entities stubs to implement serializable with
wsdl2java?