开发者

Unable to create j2me webservice client for a class with cyclic reference

Server

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 client

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.is开发者_开发问答Valid(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)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