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

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 {
			loadedDefinition = wsdlResource.getDefinition();
			Iterator<PortType> portTypes = loadedDefinition.getEPortTypes().iterator();
			while (portTypes.hasNext()) {
				PortType portType = (PortType);
				System.out.println("PorType: " + portType.getQName().getLocalPart());
				Iterator<Operation> operations = portType.getOperations().iterator();
				while (operations.hasNext()) {
					Operation operation =; 
					Input ip = (Input)operation.getEInput();
					Output op = (Output)operation.getOutput();
		} catch (Exception exp) {

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: Fri May 25 01:40:40 GMT 2018

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

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

Back to the top