Re: Thrown by JAXB : undefined element declaration 's:schema'

2008-04-11 Thread Tim Perrett

Hey Guys,

Thanks for the various replies on this - If i wanted to add s:import  
- what would I need to add to the WSDL file?


Cheers

Tim

On 8 Apr 2008, at 21:31, Daniel Kulp wrote:
Thus, to get it working for CXF, you would need to modify the schema  
to

put the proper s:import in place to import the schema schema, then
include the binding file to deal with the duplicate classes.




Re: Thrown by JAXB : undefined element declaration 's:schema'

2008-04-11 Thread Benson Margulies
It goes inside the schema element. Any schema that references another schema
needs an import.

On Fri, Apr 11, 2008 at 7:18 AM, Tim Perrett [EMAIL PROTECTED] wrote:

 Hey Guys,

 Thanks for the various replies on this - If i wanted to add s:import -
 what would I need to add to the WSDL file?

 Cheers

 Tim

 On 8 Apr 2008, at 21:31, Daniel Kulp wrote:

  Thus, to get it working for CXF, you would need to modify the schema to
  put the proper s:import in place to import the schema schema, then
  include the binding file to deal with the duplicate classes.
 




Re: Thrown by JAXB : undefined element declaration 's:schema'

2008-04-09 Thread Benson Margulies
It shouldn't be too hard to write some xslt to script the edit Dan suggests.

For the two errors you report, I think that the second requires -exsh (or
one one the other command-line args to the tool) and the other requires a
minimal import element that specifies the namespace but no system id.







Re: Thrown by JAXB : undefined element declaration 's:schema'

2008-04-09 Thread Tim Perrett

Hey Glen,

Removing the s:schema from the WSDL seems to let wsdl2java work no  
problem - i did some digging in the w3c schema and it appears that in  
the s namespace, s:schema would point to the root node of the XSD -  
which seems to be pretty bizarre. I was wondering if that was some  
kind of .NET convention or something...


Im not overly familiar with XJB are all - and how such a technique  
would resolve this problem? Can anyone give me a shove in the right  
direction?


Cheers

Tim


Re: Thrown by JAXB : undefined element declaration 's:schema'

2008-04-09 Thread Tim Perrett




Hey Daniel,

Thanks for your interesting reply.

Thus, to get it working for CXF, you would need to modify the schema  
to

put the proper s:import in place to import the schema schema, then
include the binding file to deal with the duplicate classes.

Alternatively, use the workround on that blog with wsgen to  
generated the

code, then use CXF at runtime.   It's just straight JAX-WS code so it
should work.


Ideally im looking for a solution that lets me generate the classes  
without needing to modify the WSDL, as that syntax is used through a  
whole bunch of services that I need to consume so im reluctant to  
monkey patch the service.


Is it not possible to include the binding files (as shown on the blog)  
directly with cxf's wsdl2java tool? I gave it a whirl but with no  
luck. Is there a solution similar to that we can fashion? Otherwise,  
when I generate using wsimport, I get the following warnings:


[WARNING] src-resolve.4.2: Error resolving component 's:schema'. It  
was detected that 's:schema' is in namespace 'http://www.w3.org/2001/XMLSchema' 
, but components from this namespace are not referenceable from schema  
document 'icp.wsdl#types?schema1'. If this is the incorrect namespace,  
perhaps the prefix of 's:schema' needs to be changed. If this is the  
correct namespace, then an appropriate 'import' tag should be added to  
'icp.wsdl#types?schema1'.

  line 113 of icp.wsdl#types?schema1

[WARNING] Ignoring SOAP port InteractiveCampaign_SSPSoap12: it uses  
non-standard SOAP 1.2 binding.

You must specify the -extension option to use this binding.

I appreciate these are not CXF error directly, but how can I work  
around this with wsdl2java? If thats even at all possible?


Many thanks for any advice you guys can give

Cheers

Tim




Re: Thrown by JAXB : undefined element declaration 's:schema'

2008-04-09 Thread Glen Mazza
Am Mittwoch, den 09.04.2008, 10:21 +0100 schrieb Tim Perrett:
 
 
 Hey Daniel,
 
 Thanks for your interesting reply.
 
  Thus, to get it working for CXF, you would need to modify the schema  
  to
  put the proper s:import in place to import the schema schema, then
  include the binding file to deal with the duplicate classes.
 
  Alternatively, use the workround on that blog with wsgen to  
  generated the
  code, then use CXF at runtime.   It's just straight JAX-WS code so it
  should work.
 
 Ideally im looking for a solution that lets me generate the classes  
 without needing to modify the WSDL, as that syntax is used through a  
 whole bunch of services that I need to consume so im reluctant to  
 monkey patch the service.
 
 Is it not possible to include the binding files (as shown on the blog)  
 directly with cxf's wsdl2java tool? I gave it a whirl but with no  
 luck. Is there a solution similar to that we can fashion? Otherwise,  
 when I generate using wsimport, I get the following warnings:
 

The wsdl2java tool[1] apparently has a -b (binding file) option.
[1] http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html



 [WARNING] src-resolve.4.2: Error resolving component 's:schema'. It  
 was detected that 's:schema' is in namespace 
 'http://www.w3.org/2001/XMLSchema' 
 , but components from this namespace are not referenceable from schema  
 document 'icp.wsdl#types?schema1'. If this is the incorrect namespace,  
 perhaps the prefix of 's:schema' needs to be changed. If this is the  
 correct namespace, then an appropriate 'import' tag should be added to  
 'icp.wsdl#types?schema1'.
