English 中文(简体)
无法将复杂的类型 des在海滩上——“任何类型”问题
原标题:unable to deserialize complex types on apache axis - the "anytype" problem

我被迫使用那些很老的轮.来制作网络服务客户。 于是, 页: 1鱼进口商拒绝种植。 然而,轴心1.4却在创建网络服务客户方面屈服,而网络服务客户大部分工作。 有一个令人痛心的问题,它无法处理“任何类型”描述的连续复杂类型。

这里是最初的 st痕:

页: 1ava.lang.RuntimeException: org.xml.sax.SAXException: No deserializer for {http://www.w3.org/2001/XMLSchema}anyType
Caused by: org.xml.sax.SAXException: No deserializer for {http://www.w3.org/2001/XMLSchema}anyType
    at org.apache.axis.AxisFault.makeFault(AxisFault.页: 1ava:101)
    at org.apache.axis.client.Call.invoke(Call.页: 1ava:2470)
    at org.apache.axis.client.Call.invoke(Call.页: 1ava:2366)
    at org.apache.axis.client.Call.invoke(Call.页: 1ava:1812)

我认为,我可以解决这个问题,登记图形图象;项目和项目;内容(见下文xml)至其相关类别,但这不可行:

添加

_call.registerTypeMapping(VoipAccountSubscriberRead.class, new QName("http://www.w3.org/2001/XMLSchema", "anyType"), null, new BeanDeserializerFactory(VoipAccountSubscriberRead.class, new QName("http://www.w3.org/2001/XMLSchema", "anyType")));

......导致四舍五入:

页: 1

Caused by: 页: 1ava.lang.IllegalArgumentException: argument type mismatch
    at org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.页: 1ava:157)
    at org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.页: 1ava:249)
    at org.apache.axis.encoding.ser.ArrayDeserializer.valueComplete(ArrayDeserializer.页: 1ava:583)
    at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.页: 1ava:509)

Is this due to the fact that the xml has more than one nested complex type described by anytype[1] and anytype[0] or am I 页: 1ust way off the mark? I am a SOAP newbie, with a basic understanding of xml and an inadequate understanding of xsd so probably am way off the mark :)

此处为:

<?xml version="1.0"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <get_voip_account_by_external_idResponse xmlns="urn:/SOAP/Provisioning">
      <data>
        <create_timestamp xsi:type="xsd:string">2011-08-04 13:55:58</create_timestamp>
        <status xsi:type="xsd:string">active</status>
        <billing_profile xsi:type="xsd:string">default</billing_profile>
        <terminate_timestamp xsi:nil="true" xsi:type="xsd:string"/>
        <activate_timestamp xsi:type="xsd:string">2011-08-04 13:55:58</activate_timestamp>
        <modify_timestamp xsi:type="xsd:string">2011-08-04 13:55:58</modify_timestamp>
        <external_id xsi:type="xsd:string">CID_472486001</external_id>
        <id xsi:type="xsd:int">121</id>
        <subscribers soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array">
          <item>
            <admin xsi:type="xsd:boolean">false</admin>
            <alias_numbers soapenc:arrayType="xsd:anyType[0]" xsi:type="soapenc:Array"/>
            <webpassword xsi:nil="true" xsi:type="xsd:string"/>
            <status xsi:type="xsd:string">active</status>
            <ac xsi:nil="true" xsi:type="xsd:int"/>
            <webusername xsi:nil="true" xsi:type="xsd:string"/>
            <uuid xsi:type="xsd:string">5cad2cac-cc03-45bd-9ea9-189e22fdd406</uuid>
            <account_id xsi:nil="true" xsi:type="xsd:int"/>
            <username xsi:type="xsd:string">c734106b8e563edebc3098a991402566</username>
            <domain xsi:type="xsd:string">labzip-snc01.somedomain.com</domain>
            <password xsi:type="xsd:string">4daac6c07b33c76c2d5ff9bb710f4ab7</password>
            <external_id xsi:type="xsd:string">CID_472486001</external_id>
            <cc xsi:nil="true" xsi:type="xsd:int"/>
            <subscriber_id xsi:type="xsd:int">127</subscriber_id>
            <sn xsi:nil="true" xsi:type="xsd:string"/>
          </item>
        </subscribers>
      </data>
    </get_voip_account_by_external_idResponse>
  </soap:Body>
</soap:Envelope>

! (即使不是答案本身)。 我正确方向的一点

问题回答

暂无回答




相关问题
Python SOAP server / client

I have a problem with Python and SOAP. I need to create a web service based on SOAP in Python. I read that I can use libraries like soaplib, suds and ZSI. I created a Hello World web service with ...

HTTP POST and complex structures

I m trying to send a complex HTTP POST request to a web service. The web service was created using VS2008, in which you can set VS to create HTTP POST and GET interfaces alongside the SOAP one. Now ...

XML-RPC Standard and XML Data Type

I was looking at XML-RPC for a project. And correct me if I m wrong, but it seems like XML-RPC has no XML datatype. Are you supposed to pass as a string? or something else? Am I missing something? ...

Most appropriate API for URL shortening service

I ve just finished an online service for shortening URLs (in php5 with Zend Framework); you can enter an URL and you get an short URL (like tinyurl and such sites). I m thinking about the API for ...

What is the best solution for creating a SOAP Server in PHP?

I need some advice on which library is the best choice when it comes to creating SOAP servers (and eventually SOAP clients) in PHP. I know there is built-in functions for this, but is that really the ...

Logging all Soap request and responses in PHP

Does anyone know how to log all request and responses with the builtin SoapClient in PHP? I could in fact manually log everything with SoapClient::__getLastRequest() and SoapClient::__getLastResponse()...

热门标签