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 <[EMAIL PROTECTED]> 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/