larjohn wrote:
Thank you!
The example says
<cxfse:endpoint>
  <cxfse:pojo>
     <bean class="org.apache.servicemix.cxfse.GreeterImplForClientProxy">
       <property name="calculator">
          <cxfse:proxy service="calculator:CalculatorService"
context="#context" type="org.apache.cxf.calculator.CalculatorPortType" />
       </property>
     </bean>
 </cxfse:pojo>
</cxfse:endpoint>

private CalculatorPortType calculator;

  public void setCalculator(CalculatorPortType calculator) {
        this.calculator = calculator;
    }

    public CalculatorPortType getCalculator() {
        return calculator;
    }
  public void myMethod() {
    int ret = 0;
        try {
ret = getCalculator().add(1, 2); } catch (Exception e) {
            e.printStackTrace();
        }
    ...
  }


How CalculatorPortType  is known to the package? Should I import the other
service's package, the wsdl, or what?
CalculatorPortType is the proxy (or client stub) of your service2, so yes, you need import the package include CalculatorPortType.
Also, in the attribute service (<cxfse:proxy
service="calculator:CalculatorService" context="#context"
type="org.apache.cxf.calculator.CalculatorPortType" />), does the calculator
prefix relate to the property's name in any way? I mean do they have to be
the same?
They are not related, the property name could be anything, and the prefix actually come from your wsdl where define the CalculatorService
Sorry, it is obvious that I am not familiar with bean injections...

Reply via email to