You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by jaybytez <ja...@yahoo.com> on 2012/03/05 19:31:48 UTC

Service publishing twice on deployment

We are using CXF with JAX-WS annotations.  In the @WebService annotation, I
don't use the serviceName, portName, or name attributes.  And so in the
jaxws:endpoint configuration for CXF, I give the serviceName a different
name.  It appears during deployment that the service gets registered once
based on the @WebService annotations and then registered again based on the
jaxws:endpoint.  Is this the case, is it actually publishing the service
twice?  Should I use serviceName in WebService annotation to match/replace
the jaxws:endpoint configuration:

2012-03-05 09:33:16,091 [[ACTIVE] ExecuteThread: '99' for queue:
'weblogic.kernel.Default (self-tuning)'] INFO
org.apache.cxf.service.factory.ReflectionServiceFactoryBean - Creating
Service {http://foo.com}*ContactPointBusinessServiceEndpointService* from
class com.foo.ContactPointBusinessService
2012-03-05 09:33:16,988 [[ACTIVE] ExecuteThread: '99' for queue:
'weblogic.kernel.Default (self-tuning)'] INFO
org.apache.cxf.endpoint.ServerImpl - Setting the server's publish address to
be /ContactPointBusinessService
2012-03-05 09:33:17,254 [[ACTIVE] ExecuteThread: '99' for queue:
'weblogic.kernel.Default (self-tuning)'] INFO
org.apache.cxf.service.factory.ReflectionServiceFactoryBean - Creating
Service {http://foo.com}*ContactPointBusinessServiceService* from class
com.foo.ContactPointBusinessService

	&lt;jaxws:endpoint 
		id="jaxws.ContactPointBusinessService" 
		endpointName="s:ContactPointBusinessServiceEndpointServicePort" 
		*serviceName="s:ContactPointBusinessServiceEndpointService"* 
		implementor="#contactPointBusinessServiceEndpoint" 
		implementorClass="com.foo.ContactPointBusinessService" 
		address="/ContactPointBusinessService"
		xmlns:s="http://foo.com">
		<jaxws:features>
    		     <bean class="org.apache.cxf.feature.LoggingFeature"/>
		</jaxws:features>
		<jaxws:outFaultInterceptors>
    		     <bean class="com.foo.exception.CustomSoapFaultOutInterceptor" />
  		</jaxws:outFaultInterceptors>
	&lt;/jaxws:endpoint>

/**
 *
 * The ContactPointBusinessService Interface class
 *
 * This is a generated file. Do not modify.
 *
 */
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.WRAPPED, use =
SOAPBinding.Use.LITERAL, style = SOAPBinding.Style.DOCUMENT)
*@WebService(targetNamespace = "http://foo.com")*
public interface ContactPointBusinessService extends BaseBusinessService {

--
View this message in context: http://cxf.547215.n5.nabble.com/Service-publishing-twice-on-deployment-tp5538427p5538427.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Service publishing twice on deployment

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday, March 06, 2012 08:56:13 AM Alessio Soldano wrote:
> Perhaps this issue is the same as
> https://issues.apache.org/jira/browse/CXF-3209 ?

Not sure if it is, but it may be related....  That JIRA is describing client 
side issues when using the Service class to create proxies.  This issue is 
server side on deploying endpoints.

The underlying cause could be the same,  not really sure.   Part of Jim's 
initial attempt at the fix involved changes to jaxws/ServiceImpl which would 
not have any affect on the server side part at all though.

Dan



> Cheers
> Alessio
> 
> On 03/06/2012 02:29 AM, jaybytez wrote:
> > I took cxf-servlet.xml out of the jar files for CXF, so they don't exist
> > anywhere and that did not help, the problem still occurs.
> > 
> > --
> > View this message in context:
> > http://cxf.547215.n5.nabble.com/Service-publishing-twice-on-deployment-
> > tp5538427p5539597.html Sent from the cxf-user mailing list archive at
> > Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: Service publishing twice on deployment

Posted by jaybytez <ja...@yahoo.com>.
Thanks...it looks like this might be the same problem.

If there isn't a current fix, is there a workaround?

Thanks for the info...jay

--
View this message in context: http://cxf.547215.n5.nabble.com/Service-publishing-twice-on-deployment-tp5538427p5541817.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Service publishing twice on deployment

Posted by Alessio Soldano <as...@redhat.com>.
Perhaps this issue is the same as
https://issues.apache.org/jira/browse/CXF-3209 ?

Cheers
Alessio

On 03/06/2012 02:29 AM, jaybytez wrote:
> I took cxf-servlet.xml out of the jar files for CXF, so they don't exist
> anywhere and that did not help, the problem still occurs.
> 
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Service-publishing-twice-on-deployment-tp5538427p5539597.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 
Alessio Soldano
Web Service Lead, JBoss

RE: Service publishing twice on deployment

Posted by jaybytez <ja...@yahoo.com>.
I took cxf-servlet.xml out of the jar files for CXF, so they don't exist
anywhere and that did not help, the problem still occurs.

--
View this message in context: http://cxf.547215.n5.nabble.com/Service-publishing-twice-on-deployment-tp5538427p5539597.html
Sent from the cxf-user mailing list archive at Nabble.com.

RE: Service publishing twice on deployment

Posted by jaybytez <ja...@yahoo.com>.
I do use Apache Shade to combine the CXF Jars together into one, so I could
remove cxf-servlet.xml from the shaded jar to solve this, if this is the
solution.

--
View this message in context: http://cxf.547215.n5.nabble.com/Service-publishing-twice-on-deployment-tp5538427p5539499.html
Sent from the cxf-user mailing list archive at Nabble.com.

RE: Service publishing twice on deployment

Posted by jaybytez <ja...@yahoo.com>.
Thanks for the help.

I am using CXF 2.4.5 and I don't have the cxf*.xml files in my war except if
they exist inside the cxf jars.

Is there any other reason that this would happen...I am running WLS 11.

I actually added the attributes serviceName and portName to the WebService
annotation and this didn't change the output (it just made it appear more
clearly how it seems to be published twice):

2012-03-05 16:19:13,479 [[ACTIVE] ExecuteThread: '39' for queue:
'weblogic.kernel.Default (self-tuning)'] INFO
org.apache.cxf.service.factory.ReflectionServiceFactoryBean - Creating
Service {http://foo.com}ContactPointBusinessServiceEndpointService from
class com.foo.ContactPointBusinessService
2012-03-05 16:19:14,288 [[ACTIVE] ExecuteThread: '39' for queue:
'weblogic.kernel.Default (self-tuning)'] INFO
org.apache.cxf.endpoint.ServerImpl - Setting the server's publish address to
be /ContactPointBusinessService
2012-03-05 16:19:14,629 [[ACTIVE] ExecuteThread: '39' for queue:
'weblogic.kernel.Default (self-tuning)'] INFO
org.apache.cxf.service.factory.ReflectionServiceFactoryBean - Creating
Service {http://foo.com}ContactPointBusinessServiceEndpointService from
class com.foo.ContactPointBusinessService

Thanks...jay

--
View this message in context: http://cxf.547215.n5.nabble.com/Service-publishing-twice-on-deployment-tp5538427p5539495.html
Sent from the cxf-user mailing list archive at Nabble.com.

RE: Service publishing twice on deployment

Posted by Michael <mt...@optonline.net>.
I had a similar problem.  My service was published twice by JBoss on
start-up when the service was deployed.

I traced this problem down to having both cxf-servlet.xml and web.xml files
in my WAR file.  When I removed the cxf-servlet.xml file from my WAR JBoss
only deployed the service once.

-----Original Message-----
From: jaybytez [mailto:jaybytez@yahoo.com] 
Sent: Monday, March 05, 2012 1:32 PM
To: users@cxf.apache.org
Subject: Service publishing twice on deployment

We are using CXF with JAX-WS annotations.  In the @WebService annotation, I
don't use the serviceName, portName, or name attributes.  And so in the
jaxws:endpoint configuration for CXF, I give the serviceName a different
name.  It appears during deployment that the service gets registered once
based on the @WebService annotations and then registered again based on the
jaxws:endpoint.  Is this the case, is it actually publishing the service
twice?  Should I use serviceName in WebService annotation to match/replace
the jaxws:endpoint configuration:

2012-03-05 09:33:16,091 [[ACTIVE] ExecuteThread: '99' for queue:
'weblogic.kernel.Default (self-tuning)'] INFO
org.apache.cxf.service.factory.ReflectionServiceFactoryBean - Creating
Service {http://foo.com}*ContactPointBusinessServiceEndpointService* from
class com.foo.ContactPointBusinessService
2012-03-05 09:33:16,988 [[ACTIVE] ExecuteThread: '99' for queue:
'weblogic.kernel.Default (self-tuning)'] INFO
org.apache.cxf.endpoint.ServerImpl - Setting the server's publish address to
be /ContactPointBusinessService
2012-03-05 09:33:17,254 [[ACTIVE] ExecuteThread: '99' for queue:
'weblogic.kernel.Default (self-tuning)'] INFO
org.apache.cxf.service.factory.ReflectionServiceFactoryBean - Creating
Service {http://foo.com}*ContactPointBusinessServiceService* from class
com.foo.ContactPointBusinessService

	&lt;jaxws:endpoint 
		id="jaxws.ContactPointBusinessService" 
	
endpointName="s:ContactPointBusinessServiceEndpointServicePort" 
		*serviceName="s:ContactPointBusinessServiceEndpointService"*

		implementor="#contactPointBusinessServiceEndpoint" 
		implementorClass="com.foo.ContactPointBusinessService" 
		address="/ContactPointBusinessService"
		xmlns:s="http://foo.com">
		<jaxws:features>
    		     <bean class="org.apache.cxf.feature.LoggingFeature"/>
		</jaxws:features>
		<jaxws:outFaultInterceptors>
    		     <bean
class="com.foo.exception.CustomSoapFaultOutInterceptor" />
  		</jaxws:outFaultInterceptors>
	&lt;/jaxws:endpoint>

/**
 *
 * The ContactPointBusinessService Interface class
 *
 * This is a generated file. Do not modify.
 *
 */
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.WRAPPED, use =
SOAPBinding.Use.LITERAL, style = SOAPBinding.Style.DOCUMENT)
*@WebService(targetNamespace = "http://foo.com")* public interface
ContactPointBusinessService extends BaseBusinessService {

--
View this message in context:
http://cxf.547215.n5.nabble.com/Service-publishing-twice-on-deployment-tp553
8427p5538427.html
Sent from the cxf-user mailing list archive at Nabble.com.