Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » use emf model to create SOAP Request
use emf model to create SOAP Request [message #947570] Wed, 17 October 2012 07:45
Chiman Rao is currently offline Chiman RaoFriend
Messages: 2
Registered: October 2012
Junior Member
hi

I am using the following piece of code to create a model from a wsdl file.
	public static void main(String args[]) {
		URI fileURI = URI.createURI("someurl.wsdl");
		WSDLResourceFactoryImpl factImpl = new WSDLResourceFactoryImpl();
		WSDLResourceImpl wsdlResource = (WSDLResourceImpl)factImpl.createResource(fileURI);
		ResourceSet set = new ResourceSetImpl();
		set.getResourceFactoryRegistry().getExtensionToFactoryMap().put("xml", new XMLResourceFactoryImpl());
		set.getResourceFactoryRegistry().getExtensionToFactoryMap().put("xsd", new XSDResourceFactoryImpl());
		wsdlResource.basicSetResourceSet(new ResourceSetImpl(), null);
		Definition loadedDefinition = null;
		
		try {
			wsdlResource.load(null);
			loadedDefinition = wsdlResource.getDefinition();
			Iterator<PortType> portTypes = loadedDefinition.getEPortTypes().iterator();
			while (portTypes.hasNext()) {
				PortType portType = (PortType)portTypes.next();
				System.out.println("PorType: " + portType.getQName().getLocalPart());
				Iterator<Operation> operations = portType.getOperations().iterator();
				while (operations.hasNext()) {
					Operation operation = operations.next(); 
					Input ip = (Input)operation.getEInput();
					Output op = (Output)operation.getOutput();
					
				}
				
			}
			
		} catch (Exception exp) {
			exp.printStackTrace();
			
		}
	}
}


From this I want to construct a SOAP message for one of the operations programatically. How can I do this?
Previous Topic:Eclipse Dali generate entities from tables problem
Next Topic:Content Assist doesn't work 100% for tagx
Goto Forum:
  


Current Time: Tue Apr 23 08:40:43 GMT 2024

Powered by FUDForum. Page generated in 0.02948 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top