Freeman, 

I have removed service name from xbean.xml file and it works fine
As you rightly said, there is a problem in xbean service name?, but i am not
able to identify whats going wrong in service name, i have same name space
and service name also in xbean.xml file , still getting same error 

following is my wsdl and xbean.xml file 

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:eka="http://ekaplus.com/contract"; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
name="contract" targetNamespace="http://ekaplus.com/contract"; 
xmlns:xsd1="com.ekaplus.v7.cotton.physical.contract" 
xmlns:xsd2="http://www.ekaplus.com/integration/common/document/return";>
<wsdl:types>
<xsd:schema targetNamespace="http://ekaplus.com/contract";>
<xsd:element name="createContract">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="in" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="createContractResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="out" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
        <xsd:import
                        
namespace="http://www.ekaplus.com/integration/common/document/return";
                        schemaLocation="ReturnDocument.xsd">
                </xsd:import>
                <xsd:import namespace="com.ekaplus.v7.cotton.physical.contract"
                        schemaLocation="contract.xsd">
                </xsd:import></xsd:schema></wsdl:types>
<wsdl:message name="createContractRequest">
<wsdl:part element="xsd1:Contract" name="parameters"/>
</wsdl:message>
<wsdl:message name="createContractResponse">
<wsdl:part element="xsd2:ReturnDocument" name="parameters"/>
</wsdl:message>
<wsdl:portType name="contract">
<wsdl:operation name="createContract">
<wsdl:input message="eka:createContractRequest"/>
<wsdl:output message="eka:createContractResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="contractSOAP" type="eka:contract">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="createContract">
<soap:operation soapAction="http://ekaplus.com/contract/NewOperation"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="eka:createContractService">
<wsdl:port binding="eka:contractSOAP" name="createContractService">
<soap:address location="http://localhost:8092/ContractService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>


xbean as follows 

<beans xmlns="http://www.springframework.org/schema/beans";
       xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0";
       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance";
       xmlns:eka="http://ekaplus.com/contract";
       xsi:schemaLocation="http://servicemix.apache.org/cxfbc/1.0
http://servicemix.apache.org/schema/servicemix-cxfbc-3.2.3.xsd
       http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd";>

  <cxfbc:consumer wsdl="classpath:contract.wsdl"
                 servicename="eka:createContractService"
                 endpoint="eka:createContractEP"
                      targetService="eka:createContractDataMapperBean"/>

</beans>


Can you make out any mismatches 

Brijesh N K


