0
에 필요 XSD 설정할 필드를 생성 다음은 상기 사진에 설명 된 규격의 일 구현이다. 사용자가 ?wsdl
링크를 액세스 할 때
@WebService
@SOAPBinding(style = Style.DOCUMENT)
public interface WithdrawService {
@WebMethod
public Response withdraw(
@WebParam(name="CORPCODE") String corpcode,
@WebParam(name="SERVCODE") String servcode,
@WebParam(name="AMOUNT") double amount,
@WebParam(name="CCYID") String ccyid,
@WebParam(name="ACCTNO") String acctno,
@WebParam(name="REFVAL1") String refvel1,
@WebParam(name="REFVAL2") String refval2,
@WebParam(name="TRANREF") String tranref,
@WebParam(name="DESC") String desc,
@WebParam(name="LICENSEID") String licenseid,
@WebParam(name="LICENSEKEY") String licensekey
);
}
다음 WSDL을 생성한다.
<!-- Published by JAX-WS RI (http://jax-ws.java.net). RI's version is JAX-WS RI 2.2.10 svn-revision#919b322c92f13ad085a933e8dd6dd35d4947364b.
-->
<!-- Generated by JAX-WS RI (http://jax-ws.java.net). RI's version is JAX-WS RI 2.2.10 svn-revision#919b322c92f13ad085a933e8dd6dd35d4947364b.
-->
<definitions targetNamespace="http://withdraw.kbz.nirvasoft.com/" name="WithdrawServiceImplService">
<types>
<xsd:schema>
<xsd:import namespace="http://withdraw.kbz.nirvasoft.com/" schemaLocation="http://localhost:8080/WithdrawService/withdraw?xsd=1"/>
</xsd:schema>
</types>
<message name="withdraw">
<part name="parameters" element="tns:withdraw"/>
</message>
<message name="withdrawResponse">
<part name="parameters" element="tns:withdrawResponse"/>
</message>
<portType name="WithdrawService">
<operation name="withdraw">
<input wsam:Action="http://withdraw.kbz.nirvasoft.com/WithdrawService/withdrawRequest" message="tns:withdraw"/>
<output wsam:Action="http://withdraw.kbz.nirvasoft.com/WithdrawService/withdrawResponse" message="tns:withdrawResponse"/>
</operation>
</portType>
<binding name="WithdrawServiceImplPortBinding" type="tns:WithdrawService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="withdraw">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="WithdrawServiceImplService">
<port name="WithdrawServiceImplPort" binding="tns:WithdrawServiceImplPortBinding">
<soap:address location="http://localhost:8080/WithdrawService/withdraw"/>
</port>
</service>
</definitions>
우리는 두 가지 점에 만족하지 않습니다.
- 사용 된 유형에 대한 xsd 문서가 없습니다.
- 필드가 생성 된 wsdl에 필요한지 여부는 말할 수 없습니다.
코드를 사용하여 어떻게 달성 할 수 있었는지 알고 싶습니다.