Web services 使用代理服务的服务中介-WSO2

Web services 使用代理服务的服务中介-WSO2,web-services,wso2,wso2esb,mediator,Web Services,Wso2,Wso2esb,Mediator,我是这个领域的新手,需要通过ESB访问我的web服务。正如这里提到的,我试图创造它。之后,我运行它并得到如下响应: <TryitProxyError xmlns:h="http://wso2.org/ns/TryitProxy" h:status="SOAP envelope error">org.apache.axis2.AxisFault: The input stream for an incoming message is null.</TryitProxyError&

我是这个领域的新手,需要通过ESB访问我的web服务。正如这里提到的,我试图创造它。之后,我运行它并得到如下响应:

<TryitProxyError xmlns:h="http://wso2.org/ns/TryitProxy"
h:status="SOAP envelope error">org.apache.axis2.AxisFault:
The input stream for an incoming message is null.</TryitProxyError>

如果只想通过ESB访问web服务,则需要创建代理服务并访问代理服务URI,而不是原始服务URI。如果您只想通过ESB访问web服务,则需要创建代理服务并访问代理服务URI,而不是原始服务URI。只需遵循。

尝试下面的代理,看看您得到了什么。通过源代码视图编辑器添加此代理配置

 <proxy xmlns="http://ws.apache.org/ns/synapse"
           name="testProxy"
           transports="https http"
           startOnLoad="true"
           trace="disable">
       <description/>
       <target>
          <inSequence>

             <log level="full">
                <property name="testprop" value="incoming message"/>

             </log>

             <send>
                <endpoint>
                   <address uri="http://localhost:2935/PatientRegService.asmx"/>
                </endpoint>
             </send>
          </inSequence>
          <outSequence>
             <send/>
          </outSequence>
       </target>
    </proxy>

试试下面的代理,看看你得到了什么。通过源代码视图编辑器添加此代理配置

 <proxy xmlns="http://ws.apache.org/ns/synapse"
           name="testProxy"
           transports="https http"
           startOnLoad="true"
           trace="disable">
       <description/>
       <target>
          <inSequence>

             <log level="full">
                <property name="testprop" value="incoming message"/>

             </log>

             <send>
                <endpoint>
                   <address uri="http://localhost:2935/PatientRegService.asmx"/>
                </endpoint>
             </send>
          </inSequence>
          <outSequence>
             <send/>
          </outSequence>
       </target>
    </proxy>



在上面的示例中,如果我们选择目标端点作为输入URL,我们需要为其提供WSDL路径吗?对于以上我的场景,我需要给出
http://localhost:2935/PatientRegService.asmx?WSDL
我尝试了前面提到的链接。但仍然给我相同的错误消息。在传递代理中,只应给出端点URL。例如,尝试使用ESB本身中默认托管的echo服务中的http端点URL。thanx maninda。。我能够配置esb。我忘了在iis中托管web服务。这就是我犯这个错误的原因。我可以使用直通代理连接它。在上面的示例中,如果我们选择目标端点作为enterurl,我们需要为其提供WSDL路径吗?对于以上我的场景,我需要给出
http://localhost:2935/PatientRegService.asmx?WSDL
我尝试了前面提到的链接。但仍然给我相同的错误消息。在传递代理中,只应给出端点URL。例如,尝试使用ESB本身中默认托管的echo服务中的http端点URL。thanx maninda。。我能够配置esb。我忘了在iis中托管web服务。这就是我犯这个错误的原因。我可以使用直通代理连接它。你的代理配置是什么?@Ratha-我对这个领域完全陌生,我尝试了这里提到的custome proxy,然后尝试了maninda提到的直通代理。。但是仍然无法配置它。你能给你的passthrough代理配置(即:synapse配置)吗添加了一个示例配置。请检查并查看您是否收到响应。您的代理配置是什么?@Ratha-我对这一领域完全陌生,我尝试了此处提到的custome proxy,然后尝试了maninda提到的pass-through proxy。。但是仍然无法配置它。你能给你的passthrough代理配置(即:synapse配置)吗添加了一个示例配置。请检查并查看您是否收到响应。我尝试了此配置,并选择endpoint as
PatientManager HttpEndpoint
,然后它会给出相同的消息-
传入消息的输入流为空(将尝试使用专用代理协议,因为可能会对此终结点强制实施跨域浏览器限制。)当我尝试使用
PatientManager HttpSoap11Endpoint
时,它给出了以下错误
soap:Client System.Web.Services.Protocols.SoapException:Server未识别HTTP头SOAPAction:urn:mediate的值。位于System.Web.Services.ProtocolHelper.RouterRequest()的System.Web.Services.Protocols.SoapServerProtocol.RouterRequest()位于System.Web.Services.Protocols.SoapServerProtocol.Initialize()的System.Web.Services.Protocols.SoapServerProtocol.RouterRequest(SoapServerMessage消息)在System.Web.Services.protocol.ServerProtocolFactory.Create
中,如果您注意到上面的代理配置,我们没有向该配置添加wsdl。因此,如果您检查代理的wsdl,它是默认的wsdl,并且与您的后端服务无关。您需要做的是,使用实际的后端服务WSDL创建一个soapui项目,并将该请求发送到此代理。代理将taht请求路由到后端服务。我能够配置esb。我忘了在IIS中托管web服务。这就是我犯这个错误的原因。我可以使用直通代理连接它。无论如何,谢谢您的帮助。我尝试了这个方法,并选择endpoint作为
PatientManager HttpEndpoint
,然后它会给出相同的消息-
传入消息的输入流为空(将尝试使用专用代理协议,因为可能会对此终结点强制实施跨域浏览器限制。)当我尝试使用
PatientManager HttpSoap11Endpoint
时,它给出了以下错误
soap:Client System.Web.Services.Protocols.SoapException:Server未识别HTTP头SOAPAction:urn:mediate的值。位于System.Web.Services.ProtocolHelper.RouterRequest()的System.Web.Services.Protocols.SoapServerProtocol.RouterRequest()位于System.Web.Services.Protocols.SoapServerProtocol.Initialize()的System.Web.Services.Protocols.SoapServerProtocol.RouterRequest(SoapServerMessage消息)在System.Web.Services.protocol.ServerProtocolFactory.Create
中,如果您注意到上面的代理配置,我们没有向该配置添加wsdl。因此,如果您检查代理的wsdl,它是默认的wsdl,并且与您的后端服务无关。您需要做的是,使用实际的后端服务WSDL创建一个soapui项目,并将该请求发送到此代理。代理将taht请求路由到后端服务。我能够配置esb。我忘了在IIS中托管web服务。这就是我犯这个错误的原因。我可以使用直通代理连接它。无论如何,谢谢你的帮助。
 <proxy xmlns="http://ws.apache.org/ns/synapse"
           name="testProxy"
           transports="https http"
           startOnLoad="true"
           trace="disable">
       <description/>
       <target>
          <inSequence>

             <log level="full">
                <property name="testprop" value="incoming message"/>

             </log>

             <send>
                <endpoint>
                   <address uri="http://localhost:2935/PatientRegService.asmx"/>
                </endpoint>
             </send>
          </inSequence>
          <outSequence>
             <send/>
          </outSequence>
       </target>
    </proxy>