views:

322

answers:

2

Hello, I have done this on Websphere (re: title of this topic) using wsdl2java for generating wsdl to java mapping xml file. My endpoint is a generic stateless EJB. The code in EJB is generated by traversing the each wsdl and getting the wsdl operation and stuck it in the generated remote EJB interface. Each EJB method impl is generic and handles all the services the same. Used instructions on this doc to do this on WAS: http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/twbs_devwbsjaxrpcwsdl.html

Now, I am asking you all for help if anyone has done something similar in Sun AS 9.1.

Starting from existing WSDL (and xsd) files. Knowing the sole EJB service endpoint implementation for each services are the same, and generating an EAR file (webservices.xml, ejb-jar.xml, etc).

Have struggled with wscompile and alike, but not getting anyware in the same fashion I did for WebSphere.

Thanks for help.

+1  A: 

You want to create a WS client which runs under Sun AS? I don't know Sun AS in detail and I don't know the WS libraries it supplies. But you may want to use a public WS library:

For every library there is documentation which describes how to create a project from WSDL.

You could even use Eclipse to create a project from WSDL for you: File -> New -> Other... -> Web Services -> WSDL. Make sure you have the "WST Web Services" Plugins installed.

Eduard Wirch
A: 

I've never used it myself, but I just recently read about the wsdlLocation() attribute of the WebService annotation, which is supposed to map the service to a preexisting WSDL document (not sure if you're even using EJB3, though).

Fabian Steeg