Hi Adrian,
If this class can be modified , I think we can add some annotations for
this method to avoid generating wrapper element and resolve clash :
pacakge com.foo;
public class Bar {
@ResponseWrapper(targetNamespace = "http://apache.org/namespace",
className = "com.foo.CreateCaseResponse", localName = "createCaseResponse")
@RequestWrapper(targetNamespace = "http://apache.org/namespace",
className = "com.foo.CreateCaseRequest2", localName = "createCaseRequst")
public CreateCaseResponse createCase(String arg0, CreateCaseRequest
arg1);
}
When java2wsdl can not read these annotations for this method , it will
try to load the RequestWrapper class and ReponseWrapper class from
package com.foo.jaxws (as per jaxws spec).
If it is failed to load , it will generate wrapper elements for this
method .
Regards
Jim
Adrian Trenaman wrote:
Hi Jim,
Thanks for the info! The collision I'm running into is due to the Java API
(based on an EJB) already providing wrappers classes for parameter lists.
For example:
public CreateCaseResponse createCase(String arg0, CreateCaseRequest
arg1)
... as you can see, our java2wsdl will try and create a wrapper element for
CreateCaseResponse (as per the JAXWS spec) which then clashes with the
already existing type CreateCaseResponse. Ugly, huh?!
The original CreateCaseResponse is in a different Java package from the
interface, so if we could map individual packages to schema namespaces then
I would be able to resolve the clash. However, as you say in your email, CXF
doesn't provide support for this.
Best,
Ade.
Jim Ma-3 wrote:
Hi Adrian,
What type of collision did you run into ? Is this schema element name
collision?
Java2wsdl uses converted packagename or annotated namepace as it's
namespace ,
and there is no way to customize the namespace on per-package basis like
wsdl2java does.
Cheers
-Jim
Trenaman, Adrian wrote:
Hi all,
I'm creating some WSDL from classes in an existing Jar file; CXF's
java2wsdl is putting everything into the same schema namespace which is
causing collisions. Is there any way to customise the namespace on a
per-package basis so that I can avoid the collisions?
Thanks,
Ade.
Adrian Trenaman
Principal Consultant, IONA Technologies.
E: [EMAIL PROTECTED]
P: +353-1-6372659
M: +353-86-6051026
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland