java - TargetNamespace in CXF simple frontEnd -
i using cxf simple frontend uses xml configs stead of annotations creating soap web services.
now have created service:
<simple:server id="locationsettingservice" serviceclass="com.my.own.webservice" address="/locationsettingwebservice"> <simple:servicebean> <bean class="com.my.own.webserviceimpl"> </bean> </simple:servicebean> <simple:ininterceptors> <ref bean="addressinghandler" /> <ref bean="authhandler" /> </simple:ininterceptors> <simple:databinding> <bean class="org.apache.cxf.aegis.databinding.aegisdatabinding" /> </simple:databinding> </simple:server>
after deployment wsdl is:
<wsdl:definitions name="locationsettingwebservice" ... targetnamespace="http://own.my.com/">
it uses targetnamespace http://own.my.com/
my problem dont want forward-slash @ end of above namespace need http://own.my.com
targetnamespace .so want modify namespace using simple frontend. help?
update: after searching long time , trying hundreds of workaround. figured out problem, cxf namespace generation technique '/' ahead of xfire had.
go this page .and xfire compatibility tried many things got no luck escaping '/'. please people opened bounty little reputation.
finally managed work out, apache's mailing list , it's generous people.
all needed add factorybean first configuration being xfirecompatibilityserviceconfiguration
because it's rule first returns configuration wins.
<simple:server id="locationsettingservice" serviceclass="com.my.own.webservice" address="/locationsettingwebservice"> <simple:servicefactory> <ref bean="aegiscompatibilityfactorybean"/> </simple:servicefactory> <simple:servicebean> <bean class="com.my.own.webserviceimpl"> </bean> </simple:servicebean> <simple:ininterceptors> <ref bean="addressinghandler" /> <ref bean="authhandler" /> </simple:ininterceptors> <simple:databinding> <bean class="org.apache.cxf.aegis.databinding.aegisdatabinding" /> </simple:databinding> </simple:server>
and factory bean itself
<bean id="aegiscompatibilityfactorybean" class="org.apache.cxf.service.factory.reflectionservicefactorybean" scope="prototype"> <property name="serviceconfigurations"> <list> <bean class="org.apache.cxf.aegis.databinding.xfirecompatibilityserviceconfiguration"> </bean> <bean class="org.apache.cxf.service.factory.defaultserviceconfiguration" /> </list> </property> </bean>
and make sure scope of bean prototype if using multiple web services.
Comments
Post a Comment