解决方案 »

  1.   

    我怀疑应该用myeclipse生成的这个类QueryCardResponse来接。但是不知道怎么用它来接收。下面为这个类里面的代码
    package org.com.www.projects;import javax.xml.bind.annotation.XmlAccessType;
    import javax.xml.bind.annotation.XmlAccessorType;
    import javax.xml.bind.annotation.XmlElement;
    import javax.xml.bind.annotation.XmlType;/**
     * <p>
     * Java class for queryCardResponse complex type.
     * 
     * <p>
     * The following schema fragment specifies the expected content contained within
     * this class.
     * 
     * <pre>
     * &lt;complexType name="queryCardResponse">
     *   &lt;complexContent>
     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       &lt;sequence>
     *         &lt;element name="return" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
     *       &lt;/sequence>
     *     &lt;/restriction>
     *   &lt;/complexContent>
     * &lt;/complexType>
     * </pre>
     * 
     * 
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "queryCardResponse", propOrder = { "_return" })
    public class QueryCardResponse { @XmlElement(name = "return")
    protected String _return; /**
     * Gets the value of the return property.
     * 
     * @return possible object is {@link String }
     * 
     */
    public String getReturn() {
    return _return;
    } /**
     * Sets the value of the return property.
     * 
     * @param value
     *            allowed object is {@link String }
     * 
     */
    public void setReturn(String value) {
    this._return = value;
    }}
      

  2.   

    下面是在浏览器里输入服务端的地址的xml代码
      <?xml version="1.0" encoding="UTF-8" ?> 
    - <wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://ws.hrfd.com/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" name="QueryCardManageWSImplService" targetNamespace="http://ws.hrfd.com/">
    - <wsdl:types>
    - <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://ws.hrfd.com/" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://ws.hrfd.com/">
      <xsd:element name="queryCard" type="tns:queryCard" /> 
    - <xsd:complexType name="queryCard">
    - <xsd:sequence>
      <xsd:element minOccurs="0" name="cardNo" type="xsd:string" /> 
      <xsd:element minOccurs="0" name="password" type="xsd:string" /> 
      </xsd:sequence>
      </xsd:complexType>
      <xsd:element name="queryCardResponse" type="tns:queryCardResponse" /> 
    - <xsd:complexType name="queryCardResponse">
    - <xsd:sequence>
      <xsd:element minOccurs="0" name="return" type="xsd:string" /> 
      </xsd:sequence>
      </xsd:complexType>
      </xsd:schema>
      </wsdl:types>
    - <wsdl:message name="queryCard">
      <wsdl:part element="tns:queryCard" name="parameters" /> 
      </wsdl:message>
    - <wsdl:message name="queryCardResponse">
      <wsdl:part element="tns:queryCardResponse" name="parameters" /> 
      </wsdl:message>
    - <wsdl:portType name="QueryCardManageWS">
    - <wsdl:operation name="queryCard">
      <wsdl:input message="tns:queryCard" name="queryCard" /> 
      <wsdl:output message="tns:queryCardResponse" name="queryCardResponse" /> 
      </wsdl:operation>
      </wsdl:portType>
    - <wsdl:binding name="QueryCardManageWSImplServiceSoapBinding" type="tns:QueryCardManageWS">
      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> 
    - <wsdl:operation name="queryCard">
      <soap:operation soapAction="" style="document" /> 
    - <wsdl:input name="queryCard">
      <soap:body use="literal" /> 
      </wsdl:input>
    - <wsdl:output name="queryCardResponse">
      <soap:body use="literal" /> 
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
    - <wsdl:service name="QueryCardManageWSImplService">
    - <wsdl:port binding="tns:QueryCardManageWSImplServiceSoapBinding" name="QueryCardManageWSImplPort">
      <soap:address location="http://192.168.1.50:8080/ws/queryCardManage" /> 
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>