users@glassfish.java.net

Re: WSGEN Classpath

From: Vijay Ramachandran <Vijay.Ramachandran_at_Sun.COM>
Date: Tue, 31 Oct 2006 11:39:45 -0800

How are you packaging it ? Checkout
glassfish\appserv-tests\devtests\webservice\annotations\libdependent for
a sample servlet endpoint using classes in a library. Checkout
glassfish\appserv-tests\devtests\webservice\ejb_annotations\libdependent*
for a sample EJB endpoint using classes in a library.

Vijay

Kenneth Clark wrote:
> Thanks very much. I did what you suggested and it works now.
>
> BUT
> Now when I deploy the JAR webservice it gives me:
> Deploying application in domain failed; Deployment Error -- null
> Deployment Error -- null
>
> CODE
>
> @Stateless
> @WebService(serviceName = "CompanyWebService")
> public class CompanyServiceBean implements CompanyService {
> public CompanyServiceBean(){
> }
>
> @WebMethod(operationName="fetchCompany")
> public CompanyResponse getCompany(CompanyRequest cRequest){
> CompanyResponse cResponse = null;
> try{
> Response response = ResponseImpl.getDefaultFactory().create("This
> is the repsonse", true);
> cResponse =
> CompanyResponseImpl.getDefaultFactory().create(cRequest.getCompany(),
> response);
> }catch(CloneNotSupportedException e){
> }
> return cResponse;
> }
> }
>
> I have put the library containing the CompanyResponse etc in
> glassfish/domains/domain1/lib and restarted the domain. A simple web
> service returning a String works but this one just won't deploy. Sorry
> about all the dumb questions. I have not put any deployment
> descriptors in place as I am under the impression that this is not
> needed with the annotations?
>
> Regards
> Kenneth
>
> Jitendra Kotamraju wrote:
>> Kenneth Clark wrote:
>>
>>> Just had an interesting battle with the wsgen tool and the -cp arg.
>>>
>>> Scenario
>>> I have a jar library external to my web service (it is a custom
>>> library that many web services will feed off)
>>> if in the -cp arg I put the physical path to the library (not
>>> packaged, extracted) and try run the wsgen tool it tell me it can
>>> find files but if I put the library in the same directory that I am
>>> running the wsgen tool from it worked.
>>>
>>> It also works if I put it in the PATH environment variable.
>>>
>>> example
>>> project.company.ClassName (library file)
>>> in a directory structure
>>> drive:\classes
>>>
>>> company.webservices.ServiceEndPointClass (webservice file)
>>> in a drictory structure
>>> drive:\webservice
>>>
>>> WSGEN
>>> drive:\webservice>wsgen -cp drive:\classes
>>> company.webservices.ServiceEndPointClass -wsdl
>>
>> Put both library classes as well as webservice classes in the classpath.
>>
>> wsgen -cp drive:\classes;drive:\webservice
>> company.webservices.ServiceEndPointClass -wsdl
>>
>> Jitu
>>
>>>
>>> will return an error stating that the class (ClassName) cannot be
>>> found (this is based on the assumption that ClassName is being used
>>> by the web service).
>>>
>>> Am I doing something really stupid? Is this normal behaviour?
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>