![](/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.