Discussion:
[jboss-user] [JBoss Web Services] - custom WS namespace prefix?
Guillermo L
2013-07-09 21:00:52 UTC
Permalink
Guillermo L [https://community.jboss.org/people/gmlopezdev] created the discussion

"custom WS namespace prefix?"

To view the discussion, visit: https://community.jboss.org/message/827174#827174

--------------------------------------------------------------
Hi,
Is there a way to specify a custom namespace prefix for a web service?

I'm currently developing under jboss AS7.1.3

I've read that creating a package-info.java with the following content should do the trick but I had no luck so I guess that there should be some jboss/cxf magic to accomplish it.

@javax.xml.bind.annotation.XmlSchema (
  xmlns = {
    @javax.xml.bind.annotation.XmlNs(prefix = "customws", namespaceURI="http://myws.com/")
  }
)
package com.myws;

Thanks for your help!
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/827174#827174]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Alessio Soldano
2013-07-12 15:53:09 UTC
Permalink
Alessio Soldano [https://community.jboss.org/people/asoldano] created the discussion

"Re: custom WS namespace prefix?"

To view the discussion, visit: https://community.jboss.org/message/827788#827788

--------------------------------------------------------------
Did you consider generating the wsdl from your endpoint, editing prefixes in it and then publishing the endpoint with the modified wsdl?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/827788#827788]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Guillermo L
2013-07-12 16:19:36 UTC
Permalink
Guillermo L [https://community.jboss.org/people/gmlopezdev] created the discussion

"Re: custom WS namespace prefix?"

To view the discussion, visit: https://community.jboss.org/message/827792#827792

--------------------------------------------------------------
I'm not sure I'm getting you right. This is how it is currently developed. An endopoint interface annotated with jax-ws standard annotations. The wsdl is generated from them, however which annotation would you use to specify the namespace prefix for the web service? The package-info.java is the only way I found out I could use for this purpose but that didnÂŽt worked.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/827792#827792]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Loading...