-
1. Re: creating new targetnamespace for complex types
bk8133 May 14, 2007 1:26 PM (in response to khelenek)Try using this at webservice bean level(at exposed method)
WebService(targetNamespace="")
WebParam(targetNamespace="")
WebResult(targetNamespace="") -
2. Re: creating new targetnamespace for complex types
khelenek May 14, 2007 4:47 PM (in response to khelenek)Thanks for writing back.
That's actually the first technique I tried which also did not seem to work. Here is an example of a my web service bean:@Stateless(name="VerificationWs") @WebService( name="VerificationWs", targetNamespace = VerificationWsBean.DEFAULT_NS) @SOAPBinding public class VerificationWsBean { @TransactionAttribute(value=TransactionAttributeType.REQUIRES_NEW) @WebMethod @WebResult(targetNamespace=VerificationWsBean.DEFAULT_NS) public VerificationResponse verify( @WebParam(targetNamespace=VerificationWsBean.DEFAULT_NS) VerificationRequest request ) throws Exception { return verifyDirect(request); } }
And then in my VerificationRequest.java class I have:@XmlType(namespace="http://verification.studentuniverse.com/ws/client") public class VerificationRequest implements Serializable {
But in my wsdl I still get VerificationRequest mapped as complex types under a schema with the package namespace:<schema elementFormDefault="qualified" targetNamespace="http://package.mycompany.com/jaws">
(The methods map as complex types under the correct namespace as defined by the @WebService annotation, though.
Any ideas what to try next?
Thanks in advance,
kris -
3. Re: creating new targetnamespace for complex types
oskar.carlstedt May 15, 2007 3:16 AM (in response to khelenek)Hi!
I think this sounds terrible for you, but you probably have to start working in the other direction. If you want to ensure your contract (the wsdl file) is changed in the way you want, then you must start with taking control over it, i.e. develop it by yourself. What I'm saying - take full control of your wsdl and its dependent schema instances.
Beeing in your situation, it might be good saving the old wsdl file and then run a wsprovide. Your wsdl will be the same but you have to update your implementation.
With kind regards
Oskar -
4. Re: creating new targetnamespace for complex types
centecbertl May 15, 2007 8:14 AM (in response to khelenek)the package of complex parameters needs to be specified per java package within a package-info.java file:
see http://www.jboss.com/index.html?module=bb&op=viewtopic&t=103352
JBossWS 1.2.x generates buggy wsdl files, though unless
http://jira.jboss.com/jira/secure/ManageAttachments.jspa?id=12335583
is fixed (scheduled for version 2.0.0 now).
Although the wsdl files are not correct, clients generated with .net 2.0 and
axis 1.4 tend towork at least when the parameter typ names are unique
without looking at their package names. The client stub generators are
intelligent enough to remember the correct package names then. -
5. Re: creating new targetnamespace for complex types
khelenek May 15, 2007 1:17 PM (in response to khelenek)Thanks for the help guys. Turns out it was because I was using the jbossws that was installed with jboss-4.0.5.GA, which i believe is version 1.0.3. I guess jaxb bindings were not supported until a later version, because I installed 1.2.1.GA and everything worked as expected.
However, I have a new question. My web service seems to be bound to http://localhost/MyBeanClassNameService/MyBeanClassName. Is there anyway to change that? I tried the name attribute of the @Stateless and @WebService annotations to no avail. -
6. Re: creating new targetnamespace for complex types
heiko.braun May 16, 2007 7:14 AM (in response to khelenek)Here's the answer to the web context question:
http://jbws.dyndns.org/mediawiki/index.php/JAX-WS_User_Guide#JBossWS_Extenstions