Hi JB,

   Thanks for your help, I added cxfse service/endpoint and change
validateWsdl='no' but still cannot get it work. attached is source code.

SMX log:

DEBUG - AutoDeploymentService          - SA dependencies: [servicemix-http,
servicemix-cxf-se]
DEBUG - DeploymentService              - Moving
E:\progress\fuse-esb-3.4.0.2\data\smx\tmp\ejb-sa-1.0-SNAPSHOT.0.tmp to
E:\progress\fuse-esb-3.4.0.2\data\smx\service-assemblies\ejb-sa\version_1\install
DEBUG - DeploymentService              - Unpack service unit archive
E:\progress\fuse-esb-3.4.0.2\data\smx\service-assemblies\ejb-sa\version_1\install\ejb-cxf-su-1.0-SNAPSHOT.zip
to
E:\progress\fuse-esb-3.4.0.2\data\smx\service-assemblies\ejb-sa\version_1\sus\servicemix-cxf-se\ejb-cxf-su
DEBUG - CxfSeComponent                 - Deploying service unit
DEBUG - CxfSeComponent                 - Looking for
E:\progress\fuse-esb-3.4.0.2\data\smx\service-assemblies\ejb-sa\version_1\sus\servicemix-cxf-se\ejb-cxf-su\xbean.xml:
true
-----------------------proxy:null
DEBUG - CxfSeComponent                 - Service unit deployed
DEBUG - DeploymentService              - Unpack service unit archive
E:\progress\fuse-esb-3.4.0.2\data\smx\service-assemblies\ejb-sa\version_1\install\ejb-http-su-1.0-SNAPSHOT.zip
to
E:\progress\fuse-esb-3.4.0.2\data\smx\service-assemblies\ejb-sa\version_1\sus\servicemix-http\ejb-http-su
2009-6-11 13:18:38
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromClass
信息: Creating Service {http://demo/servicemix}LoginServiceService from class
demo.LoginService
2009-6-11 13:18:38 org.apache.cxf.configuration.spring.ConfigurerImpl
getBeanName
信息: Could not determine bean name for instance of class
org.apache.cxf.transport.jbi.JBIDestination.
2009-6-11 13:18:38 org.apache.cxf.endpoint.ServerImpl initDestination
信息: Setting the server's publish address to be
jbi://ID-192-168-83-151-121cd939b54-25-5
DEBUG - HttpComponent                  - Deploying service unit
DEBUG - HttpComponent                  - Looking for
E:\progress\fuse-esb-3.4.0.2\data\smx\service-assemblies\ejb-sa\version_1\sus\servicemix-http\ejb-http-su\xbean.xml:
true
DEBUG - HttpComponent                  - Service unit deployed
INFO  - ServiceAssemblyLifeCycle       - Starting service assembly: ejb-sa
INFO  - ServiceUnitLifeCycle           - Initializing service unit:
ejb-cxf-su
DEBUG - CxfSeComponent                 - Initializing service unit
DEBUG - ComponentContextImpl           - Component: servicemix-cxf-se
activated endpoint: {http://demo/servicemix}LoginServiceService :
LoginServicePort
DEBUG - CxfSeComponent                 - Querying service description for
ServiceEndpoint[service={http://demo/servicemix}LoginServiceService,endpoint=LoginServicePort]
DEBUG - CxfSeComponent                 - No description found for
{http://demo/servicemix}LoginServiceService:LoginServicePort
DEBUG - WSDL1Processor                 - Endpoint
ServiceEndpoint[service={http://demo/servicemix}LoginServiceService,endpoint=LoginServicePort]
has no service description
DEBUG - CxfSeComponent                 - Querying service description for
ServiceEndpoint[service={http://demo/servicemix}LoginServiceService,endpoint=LoginServicePort]
DEBUG - CxfSeComponent                 - No description found for
{http://demo/servicemix}LoginServiceService:LoginServicePort
DEBUG - WSDL2Processor                 - Endpoint
ServiceEndpoint[service={http://demo/servicemix}LoginServiceService,endpoint=LoginServicePort]
has no service description
DEBUG - CxfSeComponent                 - Service unit initialized
INFO  - ServiceUnitLifeCycle           - Initializing service unit:
ejb-http-su
DEBUG - HttpComponent                  - Initializing service unit
DEBUG - JCAFlow                        - ServiceMix: broadcasting info for
org.apache.servicemix.jbi.event.EndpointEvent[source=ServiceEndpoint[service={http://demo/servicemix}LoginServiceService,endpoint=LoginServicePort]]
DEBUG - JMSFlow                        - ServiceMix: broadcasting info for
org.apache.servicemix.jbi.event.EndpointEvent[source=ServiceEndpoint[service={http://demo/servicemix}LoginServiceService,endpoint=LoginServicePort]]
DEBUG - HttpComponent                  - Service unit initialized
INFO  - ServiceUnitLifeCycle           - Starting service unit: ejb-cxf-su
DEBUG - CxfSeComponent                 - Starting service unit
DEBUG - CxfSeComponent                 - Unable to inject ComponentContext:
demo.LoginServiceImpl.setContext(javax.jbi.component.ComponentContext)
DEBUG - CxfSeComponent                 - Service unit started
INFO  - ServiceUnitLifeCycle           - Starting service unit: ejb-http-su
DEBUG - HttpComponent                  - Starting service unit
DEBUG - HttpComponent                  - Service unit started
INFO  - AutoDeploymentService          - Directory: hotdeploy: Finished
installation of archive:  ejb-sa-1.0-SNAPSHOT.jar


   1. http su still check the wsdl file

<jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message";
version="1.0">
<jbi-task-result>
<frmwk-task-result>
<frmwk-task-result-details>
<task-result-details>
<task-id>start</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
</task-result-details>
</frmwk-task-result-details>
</frmwk-task-result>
<component-task-result>
<component-name>servicemix-http</component-name>
<component-task-result-details>
<task-result-details>
<task-id>start</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
<task-status-msg>
<msg-loc-info>
<loc-token/>
<loc-message>Unable to parse result string</loc-message>
</msg-loc-info>
</task-status-msg>
<exception-info>
<nesting-level>1</nesting-level>
<loc-token/>
<loc-message>Could not find service
'{http://demo/servicemix}LoginServiceService' in wsdl</loc-message>
<stack-trace><![CDATA[javax.jbi.management.DeploymentException: Could not
find service '{http://demo/servicemix}LoginServiceService' in wsdl

        at
org.apache.servicemix.http.endpoints.HttpSoapConsumerEndpoint.validateWsdl1(HttpSoapConsumerEndpoint.java:374)

        at
org.apache.servicemix.http.endpoints.HttpSoapConsumerEndpoint.activate(HttpSoapConsumerEndpoint.java:318)

        at
org.apache.servicemix.common.DefaultServiceUnit.init(DefaultServiceUnit.java:54)

        at
org.apache.servicemix.common.BaseServiceUnitManager.init(BaseServiceUnitManager.java:122)

        at
org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.init(ServiceUnitLifeCycle.java:85)

        at
org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(ServiceAssemblyLifeCycle.java:145)

        at
org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:390)

        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:351)

        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:255)

        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:658)

        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:63)

        at
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:622)

        at java.util.TimerThread.mainLoop(Timer.java:512)

        at java.util.TimerThread.run(Timer.java:462)

]]></stack-trace>
</exception-info>
</task-result-details>
</component-task-result-details>
</component-task-result>
</jbi-task-result>
</jbi-task>

        at
org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:125)
        at
org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:111)
        at
org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(ServiceAssemblyLifeCycle.java:168)
        at
org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:390)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:351)
        ... 6 more
DEBUG - JMSFlow                        - ServiceMix: broadcasting info for
org.apache.servicemix.jbi.event.EndpointEvent[source=ServiceEndpoint[service={http://demo/servicemix}LoginServiceService,endpoint=LoginServicePort]]
  
    2. If I create a wsdl file to match HTTP su service and endpoint, the su
can be deployed but get  error message as below when access the service.

DEBUG - HttpComponent                  - Receiving HTTP request: GET
/LoginServiceService/ HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, */*
Accept-Language: zh-cn
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MAXTHON
2.0)
Host: bjc-d-leonf-xp:8199
Connection: Keep-Alive


isUserJbiWrapper------------------true
DEBUG - PhaseInterceptorChain          - Adding interceptor
org.apache.servicemix.soap.interceptors.mime.AttachmentsInInterceptor
DEBUG - PhaseInterceptorChain          - Adding interceptor
org.apache.servicemix.soap.interceptors.xml.StaxInInterceptor
DEBUG - PhaseInterceptorChain          - Adding interceptor
org.apache.servicemix.soap.bindings.soap.interceptors.SoapInInterceptor
DEBUG - PhaseInterceptorChain          - Adding interceptor
org.apache.servicemix.soap.bindings.soap.interceptors.SoapActionInOperationInterceptor
DEBUG - PhaseInterceptorChain          - Adding interceptor
org.apache.servicemix.soap.interceptors.wsdl.WsdlOperationInInterceptor
DEBUG - PhaseInterceptorChain          - Adding interceptor
org.apache.servicemix.soap.bindings.soap.interceptors.MustUnderstandInterceptor
DEBUG - PhaseInterceptorChain          - Adding interceptor
org.apache.servicemix.soap.interceptors.jbi.JbiInWsdl1Interceptor
DEBUG - PhaseInterceptorChain          - Adding interceptor
org.apache.servicemix.soap.interceptors.jbi.JbiInInterceptor
DEBUG - PhaseInterceptorChain          - Invoking handleMessage on
interceptor
org.apache.servicemix.soap.interceptors.mime.AttachmentsInInterceptor
INFO  - PhaseInterceptorChain          - Interceptor has thrown exception,
unwinding now
java.lang.NullPointerException: InputStream content not found
        at
org.apache.servicemix.soap.interceptors.mime.AttachmentsInInterceptor.handleMessage(AttachmentsInInterceptor.java:46)
        at
org.apache.servicemix.soap.core.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:85)
        at
org.apache.servicemix.http.endpoints.HttpSoapConsumerMarshaler.createExchange(HttpSoapConsumerMarshaler.java:107)
        at 
demo.SoapConsumerMarshaler.createExchange(SoapConsumerMarshaler.java:29)
        at
org.apache.servicemix.http.endpoints.HttpConsumerEndpoint.createExchange(HttpConsumerEndpoint.java:488)
        at
org.apache.servicemix.http.endpoints.HttpConsumerEndpoint.process(HttpConsumerEndpoint.java:293)
        at
org.apache.servicemix.http.HttpBridgeServlet.service(HttpBridgeServlet.java:56)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
        at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
        at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:363)
        at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
        at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
        at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:324)
        at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
        at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
        at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
        at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522)
DEBUG - PhaseInterceptorChain          - Invoking handleFault on interceptor
org.apache.servicemix.soap.interceptors.mime.AttachmentsInInterceptor
DEBUG - PhaseInterceptorChain          - Adding interceptor
org.apache.servicemix.soap.interceptors.xml.StaxOutInterceptor
DEBUG - PhaseInterceptorChain          - Adding interceptor
org.apache.servicemix.soap.bindings.soap.interceptors.SoapOutInterceptor
DEBUG - PhaseInterceptorChain          - Adding interceptor
org.apache.servicemix.soap.bindings.soap.interceptors.SoapFaultOutInterceptor
DEBUG - PhaseInterceptorChain          - Invoking handleMessage on
interceptor org.apache.servicemix.soap.interceptors.xml.StaxOutInterceptor
DEBUG - PhaseInterceptorChain          - Invoking handleMessage on
interceptor
org.apache.servicemix.soap.bindings.soap.interceptors.SoapOutInterceptor
DEBUG - PhaseInterceptorChain          - Invoking handleMessage on
interceptor
org.apache.servicemix.soap.bindings.soap.interceptors.SoapFaultOutInterceptor

   

Jean-Baptiste Onofré wrote:
> 
> 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>
> 
> 
http://www.nabble.com/file/p23975536/sm-ejb-proxy.zip sm-ejb-proxy.zip 
-- 
View this message in context: 
http://www.nabble.com/How-to-invoke-EJB-and-How-to-disable-WSDL-validation-in-http%3Asoap-consumer-provider--tp23963883p23975536.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to