You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Fullocto <br...@fr.thalesgroup.com> on 2008/06/04 11:44:57 UTC

CXF proxy

Hello all,

I wonder what is the #context in the proxy configuration in a servicemix
cxf-SE.
Is it optional? Or is it a need so the pojo can send/receive messages to the
proxy service?

Also  is the type important: if I have type="myInterface"
What are the requirement for myInterface: I have only to use method whose
parameters are the Java classes bound to the wsdl contract, haven't I?

TY

-- 
View this message in context: http://www.nabble.com/CXF-proxy-tp17642918p17642918.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: CXF proxy

Posted by Fullocto <br...@fr.thalesgroup.com>.
up? need more precision?
ty
-- 
View this message in context: http://www.nabble.com/CXF-proxy-tp17642918p17751743.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: CXF proxy

Posted by Fullocto <br...@fr.thalesgroup.com>.
Thank you for your answer
I have 3 cxfse:endpoint that needs to access a BC provider exposing
"outsider:farAwayService".

I already have some code:
- dans les classes des endpoint 1,2,3:  (E1) (E2) (E3), j'ai une classe:
private HelpBroker helpBroker = new HelpBroker()
- in this class HelpBroker (I created a singleton class), I will the proxy
private MyProxy myProxy;
and I want this interface MyProxy "to call" the BC provider exposed service.

How can I do this in my spring file so it can be used by all my three CXF
endpoints?

<cxfse:endpoint>
   <cxfse:pojo>
     <bean class="endpoint1">
     </bean>
   </cxfse:pojo>
</cxfse:endpoint>

<bean class="HelpBroker " singleton="true">
       <property name="myProxy">
          <cxfse:proxy service="outsider:farAwayService" context="#context"
type="MyProxy " />
       </property>
</bean>

I created a singleton so all endpoint created for the class HelpBroker will
be the object I create with spring  and whose myproxy property is
configured.
Then I am not sure that if don't have any namespace in the <bean> property,
it will be managed by cxf component...
By the way how could I find which class reads the xbean.xml file? 





-- 
View this message in context: http://www.nabble.com/CXF-proxy-tp17642918p17650796.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: CXF proxy

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

Fullocto wrote:
> Hello all,
>
> I wonder what is the #context in the proxy configuration in a servicemix
> cxf-SE.
>   
It's ComponentContext from which you can access jbi bus the retrieve or 
send messages
> Is it optional? Or is it a need so the pojo can send/receive messages to the
> proxy service?
>   
It's not optional
> Also  is the type important: if I have type="myInterface"
>   
Yes, the type is import, it's the SEI (service endpoint interface) for 
ClientProxyFactory to create Proxy.
> What are the requirement for myInterface: I have only to use method whose
> parameters are the Java classes bound to the wsdl contract, haven't I?
>   

It depend on which way you are using.
For code first way, there is no wsdl beforehand, what you have is the 
interface,  if you ensure you annotated your interface correctly, it's ok
For wsdl first way, since the interface is generated automatically 
according to the wsdl, so yes, you have only to use method whose 
parameters are the java classes bound to the wsdl contract
> TY
>
>