Can somebody help me?

-----邮件原件-----
发件人: 谢文渊 [mailto:[EMAIL PROTECTED] 
发送时间: 2008年4月24日 18:54
收件人: [email protected]
主题: [BULK] 答复: [BULK] HELP:i have a difficulty for using servicemix3.2.1, 
description is in content
重要性: 低

I have adjusted config file, and can get wsdl from IE, but when I use java 
client to invoke the exposed service, it can't invoke. Configure, java client 
and exception bellow:
Provider's xbean.xml
<beans xmlns:http="http://servicemix.apache.org/http/1.0"; 
       xmlns:ns2="http://workday.service.ats.yulong.com";> 
      <http:endpoint service="ns2:WorkDayService" 
                     endpoint="WorkDayServiceHttpPort"
                     role="provider"
                     soap="true"                     
locationURI="http://172.16.2.199:9080/ats/services/WorkDayService/";             
        wsdlResource="http://172.16.51.51:8080/ATS/services/WorkDayService?wsdl";
                     defaultMep="http://www.w3.org/2004/08/wsdl/in-out"/>
  </beans>

Cunsumer's xbean.xml
<beans xmlns:http="http://servicemix.apache.org/http/1.0"; 
       xmlns:ns2="http://workday.service.ats.yulong.com"; 
       xmlns:myns="http://esb.yulong.com/servicemix/1.0";> 
      <http:endpoint service="ns2:XFireWebservice" 
                     endpoint="xfireWebserviceEP" 
                     targetService="ns2:WorkDayService"
                     role="consumer"
                     soap="true"                     
locationURI="http://172.16.51.32:8888/services/XFireWebservice"; 
                     defaultMep="http://www.w3.org/2004/08/wsdl/in-out"; />
</beans>

Java client fragment(use xfire)
XFire xfire = XFireFactory.newInstance().getXFire();
        XFireProxyFactory factory = new XFireProxyFactory(xfire);
        
        String serviceUrl = 
"http://172.16.51.32:8888/services/XFireWebservice";;        
        WorkDayServiceInterface client = null;
        try
        {
            client = (WorkDayServiceInterface) factory.create(serviceModel, 
serviceUrl);
        }
        catch (Exception e)
        {
            e.printStackTrace();
            log.error("WsClient.callWebService(): EXCEPTION: " + e.toString());
        }
        
        // Invoke the service
        List<WorkDay> workDays = null;
        try
        {
            String[] depts = { "001031001" };
            workDays = (List<WorkDay>) client.findWorkDays(depts, "", 
"YL05377", "2008-4-12", "2008-4-20", false, 10, 1);
             System.out.println("execute over");
            }catch(Exception e)
        {
        }

The Exception:
2008-4-24 17:18:04 org.apache.commons.httpclient.HttpMethodDirector 
isRedirectNeeded
信息: Redirect requested but followRedirects is disabled


收件人: [email protected]
主题: [BULK] HELP:i have a difficulty for using servicemix3.2.1, description is 
in content
重要性: 低

 

I have bellow topology

Client --> httpsoap(consumer) --> NMR --> httpsoap(provider) --> external web 
service(xfire)

My configure file:

provider: xbean.xml

<beans xmlns:http="http://servicemix.apache.org/http/1.0";

       xmlns:ats="http://workday.service.ats.yulong.com";>

 

 <http:endpoint service="ats:ResearchService"

                 endpoint="rbroker"

                 role="provider"

                 
locationURI="http://172.16.2.199:9080/ats/services/WorkDayService/";

                 wsdlResource="classpath:WorkDayService.wsdl"

                 soap="true"/>

 

</beans>

 

Consumer: xbean.xml

<beans xmlns:http="http://servicemix.apache.org/http/1.0";

       xmlns:ats="http://workday.service.ats.yulong.com";>

 

  <http:endpoint service="ats:WorkDayService"

                 endpoint="WorkDaySvr"

                 targetService="ats:ResearchService"

                 targetEndpoint="rbroker"

                 role="consumer"

                 locationURI="http://0.0.0.0:8193/ats/WorkDayService/";

                 defaultMep="http://www.w3.org/2004/08/wsdl/in-out"; 

                 soap="true"/>                      

 

</beans>

 

Sa: jbi.xml

<?xml version="1.0" encoding="UTF-8"?>

<jbi xmlns="http://java.sun.com/xml/ns/jbi"; version="1.0">

  <service-assembly>

    <identification>

      <name>wsdl-first-sa</name>

      <description>ServiceMix :: Samples :: WSDL first :: SA</description>

    </identification>

    <service-unit>

      <identification>

        <name>att-ws-provider-su</name>

        <description>workday provider</description>

      </identification>

      <target>

        <artifacts-zip>att-ws-provider-su.zip</artifacts-zip>

        <component-name>servicemix-http</component-name>

      </target>

    </service-unit>

    <service-unit>

      <identification>

        <name>att-ws-service-su</name>

        <description>workday consumer </description>

      </identification>

      <target>

        <artifacts-zip>att-ws-service-su.zip</artifacts-zip>

        <component-name>servicemix-http</component-name>

      </target>

    </service-unit>

  </service-assembly>

</jbi>

 

I request to retrieve the wsdl throught http, 
IE occurs bellow:
Unable to find requested resource

RequestURI=/ats/WorkDayService/main.wsdl

Servicemix console:

17:35:00,931 | DEBUG | btpool1-1 - /ats/WorkDayService/main.wsdl | jetty        
            | ervicemix.http.jetty.JCLLogger   70 | REQUEST 
/ats/WorkDayService/main.wsdl on [EMAIL PROTECTED]

17:35:00,931 | DEBUG | btpool1-1 - /ats/WorkDayService/main.wsdl | jetty        
            | ervicemix.http.jetty.JCLLogger   70 | servlet=jbiServlet

17:35:00,931 | DEBUG | btpool1-1 - /ats/WorkDayService/main.wsdl | jetty        
            | ervicemix.http.jetty.JCLLogger   70 | chain=null

17:35:00,931 | DEBUG | btpool1-1 - /ats/WorkDayService/main.wsdl | jetty        
            | ervicemix.http.jetty.JCLLogger   70 | servlet holder=jbiServlet

17:35:00,931 | DEBUG | btpool1-1 - /ats/WorkDayService/main.wsdl | 
ConsumerProcessor        | p.processors.ConsumerProcessor  121 | Receiving HTTP 
request: GET /ats/WorkDayService/main.wsdl HTTP/1.1

Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, 
application/x-shockwave-flash, application/vnd.ms-excel, 
application/vnd.ms-powerpoint, application/msword, */*

Accept-Language: zh-cn

Accept-Encoding: gzip, deflate

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)

Host: 172.16.51.32:8193

Connection: Keep-Alive

 

 

17:35:00,946 | DEBUG | btpool1-1 - /ats/WorkDayService/main.wsdl | 
HttpComponent            | e.servicemix.http.HttpEndpoint  211 | PortType for 
targetService/targetEndpoint could not be found

17:35:00,946 | DEBUG | btpool1-1 - /ats/WorkDayService/main.wsdl | 
HttpComponent            | e.servicemix.soap.SoapEndpoint  277 | Retrieving 
proxied endpoint definition

17:35:00,946 | DEBUG | btpool1-1 - /ats/WorkDayService/main.wsdl | 
HttpComponent            | icemix.common.DefaultComponent   79 | Querying 
service description for 
ServiceEndpoint[service={http://workday.service.ats.yulong.com}ResearchService,endpoint=rbroker]

17:35:00,946 | DEBUG | btpool1-1 - /ats/WorkDayService/main.wsdl | 
HttpComponent            | icemix.common.DefaultComponent   87 | No description 
found for {http://workday.service.ats.yulong.com}ResearchService:rbroker

17:35:00,946 | DEBUG | btpool1-1 - /ats/WorkDayService/main.wsdl | jetty        
            | ervicemix.http.jetty.JCLLogger   70 | RESPONSE 
/ats/WorkDayService/main.wsdl  404

17:36:05,909 | DEBUG | btpool1-0 - Acceptor0 [EMAIL PROTECTED]:8193 | 
JettyContextManager      | ntextManager$ThreadPoolWrapper  465 | Dispatching 
job: [EMAIL PROTECTED],io=1,w=true,b=false|false]

 

What is My problem?

 

thx

Reply via email to