WSDL parsing that includes references to standard soap encoding types [message #557790] |
Wed, 08 September 2010 23:08 |
seth Messages: 1 Registered: September 2010 |
Junior Member |
|
|
Hi,
I am trying to write a wsdl parser using eclipse wst framework. Here is the snippet i use
ResourceSet resourceSet = new ResourceSetImpl();
URI wsdlURI = URI.createURI("*.wsdl"); //$NON-NLS-1$
Factory factory = WSDLResourceFactoryRegistry.INSTANCE.getFactory((wsdlURI));
resourceSet.getResourceFactoryRegistry().
getExtensionToFactoryMap().put("wsdl", //$NON-NLS-1$
factory);
WSDLResourceImpl wsdlResource = (WSDLResourceImpl)resourceSet.createResource(wsdlURI);
resourceSet.getLoadOptions().put(WSDLResourceImpl.CONTINUE_O N_LOAD_ERROR, new Boolean(false));
resourceSet.getLoadOptions().put(WSDLResourceImpl.USE_EXTENS ION_FACTORIES, new Boolean(true));
wsdlResource.setURI(createURI(uri));
wsdlResource.load(null, resourceSet.getLoadOptions());
Definition definition = wsdlResource.getDefinition();
The problem is if the wsdl has some references to the types in standard soap encoding namespace xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" like <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:ResultElement[]"/> the schema validation fails with error XSD: Attribute reference 'http://schemas.xmlsoap.org/soap/encoding/#arrayType' is unresolved.
After debugging i could find there is an extension point catalogContribution and these standard namcespaces are contributed to that extension point, but how do i make sure these standard namespace grammers are loaded without explicitly specifying import. Any help would be appreciated.
Thanks
|
|
|
Powered by
FUDForum. Page generated in 0.04759 seconds