cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikolay Elenkov <>
Subject Re: wrong targetNamespace in generated WSDL
Date Tue, 27 Apr 2010 01:46:37 GMT
On 2010/04/24 0:24, Daniel Kulp wrote:
> On Friday 23 April 2010 5:09:00 am Nikolay Elenkov wrote:
>> I am using apche-cxf 2.2.7, and I can't seem to find a way to set the
>> target namespace of the WSDL returned by Service?wsdl. It is always
>> See below:
>> <wsdl:definitions name="MyService"
>> targetNamespace="">
>> <wsdl:import
>> location="https://server/myws/services/MyService?wsdl=MyService.wsdl"
>> namespace="">
>>     </wsdl:import>
>> The  namespace on the wsdl:import is correct, but not the one on
>> wsdl:definitions is not. I've set the namespace on my implementation class
>> with @WebService(targetNamespace="..."), but that seems to be ignored.
>> My service is defined in cxf-servlet.xml, but there seems to be no way
>> to pass the targetNamespace to <jaxws:endpoint> either. Am I missing
>> something obvious?
>> Any hints are much appreciated.
> Are you using an aop proxy or similar?   You may need to specify the 
> implementorClass attribute on the jaxws:endpoint so we can get the right class 
> and find the appropriate WebService annotation.

I'm not using transactions, etc., but Spring may be creating a proxy. At any
rate, I have specified implementorClass (doesn't work without it) and still
getting a wrong targetNamespace. Here's my cxf-servlet.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""

	<context:annotation-config />

	<context:property-placeholder location="" />

	<bean id="myservice" class="" />

	<jaxws:endpoint id="ws" implementor="#myservice"
		serviceName="MyService" implementorClass=""
		address="/MyService" publishedEndpointUrl="${publishedEndpointUrl}" />


View raw message