soapAction是必需的错误消息

时间:2014-06-02 03:24:51

标签: web-services soap action soapui tibco

我是TIBCO Business Studio和SOAP语言的新手。 我正在研究这个项目需要一些帮助。我一直收到与SOAP Action相关的错误。

这是SOAPUI上的原始SOAP请求:

POST http://127.0.0.1:25001/MyInterface/ HTTP/1.1
Connection: close
Accept-Encoding: gzip,deflate
SOAPAction="http://tempuri.org/MyInterface/SomeMethod"
Content-Type: application/soap+xml
Content-Length: 759
Host: 127.0.0.1:25001
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/">   
      <soap:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
            <wsa:Action>http://tempuri.org/MyInterface/SomeMethod</wsa:Action>
            <wsa:To>http://127.0.0.1:25001/MyInterface/</wsa:To> //when I loopback
            //<wsa:To>http://SomeWebservice:Port/MyInterface</wsa:To> //when connecting directly to web service
      </soap:Header>   
      <soap:Body>   
           <tem:SomeMethod>   
                   <tem:param1>ABC</tem:param1> 
                   <tem:param2>XYZ</tem:param2>
           </tem:SomeMethod>   
      </soap:Body>
</soap:Envelope>

这是我不断获得的原始错误响应:

<soap-env:Envelope xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope">   
  <soap-env:Header/>   
  <soap-env:Body>     
        <soap-env:Fault>         
                <soap-env:Code>           
                         <soap-env:Value>soap-env:Receiver</soap-env:Value>         
                </soap-env:Code>         
                <soap-env:Reason>           
                         <soap-env:Text xml:lang="en-US">soapAction is required</soap-env:Text>         
                </soap-env:Reason>         
                <soap-env:Detail>           
                         <tibco:myFaultDetail xmlns:tibco="http://tibcouri/">java.lang.RuntimeException: soapAction is required
at com.tibco.amf.binding.soap.runtime.transport.http.SoapHttpInboundEndpoint.processHttpPost(SoapHttpInboundEndpoint.java:346)
at com.tibco.amf.binding.soap.runtime.transport.http.SoapHttpServer.doPost(SoapHttpServer.java:195)at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
at org.mortbay.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1213)at com.tibco.governance.pa.amxcomponent.pep.http.HttpPepFilter.doFilter(HttpPepFilter.java:126)
at org.mortbay.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1205)
at com.tibco.amf.implementation.common.httpfilter.GenericComponentFilter.doFilter(GenericComponentFilter.java:65)
at org.mortbay.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1205)at com.tibco.amf.hpa.tibcohost.jetty.internal.ConnectorFilter.doFilter(ConnectorFilter.java:49)
at org.mortbay.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1205)at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:928)at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)at  org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)at java.lang.Thread.run(Unknown Source)
                         </tibco:myFaultDetail>         
                </soap-env:Detail>    
        </soap-env:Fault>   
  </soap-env:Body>
</soap-env:Envelope>

有时我也会收到此错误:

The SOAP action specified on the message, '', does not match the HTTP SOAP Action, 'http://tempuri.org/MyInterface/SomeMethod'.

我可以知道导致这些问题的原因以及我应该研究哪些部分的TIBCO Business Studio?我在HTTP Header中指定了一个SOAPAction,并在SOAP头中包含了一个。我不确定为什么TIBCO的Mediation组件无法检测到它们。

当我对localhost进行环回时会发生这些错误。否则,如果我的端点URI是实际的Web服务,它将正常工作。

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 652
Content-Type: application/soap+xml; charset=utf-8
Server: Microsoft-IIS/7.5
Access-Control-Allow-Origin: *
Set-Cookie: ASP.NET_SessionId=somejiberrish; path=/; HttpOnly
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Content-Type
Access-Control-Allow-Methods: POST,GET,OPTIONS
Date: Mon, 02 Jun 2014 03:11:12 GMT
Connection: close

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
    <a:Action s:mustUnderstand="1">http://tempuri.org/MyInterface/SomeMethodResponse</a:Action>
</s:Header>
<s:Body>
    <SomeMethodResponse xmlns="http://tempuri.org/">
        <SomeMethodResult xmlns:b="http://schemas.datacontract.org/2004/07/SomeWebService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">   
              <b:response1>-1</b:response1>
              <b:response2>-1</b:response2>
       </SomeMethodResult>
   </SomeMethodResponse>
</s:Body>
</s:Envelope>

请帮助我,谢谢你的帮助!

1 个答案:

答案 0 :(得分:0)

原因是某些TIBCO产品希望HTTP标头SOAPAction拼写为驼峰:SoapAction,而同一产品的其他产品或版本需要以较低的驼峰情况编写标头,与soapAction中一样。尝试所有三种变体,让我们知道哪一种适合您。

如果这没有帮助,请告诉我们您正在使用的TIBCO产品。 TIBCO BusinessStudio只是一个基于Eclipse的IDE,用于配置许多其他TIBCO产品(AMX SG&amp; SB,BW,BPM,iProcess等)。

HTH,

亨德里克