You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Wolf, Chris (IT)" <Ch...@morganstanley.com> on 2008/03/09 16:04:45 UTC
Need assistance re: ServiceConstructionException
Before posting this, I looked at the JAX-WS spec (although I could only
find 2.1) and searched
the message archives. Before resorting to downloading the CXF source
and building
CXF from scratch so I can debug this problem, I am hoping someone can
help.
I created a service with a number of operations, based on the
"wsdl_first" sample.
Everything works great in the Jetty-embedded configuration, however,
when I try
to prepare a WAR deployment, and deploy to Tomcat, I receive the
following cryptic error:
Mar 09 10:01:15 bw26wolfch [] 2 Error
org/apache/catalina/core/ContainerBase/[Catalina]/[localhost]/[/secadmin
]
Servlet /secadmin threw load() exception
<org.apache.cxf.service.factory.ServiceConstructionException:
Could not find definition for service
{http://services.secadmin.cis.ms.com/}SecAdminImplService.
The generated service interface is:
com.ms.cis.secadmin.services.SecAdmin
The implementation class is:
com.ms.cis.secadmin.services.SecAdminImpl
*** So why is it looking for "SecAdminImplService"? Why is it appending
"Service"?
The relevant configuration settings are:
WSDL:
<wsdl:definitions name="SecAdmin"
targetNamespace="http://services.secadmin.cis.ms.com"
[...]
<wsdl:portType name="SecAdmin">
[...]
<wsdl:binding name="SecAdmin_SOAPBinding" type="tns:SecAdmin">
[...]
<wsdl:service name="SecAdmin">
<wsdl:port binding="tns:SecAdmin_SOAPBinding" name="secadmin">
<soap:address location="http://localhost:8080/secadmin"/>
</wsdl:port>
</wsdl:service>
CXF-SERVLET:
<beans xmlns="http://www.springframework.org/schema/beans"
[...]
<jaxws:endpoint
id="secadmin"
implementor="com.ms.cis.secadmin.services.SecAdminImpl"
wsdlLocation="WEB-INF/wsdl/secadmin.wsdl"
address="/secadmin">
<jaxws:features>
<bean class="org.apache.cxf.feature.LoggingFeature"/>
</jaxws:features>
</jaxws:endpoint>
</beans>
--------------------------------------------------------
NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.
RE: Need assistance re: ServiceConstructionException
Posted by "Wolf, Chris (IT)" <Ch...@morganstanley.com>.
Glen,
Thanks so much for helping me - that was the issue. I actually did not
even have
a "WebService" annotation in my implementation class, because I did
"wsdl-first" and
thought the "WebService" annotation in the generated SEI was sufficient.
If the implementation
class implements the SEI, I don't see why the "WebService" annotation is
needed in both,
but whatever, all I care about (right now) is that it no longer throws
an exception.
Thanks,
-Chris
-----Original Message-----
From: Glen Mazza [mailto:glen.mazza@verizon.net]
Sent: Sunday, March 09, 2008 5:09 PM
To: cxf-user@incubator.apache.org
Subject: Re: Need assistance re: ServiceConstructionException
Check your "serviceName" value for the @javax.jws.WebService annotation
preceding your web service's implementation class, like here:
http://www.jroller.com/gmazza/date/20080308#MTstep6
HTH,
Glen
Am Sonntag, den 09.03.2008, 11:04 -0400 schrieb Wolf, Chris (IT):
> Before posting this, I looked at the JAX-WS spec (although I could
> only find 2.1) and searched the message archives. Before resorting to
> downloading the CXF source and building CXF from scratch so I can
> debug this problem, I am hoping someone can help.
>
> I created a service with a number of operations, based on the
> "wsdl_first" sample.
> Everything works great in the Jetty-embedded configuration, however,
> when I try to prepare a WAR deployment, and deploy to Tomcat, I
> receive the following cryptic error:
>
> Mar 09 10:01:15 bw26wolfch [] 2 Error
> org/apache/catalina/core/ContainerBase/[Catalina]/[localhost]/[/secadm
> in
> ]
> Servlet /secadmin threw load() exception
> <org.apache.cxf.service.factory.ServiceConstructionException:
> Could not find definition for service
> {http://services.secadmin.cis.ms.com/}SecAdminImplService.
>
> The generated service interface is:
> com.ms.cis.secadmin.services.SecAdmin
>
> The implementation class is:
> com.ms.cis.secadmin.services.SecAdminImpl
>
> *** So why is it looking for "SecAdminImplService"? Why is it
> appending "Service"?
>
>
> The relevant configuration settings are:
>
> WSDL:
>
> <wsdl:definitions name="SecAdmin"
> targetNamespace="http://services.secadmin.cis.ms.com"
> [...]
> <wsdl:portType name="SecAdmin">
> [...]
> <wsdl:binding name="SecAdmin_SOAPBinding" type="tns:SecAdmin"> [...]
> <wsdl:service name="SecAdmin">
> <wsdl:port binding="tns:SecAdmin_SOAPBinding" name="secadmin">
> <soap:address location="http://localhost:8080/secadmin"/>
> </wsdl:port>
> </wsdl:service>
>
> CXF-SERVLET:
>
> <beans xmlns="http://www.springframework.org/schema/beans"
> [...]
> <jaxws:endpoint
> id="secadmin"
> implementor="com.ms.cis.secadmin.services.SecAdminImpl"
> wsdlLocation="WEB-INF/wsdl/secadmin.wsdl"
> address="/secadmin">
> <jaxws:features>
> <bean class="org.apache.cxf.feature.LoggingFeature"/>
> </jaxws:features>
> </jaxws:endpoint>
> </beans>
> --------------------------------------------------------
>
> NOTICE: If received in error, please destroy and notify sender. Sender
does not intend to waive confidentiality or privilege. Use of this email
is prohibited when received in error.
--------------------------------------------------------
NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.
Re: Need assistance re: ServiceConstructionException
Posted by Glen Mazza <gl...@verizon.net>.
Check your "serviceName" value for the @javax.jws.WebService annotation
preceding your web service's implementation class, like here:
http://www.jroller.com/gmazza/date/20080308#MTstep6
HTH,
Glen
Am Sonntag, den 09.03.2008, 11:04 -0400 schrieb Wolf, Chris (IT):
> Before posting this, I looked at the JAX-WS spec (although I could only
> find 2.1) and searched
> the message archives. Before resorting to downloading the CXF source
> and building
> CXF from scratch so I can debug this problem, I am hoping someone can
> help.
>
> I created a service with a number of operations, based on the
> "wsdl_first" sample.
> Everything works great in the Jetty-embedded configuration, however,
> when I try
> to prepare a WAR deployment, and deploy to Tomcat, I receive the
> following cryptic error:
>
> Mar 09 10:01:15 bw26wolfch [] 2 Error
> org/apache/catalina/core/ContainerBase/[Catalina]/[localhost]/[/secadmin
> ]
> Servlet /secadmin threw load() exception
> <org.apache.cxf.service.factory.ServiceConstructionException:
> Could not find definition for service
> {http://services.secadmin.cis.ms.com/}SecAdminImplService.
>
> The generated service interface is:
> com.ms.cis.secadmin.services.SecAdmin
>
> The implementation class is:
> com.ms.cis.secadmin.services.SecAdminImpl
>
> *** So why is it looking for "SecAdminImplService"? Why is it appending
> "Service"?
>
>
> The relevant configuration settings are:
>
> WSDL:
>
> <wsdl:definitions name="SecAdmin"
> targetNamespace="http://services.secadmin.cis.ms.com"
> [...]
> <wsdl:portType name="SecAdmin">
> [...]
> <wsdl:binding name="SecAdmin_SOAPBinding" type="tns:SecAdmin">
> [...]
> <wsdl:service name="SecAdmin">
> <wsdl:port binding="tns:SecAdmin_SOAPBinding" name="secadmin">
> <soap:address location="http://localhost:8080/secadmin"/>
> </wsdl:port>
> </wsdl:service>
>
> CXF-SERVLET:
>
> <beans xmlns="http://www.springframework.org/schema/beans"
> [...]
> <jaxws:endpoint
> id="secadmin"
> implementor="com.ms.cis.secadmin.services.SecAdminImpl"
> wsdlLocation="WEB-INF/wsdl/secadmin.wsdl"
> address="/secadmin">
> <jaxws:features>
> <bean class="org.apache.cxf.feature.LoggingFeature"/>
> </jaxws:features>
> </jaxws:endpoint>
> </beans>
> --------------------------------------------------------
>
> NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.