在SOAP中获取连接对象

在SOAP中获取连接对象,soap,jax-ws,java-metro-framework,Soap,Jax Ws,Java Metro Framework,我已经在Tomcat上用Metro编写了一个SOAP服务。它可以正常工作,但是类没有全部返回 我有一个类ServiceReport,它与其他类有关系。代码如下: @Entity @Table( name = "ALBAU_SERVICEREPORT" ) public class ServiceReport extends StoredEntity<ServiceReport> { @ManyToOne( targetEntity = AlbauInstallation.cl

我已经在Tomcat上用Metro编写了一个SOAP服务。它可以正常工作,但是类没有全部返回

我有一个类ServiceReport,它与其他类有关系。代码如下:

@Entity
@Table( name = "ALBAU_SERVICEREPORT" )
public class ServiceReport extends StoredEntity<ServiceReport> {

   @ManyToOne( targetEntity = AlbauInstallation.class, cascade = CascadeType.PERSIST )
   @XmlTransient
   private AlbauInstallation installation;

   @OneToOne( cascade = CascadeType.ALL )
   private FlexDocument flexDocumentData;

   //   private Header headerData;
   @OneToMany( cascade = CascadeType.ALL,
               fetch = FetchType.EAGER,
               targetEntity = Position.class,
               mappedBy = "serviceReport" )
   private List<Position> positionList;
@实体
@表(name=“ALBAU\u SERVICEREPORT”)
公共类ServiceReport扩展了StoreIdentity{
@多通(targetEntity=AlbaUIInstallation.class,cascade=CascadeType.PERSIST)
@XmlTransient
私人装置;
@OneToOne(级联=级联类型.ALL)
私有FlexDocument flexDocumentData;
//私有头数据;
@OneToMany(级联=级联类型.ALL,
fetch=FetchType.EAGER,
targetEntity=Position.class,
mappedBy=“serviceReport”)
私人名单;
WSDL中创建的唯一属性是flexDocumentData。为了在生成的接口中同时使用AlbaUIInstallation和positionList,我需要什么注释

这是指向WSDL的链接:


看起来OneTONE关系已传递,其他关系未传递。在本例中,解决方案似乎非常简单:

在类
位置
中,我更改了多通注释,如下所示: 表格:

致:

需要做的第二个更改是为positions添加一个
setter
。我不知道为什么,但是如果没有setter,该属性就不会出现在WSDL中

现在我在WSDL中得到了集合

@ManyToOne
private ServiceReport serviceReport;
@ManyToOne(targetEntity = ServiceReport.class)
private ServiceReport serviceReport;