我继承了一个包含许多java Web服务的项目。我想添加另一个,所以我一直在使用一个作为模板。我添加了
<namespace id="bsghandle"
uri="http://bsghandle.queryservice.vcwh.oss.cable.company.com/" />
进入enunciate.xml的<namespaces>
部分
namespace="http://bsghandle.queryservice.vcwh.oss.cable.company.com/"
file="bsghandle.wsdl" />
进入<xml>
部分。
这是pom.xml片段
<plugin>
<groupId>org.codehaus.enunciate</groupId>
<artifactId>maven-enunciate-plugin</artifactId>
<version>1.25</version>
<configuration>
<configFile>${basedir}/src/main/webapp/WEB-INF/enunciate.xml</configFile>
<compileDebug>true</compileDebug>
<addGWTSources>false</addGWTSources>
<addActionscriptSources>false</addActionscriptSources>
</configuration>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.7</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>assemble</goal>
</goals>
</execution>
</executions>
</plugin>
Maven生成web.xml条目,包括以下内容:
<filter-mapping>
<filter-name>wsdl-redirect-filter-bsghandle</filter-name>
<url-pattern>/soap/BsgHandleResourceService</url-pattern>
</filter-mapping>
我创建了三个类来处理请求,类似于模板。 我向这样的工作服务发送请求
./soapget.sh soap_serial.xml r.xml
其中soapget.sh是
#!/bin/bash
wget "http://localhost:5032/VCWH_QueryService/soap/SettopChannelMapResourceService" --post-file=$1 --header="Content-Type: text/xml" -O $2
这会产生一个很好的响应,在r.xml中捕获。
现在当我为我写的新服务尝试同样的事情时
./bsg.sh soap_rate.xml r2.xml
其中bsg.sh是
#!/bin/bash
wget "http://localhost:5032/VCWH_QueryService/soap/BsgHandleResourceService" --post-file=$1 --header="Content-Type: text/xml" -O $2
我得到了无用的错误
2015-11-23 20:26:52 ERROR 500: Internal Server Error
项目的日志文件也不包含任何其他信息。
当我观察工作服务的日志文件时(在SettopChannelMapResource.java中),我可以看到这个调试语句被命中为输出到日志的第一件事
logger.debug("getChannelMapBySerialNumber() called for sn=" + serialNumber
+ " from ip" + request.getRemoteAddr());
但在我的类似服务中,相同的记录器输出不会受到影响。 我该如何调试呢?
答案 0 :(得分:0)
我在SoapUI中使用了一个请求。出于某种原因,这返回了一个有用的错误消息,我能够找到并解决问题。即使在修复之后,另一种方法仍然返回相同的无用ERROR 500:内部服务器错误