Hi,

Could you please provide the complete SMX log file ?

Could you try to define the service and endpoint in the cxfse:endpoint definition ?

For your information, here is an EJB proxy using CXF-SE/HTTP that works (using weblogic like you as backend).

First the CXF-SE SU xbean.xml:
<beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0";
       xmlns:fsb="http://www.fimasys.com/fsb";>

<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
      <property name="locations">
         <value>classpath:/farm-report-service-config.properties</value>
      </property>
   </bean>

   <cxfse:endpoint>
      <cxfse:service>fsb:farm-report-service</cxfse:service>
      <cxfse:endpoint>FarmReportServiceImplPort</cxfse:endpoint>
      <cxfse:pojo>
<bean class="com.fimasys.fsb.services.farmreport.FarmReportServiceImpl">
            <property name="urlProvider" value="${farm.jndiUrlProvider}"/>
<property name="jndiContextFactory" value="${farm.jndiContextFactory}"/>
         </bean>
      </cxfse:pojo>
   </cxfse:endpoint>

The FarmReportServiceImpl is the EJB client:
@WebService(serviceName = "farm-report-service", targetNamespace = "http://www.fimasys.com/fsb";, endpointInterface = "com.fimasys.fsb.services.farmreport.FarmReportService")
public class FarmReportServiceImpl implements FarmReportService {
...
}

@WebService(targetNamespace = "http://www.fimasys.com/fsb";, name = "FarmReportService")
public interface FarmReportService {

        /**
         * @param reportCode the report code (mandatory)
         * @param applicationCode the application code (mandatory)
         * @param mediaType the media type (optional)
         * @param asynchronousTimeout the asynchronous timeout (optional)
* @param reportParameters the parameters specific to this report (optional) * @return the result as a byte array, may be null as some report do not return an output stream
         * @throws ReportingException
         */
public byte[] executeReport( @WebParam(name="reportCode") String reportCode, @WebParam(name="applicationCode") String applicationCode,
                                     @WebParam(name="mediaType") String 
mediaType,
@WebParam(name="asynchronousTimeout") Integer asynchronousTimeout, @WebParam(name="reportParameters") List<ReportParameter> reportParameters) throws ReportingException;

}

On the HTTP SU, I have the xbean.xml:

        <http:soap-consumer service="fsb:farm-report-service"
                            endpoint="fsb:farm-report-service-http"
                            targetService="fsb:farm-report-service"
                            targetEndpoint="FarmReportServiceImplPort"
                            locationURI="${service.locationURI}"
                            wsdl="classpath:farm-report.wsdl"
                            validateWsdl="no"/>


Regards
JB

laolong wrote:
Hi

   I'm a newcomer of servicemix, I'm going to make a EJB proxy to expose my
EJB as webservice, but always get 'Cound not find port LoginServicePort in
wsdl for service {http://demo/servicemix}LoginService' error since
loginservice.wsdl is a 'fake' WSDL , looks like validateWsdl="false" is not
working, how can I disable it?

  My code is created according to ServiceMix Tutorials ---Using EJB inside
ServiceMix(http://cwiki.apache.org/SM/6-intermediate-using-ejb-inside-servicemix.html)

  It will be great help to provide a working example of EJB proxy, thanks in
advance!

ejb-http-su xbean.xml
<beans xmlns:http="http://servicemix.apache.org/http/1.0";
       xmlns:tns="http://demo/servicemix";>
<http:soap-consumer
                service="tns:LoginService"
                endpoint="ep"
                targetService="tns:LoginService"
                targetEndpoint="LoginServicePort"
                defaultMep="http://www.w3.org/2004/08/wsdl/in-out";
                locationURI="http://0.0.0.0:8199/LoginServiceService";
                wsdl="classpath:loginservice.wsdl"
                validateWsdl="false"
                useJbiWrapper="true"
  />
</beans>


cxfse xbean.xml
<beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0";
       xmlns:tns="http://demo/servicemix";>

   <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
      <property name="environment">
         <props>
            <prop key="java.naming.factory.initial">
               weblogic.jndi.WLInitialContextFactory
            </prop>
            <prop key="java.naming.provider.url">
               t3://192.168.80.111:7001
            </prop>
         </props>
      </property>
   </bean>

   <bean id="ejbProxy"
class="org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean">
      <property name="jndiName" value="demo/UserDAORemote"/>
      <property name="businessInterface" value="demo.UserDAORemote"/>
      <property name="homeInterface" value="demo.UserDAORemoteHome"/>
      <property name="refreshHomeOnConnectFailure" value="true"/>
      <property name="cacheHome" value="true"/>
      <property name="lookupHomeOnStartup" value="false"/>
      <property name="resourceRef" value="true"/>
      <property name="jndiTemplate" ref="jndiTemplate"/>
   </bean>

   <cxfse:endpoint>
      <cxfse:pojo>
         <bean class="demo.LoginServiceImpl">
            <property name="proxy" ref="ejbProxy"/>
         </bean>
      </cxfse:pojo>
   </cxfse:endpoint>

</beans>

Reply via email to