You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by RKR <Ra...@infosys.com> on 2008/09/25 15:40:20 UTC

Error in accessing external web service through service mix

Hi,
I tried accessing an external web service from servicemix. I used one
cxf-bc-provider and one http-consumer to access the web service. I build the
project. I am attaching the xbean file of both component. I have uploaded
the wsdl of the web service for your reference.

cxf-bc-provider
<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"
       xsi:schemaLocation="http://servicemix.apache.org/cxfbc/1.0
http://servicemix.apache.org/schema/servicemix-cxfbc-3.2.2.xsd
       http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

  <cxfbc:provider wsdl="classpath:Hello.wsdl"
                        locationURI="http://172.21.86.156:9001/hello"
                        service="hello:HelloTestService"
                        endpoint="HelloTestPort"
                        interfaceName="hello:HelloTest">
  
  </cxfbc:provider>


</beans>

http-consumer

<beans xmlns:http="http://servicemix.apache.org/http/1.0"
       xmlns:replaceMe="http://servicemix.apache.org/replaceMe"
       xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://servicemix.apache.org/http/1.0
http://servicemix.apache.org/schema/servicemix-http-3.2.2.xsd
       http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

  <http:endpoint service="hello:HelloTestService"
                 endpoint="HelloTestPort"
                 role="consumer" 
                 locationURI="http://localhost:8192/example/"  />   
                

</beans>

But while deploying the project. I am getting this error:

java.lang.RuntimeException: org.xml.sax.SAXParseException: The value of the
attr
ibute "prefix="xmlns",localpart="hello",rawname="xmlns:hello"" is invalid.
Prefi
xed namespace bindings may not be empty.
        at
org.apache.servicemix.jbi.deployment.DescriptorFactory.buildDescripto
r(DescriptorFactory.java:141)
        at
org.apache.servicemix.jbi.deployment.DescriptorFactory.buildDescripto
r(DescriptorFactory.java:80)
        at
org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.<init>(Servi
ceUnitLifeCycle.java:67)
        at
org.apache.servicemix.jbi.framework.Registry.registerServiceUnit(Regi
stry.java:746)
        at
org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAs
sembly(DeploymentService.java:518)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServi
ceAssembly(AutoDeploymentService.java:353)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchi
ve(AutoDeploymentService.java:256)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateExter
http://www.nabble.com/file/p19669734/Hello.wsdl Hello.wsdl 


Please reply soon. It is very urgent.
Thanks
-- 
View this message in context: http://www.nabble.com/Error-in-accessing-external-web-service-through-service-mix-tp19669734p19669734.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Error in accessing external web service through service mix

Posted by Edell Nolan <ed...@gmail.com>.
Can you try with the following in your xbean.xml file

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
           xmlns:hello="http://swebservice.samples.servicemix.apache.org/">

    <cxfbc:provider wsdl="classpath:Hello.wsdl"
                          locationURI="http://172.21.86.156:9001/hello"
                          service="hello:HelloTestService"
                          endpoint="HelloTestPort"
                          interfaceName="hello:HelloTest">
    </cxfbc:provider>
</beans>

And make sure that the Hello.wsdl file is in your resources directory with
your xbean.xml file.
That the cxf-bc dependency is in your pom file.

Edell.



On Fri, Sep 26, 2008 at 5:51 AM, RKR <Ra...@infosys.com> wrote:

