cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ANAND RAI (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CXF-2284) org.apache.cxf.BusException: No binding factory for namespace http://schemas.xmlsoap.org/wsdl/soap/ registered."
Date Sat, 13 Jun 2009 08:57:09 GMT

     [ https://issues.apache.org/jira/browse/CXF-2284?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

ANAND RAI updated CXF-2284:
---------------------------

    Description: 
I am writing a Component using CXF to consume an AXIS webservice  hosted on Tomcat.The component
works absolutely fine as a standalone application on eclipse , but things get worst when i
integrate it with rest of project which has another component exposing CXF Webservice . I
am using CXF 2.1.5  accross my application (for consuming and producing) .
Following spring configuration was used to create  stub .

<bean id="accountService" class="org.springframework.remoting.jaxws.JaxWsPortProxyFactoryBean">
       <property name="serviceInterface" value="x.y.AccountManagerPortType" />
       <property name="wsdlDocumentUrl" value="http://xyz:8084/someName/services/AccountManager?wsdl"
/>
       <property name="namespaceUri" value="http://x.y" />
       <property name="serviceName" value="AccountManager" />
       <property name="portName" value="AccountManagerSOAP11port_http" />
</bean>  

Spring logs show that spring is not able to create  AccountManagerSOAP11port_http.jaxws-client.proxy
.
CXF logging was enable by following configuration
<cxf:bus>
	<cxf:features>
		<cxf:logging />
	</cxf:features>
</cxf:bus>
to notice that CXF is able to send and recieve message ,but its returning back a null object.Initially
it appeared to me as if it is some issue with SOAPHandler or jaxb .After some debugging i
noticed that spring is getting an exception while creating above service the exception was

"org.apache.cxf.BusException: No binding factory for namespace http://schemas.xmlsoap.org/wsdl/soap/
registered ".
I wasn't able to get a stack trace, because spring was eating up the exception and rather
giving a friendly message which didn't make much sense to me except that it failed to create
"AccountManagerSOAP11port_http.jaxws-client.proxy " .

Below is a snapshot of eclipse in debug persepective

this     DefaultListableBeanFactory  (id=257)     
ex       WebServiceException  (id=485)    
   cause  ServiceConstructionException  (id=629)   
       cause  BusException  (id=633)      
           cause  BusException  (id=633)      
           detailMessage         null    
           message       Message  (id=638)  
	           bundle          PropertyResourceBundle  (id=641)         
                   code   "NO_BINDING_FACTORY_EXC" (id=644)         
                   parameters   Object[1]  (id=645) 
                   stackTrace     null    
           detailMessage         "org.apache.cxf.BusException: No binding factory for namespace
				 http://schemas.xmlsoap.org/wsdl/soap/ registered." (id=636)             message     
 null    
        stackTrace     null    
   detailMessage         "org.apache.cxf.service.factory.ServiceConstructionException" (id=632)
    stackTrace     null    
beanName    "subscriberService" (id=488)        
bean   JaxWsPortProxyFactoryBean  (id=440)    
mbd   RootBeanDefinition  (id=490)       
wrappedBean          JaxWsPortProxyFactoryBean  (id=440)    

I googled this exception and found that many people  have reported same problem and for most
of queries the cause is suggested to be missing CXF-extension-soap.xml or cxf-rt-bindings-soap-2.1.3.jar
missing in classpath .But in my case i have both of them 

I have following spring imports in spring configuration

 <import resource="classpath:META-INF/cxf/cxf.xml" />
 <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
 <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />      

and cxf-rt-bindings-soap-2.1.3.jar is present in web-inf/lib of the war file .
I added some more imports ,but didn't prooved to be any help . 

<import resource="classpath:META-INF/cxf/cxf.xml"/>
<import resource="classpath:META-INF/cxf/cxf-extension-jaxws.xml"/>
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
<import resource="classpath:META-INF/cxf/cxf-extension-management.xml"/>
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
<import resource="classpath:META-INF/cxf/cxf-extension-addr.xml"/>
   
I tried another approach to consume webservice .
<beans default-init-method="beanInit" default-destroy-method="beanDestroy"
xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:hlapi="http://x.y"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">

<jaxws:client id="accountService"
serviceClass="x.y.AccountManagerPortType"
address="http://xyz:8084/someName/services/AccountManager"
serviceName="hlapi:AccountManager"
endpointName="hlapi:AccountManagerSOAP11port_http"/>

I wasn't able to get any exception while debugging , but i am facing the same issue as with
previous approach , CXF logs inbound and outbound messages , but its returning me a null object
.

This has become a blocking issue for me and my team ,i am stuck on this issue since past week
.
Please advise any possible solution .  

  was:
I have a client application to consume a webservice , the application works correctly as a
standalone application on Eclipse . When i integrate it with my rest of project it fails on
JBOSS . Our project exposes some webservices at one end and consume webservice at the other
end .Both consumption and production of webservice is done using CXF . 

I got following exception when i degugged the code ..

org.apache.cxf.BusException: No binding factory for namespace http://schemas.xmlsoap.org/wsdl/soap/
registered."

I found out possible solutions for this problem .
 1. Import CXF.xml
 2. Import cxf-rt-bindings-soap-2.1.3.jar

I have following imports in Spring Configuration , i verifies that all beans declared in these
xml are getting created 

 <import resource="classpath:META-INF/cxf/cxf.xml" />
 <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
 <import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> 

cxf-rt-bindings-soap-2.1.3.jar is present in my classpath (WEB-INF/lib) .

Please advice .










Added a more detailed exception .

> org.apache.cxf.BusException: No binding factory for namespace http://schemas.xmlsoap.org/wsdl/soap/
registered." 
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-2284
>                 URL: https://issues.apache.org/jira/browse/CXF-2284
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1.5
>         Environment: Win XP
>            Reporter: ANAND RAI
>            Priority: Blocker
>
> I am writing a Component using CXF to consume an AXIS webservice  hosted on Tomcat.The
component works absolutely fine as a standalone application on eclipse , but things get worst
when i integrate it with rest of project which has another component exposing CXF Webservice
. I am using CXF 2.1.5  accross my application (for consuming and producing) .
> Following spring configuration was used to create  stub .
> <bean id="accountService" class="org.springframework.remoting.jaxws.JaxWsPortProxyFactoryBean">
>        <property name="serviceInterface" value="x.y.AccountManagerPortType" />
>        <property name="wsdlDocumentUrl" value="http://xyz:8084/someName/services/AccountManager?wsdl"
/>
>        <property name="namespaceUri" value="http://x.y" />
>        <property name="serviceName" value="AccountManager" />
>        <property name="portName" value="AccountManagerSOAP11port_http" />
> </bean>  
> Spring logs show that spring is not able to create  AccountManagerSOAP11port_http.jaxws-client.proxy
.
> CXF logging was enable by following configuration
> <cxf:bus>
> 	<cxf:features>
> 		<cxf:logging />
> 	</cxf:features>
> </cxf:bus>
> to notice that CXF is able to send and recieve message ,but its returning back a null
object.Initially it appeared to me as if it is some issue with SOAPHandler or jaxb .After
some debugging i noticed that spring is getting an exception while creating above service
the exception was 
> "org.apache.cxf.BusException: No binding factory for namespace http://schemas.xmlsoap.org/wsdl/soap/
registered ".
> I wasn't able to get a stack trace, because spring was eating up the exception and rather
giving a friendly message which didn't make much sense to me except that it failed to create
"AccountManagerSOAP11port_http.jaxws-client.proxy " .
> Below is a snapshot of eclipse in debug persepective
> this     DefaultListableBeanFactory  (id=257)     
> ex       WebServiceException  (id=485)    
>    cause  ServiceConstructionException  (id=629)   
>        cause  BusException  (id=633)      
>            cause  BusException  (id=633)      
>            detailMessage         null    
>            message       Message  (id=638)  
> 	           bundle          PropertyResourceBundle  (id=641)         
>                    code   "NO_BINDING_FACTORY_EXC" (id=644)         
>                    parameters   Object[1]  (id=645) 
>                    stackTrace     null    
>            detailMessage         "org.apache.cxf.BusException: No binding factory for
namespace 				 http://schemas.xmlsoap.org/wsdl/soap/ registered." (id=636)             message
      null    
>         stackTrace     null    
>    detailMessage         "org.apache.cxf.service.factory.ServiceConstructionException"
(id=632)     stackTrace     null    
> beanName    "subscriberService" (id=488)        
> bean   JaxWsPortProxyFactoryBean  (id=440)    
> mbd   RootBeanDefinition  (id=490)       
> wrappedBean          JaxWsPortProxyFactoryBean  (id=440)    
> I googled this exception and found that many people  have reported same problem and for
most of queries the cause is suggested to be missing CXF-extension-soap.xml or cxf-rt-bindings-soap-2.1.3.jar
missing in classpath .But in my case i have both of them 
> I have following spring imports in spring configuration
>  <import resource="classpath:META-INF/cxf/cxf.xml" />
>  <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
>  <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />      
> and cxf-rt-bindings-soap-2.1.3.jar is present in web-inf/lib of the war file .
> I added some more imports ,but didn't prooved to be any help . 
> <import resource="classpath:META-INF/cxf/cxf.xml"/>
> <import resource="classpath:META-INF/cxf/cxf-extension-jaxws.xml"/>
> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
> <import resource="classpath:META-INF/cxf/cxf-extension-management.xml"/>
> <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
> <import resource="classpath:META-INF/cxf/cxf-extension-addr.xml"/>
>    
> I tried another approach to consume webservice .
> <beans default-init-method="beanInit" default-destroy-method="beanDestroy"
> xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:jaxws="http://cxf.apache.org/jaxws"
> xmlns:hlapi="http://x.y"
> xmlns:context="http://www.springframework.org/schema/context"
> xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
> http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
> <jaxws:client id="accountService"
> serviceClass="x.y.AccountManagerPortType"
> address="http://xyz:8084/someName/services/AccountManager"
> serviceName="hlapi:AccountManager"
> endpointName="hlapi:AccountManagerSOAP11port_http"/>
> I wasn't able to get any exception while debugging , but i am facing the same issue as
with previous approach , CXF logs inbound and outbound messages , but its returning me a null
object .
> This has become a blocking issue for me and my team ,i am stuck on this issue since past
week .
> Please advise any possible solution .  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message