![](/img/trans.png)
[英]jaxws-maven-plugin, maven-enunciate-plugin example?
[英]how to debug maven enunciate plugin tomcat web service
我继承了一个包含许多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());
但是在我的类似服务中,相同的记录器输出未命中。 我该如何调试?
我在SoapUI中使用了一个请求。 由于某种原因,它返回了一条有用的错误消息,并且我能够找到并解决问题。 即使修复后,其他方法仍然返回相同的无用错误500:内部服务器错误
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.