You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Benson Margulies <bi...@basistech.com> on 2007/07/30 21:25:02 UTC

wsdl2js, namespace prefixes

When we built wsdl2js, we were working with a soap toolkit that allowed
us to control the namespace prefixes used in the WSDL (and the actual
wire protocol). This had a happy side-effect: we could assume
'presentable' prefixes, and use them as parts of JavaScript identifiers.

 

As far as I've ever figured out, XFire (and presumably CXF) don't cater
to people with feelings about prefixes, so we've got things in tns: and
things in ns0: and ns1: etc.

 

For JavaScript generation, I hate to force the user to supply some sort
of additional file to hand out prefixes. Is there some JAX-WS annotation
that would allow CXF to allow someone or something to spec out the
namespaces? Aegis has a mechanism that, sadly, doesn't quite work. I
spent some time on it in XFire and couldn't quite adapt the code to do
it.

 


Re: wsdl2js, namespace prefixes

Posted by sparktronics <sp...@gmail.com>.
you can include the following as part of the jaxws:endpoint node

<jaxws:dataBinding>
		      <bean class="org.apache.cxf.jaxb.JAXBDataBinding">
		        <property name="namespaceMap">
		    		<map>
		   			<entry>
		      		
<key><value>http://gencat.net/scsp/esquemes/productes/gro/bo/resposta</value></key>
		      			<value>pica1</value>
		   			</entry>
		      		</map>
		        </property>
		      </bean>
		     </jaxws:dataBinding>

And it will use the specified prefix

--
View this message in context: http://cxf.547215.n5.nabble.com/wsdl2js-namespace-prefixes-tp571839p5485631.html
Sent from the cxf-dev mailing list archive at Nabble.com.