服务器
import javax.jws.WebService;
@WebService(endpointInterface = "SomeService")
public class SomeServiceImpl implements SomeService{
@Override
public Parent getParent() {
return new Parent();
}
}
public class Parent {
private Child child;
//Getter,Setter
}
public class Child {
private Parent parent;
//Getter,Setter
}
J2ME客户端
C:\WTK2.5.2_01\bin>wscompile.exe -gen -cldc1.1 -verbose config.xml
[RemoteInterfaceGenerator: Generating Java class for: SomeService.java]
[CustomClassGenerator: generating JavaClass for: getParent]
[CutomClassGenerator: generating JavaClass for: getParentResponse]
[CustomClassGenerator: generating JavaClass for: parent]
[CustomClassGenerator: generating JavaClass for: child]
Exception in thread "main" java.lang.StackOverflowError
at com.sun.j2mews.sg.StubGenerator.isValid(Unknown Source)
at com.sun.j2mews.sg.StubGenerator.isValid(Unknown Source)
at com.sun.j2mews.sg.StubGenerator.isValid(Unknown Source)
at com.sun.j2mews.sg.StubGenerator.isValid(Unknown Source)
at com.sun.j2mews.sg.StubGenerator.isValid(Unknown Source)
at com.sun.j2mews.sg.StubGenerator.isValid(Unknown Source)