>
> Hi,
> I added the entry. Now that error is not coming for me but i am getting
> this
> error.
>
> ernel.ServiceRegistrationException:
> org.springframework.beans.factory.BeanCreati
> onException: Error creating bean with name
> 'org.apache.servicemix.cxfbc.CxfBcPro
> vider' defined in file
> [C:\iona\fuse-esb-3.3.1.3\data\smx\service-assemblies\tut
> orial-sa\version_2\sus\servicemix-cxf-bc\cxf-bc-su\xbean.xml]:
> Initialization of
>  bean failed; nested exception is
> org.springframework.beans.InvalidPropertyExcep
> tion: Invalid property 'wsdl' of bean class
> [org.apache.servicemix.cxfbc.CxfBcPr
> ovider]: No property 'wsdl' found
>
> I have attached the wsdl for ur reference.
> Please look into it and help me in resolving the issue.
>
>
> Edell Nolan wrote:
> >
> > Hi,
> >
> > you need to define the namespace for the prefix in your xbean.xml files.
> >
> > eg. xmlns:hello="http://swebservice.samples.servicemix.apache.org/"
> >
> >
> > Edell.
> >
> >
> >
> > On Thu, Sep 25, 2008 at 2:40 PM, RKR <Ra...@infosys.com> wrote:
> >
> >>
> >> Hi,
> >> I tried accessing an external web service from servicemix. I used one
> >> cxf-bc-provider and one http-consumer to access the web service. I build
> >> the
> >> project. I am attaching the xbean file of both component. I have
> uploaded
> >> the wsdl of the web service for your reference.
> >>
> >> cxf-bc-provider
> >> <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"
> >>       xsi:schemaLocation="http://servicemix.apache.org/cxfbc/1.0
> >> http://servicemix.apache.org/schema/servicemix-cxfbc-3.2.2.xsd
> >>       http://www.springframework.org/schema/beans
> >> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
> >>
> >>  <cxfbc:provider wsdl="classpath:Hello.wsdl"
> >>                        locationURI="http://172.21.86.156:9001/hello"
> >>                        service="hello:HelloTestService"
> >>                        endpoint="HelloTestPort"
> >>                        interfaceName="hello:HelloTest">
> >>
> >>  </cxfbc:provider>
> >>
> >>
> >> </beans>
> >>
> >> http-consumer
> >>
> >> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
> >>       xmlns:replaceMe="http://servicemix.apache.org/replaceMe"
> >>       xmlns="http://www.springframework.org/schema/beans"
> >>       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
> >>       xsi:schemaLocation="http://servicemix.apache.org/http/1.0
> >> http://servicemix.apache.org/schema/servicemix-http-3.2.2.xsd
> >>       http://www.springframework.org/schema/beans
> >> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
> >>
> >>  <http:endpoint service="hello:HelloTestService"
> >>                 endpoint="HelloTestPort"
> >>                 role="consumer"
> >>                 locationURI="http://localhost:8192/example/"  />
> >>
> >>
> >> </beans>
> >>
> >> But while deploying the project. I am getting this error:
> >>
> >> java.lang.RuntimeException: org.xml.sax.SAXParseException: The value of
> >> the
> >> attr
> >> ibute "prefix="xmlns",localpart="hello",rawname="xmlns:hello"" is
> >> invalid.
> >> Prefi
> >> xed namespace bindings may not be empty.
> >>        at
> >> org.apache.servicemix.jbi.deployment.DescriptorFactory.buildDescripto
> >> r(DescriptorFactory.java:141)
> >>        at
> >> org.apache.servicemix.jbi.deployment.DescriptorFactory.buildDescripto
> >> r(DescriptorFactory.java:80)
> >>        at
> >> org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.<init>(Servi
> >> ceUnitLifeCycle.java:67)
> >>        at
> >> org.apache.servicemix.jbi.framework.Registry.registerServiceUnit(Regi
> >> stry.java:746)
> >>        at
> >> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAs
> >> sembly(DeploymentService.java:518)
> >>        at
> >> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServi
> >> ceAssembly(AutoDeploymentService.java:353)
> >>        at
> >> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchi
> >> ve(AutoDeploymentService.java:256)
> >>        at
> >> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateExter
> >> http://www.nabble.com/file/p19669734/Hello.wsdl Hello.wsdl
> >>
> >>
> >> Please reply soon. It is very urgent.
> >> Thanks
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Error-in-accessing-external-web-service-through-service-mix-tp19669734p19669734.html
> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> http://www.nabble.com/file/p19682482/Hello.wsdl Hello.wsdl
> --
> View this message in context:
> http://www.nabble.com/Error-in-accessing-external-web-service-through-service-mix-tp19669734p19682482.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>

