You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Freeman Fang <fr...@gmail.com> on 2008/12/23 06:27:35 UTC
Re: error cxf-bc deployment
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>
>
>
Re: error cxf-bc deployment
Posted by brijesh <br...@gmail.com>.
hi Freeman,
thanks a lot finally I could deploy it , and you made my day.
Your help was immense
regards
Brijesh N K
Freeman Fang wrote:
>
> Hi,
>
> Also you need remove eka prefix from the port name in your wsdl
> Freeman
>
> brijesh wrote:
>> thanks Freeman,
>> I have removed eka: prefix and now this time it given some other stack as
>> follows
>>
>> <loc-message>Unable to parse result string</loc-message>
>>
>> <loc-message>java.lang.NullPointerException</loc-message>
>> <stack-trace><![CDATA[javax.jbi.management.DeploymentException:
>> java.lang.NullPointerException
>> 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.checkPendingSAs(AutoDeploymentService.java:482)
>> at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.checkPendingComponents(AutoDeploymentService.java:535)
>> at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateSharedLibrary(AutoDeploymentService.java:317)
>> at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:254)
>> 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.NullPointerException
>> at
>> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:227)
>> at
>> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:152)
>> at
>> org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:117)
>> at
>> org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java:319)
>> ... 15 more
>> ]]></stack-trace>
>> </exception-info>
>>
>> regards
>>
>> Brijesh N K
>>
>>
>>
>>
>>
>> Freeman Fang wrote:
>>
>>> I know the reason now,
>>> comment inline
>>>
>>>
>>> brijesh wrote:
>>>
>>>> Freeman,
>>>> Yes , I can run successfully without service in xbean.xml file,
>>>> But when i am adding service in xbean.xml, I am getting deployment
>>>> error.
>>>> (i
>>>> will have more service def in wsdl though currently not)
>>>> Don't know what i am doing wrong in service defentition , its giving
>>>> following stack when i am deploying it
>>>>
>>>> <stack-trace><![CDATA[javax.jbi.management.DeploymentException:
>>>> org.apache.cxf.service.factory.ServiceConstructionException: Could not
>>>> find
>>>> definition for servic
>>>> ttp://ekaplus.com/contract}createContractService.
>>>> 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}createContractService.
>>>> at
>>>> org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:114)
>>>> at
>>>> org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java:319)
>>>> ... 13 more
>>>>
>>>>
>>>>
>>>>
>>>> the following is my wsdl
>>>> <?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">
>>>>
>>>>
>>> here should be
>>> <wsdl:service name="createContractService">
>>> since you already defined targetNamespace="http://ekaplus.com/contract",
>>> your eka prefix is duplication
>>>
>>>
>>>> <wsdl:port binding="eka:contractSOAP" name="eka: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"
>>>> service="eka:createContractService"
>>>> endpoint="eka:createContractEP"
>>>> targetService="eka:createContractDataMapperBean"/>
>>>>
>>>>
>>>>
>>>> thanks,
>>>> Brijesh N K
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Freeman Fang wrote:
>>>>
>>>>
>>>>> You said you can run it successfully without the service in xbean.xml,
>>>>> correct?
>>>>> And with the service, what's the error you see?
>>>>> java.lang.StringIndexOutOfBoundsException: String index out of
>>>>> range:-1
>>>>> or
>>>>> Could not find definition for service {
>>>>> ttp://ekaplus.com/contract}createContractBC.
>>>>> Btw, there is no attachment with this mail, that's disallowed by the
>>>>> filter.
>>>>>
>>>>> Freeman
>>>>> brijesh wrote:
>>>>>
>>>>>
>>>>>> Freeman,
>>>>>>
>>>>>> yeas, that was mistake one. I corrected and deployed but I am getting
>>>>>> the
>>>>>> same error.
>>>>>> I think Something else is going wrong, which I am not able to trace,
>>>>>>
>>>>>> I have attached source as zip along with. It would be great if you
>>>>>> can
>>>>>> advice me after seeing source, I am running behind schedule as i have
>>>>>> to
>>>>>> deliver a POC for this.
>>>>>>
>>>>>> thanks
>>>>>> Brjesh N K
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Freeman Fang wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> brijesh wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> 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"
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> should be service="eka:createContractService" but not servicename=""
>>>>>>> And as said in [1], since your wsdl only have one service, so the
>>>>>>> the
>>>>>>> service attribute here isn't madatory, I believe that's why it works
>>>>>>> when you remove it.
>>>>>>> [1]http://servicemix.apache.org/servicemix-cxf-bc.html
>>>>>>>
>>>>>>> Freeman
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> 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>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> :-(:working::working::working::working::working::working:>-):working::working::working::working::working::working::working:
>>>>>> http://www.nabble.com/file/p21144777/Samples.zip Samples.zip
>>>>>> http://www.nabble.com/file/p21144777/Samples.zip Samples.zip
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
>
--
View this message in context: http://www.nabble.com/error-cxf-bc-deployment-tp21139850p21146437.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: error cxf-bc deployment
Posted by Freeman Fang <fr...@gmail.com>.
Hi,
Also you need remove eka prefix from the port name in your wsdl
Freeman
brijesh wrote:
> thanks Freeman,
> I have removed eka: prefix and now this time it given some other stack as
> follows
>
> <loc-message>Unable to parse result string</loc-message>
>
> <loc-message>java.lang.NullPointerException</loc-message>
> <stack-trace><![CDATA[javax.jbi.management.DeploymentException:
> java.lang.NullPointerException
> 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.checkPendingSAs(AutoDeploymentService.java:482)
> at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.checkPendingComponents(AutoDeploymentService.java:535)
> at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateSharedLibrary(AutoDeploymentService.java:317)
> at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:254)
> 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.NullPointerException
> at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:227)
> at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:152)
> at
> org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:117)
> at
> org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java:319)
> ... 15 more
> ]]></stack-trace>
> </exception-info>
>
> regards
>
> Brijesh N K
>
>
>
>
>
> Freeman Fang wrote:
>
>> I know the reason now,
>> comment inline
>>
>>
>> brijesh wrote:
>>
>>> Freeman,
>>> Yes , I can run successfully without service in xbean.xml file,
>>> But when i am adding service in xbean.xml, I am getting deployment error.
>>> (i
>>> will have more service def in wsdl though currently not)
>>> Don't know what i am doing wrong in service defentition , its giving
>>> following stack when i am deploying it
>>>
>>> <stack-trace><![CDATA[javax.jbi.management.DeploymentException:
>>> org.apache.cxf.service.factory.ServiceConstructionException: Could not
>>> find
>>> definition for servic
>>> ttp://ekaplus.com/contract}createContractService.
>>> 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}createContractService.
>>> at
>>> org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:114)
>>> at
>>> org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java:319)
>>> ... 13 more
>>>
>>>
>>>
>>>
>>> the following is my wsdl
>>> <?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">
>>>
>>>
>> here should be
>> <wsdl:service name="createContractService">
>> since you already defined targetNamespace="http://ekaplus.com/contract",
>> your eka prefix is duplication
>>
>>
>>> <wsdl:port binding="eka:contractSOAP" name="eka: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"
>>> service="eka:createContractService"
>>> endpoint="eka:createContractEP"
>>> targetService="eka:createContractDataMapperBean"/>
>>>
>>>
>>>
>>> thanks,
>>> Brijesh N K
>>>
>>>
>>>
>>>
>>>
>>>
>>> Freeman Fang wrote:
>>>
>>>
>>>> You said you can run it successfully without the service in xbean.xml,
>>>> correct?
>>>> And with the service, what's the error you see?
>>>> java.lang.StringIndexOutOfBoundsException: String index out of range:-1
>>>> or
>>>> Could not find definition for service {
>>>> ttp://ekaplus.com/contract}createContractBC.
>>>> Btw, there is no attachment with this mail, that's disallowed by the
>>>> filter.
>>>>
>>>> Freeman
>>>> brijesh wrote:
>>>>
>>>>
>>>>> Freeman,
>>>>>
>>>>> yeas, that was mistake one. I corrected and deployed but I am getting
>>>>> the
>>>>> same error.
>>>>> I think Something else is going wrong, which I am not able to trace,
>>>>>
>>>>> I have attached source as zip along with. It would be great if you can
>>>>> advice me after seeing source, I am running behind schedule as i have
>>>>> to
>>>>> deliver a POC for this.
>>>>>
>>>>> thanks
>>>>> Brjesh N K
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Freeman Fang wrote:
>>>>>
>>>>>
>>>>>
>>>>>> brijesh wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> 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"
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> should be service="eka:createContractService" but not servicename=""
>>>>>> And as said in [1], since your wsdl only have one service, so the the
>>>>>> service attribute here isn't madatory, I believe that's why it works
>>>>>> when you remove it.
>>>>>> [1]http://servicemix.apache.org/servicemix-cxf-bc.html
>>>>>>
>>>>>> Freeman
>>>>>>
>>>>>>
>>>>>>
>>>>>>> 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>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> :-(:working::working::working::working::working::working:>-):working::working::working::working::working::working::working:
>>>>> http://www.nabble.com/file/p21144777/Samples.zip Samples.zip
>>>>> http://www.nabble.com/file/p21144777/Samples.zip Samples.zip
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: error cxf-bc deployment
Posted by brijesh <br...@gmail.com>.
thanks Freeman,
I have removed eka: prefix and now this time it given some other stack as
follows
<loc-message>Unable to parse result string</loc-message>
<loc-message>java.lang.NullPointerException</loc-message>
<stack-trace><![CDATA[javax.jbi.management.DeploymentException:
java.lang.NullPointerException
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.checkPendingSAs(AutoDeploymentService.java:482)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.checkPendingComponents(AutoDeploymentService.java:535)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateSharedLibrary(AutoDeploymentService.java:317)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:254)
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.NullPointerException
at
org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:227)
at
org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:152)
at
org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:117)
at
org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java:319)
... 15 more
]]></stack-trace>
</exception-info>
regards
Brijesh N K
Freeman Fang wrote:
>
> I know the reason now,
> comment inline
>
>
> brijesh wrote:
>> Freeman,
>> Yes , I can run successfully without service in xbean.xml file,
>> But when i am adding service in xbean.xml, I am getting deployment error.
>> (i
>> will have more service def in wsdl though currently not)
>> Don't know what i am doing wrong in service defentition , its giving
>> following stack when i am deploying it
>>
>> <stack-trace><![CDATA[javax.jbi.management.DeploymentException:
>> org.apache.cxf.service.factory.ServiceConstructionException: Could not
>> find
>> definition for servic
>> ttp://ekaplus.com/contract}createContractService.
>> 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}createContractService.
>> at
>> org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:114)
>> at
>> org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java:319)
>> ... 13 more
>>
>>
>>
>>
>> the following is my wsdl
>> <?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">
>>
> here should be
> <wsdl:service name="createContractService">
> since you already defined targetNamespace="http://ekaplus.com/contract",
> your eka prefix is duplication
>
>> <wsdl:port binding="eka:contractSOAP" name="eka: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"
>> service="eka:createContractService"
>> endpoint="eka:createContractEP"
>> targetService="eka:createContractDataMapperBean"/>
>>
>>
>>
>> thanks,
>> Brijesh N K
>>
>>
>>
>>
>>
>>
>> Freeman Fang wrote:
>>
>>> You said you can run it successfully without the service in xbean.xml,
>>> correct?
>>> And with the service, what's the error you see?
>>> java.lang.StringIndexOutOfBoundsException: String index out of range:-1
>>> or
>>> Could not find definition for service {
>>> ttp://ekaplus.com/contract}createContractBC.
>>> Btw, there is no attachment with this mail, that's disallowed by the
>>> filter.
>>>
>>> Freeman
>>> brijesh wrote:
>>>
>>>> Freeman,
>>>>
>>>> yeas, that was mistake one. I corrected and deployed but I am getting
>>>> the
>>>> same error.
>>>> I think Something else is going wrong, which I am not able to trace,
>>>>
>>>> I have attached source as zip along with. It would be great if you can
>>>> advice me after seeing source, I am running behind schedule as i have
>>>> to
>>>> deliver a POC for this.
>>>>
>>>> thanks
>>>> Brjesh N K
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Freeman Fang wrote:
>>>>
>>>>
>>>>> brijesh wrote:
>>>>>
>>>>>
>>>>>> 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"
>>>>>>
>>>>>>
>>>>>>
>>>>> should be service="eka:createContractService" but not servicename=""
>>>>> And as said in [1], since your wsdl only have one service, so the the
>>>>> service attribute here isn't madatory, I believe that's why it works
>>>>> when you remove it.
>>>>> [1]http://servicemix.apache.org/servicemix-cxf-bc.html
>>>>>
>>>>> Freeman
>>>>>
>>>>>
>>>>>> 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>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>> :-(:working::working::working::working::working::working:>-):working::working::working::working::working::working::working:
>>>> http://www.nabble.com/file/p21144777/Samples.zip Samples.zip
>>>> http://www.nabble.com/file/p21144777/Samples.zip Samples.zip
>>>>
>>>>
>>>
>>>
>>
>>
>
>
>
--
View this message in context: http://www.nabble.com/error-cxf-bc-deployment-tp21139850p21145869.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: error cxf-bc deployment
Posted by Freeman Fang <fr...@gmail.com>.
I know the reason now,
comment inline
brijesh wrote:
> Freeman,
> Yes , I can run successfully without service in xbean.xml file,
> But when i am adding service in xbean.xml, I am getting deployment error. (i
> will have more service def in wsdl though currently not)
> Don't know what i am doing wrong in service defentition , its giving
> following stack when i am deploying it
>
> <stack-trace><![CDATA[javax.jbi.management.DeploymentException:
> org.apache.cxf.service.factory.ServiceConstructionException: Could not find
> definition for servic
> ttp://ekaplus.com/contract}createContractService.
> 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}createContractService.
> at
> org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:114)
> at
> org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java:319)
> ... 13 more
>
>
>
>
> the following is my wsdl
> <?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">
>
here should be
<wsdl:service name="createContractService">
since you already defined targetNamespace="http://ekaplus.com/contract",
your eka prefix is duplication
> <wsdl:port binding="eka:contractSOAP" name="eka: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"
> service="eka:createContractService"
> endpoint="eka:createContractEP"
> targetService="eka:createContractDataMapperBean"/>
>
>
>
> thanks,
> Brijesh N K
>
>
>
>
>
>
> Freeman Fang wrote:
>
>> You said you can run it successfully without the service in xbean.xml,
>> correct?
>> And with the service, what's the error you see?
>> java.lang.StringIndexOutOfBoundsException: String index out of range:-1
>> or
>> Could not find definition for service {
>> ttp://ekaplus.com/contract}createContractBC.
>> Btw, there is no attachment with this mail, that's disallowed by the
>> filter.
>>
>> Freeman
>> brijesh wrote:
>>
>>> Freeman,
>>>
>>> yeas, that was mistake one. I corrected and deployed but I am getting the
>>> same error.
>>> I think Something else is going wrong, which I am not able to trace,
>>>
>>> I have attached source as zip along with. It would be great if you can
>>> advice me after seeing source, I am running behind schedule as i have to
>>> deliver a POC for this.
>>>
>>> thanks
>>> Brjesh N K
>>>
>>>
>>>
>>>
>>>
>>> Freeman Fang wrote:
>>>
>>>
>>>> brijesh wrote:
>>>>
>>>>
>>>>> 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"
>>>>>
>>>>>
>>>>>
>>>> should be service="eka:createContractService" but not servicename=""
>>>> And as said in [1], since your wsdl only have one service, so the the
>>>> service attribute here isn't madatory, I believe that's why it works
>>>> when you remove it.
>>>> [1]http://servicemix.apache.org/servicemix-cxf-bc.html
>>>>
>>>> Freeman
>>>>
>>>>
>>>>> 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>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>> :-(:working::working::working::working::working::working:>-):working::working::working::working::working::working::working:
>>> http://www.nabble.com/file/p21144777/Samples.zip Samples.zip
>>> http://www.nabble.com/file/p21144777/Samples.zip Samples.zip
>>>
>>>
>>
>>
>
>
Re: error cxf-bc deployment
Posted by brijesh <br...@gmail.com>.
Freeman,
Yes , I can run successfully without service in xbean.xml file,
But when i am adding service in xbean.xml, I am getting deployment error. (i
will have more service def in wsdl though currently not)
Don't know what i am doing wrong in service defentition , its giving
following stack when i am deploying it
<stack-trace><![CDATA[javax.jbi.management.DeploymentException:
org.apache.cxf.service.factory.ServiceConstructionException: Could not find
definition for servic
ttp://ekaplus.com/contract}createContractService.
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}createContractService.
at
org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:114)
at
org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java:319)
... 13 more
the following is my wsdl
<?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="eka: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"
service="eka:createContractService"
endpoint="eka:createContractEP"
targetService="eka:createContractDataMapperBean"/>
thanks,
Brijesh N K
Freeman Fang wrote:
>
> You said you can run it successfully without the service in xbean.xml,
> correct?
> And with the service, what's the error you see?
> java.lang.StringIndexOutOfBoundsException: String index out of range:-1
> or
> Could not find definition for service {
> ttp://ekaplus.com/contract}createContractBC.
> Btw, there is no attachment with this mail, that's disallowed by the
> filter.
>
> Freeman
> brijesh wrote:
>> Freeman,
>>
>> yeas, that was mistake one. I corrected and deployed but I am getting the
>> same error.
>> I think Something else is going wrong, which I am not able to trace,
>>
>> I have attached source as zip along with. It would be great if you can
>> advice me after seeing source, I am running behind schedule as i have to
>> deliver a POC for this.
>>
>> thanks
>> Brjesh N K
>>
>>
>>
>>
>>
>> Freeman Fang wrote:
>>
>>> brijesh wrote:
>>>
>>>> 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"
>>>>
>>>>
>>> should be service="eka:createContractService" but not servicename=""
>>> And as said in [1], since your wsdl only have one service, so the the
>>> service attribute here isn't madatory, I believe that's why it works
>>> when you remove it.
>>> [1]http://servicemix.apache.org/servicemix-cxf-bc.html
>>>
>>> Freeman
>>>
>>>> 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>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>> :-(:working::working::working::working::working::working:>-):working::working::working::working::working::working::working:
>> http://www.nabble.com/file/p21144777/Samples.zip Samples.zip
>> http://www.nabble.com/file/p21144777/Samples.zip Samples.zip
>>
>
>
>
--
View this message in context: http://www.nabble.com/error-cxf-bc-deployment-tp21139850p21145049.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: error cxf-bc deployment
Posted by Freeman Fang <fr...@gmail.com>.
You said you can run it successfully without the service in xbean.xml,
correct?
And with the service, what's the error you see?
java.lang.StringIndexOutOfBoundsException: String index out of range:-1
or
Could not find definition for service {
ttp://ekaplus.com/contract}createContractBC.
Btw, there is no attachment with this mail, that's disallowed by the filter.
Freeman
brijesh wrote:
> Freeman,
>
> yeas, that was mistake one. I corrected and deployed but I am getting the
> same error.
> I think Something else is going wrong, which I am not able to trace,
>
> I have attached source as zip along with. It would be great if you can
> advice me after seeing source, I am running behind schedule as i have to
> deliver a POC for this.
>
> thanks
> Brjesh N K
>
>
>
>
>
> Freeman Fang wrote:
>
>> brijesh wrote:
>>
>>> 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"
>>>
>>>
>> should be service="eka:createContractService" but not servicename=""
>> And as said in [1], since your wsdl only have one service, so the the
>> service attribute here isn't madatory, I believe that's why it works
>> when you remove it.
>> [1]http://servicemix.apache.org/servicemix-cxf-bc.html
>>
>> Freeman
>>
>>> 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>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
> :-(:working::working::working::working::working::working:>-):working::working::working::working::working::working::working:
> http://www.nabble.com/file/p21144777/Samples.zip Samples.zip
> http://www.nabble.com/file/p21144777/Samples.zip Samples.zip
>
Re: error cxf-bc deployment
Posted by brijesh <br...@gmail.com>.
Freeman,
yeas, that was mistake one. I corrected and deployed but I am getting the
same error.
I think Something else is going wrong, which I am not able to trace,
I have attached source as zip along with. It would be great if you can
advice me after seeing source, I am running behind schedule as i have to
deliver a POC for this.
thanks
Brjesh N K
Freeman Fang wrote:
>
> brijesh wrote:
>> 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"
>>
> should be service="eka:createContractService" but not servicename=""
> And as said in [1], since your wsdl only have one service, so the the
> service attribute here isn't madatory, I believe that's why it works
> when you remove it.
> [1]http://servicemix.apache.org/servicemix-cxf-bc.html
>
> Freeman
>> 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>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
>
:-(:working::working::working::working::working::working:>-):working::working::working::working::working::working::working:
http://www.nabble.com/file/p21144777/Samples.zip Samples.zip
http://www.nabble.com/file/p21144777/Samples.zip Samples.zip
--
View this message in context: http://www.nabble.com/error-cxf-bc-deployment-tp21139850p21144777.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: error cxf-bc deployment
Posted by Freeman Fang <fr...@gmail.com>.
brijesh wrote:
> 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"
>
should be service="eka:createContractService" but not servicename=""
And as said in [1], since your wsdl only have one service, so the the
service attribute here isn't madatory, I believe that's why it works
when you remove it.
[1]http://servicemix.apache.org/servicemix-cxf-bc.html
Freeman
> 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>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: error cxf-bc deployment
Posted by brijesh <br...@gmail.com>.
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.
Re: error cxf-bc deployment
Posted by Freeman Fang <fr...@gmail.com>.
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>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: error cxf-bc deployment
Posted by brijesh <br...@gmail.com>.
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-tp21139850p21140543.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: error cxf-bc deployment
Posted by Freeman Fang <fr...@gmail.com>.
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>
>>>
>>>
>>>
>>
>>
>
>
Re: error cxf-bc deployment
Posted by brijesh <br...@gmail.com>.
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??
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-tp21139850p21140017.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.