小编use*_*801的帖子

JAXBException:类 java.util.ArrayList 或其任何超类在此上下文中都是已知的

我是 Spring 集成的新手,并且在满足我的项目要求时。我面临以下问题以将 Pojo(java 对象)编组到 SOAP 响应(使用 Spring 集成 ws):请找到以下相同的详细信息:

  1. 我有如下示例 xsd 文件:

      </xsd:element>
        <xsd:element name="MyUserResponses">
        <xsd:complexType>
          <xsd:sequence>
             <xsd:element minOccurs="0" maxOccurs="unbounded" name="MyUserResponse"
           type="tns:MyUserResponse" />
          </xsd:sequence>
        </xsd:complexType>
        </xsd:element>
    
      <xsd:complexType name="MyUserResponse">
       <xsd:sequence>
            <xsd:element minOccurs="0" maxOccurs="1" name="SomeNumber" type="xsd:string"/>
            <xsd:element minOccurs="0" maxOccurs="1" name="ReferenceID" type="xsd:string" />
        </xsd:sequence>
      </xsd:complexType>
    </xsd:schema>
    
    Run Code Online (Sandbox Code Playgroud)

我使用 xjc 编译器创建了以下 java 对象文件:

package com.myuser.echannel;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;


/**
 * <p>Java class for anonymous complex type.
 * 
 * <p>The following schema fragment specifies the expected content contained …
Run Code Online (Sandbox Code Playgroud)

spring

2
推荐指数
1
解决办法
2万
查看次数

标签 统计

spring ×1