Re: Error in accessing external web service through service mix

Posted by RKR <Ra...@infosys.com>.
Hi,
I added the entry. Now that error is not coming for me but i am getting this
error.

ernel.ServiceRegistrationException:
org.springframework.beans.factory.BeanCreati
onException: Error creating bean with name
'org.apache.servicemix.cxfbc.CxfBcPro
vider' defined in file
[C:\iona\fuse-esb-3.3.1.3\data\smx\service-assemblies\tut
orial-sa\version_2\sus\servicemix-cxf-bc\cxf-bc-su\xbean.xml]:
Initialization of
 bean failed; nested exception is
org.springframework.beans.InvalidPropertyExcep
tion: Invalid property 'wsdl' of bean class
[org.apache.servicemix.cxfbc.CxfBcPr
ovider]: No property 'wsdl' found

I have attached the wsdl for ur reference.
Please look into it and help me in resolving the issue.


Edell Nolan wrote:
> 
> Hi,
> 
> you need to define the namespace for the prefix in your xbean.xml files.
> 
> eg. xmlns:hello="http://swebservice.samples.servicemix.apache.org/"
> 
> 
> Edell.
> 
> 
> 
> On Thu, Sep 25, 2008 at 2:40 PM, RKR <Ra...@infosys.com> wrote:
> 
>>
>> Hi,
>> I tried accessing an external web service from servicemix. I used one
>> cxf-bc-provider and one http-consumer to access the web service. I build
>> the
>> project. I am attaching the xbean file of both component. I have uploaded
>> the wsdl of the web service for your reference.
>>
>> cxf-bc-provider
>> <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"
>>       xsi:schemaLocation="http://servicemix.apache.org/cxfbc/1.0
>> http://servicemix.apache.org/schema/servicemix-cxfbc-3.2.2.xsd
>>       http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>>
>>  <cxfbc:provider wsdl="classpath:Hello.wsdl"
>>                        locationURI="http://172.21.86.156:9001/hello"
>>                        service="hello:HelloTestService"
>>                        endpoint="HelloTestPort"
>>                        interfaceName="hello:HelloTest">
>>
>>  </cxfbc:provider>
>>
>>
>> </beans>
>>
>> http-consumer
>>
>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>       xmlns:replaceMe="http://servicemix.apache.org/replaceMe"
>>       xmlns="http://www.springframework.org/schema/beans"
>>       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>>       xsi:schemaLocation="http://servicemix.apache.org/http/1.0
>> http://servicemix.apache.org/schema/servicemix-http-3.2.2.xsd
>>       http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>>
>>  <http:endpoint service="hello:HelloTestService"
>>                 endpoint="HelloTestPort"
>>                 role="consumer"
>>                 locationURI="http://localhost:8192/example/"  />
>>
>>
>> </beans>
>>
>> But while deploying the project. I am getting this error:
>>
>> java.lang.RuntimeException: org.xml.sax.SAXParseException: The value of
>> the
>> attr
>> ibute "prefix="xmlns",localpart="hello",rawname="xmlns:hello"" is
>> invalid.
>> Prefi
>> xed namespace bindings may not be empty.
>>        at
>> org.apache.servicemix.jbi.deployment.DescriptorFactory.buildDescripto
>> r(DescriptorFactory.java:141)
>>        at
>> org.apache.servicemix.jbi.deployment.DescriptorFactory.buildDescripto
>> r(DescriptorFactory.java:80)
>>        at
>> org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.<init>(Servi
>> ceUnitLifeCycle.java:67)
>>        at
>> org.apache.servicemix.jbi.framework.Registry.registerServiceUnit(Regi
>> stry.java:746)
>>        at
>> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAs
>> sembly(DeploymentService.java:518)
>>        at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServi
>> ceAssembly(AutoDeploymentService.java:353)
>>        at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchi
>> ve(AutoDeploymentService.java:256)
>>        at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateExter
>> http://www.nabble.com/file/p19669734/Hello.wsdl Hello.wsdl
>>
>>
>> Please reply soon. It is very urgent.
>> Thanks
>> --
>> View this message in context:
>> http://www.nabble.com/Error-in-accessing-external-web-service-through-service-mix-tp19669734p19669734.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
http://www.nabble.com/file/p19682482/Hello.wsdl Hello.wsdl 
-- 
View this message in context: http://www.nabble.com/Error-in-accessing-external-web-service-through-service-mix-tp19669734p19682482.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Error in accessing external web service through service mix

