0

I'm using the Java EE GlassFish application server and Eclipse IDE. I've created a web service using the following annotation:

package com.ws;

@Stateless
@WebService  
public class AttachmentService implements AttachmentRemote, AttachmentLocal {


    /**
     * Default constructor.
     */
    public AttachmentService() {
    }


    @Override
    @WebMethod
    public MyAttachment downloadAttachment(long attachmentId){
        .........
    }


    @Override
    @WebMethod
    public void uploadFile(MyAttachment attachment) {
        ..............

    }
}

It's deployed correctly, and the WSDL was created at the location http://localhost:8080/AttachmentServiceService/AttachmentService?WSDL.

My question is:

Can I use the WSDL at runtime without generating the stub class manually?

If I change the methods or add a new method so I need to regenerate the stub classes? So that I need to test all methods and redeploy all my application which use this web service?

Hazim
  • 805
  • 11
  • 24

1 Answers1

0

Are you sure that you want to generate the stub classes automatically? Usually you won't need to change your wsdl definition very often, and in some cases you might want to changes some details in your stubs. I think it is quite common to do it "by hand", for example with eclipse.

Community
  • 1
  • 1
nsanglar
  • 1,632
  • 1
  • 14
  • 24