facebook

Other package for generated files

  1. MyEclipse Archived
  2.  > 
  3. Web Services
Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #254538 Reply

    Roel De Nijs
    Member

    Is it possible to put the generated files (by the web service wizard) in another package (at generation). I know you can refactor and move those files.

    #254581 Reply

    Brian Fernandes
    Moderator

    Hysterio,

    Both top down and bottom up wizards give you a field into which you can put in your desired package name. For the POJOs generated by the top down wizard, those are decided based on the namespace in the WSDL document and cannot be changed.
    Perhaps I have misunderstood your question, if so, could you elaborate a little more?

    Best,
    Brian.

    #254612 Reply

    Roel De Nijs
    Member

    Brian,

    i created already some JAX-WS web services with NetBeans 5.0, so i looked forward to the M2 release of ME5.0

    So yesterday i spend a whole day to do some experiments with the web services.

    in netbeans you have a build.xml and one of its entries is:

    [target name=”-pre-compile-test”]
    [taskdef name=”wsimport” classname=”com.sun.tools.ws.ant.WsImport”]
    [classpath path=”${javac.classpath}”/]
    [/taskdef]

    [!– Use “debug” or “run” here. –>
    [antcall target=”run”/]
    [echo]running wsimport[/echo]
    [wsimport
    debug=”true”
    keep=”true”
    destdir=”test”
    package=”be.aquafin.webgis.ws03.server.generated”
    wsdl=”http://10.1.10.117:8084/WS03/dbService?wsdl”/%5D
    [/target]

    and like you can see, you can give a package (bold) and the generated files will be added to the package.

    but depending on your explanation it isn’t possible with MyEclipse 5.0M2

    #254618 Reply

    Brian Fernandes
    Moderator

    Hysterio,

    1) Are you using the top down wizard or bottom up?
    2) Have you tried specifying a package in the appropriate wizard fields? What happens?

    If you’re using the top down wizard, package names for the POJOs depends on the namespace within your WSDL file, this is usually what most people expect. Do you want to keep one namespace and use a non-corresponding package name?
    The pacakge field controls the packe of the service interface, service implementation and test client if any.

    Best,
    Brian.

    #254620 Reply

    Roel De Nijs
    Member

    OK, if i check “define custom mapping for namespace” and i add a mapping, the wizard puts the generated files in the package i defined. so you can do it and it works. you only have to know where to look in the wizard 🙂

    so this was a not needed question if i had done some better experimenting and trying

    #254677 Reply

    Brian Fernandes
    Moderator

    Hysterio,

    I’m afraid we don’t have a “define custom mapping for namespace” setting in any of our wizards. I think you might have got our Wizards crossed with the WTP WebService wizards which we do not support right now.
    Can you tell me how you invoke this wizard?

    To see only MyEclipse wizards, please turn go to Window > Preferences > General > Capabilities and click Advanced. Under MyEclipse Standard Tools, turn WTP Exras and WTP Deprecated off.

    If you installed a full Callisto stack, the capabilies might look a little different, turn off all capabilities under the development category except Java development (and optionally PDE).

    Best,
    Brian.

    #254701 Reply

    Roel De Nijs
    Member

    The WTP Extras & WTP Deprecated are turned off by default, so i checked it again but they weren’t checked

    to retrieve what i’m talking about:
    – go to Web Services explorer
    – go to the wsdl view
    – click on “wsdl main”
    – type an url to a wsdl
    – click go
    – select in the navigator the link to the wsdl
    – scroll in the Actions to the bottom. under “Other Actions” click on “Launch Web Service Wizard”
    – select then “Web Service Client” and click Go
    – a new window opens
    – then i set “Client Project” to a project in my workspace and i set the “Client EAR project” to nothing and click next
    – the following page is displayed

    – and there is the “define custom mapping for namespace to package” checkbox. if you check that one, you get another screen when you click next (there you can tell which namespace has to be mapped to which package), otherwise you have to click on finish

    #254705 Reply

    Brian Fernandes
    Moderator

    Hysterio,

    Thanks for all that detail. The wizard you are referring to is a WTP wizard and not ours.

    Through the capabilies settings, we suppress wizards and UI elements which we do not support in MyEclipse, this particular action to invoke the wizard was overlooked.
    We do not support this wizard right now, but will in future releases.

    To use the MyEclipse XFire based wizards, please see File > New > Other > MyEclipse > Web Services > Web Service.
    You can also invoke this wizard from the Eclipse toolbar.

    I apologize for the inconvenience and confusion,
    Best,
    Brian.

    #254708 Reply

    Roel De Nijs
    Member

    OK, we are talking about the same thing now, so i will shoot some questions about those wizards:

    1. wizard bottom-up
    ———————–
    i create a web-service and i make some adjustments (with jax-ws and so). i’ll get this very basic service

    
    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    import javax.jws.WebService;
    
    @WebService(name="Hallo", serviceName="HalloService")
    public interface IHalloService {
        
        @WebMethod
        public String zegHallo(@WebParam(name="naam") String s);       
        
    }
    

    i also have the implementation class adjusted.
    i deploy the web services project to my tomcat.

    now i can go to the wsdl-file in the web services explorer and try out my web service

    2. top-down
    ————–
    i start the wizard and choose for wsdl url, so i give the same url i used in 1 to try out my web service, i give also a package and click op finish. a couple of new classes are generated, some in the new package i declared, some in other packages (so that’s the answer to my initial question)

    so things get a lot more obvious now:
    – the question i posted here is solved because there i was using wizard of myeclipse and also the wizard of wtp, and that’s why results (generated classes) were different
    – the classes generated with the top-down of MyEclipse are very equivalent with those generated with NetBeans 5.0 (because i used that one first)
    – 1 remark/question: i made some (very basic) web services with NetBeans 5.0, when i try to use the top-down wizard with a wsdl url, i got “error generating services” and the details-button is greyed out (disabled) so can’t look to the details of it. if i try the same with the wizard of wtp (described above) everything is generated properly, no error.

    in the error log i find

    
    
    !ENTRY com.genuitec.eclipse.ws.xfire 4 0 2006-07-13 12:56:27.076
    !MESSAGE Error generating services
    !STACK 0
    org.codehaus.xfire.XFireRuntimeException: Couldn't find schema for part: {http://server.ws03.webgis.aquafin.be/}getAantalRecords
        at org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.isWrapped(WSDLServiceBuilder.java:521)
        at org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.visit(WSDLServiceBuilder.java:376)
        at org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.build(WSDLServiceBuilder.java:187)
        at org.codehaus.xfire.gen.Wsdl11Generator.generate(Wsdl11Generator.java:100)
        at com.genuitec.eclipse.ws.xfire.generator.WSGenJob.run(WSGenJob.java:59)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
    
    #254748 Reply

    Brian Fernandes
    Moderator

    Hysterio,

    Glad we’re on the same page now.
    Can you send us the WSDL in question? It appears that our top down generator fails for some files and we are investigating it right now. I could add yours to the report, it should help us fix this faster.
    You can paste the WSDL here or mail it to support@genuitec.com ATTN Brian with a link to this thread.

    Best,
    Brian.

    #254782 Reply

    Roel De Nijs
    Member

    the mail has been sent

    #254964 Reply

    Brian Fernandes
    Moderator

    This message has not been recovered.

    #254965 Reply

    Roel De Nijs
    Member

    This message has not been recovered.

    #254966 Reply

    Brian Fernandes
    Moderator

    This message has not been recovered.

    #254967 Reply

    Roel De Nijs
    Member

    This message has not been recovered.

Viewing 15 posts - 1 through 15 (of 17 total)
Reply To: Other package for generated files

You must be logged in to post in the forum log in