On Wednesday 20 October 2010 6:04:51 pm slocum wrote:
> I migrated from XFire with a WSDL First webapp to CXF 2.3.0.
> 
> My app works now, but I have a few remaining issues.
> 
> The CXF Service List page (/services) shows the proper portType name,
> operation names, and endpoint address. The WSDL link and the target
> namespace are not correct.
> 
> (1) Under the XFire implementation, I supplied the WSDL name to the webapp
> (available from
> "/services/WebService?wsdl") using the 'wsdlURL' property of the
> XFireExporter bean. I can't seem to find a way to do the same thing with
> CXF. Using the wsdlLocation attribute of the jaxws:endpoint tag isn't it.

I have no idea what that was trying to accomplish.   The wsdlLocation provides 
the runtime with the location of the wsdl to load.   The "address" is the 
endpoint address for where it's deployed (likely "/services/WebService").   
The wsdl is always ?wsdl added onto that.


> (2) How do I specify the target namespace at this level?

Usually on the @WebService annotation for the bean.   That's the best way to 
handle it.   Beyond that, you would need a custom ServiceFactory bean that 
defines the targetNamespace and such.

Dan


> 
> Here is my old XFireExporter bean:
> 
>       <bean id="webservice"
>               class="org.codehaus.xfire.spring.remoting.XFireExporter">
>               <description>
>                       Publishes the ppp.bean as an XFire web service.
>               </description>
>               <property name="name" value="PPPWebService" />
>               <property name="namespace"
>                       value="http://ws.ppp.mycompany.com"; />
>               <property name="serviceBean">
>                       <ref bean="ppp.bean" />
>               </property>
>               <property name="wsdlURL" value="${ppp.wsdl}"/>
>               <property name="serviceClass"
>                       value="com.mycompany.ppp.ws.PPPWebServicePortType" />
>               <property name="serviceFactory">
>                       <ref local="ppp.serviceFactory" />
>               </property>
>               <property name="xfire">
>                       <ref bean="xfire" />
>               </property>
>       </bean>
> 
> Here is my brand-new jaxws:endpoint bean:
> 
>       <jaxws:endpoint id="ppp.endPoint"
>               implementor="#ppp.bean"
>               address="/PPPWebService">
>               <jaxws:serviceFactory>
>                       <ref bean="ppp.serviceFactory" />
>               </jaxws:serviceFactory>
>               <jaxws:properties>
>                     <entry key="schema-validation-enabled"
> value="${soap.validate_xml}" />
>                 </jaxws:properties>
>       </jaxws:endpoint>
> 
> What am I missing?

-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog

Reply via email to