在我的代码中,可以正确调用ws http://localhost:8080/web_bank_transaction,但是也可以访问我不想要的不准确的unl“ http://localhost:8080/web_bank_transactionXXXanyThingElse ...”,以及如何将其定轨
我的pom.xml片段:
<cxf.version>2.2.3</cxf.version>
<spring.version>3.2.3.RELEASE</spring.version>
<!-- Import Apache CXF Bean Definition -->
<import resource="classpath:META-INF/cxf/cxf.xml"/>
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
<bean id="BankTransaction" class="ws.BankTransactionIMplementation"></bean>
<jaxws:server id="WebBankTransaction"
serviceClass="ws.BankTransaction"
address="/web_bank_transaction">
<jaxws:serviceBean>
<ref bean="BankTransaction"/>
</jaxws:serviceBean>
</jaxws:server>
BankTransactionIMplementation.java:
package ws;
import javax.jws.WebService;
@WebService(targetNamespace = "http://ws/")
public class BankTransactionIMplementation implements BankTransaction {
@Override
public String getAesSeed(String sid) {
return ("method getAesSeed return sid = [" + sid + "]");
}
}