Freeman Fang wrote:
> 
> Please ensure the contract.xsd is also your SA and in the correct path.
> Freeman
> brijesh wrote:
>> Freeman, 
>>
>> I have corrected the service name issues , but i am getting the following
>> error as follows 
>>
>> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>>
>>
>> full stack trace as follows 
>>
>> <loc-message>java.lang.StringIndexOutOfBoundsException: String index out
>> of
>> range: -1</loc-message>
>> <stack-trace><![CDATA[javax.jbi.management.DeploymentException:
>> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>>         at
>> org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java:421)
>>         at
>> org.apache.servicemix.common.AbstractDeployer.validate(AbstractDeployer.java:58)
>>         at
>> org.apache.servicemix.common.xbean.BaseXBeanDeployer.validate(BaseXBeanDeployer.java:55)
>>         at
>> org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:96)
>>         at
>> org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
>>         at
>> org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
>>         at
>> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
>>         at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
>>         at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
>>         at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:667)
>>         at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
>>         at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:631)
>>         at java.util.TimerThread.mainLoop(Timer.java:512)
>>         at java.util.TimerThread.run(Timer.java:462)
>> Caused by: java.lang.StringIndexOutOfBoundsException: String index out of
>> range: -1
>>         at java.lang.String.substring(String.java:1768)
>>         at
>> org.codehaus.classworlds.UrlUtils.normalizeUrlPath(UrlUtils.java:33)
>>         at
>> org.codehaus.classworlds.DefaultClassRealm.getResource(DefaultClassRealm.java:456)
>>         at
>> org.codehaus.classworlds.RealmClassLoader.getResource(RealmClassLoader.java:237)
>>         at
>> org.apache.xbean.classloader.MultiParentClassLoader.getResource(MultiParentClassLoader.java:258)
>>         at
>> org.apache.xbean.classloader.MultiParentClassLoader.getResource(MultiParentClassLoader.java:258)
>>         at
>> org.apache.xbean.classloader.MultiParentClassLoader.getResource(MultiParentClassLoader.java:258)
>>         at
>> org.apache.cxf.common.classloader.ClassLoaderUtils.getResource(ClassLoaderUtils.java:50)
>>         at
>> org.apache.cxf.resource.URIResolver.tryClasspath(URIResolver.java:246)
>>         at
>> org.apache.cxf.resource.URIResolver.tryFileSystem(URIResolver.java:192)
>>         at
>> org.apache.cxf.resource.URIResolver.resolve(URIResolver.java:91)
>>         at
>> org.apache.cxf.resource.ExtendedURIResolver.resolve(ExtendedURIResolver.java:41)
>>         at
>> org.apache.cxf.catalog.CatalogWSDLLocator.getImportInputSource(CatalogWSDLLocator.java:106)
>>         at
>> org.apache.cxf.wsdl11.ResourceManagerWSDLLocator.getImportInputSource(ResourceManagerWSDLLocator.java:110)
>>         at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
>>         at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
>>         at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)
>>         at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown
>> Source)
>>         at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>>         at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>>         at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>>         at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>>         at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>>         at
>> org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:211)
>>         at
>> org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:158)
>>         at
>> org.apache.servicemix.cxfbc.CxfBcConsumer.retrieveWSDL(CxfBcConsumer.java:463)
>>         at
>> org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java:304)
>>         ... 13 more
>> ]]></stack-trace>
>>
>>
>>
>> Thanks 
>>
>> Brijesh N K
>>
>>
>> Freeman Fang wrote:
>>   
>>> brijesh wrote:
>>>     
>>>> Freeman, 
>>>>
>>>> the following is xbean.xml
>>>>
>>>> <beans xmlns="http://www.springframework.org/schema/beans";
>>>>        xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0";
>>>>        xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance";
>>>>        xmlns:eka="http://ekaplus.com/contract";
>>>>        xsi:schemaLocation="http://servicemix.apache.org/cxfbc/1.0
>>>> http://servicemix.apache.org/schema/servicemix-cxfbc-3.2.3.xsd
>>>>        http://www.springframework.org/schema/beans
>>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd";>
>>>>
>>>>   <cxfbc:consumer wsdl="classpath:contract.wsdl"
>>>>                                      service="eka:createContractBC"
>>>>                                      endpoint="eka:createContractEP"
>>>>                      
>>>> targetService="eka:createContractDataMapperBean"/>
>>>>
>>>> </beans>
>>>>
>>>> Should change  service="eka:createContractBC" to 
>>>> service="eka:contractSOAP"
>>>> , I have namespace prefix also, will it matters?   should I give the
>>>> namespace as wsdl in xbean.xml also??
>>>>
>>>>   
>>>>       
>>> Yes, you should give the namespace as wsdl for your xbean.xml also
>>>     
>>>> regards
>>>>
>>>> Brijesh N K
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Freeman Fang wrote:
>>>>   
>>>>       
>>>>> Hi,
>>>>>
>>>>> Your sevice name in your wsdl is contractSOAP, so you need set he 
>>>>> serviceName for your cxf bc consumer configuration accordingly.
>>>>> Freeman
>>>>> brijesh wrote:
>>>>>     
>>>>>         
>>>>>> hello,
>>>>>>
>>>>>> I have create a cxf-bc, while I am deploying I am getting following
>>>>>> error 
>>>>>>
>>>>>> org.apache.cxf.service.factory.ServiceConstructionException: Could
>>>>>> not
>>>>>> find
>>>>>> definition for service {http://ekaplus.com/contract}createContractBC.
>>>>>>
>>>>>> full stack as folows 
>>>>>>
>>>>>> <stack-trace><![CDATA[javax.jbi.management.DeploymentException:
>>>>>> org.apache.cxf.service.factory.ServiceConstructionException: Could
>>>>>> not
>>>>>> find
>>>>>> definition for service {
>>>>>> ttp://ekaplus.com/contract}createContractBC.
>>>>>>         at
>>>>>> org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java:421)
>>>>>>         at
>>>>>> org.apache.servicemix.common.AbstractDeployer.validate(AbstractDeployer.java:58)
>>>>>>         at
>>>>>> org.apache.servicemix.common.xbean.BaseXBeanDeployer.validate(BaseXBeanDeployer.java:55)
>>>>>>         at
>>>>>> org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:96)
>>>>>>         at
>>>>>> org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
>>>>>>         at
>>>>>> org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
>>>>>>         at
>>>>>> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
>>>>>>         at
>>>>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
>>>>>>         at
>>>>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
>>>>>>         at
>>>>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:667)
>>>>>>         at
>>>>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
>>>>>>         at
>>>>>> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:631)
>>>>>>         at java.util.TimerThread.mainLoop(Timer.java:512)
>>>>>>         at java.util.TimerThread.run(Timer.java:462)
>>>>>> Caused by:
>>>>>> org.apache.cxf.service.factory.ServiceConstructionException:
>>>>>> Could not find definition for service
>>>>>> {http://ekaplus.com/contract}createContractBC.
>>>>>>         at
>>>>>> org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:114)
>>>>>>         at
>>>>>> org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java:319)
>>>>>>         ... 13 more
>>>>>>
>>>>>> following is my wsdl
>>>>>>
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>
>>>>>> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
>>>>>> xmlns:tns="http://www.example.org/example/";
>>>>>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
>>>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; name="example"
>>>>>> targetNamespace="http://www.example.org/example/";
>>>>>> xmlns:xsd1="com.ekaplus.v7.cotton.physical.contract"
>>>>>> xmlns:xsd2="http://www.ekaplus.com/integration/common/document/return";>
>>>>>>
>>>>>>     <wsdl:types><xsd:schema
>>>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>>>>>> targetNamespace="http://www.example.org/example/";>
>>>>>>  <xsd:element name="createContract">
>>>>>>          <xsd:complexType>
>>>>>>                  <xsd:sequence>
>>>>>>                          <xsd:element name="in" 
>>>>>> type="xsd:string"></xsd:element>
>>>>>>                  </xsd:sequence>
>>>>>>          </xsd:complexType>
>>>>>>  </xsd:element>
>>>>>>  <xsd:element name="createContractResponse">
>>>>>>          <xsd:complexType>
>>>>>>                  <xsd:sequence>
>>>>>>
>>>>>>                          <xsd:element name="out" 
>>>>>> type="xsd:string"></xsd:element>
>>>>>>                  </xsd:sequence>
>>>>>>          </xsd:complexType>
>>>>>>  </xsd:element></xsd:schema>
>>>>>>          <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>>>>>>                  <xsd:import
>>>>>>                          
>>>>>> namespace="com.ekaplus.v7.cotton.physical.contract"
>>>>>>                          schemaLocation="contract.xsd">
>>>>>>                  </xsd:import>
>>>>>>                  <xsd:import
>>>>>>                  
>>>>>> namespace="http://www.ekaplus.com/integration/common/document/return";
>>>>>>                          schemaLocation="ReturnDocument.xsd">
>>>>>>                  </xsd:import></xsd:schema></wsdl:types>
>>>>>>     <wsdl:message name="createContractRequest">
>>>>>>          <wsdl:part name="parameters"
>>>>>> element="xsd1:Contract"></wsdl:part>
>>>>>>     </wsdl:message>
>>>>>>     <wsdl:message name="createContractResponse">
>>>>>>          <wsdl:part name="parameters"
>>>>>> element="xsd2:ReturnDocument"></wsdl:part>
>>>>>>     </wsdl:message>
>>>>>>     <wsdl:portType name="contract">
>>>>>>          <wsdl:operation name="createContract">
>>>>>>                  <wsdl:input 
>>>>>> message="tns:createContractRequest"></wsdl:input>
>>>>>>                  <wsdl:output
>>>>>> message="tns:createContractResponse"></wsdl:output>
>>>>>>          </wsdl:operation>
>>>>>>     </wsdl:portType>
>>>>>>
>>>>>>
>>>>>>     <wsdl:binding name="contractSOAPBinding" type="tns:contract">
>>>>>>          <soap:binding style="document"
>>>>>>                  transport="http://schemas.xmlsoap.org/soap/http"; />
>>>>>>          <wsdl:operation name="createContract">
>>>>>>                  <soap:operation
>>>>>>                          
>>>>>> soapAction="http://www.example.org/example/createContract"; />
>>>>>>                  <wsdl:input>
>>>>>>                          <soap:body use="literal" />
>>>>>>                  </wsdl:input>
>>>>>>                  <wsdl:output>
>>>>>>                          <soap:body use="literal" />
>>>>>>                  </wsdl:output>
>>>>>>          </wsdl:operation>
>>>>>>     </wsdl:binding>
>>>>>>     <wsdl:service name="contractSOAP">
>>>>>>          <wsdl:port name="contractSOAPService"
>>>>>> binding="tns:contractSOAPBinding">
>>>>>>                  <soap:address 
>>>>>> location="http://localhost:8092/ContractService/";
>>>>>> />
>>>>>>          </wsdl:port>
>>>>>>     </wsdl:service>
>>>>>> </wsdl:definitions>
>>>>>>
>>>>>>   
>>>>>>       
>>>>>>           
>>>>>     
>>>>>         
>>>>   
>>>>       
>>>
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/error-cxf-bc-deployment-tp21139850p21142257.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to