注:在tomcat下用Axis发布webservice,获取客户端ip没问题,
用mule平台发布后,就无法获取客户端ip
问一下,mule中的配置文件如何设置?
mule配置xml如下:<model name="testservice">
<service name="test">
<inbound>
<axis:inbound-endpoint
address="http://localhost:8888/service"
style="WRAPPED"
use="LITERAL" >
<properties>
<spring:entry key="axisOptions">
<spring:map>
<spring:entry key="allowedMethods" value="*"/>
<spring:entry key="typeMappingVersion" value="1.2"/>
<spring:entry key="wsdlPortType" value="Test"/>
<spring:entry key="className" value="com.test"/>
<spring:entry key="wsdlServicePort" value="Test"/>
<spring:entry key="schemaQualified" value="http://Test"/>
<spring:entry key="wsdlTargetNamespace" value="http://Test"/>
<spring:entry key="wsdlServiceElement" value="TestAppService"/>
</spring:map>
</spring:entry>
</properties>
</axis:inbound-endpoint>
</inbound>
<component>
<spring-object bean="TestAppService"/>
</component>
</service>
</model>

解决方案 »

  1.   


    可能你需要把mule配置成为web容器(tomcat等)的一个web应用,这样他可以拿到环境,然后可以得到客户端的ip。
      

  2.   

    能不能把mule集成到tomcat之类的web容器中,直接拦截http请求呢?
      

  3.   

    写错了,应该是 不把mule集成到tomcat之类的web容器中,直接拦截http请求
      

  4.   

    这个可以解决,从muleMessage里面可以找到客户端的ip。
    不过取出来之后需要自己对字符窜进行一个简单的处理就可以了。
    楼主可以试用下。