0

問題なく展開できる Netbeans SOAP サービスと Silverlight クライアントがあります。

Silverlight からサービスを呼び出すと、(Silverlight で) 次のようになります。

new DiscourseParserWSClient created;
event handler added;
service called; Service State is: Open
http://localhost:8080/DiscourseParserWS/DiscourseParserWSService
An exception occurred during the operation, making the result invalid. 
The remote server returned an error: NotFound.

クライアントがサービスを呼び出した後、GlassFish v3 ドメインは次の問題 I fail to decipher で応答します:

WARNING: A required header representing a Message Addressing Property is not present, Problem header:{http://www.w3.org/2005/08/addressing}Action
com.sun.xml.ws.addressing.model.MissingAddressingHeaderException: Missing WS-Addressing header: "{http://www.w3.org/2005/08/addressing}Action"
        at com.sun.xml.ws.addressing.WsaTube.checkCardinality(WsaTube.java:235)
        at com.sun.xml.ws.addressing.WsaTube.checkMessageAddressingProperties(WsaTube.java:183)
        at com.sun.xml.ws.addressing.WsaServerTube.checkMessageAddressingProperties(WsaServerTube.java:281)
        at com.sun.xml.ws.addressing.WsaTube.validateInboundHeaders(WsaTube.java:140)
        at com.sun.xml.ws.addressing.WsaServerTube.processRequest(WsaServerTube.java:147)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:629)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:588)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:573)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:470)
        at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:112)
        at com.sun.enterprise.security.webservices.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:195)
        at com.sun.enterprise.security.webservices.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:127)
        at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:629)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:588)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:573)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:470)
        at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:295)
        at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:515)
        at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:285)
        at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:143)
        at org.glassfish.webservices.JAXWSServlet.doPost(JAXWSServlet.java:147)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
        at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
        at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:619)

私はMetro 2.1を使用していますが、かなりグーグルで調べた後、問題が何か関係があるのではないかと思います...

サービスの wsdl を見ることができるので、実装の問題ではないと思います。しかし、その警告のスタックは Thread クラス oO?

public void run() {
if (target != null) {
    target.run(); // <-- to this line to be exact
}
}

光を当てるのを手伝ってください。私はすでにこのクライアントで動作するいくつかのEclipse SOAPサービスを持っていますが、Netbeans、GlassFish、Metroの経験がなく、何が原因なのかわかりません...

4

3 に答える 3

4

手遅れかどうかはわかりませんが、時々追加するのに役立ちました

@Addressing(enabled = true、required = false)

WebService(クラスアノテーション)に。その後、例外は通常消えます。

アドレス指定に関する詳細については、1を参照してください。

于 2011-04-08T11:05:06.893 に答える
2

私は同じ警告を受け取っていて、これが他の誰かを助けるかもしれないと思っていました.

Netbeans ビジュアル Web サービス デザイナーで「信頼できるメッセージ配信」オプションを使用している場合、この警告が表示されることがあります。

「信頼できるメッセージ配信」が不要な場合は、単にオフにすることができます。

于 2012-09-13T04:34:50.073 に答える
0

今日、この問題に直面していましたが、soap ヘッダーの Action 属性を使用して問題を解決しました。SoapUI を使用してこれを確認しました。

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mal="http://example.com">
   <soapenv:Header>
   <MessageID xmlns="http://www.w3.org/2005/08/addressing">uuid:2c7ea154-668e-4c8b-abaa-8b119f91b8dd</MessageID>
   <Action xmlns="http://www.w3.org/2005/08/addressing">http://example.com/input</Action>
  </soapenv:Header>
   <soapenv:Body>
      ......
   </soapenv:Body>
</soapenv:Envelope>

Action 属性を渡さないと、エラー メッセージが表示されます。

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Header>
      <FaultDetail xmlns="http://www.w3.org/2005/08/addressing">
         <ProblemHeaderQName>{http://www.w3.org/2005/08/addressing}Action</ProblemHeaderQName>
      </FaultDetail>
   </S:Header>
   <S:Body>
      <SOAP-ENV:Fault xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
         <faultcode xmlns:wsa="http://www.w3.org/2005/08/addressing">wsa:MessageAddressingHeaderRequired</faultcode>
         <faultstring>A required header representing a Message Addressing Property is not present</faultstring>
      </SOAP-ENV:Fault>
   </S:Body>
</S:Envelope>

Action ヘッダーの値は、Web メソッドの @Action から決定されます。

@Action(input = "http://example.com/input", output = "http://example.com/output")
于 2015-02-23T20:00:12.813 に答える