0
我正在使用jax-ws和spring创建soap web服务。这里是我的代码如何使JAX-WS在生成的wsdl中使用https(http到https)地址
@WebService
@Service
public class SoapService {
SoapServiceDao soapServiceDao;
@WebMethod(exclude = true)
public void setSoapServiceDao(SoapServiceDao soapServiceDao) {
this.soapServiceDao = soapServiceDao;
}
@WebMethod
@SOAPBinding(parameterStyle=ParameterStyle.BARE)
public Message method1(SoapResponse soapResponse) {
return new Message();
}
}
和应用程序的context.xml
<wss:binding url="/soapservice">
<wss:service>
<ws:service bean="#soapserviceImpl" />
</wss:service>
在生成WSDL
<soap:address location="http://localhost:8080/soapservice"/>
,但我想HTTPS,因为我的服务器只接受https请求。
在这种情况下是否可以将http更改为https?
我使用肥皂UI来对此进行测试,如果写上面的代码?在方法method1中的SoapService类中? –
我认为这会更好,如果你试试这个https://coderanch.com/t/503621/java/Modify-WSDL-HTTP-HTTPS –