开发者

Generating accessor method in java code generated from WSDL

I am generating a java web service from a WSDL 1.1 document. I'm using Netbeans. The service generates fine and I can deploy it to Tomcat with no problem.

Now, I have a type for my response called "searchPhoneOutputType". When it generates, the class contains a method called List getOutput(), which allows me to get the list of results.

My question is the following, how could I tell the code generator to also generate a setOutput(List out) method? I coul开发者_开发百科d do it by hand, but then it would get overwritten when I re-generate code.

I'm wondering if there is some type of annotation XML I can use to tell the code generator to generate certain methods.

If you could shed some light I would greatly appreciate it. Thank you.


Not sure how Netbeans generates these bindings, must be via JAXB. Hence we have the .jxb config files, where you can put in generation instructions.

Extensive doc: http://download.oracle.com/docs/cd/E17802_01/webservices/webservices/docs/1.5/tutorial/doc/JAXBUsing4.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