`
冰之晴天小猪
  • 浏览: 8871 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

2.WSDL以及xsd编写遇到的几多困惑

 
阅读更多

WSDL:

1. 如下两图。其实两者所实现的方法是一样的。

    区别:上图WSDL2Java会生成4个Service接口,每个接口拥有一个方法。下图只会生成一个接口,这个接口拥有4个方法。



 

 

Namespace:

背景:phase1拥有一个namespace叫做CustomerService,phase2客户想改成CardService,但是phase2依然访问phase1的wsdl,这样就要求,客户发送soap请求到server,server能够识别不同的namespace并返回响应消息。

困难:因为@Webservice加在interface上,只能定义一个namespace,所以发送第二个namespace时server会识别不了。不知道如何在一个接口的情况下支持两个namespace。

@WebService(targetNamespace = "urn:CustomerService", name = "IstPortType")
public interface IstPortType extends java.rmi.Remote {
	@WebMethod(operationName = "getCustomerByATMPin")
	@WebResult(name = "CustATMPinAuthInqOut")
	public CustATMPinAuthInqOut getCustomerByATMPin(
			@WebParam(name = "CustATMPinAuthInqInp") CustATMPinAuthInqInp getCustomerByATMPinPara)
			throws java.rmi.RemoteException;
    @WebMethod(operationName = "getCustCardInfoByCIFNo")
	@WebResult(name = "CustCardInfoInqOut")
	public CustCardInfoInqOut getCustCardInfoByCIFNo(
			@WebParam(name = "CustCardInfoInqInp") CustCardInfoInqInp getCustCardInfoByCIFNoPara)
			throws java.rmi.RemoteException;
    @WebMethod(operationName = "updateCustCardLimit")
	@WebResult(name = "CardLimitChangeOut")
	public CardLimitChangeOut updateCustCardLimit(
			@WebParam(name = "CardLimitChangeInp") CardLimitChangeInp updateCustCardLimitPara)
			throws java.rmi.RemoteException;
    @WebMethod(operationName = "updateCustCardStatus")
	@WebResult(name = "CardStatusChangeOut")
	public CardStatusChangeOut updateCustCardStatus(
			@WebParam(name = "CardStatusChangeInp") CardStatusChangeInp updateCustCardStatusPara)
			throws java.rmi.RemoteException;
    }

 

 


 

  • 大小: 100.1 KB
  • 大小: 40.2 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics