Results 1 to 2 of 2

Thread: xfire wsdl question

  1. #1

    Default xfire wsdl question

    Hello All,
    I am working on a project that already has WSDL and XML schemas designed. I have written the business logic for these services as spring beans and I am looking to turn these beans into web services using XFIRE.

    I got some example web services that call spring beans up and running pretty quick, but I was wondering if I can generate server stub implementations from my WSDLs that would be implemented using spring and xfire.

    An example WSDL is here:
    http://www.wijiscommons.org/specs/sc...ntService.wsdl

    One might ask why I am going at this completely backwards? Well, I had the entire solution implemented using JMS and our enterprise service bus does not support JMS so I need to rewrite the edge components. The business logic is essentially the same, but I need a server stub to call my business logic.

    I would like to use XFIRE to expose these services because it seems to work nice with spring. With the example WSDL in the link above, can anyone give me some advice?

    Thanks,
    Yogesh

  2. #2

    Default Making some progress

    Hello All,
    I did complete a simple J-unit test which generates stubs from WSDLs:

    Code:
    import junit.framework.TestCase;
    
    import org.codehaus.xfire.gen.Wsdl11Generator;
    
    public class GenerateStubsFromWSDL extends TestCase{
    
    	public void testGenerate()
    	{
       	 Wsdl11Generator gen = new Wsdl11Generator();
       	 gen.setBinding(Wsdl11Generator.XMLBEANS);
    	 //gen.setWsdl("WSDL/PointerCountService.wsdl");
       	//gen.setWsdl("WSDL/PointerUploadService.wsdl");
       	gen.setWsdl("WSDL/PointerDownloadService.wsdl");
    	 gen.setOutputDirectory("generated-source");
    	 try {
    		gen.generate();
    	} catch (Exception e) {
    		// TODO Auto-generated catch block
    		e.printStackTrace();
    	}
    	
    	}
    }
    I am going to try to make these into spring beans so I can inject the business logic dependencies into them... I will post some sample code when I get that going or perhaps some more questions if I get stuck

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •