You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by johanp <ca...@live.se> on 2008/07/28 14:10:59 UTC

Servicemix CXF BC to SE

Hi,

Trying to setup a CXF BC consumer doing proxy call to CXF SE pojo.
The CXF BC does not find its WSDL (I dont supply any), would like to
build a service from bottom-up (no contract first) with a pojo deployed
CXF-SE.
Can a CXF-BC consumer find WSDL from a CXF-SE pojo like the sample below,
or do I have to create a WSDL document for the CXF-SE-pojo and place it in
the CXF-BC ?

(When running this sample with a raw HTTP soap proxied to a JSR181
it works fine with WSDL creation.)

tia/Johan

============= CXF start=====================
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
       xmlns:kg="http://kg/1.0">
  <cxfbc:consumer service="kg:KS"
                  endpoint="KS"
                  targetEndpoint="KS"
                  targetService="ks:KS"
                  targetInterface="ks:KS"
                  locationURI="http://0.0.0.0:8192/KS"/>
</beans>

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
       xmlns:kg="http://kg/1.0">
    <cxfse:endpoint service="kg:KS" endpoint="KS">
        <cxfse:pojo>
          <bean class="kg.KS" />
        </cxfse:pojo>
    </cxfse:endpoint>
</beans>

@WebService
public class KS {
	public String pling(){
        return "";
    }
}
============= CXF stop=====================


Here no WSDL needed, HTTP consumer finds WSDL from JSR181 pojo:
============== HTTP/JSR181 start =================
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns:http="http://servicemix.apache.org/http/1.0"
       xmlns:kg="http://kg/1.0">
<http:endpoint service="kg:KS"
                 endpoint="KS"
                 targetService="kg:KS"
                 role="consumer" 
                 locationURI="http://0.0.0.0:8192/KS/"
                 defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
                 soap="true" />                  
</beans>
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
	xmlns:kg="http://kg/1.0">
    <jsr181:endpoint 
    	service="kg:KS" 
    	endpoint="KS"
    	pojoClass="kg.KS">
    </jsr181:endpoint>
</beans>

@WebService
public class KS {
  public String pling(){
  return "";
}
============== HTTP/JSR181 stop =================

-- 
View this message in context: http://www.nabble.com/Servicemix-CXF-BC-to-SE-tp18688963p18688963.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Servicemix CXF BC to SE

Posted by subh <su...@aol.com>.
Hi, 

I am getting similar exception while trying to deploy my SA. So, shall I
split my BC and SE into separate SA's, is there any other way out? 

Iam using apache web deployer with JBoss to deploy my cxf. 

rgds 
subh 



johanp wrote:
> 
> 
> Yes read about splitting SA, have not tried that yet (will probably bundle
> WSDL in BC instead not too keen about splitting up into two SA's)
> 
> 
> Freeman Fang wrote:
>> 
>> Hi,
>> 
>> Did you put cxf se endpoint in one SA and put cxf bc endpoint in another 
>> SA and deploy and start the SA contain cxf se endpoint first as we 
>> discussed in this thread?
>> 
>> Freeman
>> 
>> johanp wrote:
>>> Hi,
>>> Built smx from snapshot and tested CXFBC with no WSDL deployed in SU, it
>>> does not work, getting:
>>> <loc-message>can't get wsdl</loc-message>
>>> <stack-trace><![CDATA[javax.jbi.management.DeploymentException: can't
>>> get
>>> wsdl
>>>         at
>>> org.apache.servicemix.cxfbc.CxfBcConsumer.retrieveWSDL(CxfBcConsumer.
>>> java:394)
>>>         at
>>> org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java
>>>
>>>
>>>
>>> Freeman Fang wrote:
>>>   
>>>> For servicemix 3.2.2 snapshot, we add a feature to support cxf bc 
>>>> consumer to retrieve wsdl from internal endpoint if there is one. [1] 
>>>> track this issue
>>>> So yes, cxf bc consumer can find wsdl from a cxf-se pojo since cxf se 
>>>> will build servicemodel from the pojo you specify and then build wsdl 
>>>> model from the servicemodel.
>>>> You need use the 3.2.2 snapshot to use this feature
>>>> [1]https://issues.apache.org/activemq/browse/SM-1400
>>>>
>>>> Regards
>>>> Freeman
>>>> johanp wrote:
>>>>     
>>>>> Hi,
>>>>>
>>>>> Trying to setup a CXF BC consumer doing proxy call to CXF SE pojo.
>>>>> The CXF BC does not find its WSDL (I dont supply any), would like to
>>>>> build a service from bottom-up (no contract first) with a pojo
>>>>> deployed
>>>>> CXF-SE.
>>>>> Can a CXF-BC consumer find WSDL from a CXF-SE pojo like the sample
>>>>> below,
>>>>> or do I have to create a WSDL document for the CXF-SE-pojo and place
>>>>> it
>>>>> in
>>>>> the CXF-BC ?
>>>>>
>>>>> (When running this sample with a raw HTTP soap proxied to a JSR181
>>>>> it works fine with WSDL creation.)
>>>>>
>>>>> tia/Johan
>>>>>
>>>>> ============= CXF start=====================
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>>>        xmlns:kg="http://kg/1.0">
>>>>>   <cxfbc:consumer service="kg:KS"
>>>>>                   endpoint="KS"
>>>>>                   targetEndpoint="KS"
>>>>>                   targetService="ks:KS"
>>>>>                   targetInterface="ks:KS"
>>>>>                   locationURI="http://0.0.0.0:8192/KS"/>
>>>>> </beans>
>>>>>
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
>>>>>        xmlns:kg="http://kg/1.0">
>>>>>     <cxfse:endpoint service="kg:KS" endpoint="KS">
>>>>>         <cxfse:pojo>
>>>>>           <bean class="kg.KS" />
>>>>>         </cxfse:pojo>
>>>>>     </cxfse:endpoint>
>>>>> </beans>
>>>>>
>>>>> @WebService
>>>>> public class KS {
>>>>> 	public String pling(){
>>>>>         return "";
>>>>>     }
>>>>> }
>>>>> ============= CXF stop=====================
>>>>>
>>>>>
>>>>> Here no WSDL needed, HTTP consumer finds WSDL from JSR181 pojo:
>>>>> ============== HTTP/JSR181 start =================
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>
>>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>>>>        xmlns:kg="http://kg/1.0">
>>>>> <http:endpoint service="kg:KS"
>>>>>                  endpoint="KS"
>>>>>                  targetService="kg:KS"
>>>>>                  role="consumer" 
>>>>>                  locationURI="http://0.0.0.0:8192/KS/"
>>>>>                  defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>>>>>                  soap="true" />                  
>>>>> </beans>
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>
>>>>> <beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
>>>>> 	xmlns:kg="http://kg/1.0">
>>>>>     <jsr181:endpoint 
>>>>>     	service="kg:KS" 
>>>>>     	endpoint="KS"
>>>>>     	pojoClass="kg.KS">
>>>>>     </jsr181:endpoint>
>>>>> </beans>
>>>>>
>>>>> @WebService
>>>>> public class KS {
>>>>>   public String pling(){
>>>>>   return "";
>>>>> }
>>>>> ============== HTTP/JSR181 stop =================
>>>>>
>>>>>   
>>>>>       
>>>>
>>>>     
>>>
>>>   
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Servicemix-CXF-BC-to-SE-tp18688963p19090725.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Servicemix CXF BC to SE

Posted by johanp <ca...@live.se>.

Yes read about splitting SA, have not tried that yet (will probably bundle
WSDL in BC instead not too keen about splitting up into two SA's)


Freeman Fang wrote:
> 
> Hi,
> 
> Did you put cxf se endpoint in one SA and put cxf bc endpoint in another 
> SA and deploy and start the SA contain cxf se endpoint first as we 
> discussed in this thread?
> 
> Freeman
> 
> johanp wrote:
>> Hi,
>> Built smx from snapshot and tested CXFBC with no WSDL deployed in SU, it
>> does not work, getting:
>> <loc-message>can't get wsdl</loc-message>
>> <stack-trace><![CDATA[javax.jbi.management.DeploymentException: can't get
>> wsdl
>>         at
>> org.apache.servicemix.cxfbc.CxfBcConsumer.retrieveWSDL(CxfBcConsumer.
>> java:394)
>>         at
>> org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java
>>
>>
>>
>> Freeman Fang wrote:
>>   
>>> For servicemix 3.2.2 snapshot, we add a feature to support cxf bc 
>>> consumer to retrieve wsdl from internal endpoint if there is one. [1] 
>>> track this issue
>>> So yes, cxf bc consumer can find wsdl from a cxf-se pojo since cxf se 
>>> will build servicemodel from the pojo you specify and then build wsdl 
>>> model from the servicemodel.
>>> You need use the 3.2.2 snapshot to use this feature
>>> [1]https://issues.apache.org/activemq/browse/SM-1400
>>>
>>> Regards
>>> Freeman
>>> johanp wrote:
>>>     
>>>> Hi,
>>>>
>>>> Trying to setup a CXF BC consumer doing proxy call to CXF SE pojo.
>>>> The CXF BC does not find its WSDL (I dont supply any), would like to
>>>> build a service from bottom-up (no contract first) with a pojo deployed
>>>> CXF-SE.
>>>> Can a CXF-BC consumer find WSDL from a CXF-SE pojo like the sample
>>>> below,
>>>> or do I have to create a WSDL document for the CXF-SE-pojo and place it
>>>> in
>>>> the CXF-BC ?
>>>>
>>>> (When running this sample with a raw HTTP soap proxied to a JSR181
>>>> it works fine with WSDL creation.)
>>>>
>>>> tia/Johan
>>>>
>>>> ============= CXF start=====================
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>>        xmlns:kg="http://kg/1.0">
>>>>   <cxfbc:consumer service="kg:KS"
>>>>                   endpoint="KS"
>>>>                   targetEndpoint="KS"
>>>>                   targetService="ks:KS"
>>>>                   targetInterface="ks:KS"
>>>>                   locationURI="http://0.0.0.0:8192/KS"/>
>>>> </beans>
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
>>>>        xmlns:kg="http://kg/1.0">
>>>>     <cxfse:endpoint service="kg:KS" endpoint="KS">
>>>>         <cxfse:pojo>
>>>>           <bean class="kg.KS" />
>>>>         </cxfse:pojo>
>>>>     </cxfse:endpoint>
>>>> </beans>
>>>>
>>>> @WebService
>>>> public class KS {
>>>> 	public String pling(){
>>>>         return "";
>>>>     }
>>>> }
>>>> ============= CXF stop=====================
>>>>
>>>>
>>>> Here no WSDL needed, HTTP consumer finds WSDL from JSR181 pojo:
>>>> ============== HTTP/JSR181 start =================
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>
>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>>>        xmlns:kg="http://kg/1.0">
>>>> <http:endpoint service="kg:KS"
>>>>                  endpoint="KS"
>>>>                  targetService="kg:KS"
>>>>                  role="consumer" 
>>>>                  locationURI="http://0.0.0.0:8192/KS/"
>>>>                  defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>>>>                  soap="true" />                  
>>>> </beans>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>
>>>> <beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
>>>> 	xmlns:kg="http://kg/1.0">
>>>>     <jsr181:endpoint 
>>>>     	service="kg:KS" 
>>>>     	endpoint="KS"
>>>>     	pojoClass="kg.KS">
>>>>     </jsr181:endpoint>
>>>> </beans>
>>>>
>>>> @WebService
>>>> public class KS {
>>>>   public String pling(){
>>>>   return "";
>>>> }
>>>> ============== HTTP/JSR181 stop =================
>>>>
>>>>   
>>>>       
>>>
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Servicemix-CXF-BC-to-SE-tp18688963p18729704.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Servicemix CXF BC to SE

Posted by Freeman Fang <fr...@gmail.com>.
Hi Gert,

Not sure about this feature so far.
But even we can do it in a specific order, we still can' t put cxf se su 
and cxf bc su into same sa if cxf bc su depend on the wsdl publish by 
cxf se su. Because if two SUs are in same SA, will get initialized one 
by one and then started one by one, but  the scenario require cxf se su 
get started before cxf bc su initialized, so we have to put it into two 
different SAs.

Regards
Freeman

Gert Vanthienen wrote:
> Freeman,
>
> Is there any way we can modify the Maven plugin so it generates the SU
> entries in the jbi.xml in a specific order, let's say the order in the
> pom.xml?
>
> Wdyt,
>
> Gert
>
>
> Freeman Fang wrote:
>   
>> Hi,
>>
>> Did you put cxf se endpoint in one SA and put cxf bc endpoint in another 
>> SA and deploy and start the SA contain cxf se endpoint first as we 
>> discussed in this thread?
>>
>> Freeman
>>
>> johanp wrote:
>>     
>>> Hi,
>>> Built smx from snapshot and tested CXFBC with no WSDL deployed in SU, it
>>> does not work, getting:
>>> <loc-message>can't get wsdl</loc-message>
>>> <stack-trace><![CDATA[javax.jbi.management.DeploymentException: can't get
>>> wsdl
>>>         at
>>> org.apache.servicemix.cxfbc.CxfBcConsumer.retrieveWSDL(CxfBcConsumer.
>>> java:394)
>>>         at
>>> org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java
>>>
>>>
>>>
>>> Freeman Fang wrote:
>>>   
>>>       
>>>> For servicemix 3.2.2 snapshot, we add a feature to support cxf bc 
>>>> consumer to retrieve wsdl from internal endpoint if there is one. [1] 
>>>> track this issue
>>>> So yes, cxf bc consumer can find wsdl from a cxf-se pojo since cxf se 
>>>> will build servicemodel from the pojo you specify and then build wsdl 
>>>> model from the servicemodel.
>>>> You need use the 3.2.2 snapshot to use this feature
>>>> [1]https://issues.apache.org/activemq/browse/SM-1400
>>>>
>>>> Regards
>>>> Freeman
>>>> johanp wrote:
>>>>     
>>>>         
>>>>> Hi,
>>>>>
>>>>> Trying to setup a CXF BC consumer doing proxy call to CXF SE pojo.
>>>>> The CXF BC does not find its WSDL (I dont supply any), would like to
>>>>> build a service from bottom-up (no contract first) with a pojo deployed
>>>>> CXF-SE.
>>>>> Can a CXF-BC consumer find WSDL from a CXF-SE pojo like the sample
>>>>> below,
>>>>> or do I have to create a WSDL document for the CXF-SE-pojo and place it
>>>>> in
>>>>> the CXF-BC ?
>>>>>
>>>>> (When running this sample with a raw HTTP soap proxied to a JSR181
>>>>> it works fine with WSDL creation.)
>>>>>
>>>>> tia/Johan
>>>>>
>>>>> ============= CXF start=====================
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>>>        xmlns:kg="http://kg/1.0">
>>>>>   <cxfbc:consumer service="kg:KS"
>>>>>                   endpoint="KS"
>>>>>                   targetEndpoint="KS"
>>>>>                   targetService="ks:KS"
>>>>>                   targetInterface="ks:KS"
>>>>>                   locationURI="http://0.0.0.0:8192/KS"/>
>>>>> </beans>
>>>>>
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
>>>>>        xmlns:kg="http://kg/1.0">
>>>>>     <cxfse:endpoint service="kg:KS" endpoint="KS">
>>>>>         <cxfse:pojo>
>>>>>           <bean class="kg.KS" />
>>>>>         </cxfse:pojo>
>>>>>     </cxfse:endpoint>
>>>>> </beans>
>>>>>
>>>>> @WebService
>>>>> public class KS {
>>>>> 	public String pling(){
>>>>>         return "";
>>>>>     }
>>>>> }
>>>>> ============= CXF stop=====================
>>>>>
>>>>>
>>>>> Here no WSDL needed, HTTP consumer finds WSDL from JSR181 pojo:
>>>>> ============== HTTP/JSR181 start =================
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>
>>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>>>>        xmlns:kg="http://kg/1.0">
>>>>> <http:endpoint service="kg:KS"
>>>>>                  endpoint="KS"
>>>>>                  targetService="kg:KS"
>>>>>                  role="consumer" 
>>>>>                  locationURI="http://0.0.0.0:8192/KS/"
>>>>>                  defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>>>>>                  soap="true" />                  
>>>>> </beans>
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>
>>>>> <beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
>>>>> 	xmlns:kg="http://kg/1.0">
>>>>>     <jsr181:endpoint 
>>>>>     	service="kg:KS" 
>>>>>     	endpoint="KS"
>>>>>     	pojoClass="kg.KS">
>>>>>     </jsr181:endpoint>
>>>>> </beans>
>>>>>
>>>>> @WebService
>>>>> public class KS {
>>>>>   public String pling(){
>>>>>   return "";
>>>>> }
>>>>> ============== HTTP/JSR181 stop =================
>>>>>
>>>>>   
>>>>>       
>>>>>           
>>>>     
>>>>         
>>>   
>>>       
>>
>>     
>
>
> -----
> ---
> Gert Vanthienen
> http://www.anova.be
>   


Re: Servicemix CXF BC to SE

Posted by Gert Vanthienen <ge...@skynet.be>.
Freeman,

Is there any way we can modify the Maven plugin so it generates the SU
entries in the jbi.xml in a specific order, let's say the order in the
pom.xml?

Wdyt,

Gert


Freeman Fang wrote:
> 
> Hi,
> 
> Did you put cxf se endpoint in one SA and put cxf bc endpoint in another 
> SA and deploy and start the SA contain cxf se endpoint first as we 
> discussed in this thread?
> 
> Freeman
> 
> johanp wrote:
>> Hi,
>> Built smx from snapshot and tested CXFBC with no WSDL deployed in SU, it
>> does not work, getting:
>> <loc-message>can't get wsdl</loc-message>
>> <stack-trace><![CDATA[javax.jbi.management.DeploymentException: can't get
>> wsdl
>>         at
>> org.apache.servicemix.cxfbc.CxfBcConsumer.retrieveWSDL(CxfBcConsumer.
>> java:394)
>>         at
>> org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java
>>
>>
>>
>> Freeman Fang wrote:
>>   
>>> For servicemix 3.2.2 snapshot, we add a feature to support cxf bc 
>>> consumer to retrieve wsdl from internal endpoint if there is one. [1] 
>>> track this issue
>>> So yes, cxf bc consumer can find wsdl from a cxf-se pojo since cxf se 
>>> will build servicemodel from the pojo you specify and then build wsdl 
>>> model from the servicemodel.
>>> You need use the 3.2.2 snapshot to use this feature
>>> [1]https://issues.apache.org/activemq/browse/SM-1400
>>>
>>> Regards
>>> Freeman
>>> johanp wrote:
>>>     
>>>> Hi,
>>>>
>>>> Trying to setup a CXF BC consumer doing proxy call to CXF SE pojo.
>>>> The CXF BC does not find its WSDL (I dont supply any), would like to
>>>> build a service from bottom-up (no contract first) with a pojo deployed
>>>> CXF-SE.
>>>> Can a CXF-BC consumer find WSDL from a CXF-SE pojo like the sample
>>>> below,
>>>> or do I have to create a WSDL document for the CXF-SE-pojo and place it
>>>> in
>>>> the CXF-BC ?
>>>>
>>>> (When running this sample with a raw HTTP soap proxied to a JSR181
>>>> it works fine with WSDL creation.)
>>>>
>>>> tia/Johan
>>>>
>>>> ============= CXF start=====================
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>>        xmlns:kg="http://kg/1.0">
>>>>   <cxfbc:consumer service="kg:KS"
>>>>                   endpoint="KS"
>>>>                   targetEndpoint="KS"
>>>>                   targetService="ks:KS"
>>>>                   targetInterface="ks:KS"
>>>>                   locationURI="http://0.0.0.0:8192/KS"/>
>>>> </beans>
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
>>>>        xmlns:kg="http://kg/1.0">
>>>>     <cxfse:endpoint service="kg:KS" endpoint="KS">
>>>>         <cxfse:pojo>
>>>>           <bean class="kg.KS" />
>>>>         </cxfse:pojo>
>>>>     </cxfse:endpoint>
>>>> </beans>
>>>>
>>>> @WebService
>>>> public class KS {
>>>> 	public String pling(){
>>>>         return "";
>>>>     }
>>>> }
>>>> ============= CXF stop=====================
>>>>
>>>>
>>>> Here no WSDL needed, HTTP consumer finds WSDL from JSR181 pojo:
>>>> ============== HTTP/JSR181 start =================
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>
>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>>>        xmlns:kg="http://kg/1.0">
>>>> <http:endpoint service="kg:KS"
>>>>                  endpoint="KS"
>>>>                  targetService="kg:KS"
>>>>                  role="consumer" 
>>>>                  locationURI="http://0.0.0.0:8192/KS/"
>>>>                  defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>>>>                  soap="true" />                  
>>>> </beans>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>
>>>> <beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
>>>> 	xmlns:kg="http://kg/1.0">
>>>>     <jsr181:endpoint 
>>>>     	service="kg:KS" 
>>>>     	endpoint="KS"
>>>>     	pojoClass="kg.KS">
>>>>     </jsr181:endpoint>
>>>> </beans>
>>>>
>>>> @WebService
>>>> public class KS {
>>>>   public String pling(){
>>>>   return "";
>>>> }
>>>> ============== HTTP/JSR181 stop =================
>>>>
>>>>   
>>>>       
>>>
>>>     
>>
>>   
> 
> 
> 


-----
---
Gert Vanthienen
http://www.anova.be
-- 
View this message in context: http://www.nabble.com/Servicemix-CXF-BC-to-SE-tp18688963p19096592.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Servicemix CXF BC to SE

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Did you put cxf se endpoint in one SA and put cxf bc endpoint in another 
SA and deploy and start the SA contain cxf se endpoint first as we 
discussed in this thread?

Freeman

johanp wrote:
> Hi,
> Built smx from snapshot and tested CXFBC with no WSDL deployed in SU, it
> does not work, getting:
> <loc-message>can't get wsdl</loc-message>
> <stack-trace><![CDATA[javax.jbi.management.DeploymentException: can't get
> wsdl
>         at
> org.apache.servicemix.cxfbc.CxfBcConsumer.retrieveWSDL(CxfBcConsumer.
> java:394)
>         at
> org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java
>
>
>
> Freeman Fang wrote:
>   
>> For servicemix 3.2.2 snapshot, we add a feature to support cxf bc 
>> consumer to retrieve wsdl from internal endpoint if there is one. [1] 
>> track this issue
>> So yes, cxf bc consumer can find wsdl from a cxf-se pojo since cxf se 
>> will build servicemodel from the pojo you specify and then build wsdl 
>> model from the servicemodel.
>> You need use the 3.2.2 snapshot to use this feature
>> [1]https://issues.apache.org/activemq/browse/SM-1400
>>
>> Regards
>> Freeman
>> johanp wrote:
>>     
>>> Hi,
>>>
>>> Trying to setup a CXF BC consumer doing proxy call to CXF SE pojo.
>>> The CXF BC does not find its WSDL (I dont supply any), would like to
>>> build a service from bottom-up (no contract first) with a pojo deployed
>>> CXF-SE.
>>> Can a CXF-BC consumer find WSDL from a CXF-SE pojo like the sample below,
>>> or do I have to create a WSDL document for the CXF-SE-pojo and place it
>>> in
>>> the CXF-BC ?
>>>
>>> (When running this sample with a raw HTTP soap proxied to a JSR181
>>> it works fine with WSDL creation.)
>>>
>>> tia/Johan
>>>
>>> ============= CXF start=====================
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>        xmlns:kg="http://kg/1.0">
>>>   <cxfbc:consumer service="kg:KS"
>>>                   endpoint="KS"
>>>                   targetEndpoint="KS"
>>>                   targetService="ks:KS"
>>>                   targetInterface="ks:KS"
>>>                   locationURI="http://0.0.0.0:8192/KS"/>
>>> </beans>
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
>>>        xmlns:kg="http://kg/1.0">
>>>     <cxfse:endpoint service="kg:KS" endpoint="KS">
>>>         <cxfse:pojo>
>>>           <bean class="kg.KS" />
>>>         </cxfse:pojo>
>>>     </cxfse:endpoint>
>>> </beans>
>>>
>>> @WebService
>>> public class KS {
>>> 	public String pling(){
>>>         return "";
>>>     }
>>> }
>>> ============= CXF stop=====================
>>>
>>>
>>> Here no WSDL needed, HTTP consumer finds WSDL from JSR181 pojo:
>>> ============== HTTP/JSR181 start =================
>>> <?xml version="1.0" encoding="UTF-8"?>
>>>
>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>>        xmlns:kg="http://kg/1.0">
>>> <http:endpoint service="kg:KS"
>>>                  endpoint="KS"
>>>                  targetService="kg:KS"
>>>                  role="consumer" 
>>>                  locationURI="http://0.0.0.0:8192/KS/"
>>>                  defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>>>                  soap="true" />                  
>>> </beans>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>>
>>> <beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
>>> 	xmlns:kg="http://kg/1.0">
>>>     <jsr181:endpoint 
>>>     	service="kg:KS" 
>>>     	endpoint="KS"
>>>     	pojoClass="kg.KS">
>>>     </jsr181:endpoint>
>>> </beans>
>>>
>>> @WebService
>>> public class KS {
>>>   public String pling(){
>>>   return "";
>>> }
>>> ============== HTTP/JSR181 stop =================
>>>
>>>   
>>>       
>>
>>     
>
>   


Re: Servicemix CXF BC to SE

Posted by johanp <ca...@live.se>.
Hi,
Built smx from snapshot and tested CXFBC with no WSDL deployed in SU, it
does not work, getting:
<loc-message>can't get wsdl</loc-message>
<stack-trace><![CDATA[javax.jbi.management.DeploymentException: can't get
wsdl
        at
org.apache.servicemix.cxfbc.CxfBcConsumer.retrieveWSDL(CxfBcConsumer.
java:394)
        at
org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java



Freeman Fang wrote:
> 
> For servicemix 3.2.2 snapshot, we add a feature to support cxf bc 
> consumer to retrieve wsdl from internal endpoint if there is one. [1] 
> track this issue
> So yes, cxf bc consumer can find wsdl from a cxf-se pojo since cxf se 
> will build servicemodel from the pojo you specify and then build wsdl 
> model from the servicemodel.
> You need use the 3.2.2 snapshot to use this feature
> [1]https://issues.apache.org/activemq/browse/SM-1400
> 
> Regards
> Freeman
> johanp wrote:
>> Hi,
>>
>> Trying to setup a CXF BC consumer doing proxy call to CXF SE pojo.
>> The CXF BC does not find its WSDL (I dont supply any), would like to
>> build a service from bottom-up (no contract first) with a pojo deployed
>> CXF-SE.
>> Can a CXF-BC consumer find WSDL from a CXF-SE pojo like the sample below,
>> or do I have to create a WSDL document for the CXF-SE-pojo and place it
>> in
>> the CXF-BC ?
>>
>> (When running this sample with a raw HTTP soap proxied to a JSR181
>> it works fine with WSDL creation.)
>>
>> tia/Johan
>>
>> ============= CXF start=====================
>> <?xml version="1.0" encoding="UTF-8"?>
>> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>        xmlns:kg="http://kg/1.0">
>>   <cxfbc:consumer service="kg:KS"
>>                   endpoint="KS"
>>                   targetEndpoint="KS"
>>                   targetService="ks:KS"
>>                   targetInterface="ks:KS"
>>                   locationURI="http://0.0.0.0:8192/KS"/>
>> </beans>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
>>        xmlns:kg="http://kg/1.0">
>>     <cxfse:endpoint service="kg:KS" endpoint="KS">
>>         <cxfse:pojo>
>>           <bean class="kg.KS" />
>>         </cxfse:pojo>
>>     </cxfse:endpoint>
>> </beans>
>>
>> @WebService
>> public class KS {
>> 	public String pling(){
>>         return "";
>>     }
>> }
>> ============= CXF stop=====================
>>
>>
>> Here no WSDL needed, HTTP consumer finds WSDL from JSR181 pojo:
>> ============== HTTP/JSR181 start =================
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>        xmlns:kg="http://kg/1.0">
>> <http:endpoint service="kg:KS"
>>                  endpoint="KS"
>>                  targetService="kg:KS"
>>                  role="consumer" 
>>                  locationURI="http://0.0.0.0:8192/KS/"
>>                  defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>>                  soap="true" />                  
>> </beans>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
>> 	xmlns:kg="http://kg/1.0">
>>     <jsr181:endpoint 
>>     	service="kg:KS" 
>>     	endpoint="KS"
>>     	pojoClass="kg.KS">
>>     </jsr181:endpoint>
>> </beans>
>>
>> @WebService
>> public class KS {
>>   public String pling(){
>>   return "";
>> }
>> ============== HTTP/JSR181 stop =================
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Servicemix-CXF-BC-to-SE-tp18688963p18727757.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Servicemix CXF BC to SE

Posted by Freeman Fang <fr...@gmail.com>.
Lukasz L. wrote:
> Gnodet, yeah, that's a normal use case, the idea about the feature that
> Freeman mentioned is that it is easier when you do not need to have another
> WSDL in CXF BC, which actually is the same (at least abstract part) as that
> one in CXF SE, this cause also another issue of having to maintain two
> separete WSDL and remember to apply changes in both places,
>
> Freeman, I think having two assemblies fot that is not convenient, acutally
> I would have to have two Service Assemblies containing only one Service Unit
> each,
> do you think it is a chance for that feature to implemented in some other
> way, so it would not be necessery to split the assembly?
>
>   
It's hard to do it in smx3. If you put two endpoints into one SA, the 
two endpoints will  be initialized one by one, and then started one by 
one. The problem is that when endpoint2 get initialized, it need 
endpoint1 started already, it can't happen if you put them in one SA

Regards
Freeman
> gnodet wrote:
>   
>> Maybe another option would be to deploy the WSDL inside the SU that
>> contains the proxy so that the target endpoint will only be needed
>> when an exchange is actually sent to it?
>>
>> On 7/29/08, Freeman Fang <fr...@gmail.com> wrote:
>>     
>>> Hi,
>>> The endpoint get registered to JBI bus when start the endpoint.
>>> So the error you see is caused by
>>> 1. cxf se endpoint initialized but not yet register to JBI bus
>>> 2. cxf bc consumer endpoint initialized ,  at this point the cxf bc
>>> consumer try to retrieve wsdl (and I don't think postpone retrieve wsdl
>>> to start is a good idea since wsdl is very basic info to init cxf bc
>>> consumer)from internal endpoint, unfortunately, the cxf se endpoin not
>>> registered yet.
>>>
>>> If you want to cxf bc consumer endpoint can retrieve the internal
>>> endpoint wsdl, you must ensure that endpoint already get started.
>>> For your case, you can put cxf se endpoint and cxf bc consumer endpoint
>>> into different SAs, and deploy and start the SA which contain cxf se
>>> endpoint first.
>>>
>>> Regards
>>> Freeman
>>>
>>> Lukasz L. wrote:
>>>       
>>>> this is a nice feature but it doesn't work for me,
>>>> I have CXF BC as proxy of CXF SE service (two separate Service Units),
>>>> SE SU is initialized before BC SU but still it seems that CXF SE
>>>> endpiont
>>>> is
>>>> not found,
>>>> when I debug ServiceMix I see that the invocation:
>>>> ServiceEndpoint serviceEndpoint  =
>>>> getServiceUnit().getComponent().getComponentContext().getEndpoint(getTargetService(),
>>>> getTargetEndpoint());
>>>> retruns null. This is not because of names mismatching but because there
>>>> is
>>>> no such endpoint in the registry yet (I checked that while debugging -
>>>> in
>>>> code and also using JMX Console).
>>>> So in the end I got deployment error
>>>> java.lang.NullPointerException
>>>>   at
>>>> org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java:360)
>>>> ...
>>>> When I deploy only CXF SE SU (the same one) I can see the endpoint
>>>> present
>>>> in the registry (using JMX console).
>>>>
>>>> When the endpoint is registered? During SU initialization or startup? Am
>>>> I
>>>> missing some configuration?
>>>>
>>>>
>>>> Freeman Fang wrote:
>>>>
>>>>         
>>>>> For servicemix 3.2.2 snapshot, we add a feature to support cxf bc
>>>>> consumer to retrieve wsdl from internal endpoint if there is one. [1]
>>>>> track this issue
>>>>> So yes, cxf bc consumer can find wsdl from a cxf-se pojo since cxf se
>>>>> will build servicemodel from the pojo you specify and then build wsdl
>>>>> model from the servicemodel.
>>>>> You need use the 3.2.2 snapshot to use this feature
>>>>> [1]https://issues.apache.org/activemq/browse/SM-1400
>>>>>
>>>>> Regards
>>>>> Freeman
>>>>> johanp wrote:
>>>>>
>>>>>           
>>>>>> Hi,
>>>>>>
>>>>>> Trying to setup a CXF BC consumer doing proxy call to CXF SE pojo.
>>>>>> The CXF BC does not find its WSDL (I dont supply any), would like to
>>>>>> build a service from bottom-up (no contract first) with a pojo
>>>>>> deployed
>>>>>> CXF-SE.
>>>>>> Can a CXF-BC consumer find WSDL from a CXF-SE pojo like the sample
>>>>>> below,
>>>>>> or do I have to create a WSDL document for the CXF-SE-pojo and place
>>>>>> it
>>>>>> in
>>>>>> the CXF-BC ?
>>>>>>
>>>>>> (When running this sample with a raw HTTP soap proxied to a JSR181
>>>>>> it works fine with WSDL creation.)
>>>>>>
>>>>>> tia/Johan
>>>>>>
>>>>>> ============= CXF start=====================
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>>>>        xmlns:kg="http://kg/1.0">
>>>>>>   <cxfbc:consumer service="kg:KS"
>>>>>>                   endpoint="KS"
>>>>>>                   targetEndpoint="KS"
>>>>>>                   targetService="ks:KS"
>>>>>>                   targetInterface="ks:KS"
>>>>>>                   locationURI="http://0.0.0.0:8192/KS"/>
>>>>>> </beans>
>>>>>>
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
>>>>>>        xmlns:kg="http://kg/1.0">
>>>>>>     <cxfse:endpoint service="kg:KS" endpoint="KS">
>>>>>>         <cxfse:pojo>
>>>>>>           <bean class="kg.KS" />
>>>>>>         </cxfse:pojo>
>>>>>>     </cxfse:endpoint>
>>>>>> </beans>
>>>>>>
>>>>>> @WebService
>>>>>> public class KS {
>>>>>> 	public String pling(){
>>>>>>         return "";
>>>>>>     }
>>>>>> }
>>>>>> ============= CXF stop=====================
>>>>>>
>>>>>>
>>>>>> Here no WSDL needed, HTTP consumer finds WSDL from JSR181 pojo:
>>>>>> ============== HTTP/JSR181 start =================
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>
>>>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>>>>>        xmlns:kg="http://kg/1.0">
>>>>>> <http:endpoint service="kg:KS"
>>>>>>                  endpoint="KS"
>>>>>>                  targetService="kg:KS"
>>>>>>                  role="consumer"
>>>>>>                  locationURI="http://0.0.0.0:8192/KS/"
>>>>>>                  defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>>>>>>                  soap="true" />
>>>>>> </beans>
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>
>>>>>> <beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
>>>>>> 	xmlns:kg="http://kg/1.0">
>>>>>>     <jsr181:endpoint
>>>>>>     	service="kg:KS"
>>>>>>     	endpoint="KS"
>>>>>>     	pojoClass="kg.KS">
>>>>>>     </jsr181:endpoint>
>>>>>> </beans>
>>>>>>
>>>>>> @WebService
>>>>>> public class KS {
>>>>>>   public String pling(){
>>>>>>   return "";
>>>>>> }
>>>>>> ============== HTTP/JSR181 stop =================
>>>>>>
>>>>>>
>>>>>>
>>>>>>             
>>>>>           
>>>>         
>>>       
>> -- 
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> Blog: http://gnodet.blogspot.com/
>>
>>
>>     
>
>   


Re: Servicemix CXF BC to SE

Posted by Guillaume Nodet <gn...@gmail.com>.
FWIW, servicemix 4 should simplify / solve the problem by allowing the
two endpoints to be embedded in a single jar along with the WSDLs and
other resources.

On Tue, Jul 29, 2008 at 4:55 PM, Lukasz L. <Lu...@sabre.com> wrote:
>
> Gnodet, yeah, that's a normal use case, the idea about the feature that
> Freeman mentioned is that it is easier when you do not need to have another
> WSDL in CXF BC, which actually is the same (at least abstract part) as that
> one in CXF SE, this cause also another issue of having to maintain two
> separete WSDL and remember to apply changes in both places,
>
> Freeman, I think having two assemblies fot that is not convenient, acutally
> I would have to have two Service Assemblies containing only one Service Unit
> each,
> do you think it is a chance for that feature to implemented in some other
> way, so it would not be necessery to split the assembly?
>
>
> gnodet wrote:
>>
>> Maybe another option would be to deploy the WSDL inside the SU that
>> contains the proxy so that the target endpoint will only be needed
>> when an exchange is actually sent to it?
>>
>> On 7/29/08, Freeman Fang <fr...@gmail.com> wrote:
>>> Hi,
>>> The endpoint get registered to JBI bus when start the endpoint.
>>> So the error you see is caused by
>>> 1. cxf se endpoint initialized but not yet register to JBI bus
>>> 2. cxf bc consumer endpoint initialized ,  at this point the cxf bc
>>> consumer try to retrieve wsdl (and I don't think postpone retrieve wsdl
>>> to start is a good idea since wsdl is very basic info to init cxf bc
>>> consumer)from internal endpoint, unfortunately, the cxf se endpoin not
>>> registered yet.
>>>
>>> If you want to cxf bc consumer endpoint can retrieve the internal
>>> endpoint wsdl, you must ensure that endpoint already get started.
>>> For your case, you can put cxf se endpoint and cxf bc consumer endpoint
>>> into different SAs, and deploy and start the SA which contain cxf se
>>> endpoint first.
>>>
>>> Regards
>>> Freeman
>>>
>>> Lukasz L. wrote:
>>>> this is a nice feature but it doesn't work for me,
>>>> I have CXF BC as proxy of CXF SE service (two separate Service Units),
>>>> SE SU is initialized before BC SU but still it seems that CXF SE
>>>> endpiont
>>>> is
>>>> not found,
>>>> when I debug ServiceMix I see that the invocation:
>>>> ServiceEndpoint serviceEndpoint  =
>>>> getServiceUnit().getComponent().getComponentContext().getEndpoint(getTargetService(),
>>>> getTargetEndpoint());
>>>> retruns null. This is not because of names mismatching but because there
>>>> is
>>>> no such endpoint in the registry yet (I checked that while debugging -
>>>> in
>>>> code and also using JMX Console).
>>>> So in the end I got deployment error
>>>> java.lang.NullPointerException
>>>>   at
>>>> org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java:360)
>>>> ...
>>>> When I deploy only CXF SE SU (the same one) I can see the endpoint
>>>> present
>>>> in the registry (using JMX console).
>>>>
>>>> When the endpoint is registered? During SU initialization or startup? Am
>>>> I
>>>> missing some configuration?
>>>>
>>>>
>>>> Freeman Fang wrote:
>>>>
>>>>> For servicemix 3.2.2 snapshot, we add a feature to support cxf bc
>>>>> consumer to retrieve wsdl from internal endpoint if there is one. [1]
>>>>> track this issue
>>>>> So yes, cxf bc consumer can find wsdl from a cxf-se pojo since cxf se
>>>>> will build servicemodel from the pojo you specify and then build wsdl
>>>>> model from the servicemodel.
>>>>> You need use the 3.2.2 snapshot to use this feature
>>>>> [1]https://issues.apache.org/activemq/browse/SM-1400
>>>>>
>>>>> Regards
>>>>> Freeman
>>>>> johanp wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Trying to setup a CXF BC consumer doing proxy call to CXF SE pojo.
>>>>>> The CXF BC does not find its WSDL (I dont supply any), would like to
>>>>>> build a service from bottom-up (no contract first) with a pojo
>>>>>> deployed
>>>>>> CXF-SE.
>>>>>> Can a CXF-BC consumer find WSDL from a CXF-SE pojo like the sample
>>>>>> below,
>>>>>> or do I have to create a WSDL document for the CXF-SE-pojo and place
>>>>>> it
>>>>>> in
>>>>>> the CXF-BC ?
>>>>>>
>>>>>> (When running this sample with a raw HTTP soap proxied to a JSR181
>>>>>> it works fine with WSDL creation.)
>>>>>>
>>>>>> tia/Johan
>>>>>>
>>>>>> ============= CXF start=====================
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>>>>        xmlns:kg="http://kg/1.0">
>>>>>>   <cxfbc:consumer service="kg:KS"
>>>>>>                   endpoint="KS"
>>>>>>                   targetEndpoint="KS"
>>>>>>                   targetService="ks:KS"
>>>>>>                   targetInterface="ks:KS"
>>>>>>                   locationURI="http://0.0.0.0:8192/KS"/>
>>>>>> </beans>
>>>>>>
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
>>>>>>        xmlns:kg="http://kg/1.0">
>>>>>>     <cxfse:endpoint service="kg:KS" endpoint="KS">
>>>>>>         <cxfse:pojo>
>>>>>>           <bean class="kg.KS" />
>>>>>>         </cxfse:pojo>
>>>>>>     </cxfse:endpoint>
>>>>>> </beans>
>>>>>>
>>>>>> @WebService
>>>>>> public class KS {
>>>>>>   public String pling(){
>>>>>>         return "";
>>>>>>     }
>>>>>> }
>>>>>> ============= CXF stop=====================
>>>>>>
>>>>>>
>>>>>> Here no WSDL needed, HTTP consumer finds WSDL from JSR181 pojo:
>>>>>> ============== HTTP/JSR181 start =================
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>
>>>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>>>>>        xmlns:kg="http://kg/1.0">
>>>>>> <http:endpoint service="kg:KS"
>>>>>>                  endpoint="KS"
>>>>>>                  targetService="kg:KS"
>>>>>>                  role="consumer"
>>>>>>                  locationURI="http://0.0.0.0:8192/KS/"
>>>>>>                  defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>>>>>>                  soap="true" />
>>>>>> </beans>
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>
>>>>>> <beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
>>>>>>   xmlns:kg="http://kg/1.0">
>>>>>>     <jsr181:endpoint
>>>>>>           service="kg:KS"
>>>>>>           endpoint="KS"
>>>>>>           pojoClass="kg.KS">
>>>>>>     </jsr181:endpoint>
>>>>>> </beans>
>>>>>>
>>>>>> @WebService
>>>>>> public class KS {
>>>>>>   public String pling(){
>>>>>>   return "";
>>>>>> }
>>>>>> ============== HTTP/JSR181 stop =================
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>> --
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> Blog: http://gnodet.blogspot.com/
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Servicemix-CXF-BC-to-SE-tp18688963p18714119.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: Servicemix CXF BC to SE

Posted by "Lukasz L." <Lu...@sabre.com>.
Gnodet, yeah, that's a normal use case, the idea about the feature that
Freeman mentioned is that it is easier when you do not need to have another
WSDL in CXF BC, which actually is the same (at least abstract part) as that
one in CXF SE, this cause also another issue of having to maintain two
separete WSDL and remember to apply changes in both places,

Freeman, I think having two assemblies fot that is not convenient, acutally
I would have to have two Service Assemblies containing only one Service Unit
each,
do you think it is a chance for that feature to implemented in some other
way, so it would not be necessery to split the assembly?


gnodet wrote:
> 
> Maybe another option would be to deploy the WSDL inside the SU that
> contains the proxy so that the target endpoint will only be needed
> when an exchange is actually sent to it?
> 
> On 7/29/08, Freeman Fang <fr...@gmail.com> wrote:
>> Hi,
>> The endpoint get registered to JBI bus when start the endpoint.
>> So the error you see is caused by
>> 1. cxf se endpoint initialized but not yet register to JBI bus
>> 2. cxf bc consumer endpoint initialized ,  at this point the cxf bc
>> consumer try to retrieve wsdl (and I don't think postpone retrieve wsdl
>> to start is a good idea since wsdl is very basic info to init cxf bc
>> consumer)from internal endpoint, unfortunately, the cxf se endpoin not
>> registered yet.
>>
>> If you want to cxf bc consumer endpoint can retrieve the internal
>> endpoint wsdl, you must ensure that endpoint already get started.
>> For your case, you can put cxf se endpoint and cxf bc consumer endpoint
>> into different SAs, and deploy and start the SA which contain cxf se
>> endpoint first.
>>
>> Regards
>> Freeman
>>
>> Lukasz L. wrote:
>>> this is a nice feature but it doesn't work for me,
>>> I have CXF BC as proxy of CXF SE service (two separate Service Units),
>>> SE SU is initialized before BC SU but still it seems that CXF SE
>>> endpiont
>>> is
>>> not found,
>>> when I debug ServiceMix I see that the invocation:
>>> ServiceEndpoint serviceEndpoint  =
>>> getServiceUnit().getComponent().getComponentContext().getEndpoint(getTargetService(),
>>> getTargetEndpoint());
>>> retruns null. This is not because of names mismatching but because there
>>> is
>>> no such endpoint in the registry yet (I checked that while debugging -
>>> in
>>> code and also using JMX Console).
>>> So in the end I got deployment error
>>> java.lang.NullPointerException
>>>   at
>>> org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java:360)
>>> ...
>>> When I deploy only CXF SE SU (the same one) I can see the endpoint
>>> present
>>> in the registry (using JMX console).
>>>
>>> When the endpoint is registered? During SU initialization or startup? Am
>>> I
>>> missing some configuration?
>>>
>>>
>>> Freeman Fang wrote:
>>>
>>>> For servicemix 3.2.2 snapshot, we add a feature to support cxf bc
>>>> consumer to retrieve wsdl from internal endpoint if there is one. [1]
>>>> track this issue
>>>> So yes, cxf bc consumer can find wsdl from a cxf-se pojo since cxf se
>>>> will build servicemodel from the pojo you specify and then build wsdl
>>>> model from the servicemodel.
>>>> You need use the 3.2.2 snapshot to use this feature
>>>> [1]https://issues.apache.org/activemq/browse/SM-1400
>>>>
>>>> Regards
>>>> Freeman
>>>> johanp wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Trying to setup a CXF BC consumer doing proxy call to CXF SE pojo.
>>>>> The CXF BC does not find its WSDL (I dont supply any), would like to
>>>>> build a service from bottom-up (no contract first) with a pojo
>>>>> deployed
>>>>> CXF-SE.
>>>>> Can a CXF-BC consumer find WSDL from a CXF-SE pojo like the sample
>>>>> below,
>>>>> or do I have to create a WSDL document for the CXF-SE-pojo and place
>>>>> it
>>>>> in
>>>>> the CXF-BC ?
>>>>>
>>>>> (When running this sample with a raw HTTP soap proxied to a JSR181
>>>>> it works fine with WSDL creation.)
>>>>>
>>>>> tia/Johan
>>>>>
>>>>> ============= CXF start=====================
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>>>        xmlns:kg="http://kg/1.0">
>>>>>   <cxfbc:consumer service="kg:KS"
>>>>>                   endpoint="KS"
>>>>>                   targetEndpoint="KS"
>>>>>                   targetService="ks:KS"
>>>>>                   targetInterface="ks:KS"
>>>>>                   locationURI="http://0.0.0.0:8192/KS"/>
>>>>> </beans>
>>>>>
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
>>>>>        xmlns:kg="http://kg/1.0">
>>>>>     <cxfse:endpoint service="kg:KS" endpoint="KS">
>>>>>         <cxfse:pojo>
>>>>>           <bean class="kg.KS" />
>>>>>         </cxfse:pojo>
>>>>>     </cxfse:endpoint>
>>>>> </beans>
>>>>>
>>>>> @WebService
>>>>> public class KS {
>>>>> 	public String pling(){
>>>>>         return "";
>>>>>     }
>>>>> }
>>>>> ============= CXF stop=====================
>>>>>
>>>>>
>>>>> Here no WSDL needed, HTTP consumer finds WSDL from JSR181 pojo:
>>>>> ============== HTTP/JSR181 start =================
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>
>>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>>>>        xmlns:kg="http://kg/1.0">
>>>>> <http:endpoint service="kg:KS"
>>>>>                  endpoint="KS"
>>>>>                  targetService="kg:KS"
>>>>>                  role="consumer"
>>>>>                  locationURI="http://0.0.0.0:8192/KS/"
>>>>>                  defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>>>>>                  soap="true" />
>>>>> </beans>
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>
>>>>> <beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
>>>>> 	xmlns:kg="http://kg/1.0">
>>>>>     <jsr181:endpoint
>>>>>     	service="kg:KS"
>>>>>     	endpoint="KS"
>>>>>     	pojoClass="kg.KS">
>>>>>     </jsr181:endpoint>
>>>>> </beans>
>>>>>
>>>>> @WebService
>>>>> public class KS {
>>>>>   public String pling(){
>>>>>   return "";
>>>>> }
>>>>> ============== HTTP/JSR181 stop =================
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Servicemix-CXF-BC-to-SE-tp18688963p18714119.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Servicemix CXF BC to SE

Posted by gn...@gmail.com.
Maybe another option would be to deploy the WSDL inside the SU that
contains the proxy so that the target endpoint will only be needed
when an exchange is actually sent to it?

On 7/29/08, Freeman Fang <fr...@gmail.com> wrote:
> Hi,
> The endpoint get registered to JBI bus when start the endpoint.
> So the error you see is caused by
> 1. cxf se endpoint initialized but not yet register to JBI bus
> 2. cxf bc consumer endpoint initialized ,  at this point the cxf bc
> consumer try to retrieve wsdl (and I don't think postpone retrieve wsdl
> to start is a good idea since wsdl is very basic info to init cxf bc
> consumer)from internal endpoint, unfortunately, the cxf se endpoin not
> registered yet.
>
> If you want to cxf bc consumer endpoint can retrieve the internal
> endpoint wsdl, you must ensure that endpoint already get started.
> For your case, you can put cxf se endpoint and cxf bc consumer endpoint
> into different SAs, and deploy and start the SA which contain cxf se
> endpoint first.
>
> Regards
> Freeman
>
> Lukasz L. wrote:
>> this is a nice feature but it doesn't work for me,
>> I have CXF BC as proxy of CXF SE service (two separate Service Units),
>> SE SU is initialized before BC SU but still it seems that CXF SE endpiont
>> is
>> not found,
>> when I debug ServiceMix I see that the invocation:
>> ServiceEndpoint serviceEndpoint  =
>> getServiceUnit().getComponent().getComponentContext().getEndpoint(getTargetService(),
>> getTargetEndpoint());
>> retruns null. This is not because of names mismatching but because there
>> is
>> no such endpoint in the registry yet (I checked that while debugging - in
>> code and also using JMX Console).
>> So in the end I got deployment error
>> java.lang.NullPointerException
>>   at
>> org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java:360)
>> ...
>> When I deploy only CXF SE SU (the same one) I can see the endpoint present
>> in the registry (using JMX console).
>>
>> When the endpoint is registered? During SU initialization or startup? Am I
>> missing some configuration?
>>
>>
>> Freeman Fang wrote:
>>
>>> For servicemix 3.2.2 snapshot, we add a feature to support cxf bc
>>> consumer to retrieve wsdl from internal endpoint if there is one. [1]
>>> track this issue
>>> So yes, cxf bc consumer can find wsdl from a cxf-se pojo since cxf se
>>> will build servicemodel from the pojo you specify and then build wsdl
>>> model from the servicemodel.
>>> You need use the 3.2.2 snapshot to use this feature
>>> [1]https://issues.apache.org/activemq/browse/SM-1400
>>>
>>> Regards
>>> Freeman
>>> johanp wrote:
>>>
>>>> Hi,
>>>>
>>>> Trying to setup a CXF BC consumer doing proxy call to CXF SE pojo.
>>>> The CXF BC does not find its WSDL (I dont supply any), would like to
>>>> build a service from bottom-up (no contract first) with a pojo deployed
>>>> CXF-SE.
>>>> Can a CXF-BC consumer find WSDL from a CXF-SE pojo like the sample
>>>> below,
>>>> or do I have to create a WSDL document for the CXF-SE-pojo and place it
>>>> in
>>>> the CXF-BC ?
>>>>
>>>> (When running this sample with a raw HTTP soap proxied to a JSR181
>>>> it works fine with WSDL creation.)
>>>>
>>>> tia/Johan
>>>>
>>>> ============= CXF start=====================
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>>        xmlns:kg="http://kg/1.0">
>>>>   <cxfbc:consumer service="kg:KS"
>>>>                   endpoint="KS"
>>>>                   targetEndpoint="KS"
>>>>                   targetService="ks:KS"
>>>>                   targetInterface="ks:KS"
>>>>                   locationURI="http://0.0.0.0:8192/KS"/>
>>>> </beans>
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
>>>>        xmlns:kg="http://kg/1.0">
>>>>     <cxfse:endpoint service="kg:KS" endpoint="KS">
>>>>         <cxfse:pojo>
>>>>           <bean class="kg.KS" />
>>>>         </cxfse:pojo>
>>>>     </cxfse:endpoint>
>>>> </beans>
>>>>
>>>> @WebService
>>>> public class KS {
>>>> 	public String pling(){
>>>>         return "";
>>>>     }
>>>> }
>>>> ============= CXF stop=====================
>>>>
>>>>
>>>> Here no WSDL needed, HTTP consumer finds WSDL from JSR181 pojo:
>>>> ============== HTTP/JSR181 start =================
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>
>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>>>        xmlns:kg="http://kg/1.0">
>>>> <http:endpoint service="kg:KS"
>>>>                  endpoint="KS"
>>>>                  targetService="kg:KS"
>>>>                  role="consumer"
>>>>                  locationURI="http://0.0.0.0:8192/KS/"
>>>>                  defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>>>>                  soap="true" />
>>>> </beans>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>
>>>> <beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
>>>> 	xmlns:kg="http://kg/1.0">
>>>>     <jsr181:endpoint
>>>>     	service="kg:KS"
>>>>     	endpoint="KS"
>>>>     	pojoClass="kg.KS">
>>>>     </jsr181:endpoint>
>>>> </beans>
>>>>
>>>> @WebService
>>>> public class KS {
>>>>   public String pling(){
>>>>   return "";
>>>> }
>>>> ============== HTTP/JSR181 stop =================
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: Servicemix CXF BC to SE

Posted by Freeman Fang <fr...@gmail.com>.
Hi,
The endpoint get registered to JBI bus when start the endpoint.
So the error you see is caused by
1. cxf se endpoint initialized but not yet register to JBI bus
2. cxf bc consumer endpoint initialized ,  at this point the cxf bc 
consumer try to retrieve wsdl (and I don't think postpone retrieve wsdl 
to start is a good idea since wsdl is very basic info to init cxf bc 
consumer)from internal endpoint, unfortunately, the cxf se endpoin not 
registered yet.

If you want to cxf bc consumer endpoint can retrieve the internal 
endpoint wsdl, you must ensure that endpoint already get started.
For your case, you can put cxf se endpoint and cxf bc consumer endpoint 
into different SAs, and deploy and start the SA which contain cxf se 
endpoint first.

Regards
Freeman

Lukasz L. wrote:
> this is a nice feature but it doesn't work for me,
> I have CXF BC as proxy of CXF SE service (two separate Service Units),
> SE SU is initialized before BC SU but still it seems that CXF SE endpiont is
> not found,
> when I debug ServiceMix I see that the invocation:
> ServiceEndpoint serviceEndpoint  =
> getServiceUnit().getComponent().getComponentContext().getEndpoint(getTargetService(),
> getTargetEndpoint());
> retruns null. This is not because of names mismatching but because there is
> no such endpoint in the registry yet (I checked that while debugging - in
> code and also using JMX Console).
> So in the end I got deployment error
> java.lang.NullPointerException
>   at
> org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java:360)
> ...
> When I deploy only CXF SE SU (the same one) I can see the endpoint present
> in the registry (using JMX console).
>
> When the endpoint is registered? During SU initialization or startup? Am I
> missing some configuration?
>
>
> Freeman Fang wrote:
>   
>> For servicemix 3.2.2 snapshot, we add a feature to support cxf bc 
>> consumer to retrieve wsdl from internal endpoint if there is one. [1] 
>> track this issue
>> So yes, cxf bc consumer can find wsdl from a cxf-se pojo since cxf se 
>> will build servicemodel from the pojo you specify and then build wsdl 
>> model from the servicemodel.
>> You need use the 3.2.2 snapshot to use this feature
>> [1]https://issues.apache.org/activemq/browse/SM-1400
>>
>> Regards
>> Freeman
>> johanp wrote:
>>     
>>> Hi,
>>>
>>> Trying to setup a CXF BC consumer doing proxy call to CXF SE pojo.
>>> The CXF BC does not find its WSDL (I dont supply any), would like to
>>> build a service from bottom-up (no contract first) with a pojo deployed
>>> CXF-SE.
>>> Can a CXF-BC consumer find WSDL from a CXF-SE pojo like the sample below,
>>> or do I have to create a WSDL document for the CXF-SE-pojo and place it
>>> in
>>> the CXF-BC ?
>>>
>>> (When running this sample with a raw HTTP soap proxied to a JSR181
>>> it works fine with WSDL creation.)
>>>
>>> tia/Johan
>>>
>>> ============= CXF start=====================
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>        xmlns:kg="http://kg/1.0">
>>>   <cxfbc:consumer service="kg:KS"
>>>                   endpoint="KS"
>>>                   targetEndpoint="KS"
>>>                   targetService="ks:KS"
>>>                   targetInterface="ks:KS"
>>>                   locationURI="http://0.0.0.0:8192/KS"/>
>>> </beans>
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
>>>        xmlns:kg="http://kg/1.0">
>>>     <cxfse:endpoint service="kg:KS" endpoint="KS">
>>>         <cxfse:pojo>
>>>           <bean class="kg.KS" />
>>>         </cxfse:pojo>
>>>     </cxfse:endpoint>
>>> </beans>
>>>
>>> @WebService
>>> public class KS {
>>> 	public String pling(){
>>>         return "";
>>>     }
>>> }
>>> ============= CXF stop=====================
>>>
>>>
>>> Here no WSDL needed, HTTP consumer finds WSDL from JSR181 pojo:
>>> ============== HTTP/JSR181 start =================
>>> <?xml version="1.0" encoding="UTF-8"?>
>>>
>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>>        xmlns:kg="http://kg/1.0">
>>> <http:endpoint service="kg:KS"
>>>                  endpoint="KS"
>>>                  targetService="kg:KS"
>>>                  role="consumer" 
>>>                  locationURI="http://0.0.0.0:8192/KS/"
>>>                  defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>>>                  soap="true" />                  
>>> </beans>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>>
>>> <beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
>>> 	xmlns:kg="http://kg/1.0">
>>>     <jsr181:endpoint 
>>>     	service="kg:KS" 
>>>     	endpoint="KS"
>>>     	pojoClass="kg.KS">
>>>     </jsr181:endpoint>
>>> </beans>
>>>
>>> @WebService
>>> public class KS {
>>>   public String pling(){
>>>   return "";
>>> }
>>> ============== HTTP/JSR181 stop =================
>>>
>>>   
>>>       
>>
>>     
>
>   


Re: Servicemix CXF BC to SE

Posted by "Lukasz L." <Lu...@sabre.com>.
this is a nice feature but it doesn't work for me,
I have CXF BC as proxy of CXF SE service (two separate Service Units),
SE SU is initialized before BC SU but still it seems that CXF SE endpiont is
not found,
when I debug ServiceMix I see that the invocation:
ServiceEndpoint serviceEndpoint  =
getServiceUnit().getComponent().getComponentContext().getEndpoint(getTargetService(),
getTargetEndpoint());
retruns null. This is not because of names mismatching but because there is
no such endpoint in the registry yet (I checked that while debugging - in
code and also using JMX Console).
So in the end I got deployment error
java.lang.NullPointerException
  at
org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java:360)
...
When I deploy only CXF SE SU (the same one) I can see the endpoint present
in the registry (using JMX console).

When the endpoint is registered? During SU initialization or startup? Am I
missing some configuration?


Freeman Fang wrote:
> 
> For servicemix 3.2.2 snapshot, we add a feature to support cxf bc 
> consumer to retrieve wsdl from internal endpoint if there is one. [1] 
> track this issue
> So yes, cxf bc consumer can find wsdl from a cxf-se pojo since cxf se 
> will build servicemodel from the pojo you specify and then build wsdl 
> model from the servicemodel.
> You need use the 3.2.2 snapshot to use this feature
> [1]https://issues.apache.org/activemq/browse/SM-1400
> 
> Regards
> Freeman
> johanp wrote:
>> Hi,
>>
>> Trying to setup a CXF BC consumer doing proxy call to CXF SE pojo.
>> The CXF BC does not find its WSDL (I dont supply any), would like to
>> build a service from bottom-up (no contract first) with a pojo deployed
>> CXF-SE.
>> Can a CXF-BC consumer find WSDL from a CXF-SE pojo like the sample below,
>> or do I have to create a WSDL document for the CXF-SE-pojo and place it
>> in
>> the CXF-BC ?
>>
>> (When running this sample with a raw HTTP soap proxied to a JSR181
>> it works fine with WSDL creation.)
>>
>> tia/Johan
>>
>> ============= CXF start=====================
>> <?xml version="1.0" encoding="UTF-8"?>
>> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>        xmlns:kg="http://kg/1.0">
>>   <cxfbc:consumer service="kg:KS"
>>                   endpoint="KS"
>>                   targetEndpoint="KS"
>>                   targetService="ks:KS"
>>                   targetInterface="ks:KS"
>>                   locationURI="http://0.0.0.0:8192/KS"/>
>> </beans>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
>>        xmlns:kg="http://kg/1.0">
>>     <cxfse:endpoint service="kg:KS" endpoint="KS">
>>         <cxfse:pojo>
>>           <bean class="kg.KS" />
>>         </cxfse:pojo>
>>     </cxfse:endpoint>
>> </beans>
>>
>> @WebService
>> public class KS {
>> 	public String pling(){
>>         return "";
>>     }
>> }
>> ============= CXF stop=====================
>>
>>
>> Here no WSDL needed, HTTP consumer finds WSDL from JSR181 pojo:
>> ============== HTTP/JSR181 start =================
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>        xmlns:kg="http://kg/1.0">
>> <http:endpoint service="kg:KS"
>>                  endpoint="KS"
>>                  targetService="kg:KS"
>>                  role="consumer" 
>>                  locationURI="http://0.0.0.0:8192/KS/"
>>                  defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>>                  soap="true" />                  
>> </beans>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
>> 	xmlns:kg="http://kg/1.0">
>>     <jsr181:endpoint 
>>     	service="kg:KS" 
>>     	endpoint="KS"
>>     	pojoClass="kg.KS">
>>     </jsr181:endpoint>
>> </beans>
>>
>> @WebService
>> public class KS {
>>   public String pling(){
>>   return "";
>> }
>> ============== HTTP/JSR181 stop =================
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Servicemix-CXF-BC-to-SE-tp18688963p18711182.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Servicemix CXF BC to SE

Posted by Freeman Fang <fr...@gmail.com>.
For servicemix 3.2.2 snapshot, we add a feature to support cxf bc 
consumer to retrieve wsdl from internal endpoint if there is one. [1] 
track this issue
So yes, cxf bc consumer can find wsdl from a cxf-se pojo since cxf se 
will build servicemodel from the pojo you specify and then build wsdl 
model from the servicemodel.
You need use the 3.2.2 snapshot to use this feature
[1]https://issues.apache.org/activemq/browse/SM-1400

Regards
Freeman
johanp wrote:
> Hi,
>
> Trying to setup a CXF BC consumer doing proxy call to CXF SE pojo.
> The CXF BC does not find its WSDL (I dont supply any), would like to
> build a service from bottom-up (no contract first) with a pojo deployed
> CXF-SE.
> Can a CXF-BC consumer find WSDL from a CXF-SE pojo like the sample below,
> or do I have to create a WSDL document for the CXF-SE-pojo and place it in
> the CXF-BC ?
>
> (When running this sample with a raw HTTP soap proxied to a JSR181
> it works fine with WSDL creation.)
>
> tia/Johan
>
> ============= CXF start=====================
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>        xmlns:kg="http://kg/1.0">
>   <cxfbc:consumer service="kg:KS"
>                   endpoint="KS"
>                   targetEndpoint="KS"
>                   targetService="ks:KS"
>                   targetInterface="ks:KS"
>                   locationURI="http://0.0.0.0:8192/KS"/>
> </beans>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
>        xmlns:kg="http://kg/1.0">
>     <cxfse:endpoint service="kg:KS" endpoint="KS">
>         <cxfse:pojo>
>           <bean class="kg.KS" />
>         </cxfse:pojo>
>     </cxfse:endpoint>
> </beans>
>
> @WebService
> public class KS {
> 	public String pling(){
>         return "";
>     }
> }
> ============= CXF stop=====================
>
>
> Here no WSDL needed, HTTP consumer finds WSDL from JSR181 pojo:
> ============== HTTP/JSR181 start =================
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>        xmlns:kg="http://kg/1.0">
> <http:endpoint service="kg:KS"
>                  endpoint="KS"
>                  targetService="kg:KS"
>                  role="consumer" 
>                  locationURI="http://0.0.0.0:8192/KS/"
>                  defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>                  soap="true" />                  
> </beans>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
> 	xmlns:kg="http://kg/1.0">
>     <jsr181:endpoint 
>     	service="kg:KS" 
>     	endpoint="KS"
>     	pojoClass="kg.KS">
>     </jsr181:endpoint>
> </beans>
>
> @WebService
> public class KS {
>   public String pling(){
>   return "";
> }
> ============== HTTP/JSR181 stop =================
>
>