line 113 of icp.wsdl#types?schema1
 
 [WARNING] Ignoring SOAP port InteractiveCampaign_SSPSoap12: it uses  
 non-standard SOAP 1.2 binding.
 You must specify the -extension option to use this binding.
 

Hmmm.  I'm not sure if that -extension option is for CXF's wsdl2java or
JAXB internally.  If the former, [1] above needs to be updated with that
option.

Glen


 I appreciate these are not CXF error directly, but how can I work  
 around this with wsdl2java? If thats even at all possible?
 
 Many thanks for any advice you guys can give
 
 Cheers
 
 Tim
 
 



Re: Thrown by JAXB : undefined element declaration 's:schema'

2008-04-08 Thread Benson Margulies
Can you post the wsdl?

On Tue, Apr 8, 2008 at 10:46 AM, Tim Perrett [EMAIL PROTECTED] wrote:

 Hey All,

 Just trying to get up and running with CXF wsdl2java but I keep getting
 this error from the service I want to consume:

 Thrown by JAXB : undefined element declaration 's:schema'

 Its a .NET 2 web service and it [the service] works just fine in other
 languages (ruby, python etc) - has anyone seen this error before?

 Many thanks

 Tim





Re: Thrown by JAXB : undefined element declaration 's:schema'

2008-04-08 Thread Benson Margulies
This error emerges from the bowels of JAXB's xjc tool, complete with the
lack of navigational info.

However,

What is

 s:complexType
   s:sequence
 s:element ref=s:schema /
 s:any /
   /s:sequence
 /s:complexType


supposed to mean?

I see no element named 'schema' .


Re: Thrown by JAXB : undefined element declaration 's:schema'

2008-04-08 Thread Ian Roberts

Benson Margulies wrote:


What is

 s:complexType
   s:sequence
 s:element ref=s:schema /
 s:any /
   /s:sequence
 /s:complexType


supposed to mean?


It defines a complex type consisting of an XML schema document followed 
by any XML element, but that doesn't help understand what it *means* ;-)


Ian

--
Ian Roberts   | Department of Computer Science
[EMAIL PROTECTED]  | University of Sheffield, UK


Re: Thrown by JAXB : undefined element declaration 's:schema'

2008-04-08 Thread Benson Margulies
Well, I don't know how hard it is to apply the jaxb customization inside of
CXF. My superiors in the secret college of JAXB will, with any luck, pipe up
at this point.

On Tue, Apr 8, 2008 at 12:15 PM, Ian Roberts [EMAIL PROTECTED]
wrote:

 Benson Margulies wrote:

  What is
 
  s:complexType
s:sequence
  s:element ref=s:schema /
  s:any /
/s:sequence
  /s:complexType
 
 
  supposed to mean?
 

 It defines a complex type consisting of an XML schema document followed by
 any XML element, but that doesn't help understand what it *means* ;-)

 Ian

 --
 Ian Roberts   | Department of Computer Science
 [EMAIL PROTECTED]  | University of Sheffield, UK



Re: Thrown by JAXB : undefined element declaration 's:schema'

2008-04-08 Thread Daniel Kulp


The CXF wsdl2java does support the jaxb binding files as well (-b flag).  
However, the -b things must be actual jaxb/jaxws binding files, not 
another schema.   That's very strange syntax that I haven't seen before.  
Interesting.   

Thus, to get it working for CXF, you would need to modify the schema to 
put the proper s:import in place to import the schema schema, then 
include the binding file to deal with the duplicate classes.

Alternatively, use the workround on that blog with wsgen to generated the 
code, then use CXF at runtime.   It's just straight JAX-WS code so it 
should work.

However, both those approaches generate a full object model for the 
schema, which may not be desired.   The simplest option might be to just 
download the wsdl, modify the schema to change:
 s:sequence
s:element ref=s:schema /
s:any /
 /s:sequence

to something like:
 s:sequence
s:any minOccurs=2/
 /s:sequence
or something.  That will allow you to get it as a DOM.

Dan



On Tuesday 08 April 2008, Tim Perrett wrote:
 Thats what I have traced the problem too also - after some googling it
 seems that this is a known issue with M$ SOAP services.
 I found this link:

 http://weblogs.java.net/blog/vivekp/archive/2007/05/how_to_deal_wit_1.
html

 Thats obviously for wsimport, but I thought a similar solution might
 work for CXF? What are your thoughts? Other services written in .net
 consume no problem at all with CXF, its just this one im having
 problems with.

 I could always ditch the service methods that are causing the problem?
 I think they might be MS datasets exposed as SOAP - I've used this
 service before and it hasnt been a huge problem before as the
 wsdl2lang has usually just ignored them I think.

 Cheers

 Tim

 On 8 Apr 2008, at 17:00, Benson Margulies wrote:
  This error emerges from the bowels of JAXB's xjc tool, complete with
  the
  lack of navigational info.
 
  However,
 
  What is
 
  s:complexType
s:sequence
  s:element ref=s:schema /
  s:any /
/s:sequence
  /s:complexType
 
 
  supposed to mean?
 
  I see no element named 'schema' .



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