2 Replies Latest reply on Jul 12, 2013 12:19 PM by gmlopezdev

    custom WS namespace prefix?

    gmlopezdev

      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!

        • 1. Re: custom WS namespace prefix?
          asoldano

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

          • 2. Re: custom WS namespace prefix?
            gmlopezdev

            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.