2013-05-20 28 views
0

即時通訊使用的騾子3.4,但有一點仍然沒有工作想代理一個服務隊......騾子服務代理

我的配置:

<mule xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml" xmlns:https="http://www.mulesoft.org/schema/mule/https" 
xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:spring="http://www.springframework.org/schema/beans" xmlns:http="http://www.mulesoft.org/schema/mule/http" 
xmlns:pattern="http://www.mulesoft.org/schema/mule/pattern" 
xmlns:mule-ss="http://www.mulesoft.org/schema/mule/spring-security" 
xmlns:ss="http://www.springframework.org/schema/security" 
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/current/mule-xml.xsd 
    http://www.mulesoft.org/schema/mule/https http://www.mulesoft.org/schema/mule/https/current/mule-https.xsd 
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd 
    http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.4/mule.xsd 
    http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.4/mule-http.xsd 
    http://www.mulesoft.org/schema/mule/pattern http://www.mulesoft.org/schema/mule/pattern/3.4/mule-pattern.xsd 
    http://www.mulesoft.org/schema/mule/spring-security http://www.mulesoft.org/schema/mule/spring-security/3.4/mule-spring-security.xsd 
    http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd"> 

<mule-ss:security-manager> 
    <mule-ss:delegate-security-provider 
     name="memory-dao" delegate-ref="authenticationManager" /> 
</mule-ss:security-manager> 

<spring:beans> 
    <ss:authentication-manager alias="authenticationManager"> 
     <ss:authentication-provider> 
      <ss:user-service id="userService"> 
       <ss:user name="asdf" password="asdf" authorities="ROLE_ADMIN" /> 
      </ss:user-service> 
     </ss:authentication-provider> 
    </ss:authentication-manager> 
</spring:beans> 

<!-- http:connector name="NoSessionConnector"> 
    <service-overrides sessionHandler="org.mule.session.NullSessionHandler" /> 
</http:connector--> 

<pattern:web-service-proxy name="serviceName" 
     inboundAddress="http://localhost:8050/newService" 
     outboundAddress="http://remoteHost/servicos/v2/service.svc" 
     wsdlLocation="http://remoteHost/servicos/v2/service.svc?Wsdl"/> 

但這種方式我得到的原始WSDL文件,而不是與新的本地主機轉換,我能做些什麼來改變它,以便誰使用服務將不知道它在哪裏或如何訪問它...

Tks任何幫助提前!

+0

位於'http:// remoteHost/servicos/v2/service.svc'的WSDL是否包含這個地址:'soap:address'元素中的'http:// remoteHost/servicos/v2/service.svc' ? –

+0

是的,它的確如此......我需要一種方式讓這個本地主機指向remoteHost,所以任何連接到本地主機的應用程序都不會得到remoteHost的地址......任何想法? –

+0

因此,localhost將具有幾乎相同的WSDL,但本地地址轉發到remoteHost ... –

回答

0

只有在outboundAddresswsdlLocation屬性中始終使用相同的主機名或IP地址時,地址重寫才起作用,否則Mule無法檢測到它是相同的源,並且重寫不會發生。