Posted by Edell Nolan <ed...@gmail.com>.
Hi,

you need to define the namespace for the prefix in your xbean.xml files.

eg. xmlns:hello="http://swebservice.samples.servicemix.apache.org/"


Edell.



On Thu, Sep 25, 2008 at 2:40 PM, RKR <Ra...@infosys.com> wrote:

>
> Hi,
> I tried accessing an external web service from servicemix. I used one
> cxf-bc-provider and one http-consumer to access the web service. I build
> the
> project. I am attaching the xbean file of both component. I have uploaded
> the wsdl of the web service for your reference.
>
> cxf-bc-provider
> <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"
>       xsi:schemaLocation="http://servicemix.apache.org/cxfbc/1.0
> http://servicemix.apache.org/schema/servicemix-cxfbc-3.2.2.xsd
>       http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>
>  <cxfbc:provider wsdl="classpath:Hello.wsdl"
>                        locationURI="http://172.21.86.156:9001/hello"
>                        service="hello:HelloTestService"
>                        endpoint="HelloTestPort"
>                        interfaceName="hello:HelloTest">
>
>  </cxfbc:provider>
>
>
> </beans>
>
> http-consumer
>
> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>       xmlns:replaceMe="http://servicemix.apache.org/replaceMe"
>       xmlns="http://www.springframework.org/schema/beans"
>       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>       xsi:schemaLocation="http://servicemix.apache.org/http/1.0
> http://servicemix.apache.org/schema/servicemix-http-3.2.2.xsd
>       http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>
>  <http:endpoint service="hello:HelloTestService"
>                 endpoint="HelloTestPort"
>                 role="consumer"
>                 locationURI="http://localhost:8192/example/"  />
>
>
> </beans>
>
> But while deploying the project. I am getting this error:
>
> java.lang.RuntimeException: org.xml.sax.SAXParseException: The value of the
> attr
> ibute "prefix="xmlns",localpart="hello",rawname="xmlns:hello"" is invalid.
> Prefi
> xed namespace bindings may not be empty.
>        at
> org.apache.servicemix.jbi.deployment.DescriptorFactory.buildDescripto
> r(DescriptorFactory.java:141)
>        at
> org.apache.servicemix.jbi.deployment.DescriptorFactory.buildDescripto
> r(DescriptorFactory.java:80)
>        at
> org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.<init>(Servi
> ceUnitLifeCycle.java:67)
>        at
> org.apache.servicemix.jbi.framework.Registry.registerServiceUnit(Regi
> stry.java:746)
>        at
> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAs
> sembly(DeploymentService.java:518)
>        at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServi
> ceAssembly(AutoDeploymentService.java:353)
>        at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchi
> ve(AutoDeploymentService.java:256)
>        at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateExter
> http://www.nabble.com/file/p19669734/Hello.wsdl Hello.wsdl
>
>
> Please reply soon. It is very urgent.
> Thanks
> --
> View this message in context:
> http://www.nabble.com/Error-in-accessing-external-web-service-through-service-mix-tp19669734p19669734.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>