我在java企业应用程序中使用jax-ws从给定的wsdl文件生成客户端。端点方法接收2个请求参数和几个持有mode.OUT的持有者。在调用端点操作并接收结果后,我在控制台日志中看到请求已正确发送并且收到响应。但是,持有者仍然包含空值。我一直在寻找几天没有锁定的原因,我真的很沮丧。谷歌上的资源表明这是由于wsdl中的问题或错误而发生的,并且我的代码和wsdl之间可能存在不匹配,虽然我已经从wsdl创建了代码,所以,它似乎不符合逻辑是代码和wsdl之间的冲突。无论如何,我已经检查了所有东西,从序列,命名空间等的排序,并没有发现任何东西。我非常感谢任何帮助。特别是我的公司只等待这个部署下一个war文件。此外,sopaUi按预期返回结果。我把我的wsdl放在这里。和我的终点。
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.hosaco.ir/IB2BServices" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.hosaco.ir/IB2BServices">
<wsdl:types xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://www.hosaco.ir/IB2BServices" xmlns:tns="http://www.hosaco.ir/IB2BServices">
<xs:element name="IbanInquiry">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="loginRequest" type="tns:LoginRequest" />
<xs:element minOccurs="1" maxOccurs="1" name="request" type="tns:IbanInquiryRequest" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="IbanInquiryRequest">
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="IBAN" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:element name="IbanInquiryResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="RequestedIBAN" nillable="false" type="xs:string"/>
<xs:element minOccurs="0" maxOccurs="1" name="AccountNumber" nillable="false" type="xs:string"/>
<xs:element minOccurs="0" maxOccurs="1" name="AccountStatus" nillable="false" type="xs:string"/>
<xs:element minOccurs="0" maxOccurs="1" name="AccountDescription" nillable="false" type="xs:string"/>
<xs:element minOccurs="0" maxOccurs="1" name="AccountComment" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" maxOccurs="1" name="AccountOwners" nillable="false" type="tns:ArrayOfAccountOwner"/>
<xs:element minOccurs="0" maxOccurs="1" name="PaymentCode" nillable="false" type="xs:decimal"/>
<xs:element minOccurs="0" maxOccurs="1" name="PaymentCodeValid" nillable="false" type="xs:decimal"/>
<xs:element minOccurs="1" maxOccurs="1" name="AlertCode" nillable="false" type="xs:string"/>
<xs:element minOccurs="1" maxOccurs="1" name="ErrorDescription" nillable="false" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="ArrayOfAccountOwner">
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" name="AccountOwner" nillable="false" type="tns:accountOwner"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="accountOwner">
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="FirstName" nillable="false" type="xs:string"/>
<xs:element minOccurs="1" maxOccurs="1" name="LastName" nillable="false" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="LoginRequest">
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="Username" nillable="false" type="xs:string"/>
<xs:element minOccurs="1" maxOccurs="1" name="Password" nillable="false" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="B2BServiceException">
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="Code" nillable="false" type="xs:decimal"/>
<xs:element minOccurs="1" maxOccurs="1" name="TraceCode" nillable="false" type="xs:string"/>
<xs:element minOccurs="0" maxOccurs="1" name="Translate" nillable="false" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="IbanInquiryDataIn" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:part name="parameters" element="tns:IbanInquiry" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
</wsdl:message>
<wsdl:message name="IbanInquiryDataOut" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:part name="parameters" element="tns:IbanInquiryResponse" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
</wsdl:message>
<wsdl:portType name="IB2BESB">
<wsdl:operation name="IbanInquiry">
<wsdl:input message="tns:IbanInquiryDataIn"/>
<wsdl:output message="tns:IbanInquiryDataOut"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="HttpBindingIB2BESB_Services" type="tns:IB2BESB" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
<wsdl:operation name="IbanInquiry">
<soap:operation soapAction="http://www.hosaco.ir/IB2BServices/IbanInquiry" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="esbservice" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:port binding="tns:HttpBindingIB2BESB_Services" name="HttpBindingIB2BE
SB_Services" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<soap:address location="http://epg.iic.local:4625/soap" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
&#13;
package com.payeshgaran.insurance.common.service.draft.ws.draftconfirmwebservice2;
import java.math.BigDecimal;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.Holder;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
/**
* This class was generated by the JAX-WS RI.
* JAX-WS RI 2.2.4-b01
* Generated source version: 2.2
*/
@WebService(name = "IB2BESB", targetNamespace = "http://www.hosaco.ir/IB2BServices")
@XmlSeeAlso({
ObjectFactory.class
})
public interface IB2BESB {
@WebMethod(operationName = "IbanInquiry", action = "http://www.hosaco.ir/IB2BServices/IbanInquiry")
@RequestWrapper(localName = "IbanInquiry", targetNamespace = "http://www.hosaco.ir/IB2BServices", className = "com.payeshgaran.insurance.common.service.draft.ws.draftconfirmwebservice2.IbanInquiry")
@ResponseWrapper(localName = "IbanInquiryResponse", targetNamespace = "http://www.hosaco.ir/IB2BServices", className = "com.payeshgaran.insurance.common.service.draft.ws.draftconfirmwebservice2.IbanInquiryResponse")
public void ibanInquiry(
@WebParam(name = "loginRequest", targetNamespace = "")
LoginRequest loginRequest,
@WebParam(name = "request", targetNamespace = "")
IbanInquiryRequest request,
@WebParam(name = "RequestedIBAN", targetNamespace = "", mode = WebParam.Mode.OUT)
Holder<String> requestedIBAN,
@WebParam(name = "AccountNumber", targetNamespace = "", mode = WebParam.Mode.OUT)
Holder<String> accountNumber,
@WebParam(name = "AccountStatus", targetNamespace = "", mode = WebParam.Mode.OUT)
Holder<String> accountStatus,
@WebParam(name = "AccountDescription", targetNamespace = "", mode = WebParam.Mode.OUT)
Holder<String> accountDescription,
@WebParam(name = "AccountComment", targetNamespace = "", mode = WebParam.Mode.OUT)
Holder<String> accountComment,
@WebParam(name = "AccountOwners", targetNamespace = "", mode = WebParam.Mode.OUT)
Holder<ArrayOfAccountOwner> accountOwners,
@WebParam(name = "PaymentCode", targetNamespace = "", mode = WebParam.Mode.OUT)
Holder<BigDecimal> paymentCode,
@WebParam(name = "PaymentCodeValid", targetNamespace = "", mode = WebParam.Mode.OUT)
Holder<BigDecimal> paymentCodeValid,
@WebParam(name = "AlertCode", targetNamespace = "", mode = WebParam.Mode.OUT)
Holder<String> alertCode,
@WebParam(name = "ErrorDescription", targetNamespace = "", mode = WebParam.Mode.OUT)
Holder<String> errorDescription);
}