Service Mule服务代理

Service Mule服务代理,service,proxy,mule,Service,Proxy,Mule,我试图代理服务使用骡子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-inst

我试图代理服务使用骡子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文件,而不是一个用新的localhost转换的文件,我能做些什么来更改它,这样使用该服务的人就不知道它在哪里,也不知道如何访问它


Tks需要任何帮助提前

只有在
outboundAddress
wsdlLocation
属性中始终使用相同的主机名或IP地址时,地址重写才有效,否则Mule无法检测到它是同一个源,并且不会发生重写。

WSDL是否在
http://remoteHost/servicos/v2/service.svc
准确地包含此地址:
http://remoteHost/servicos/v2/service.svc
soap:address
元素中?是的,它是。。。我需要一种方法让这个本地主机指向remoteHost direct,这样任何连接到本地主机的应用程序都不会获得remoteHost的地址。。。有什么想法吗?所以本地主机将具有几乎相同的WSDL,但本地地址转发到远程主机……那么这一定是一个错误,因为重写
soap:address
es的URL是
模式:web服务代理
的一个主要功能,我不明白为什么它对您不起作用。您可以尝试删除
wsdlLocation
?代理应自动添加“?wsdl”,获取重写wsdl。由于microsoft的某些规范,我需要将其更改为使用?SingleWSDL,?wsdl在某些场景下无法正常工作,它是一个零散的版本,需要是一个能够在每个系统上使用的单个文件,我会用你说的做一个测试,但即使如此,我仍然需要转发一个文件。。。