简体   繁体   English

在Netbeans中测试Web服务

[英]Testing web services in Netbeans

1.I created web services in netbeans using jboss 7, ni testing by typing the url into the browser and it came up like this.. This XML file does not appear to have any style information associated with it. 1.我使用jboss 7在netbeans中创建了Web服务,通​​过在浏览器中键入url进行了ni测试,它的出现是这样的。此XML文件似乎没有与之关联的任何样式信息。 The document tree is shown below. 文档树如下所示。

 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>
No such operation: null (HTTP GET PATH_INFO: /UnitConversion11/UnitConversion11null)
</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>

So does anybody knows what the problem is because I have no idea.Is there anything about the xml file? 那么有人知道问题出在哪里,因为我不知道.xml文件有什么问题吗? and where is the xml fil :( 以及xml fil在哪里:(

I think this is because your SOAP request wasn't correctly formulated. 我认为这是因为您的SOAP请求格式不正确。 You normally use this SOAP by posting ugly blobs of XML everywhere. 通常,您可以通过在各处发布难看的XML Blob来使用此SOAP。 Your simple GET request probably isn't handled by the application you wrote. 您编写的应用程序可能未处理您简单的GET请求。

From my hazy memory, there is a field in the request called something like soap:operation that identifies which bit of code will end up processing the request and this is of course missing from the GET request. 在我的朦胧记忆中,请求中有一个称为soap:operation的字段,该字段标识最终将处理该请求的代码位,这当然是GET请求所缺少的。

You could try testing your app using something like SOAPUI, curl, httprequester (..etc) to send a properly formulated SOAP request via POST or you could adapt your code to properly handle the GET request (possibly identified by having a null soap:operation?) 您可以尝试使用SOAPUI,curl,httprequester(..etc)之类的应用来测试您的应用,以通过POST发送正确制定的​​SOAP请求,也可以修改代码以正确处理GET请求(可能通过使用空soap:operation进行标识) ?)

HTH 高温超导

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM