Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » org.eclipse.wst.wsdl.Definition serialization namespace
org.eclipse.wst.wsdl.Definition serialization namespace [message #145995] Wed, 02 November 2005 15:35 Go to next message
Eclipse UserFriend
Originally posted by: esnible.acm.org

I create a <definition> using
org.eclipse.wst.wsdl.WSDLFactory.eINSTANCE.createDefinition( ), add the
definition to a Resource, and save it. The generated .wsdl file looks
like this:

<?xml version="1.0" encoding="UTF-8"?>
<definitions/>

This was unexpected; I had hoped to see a namespace:

<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"/>

This seems to be my fault. I have told the ResourceSet to use
org.eclipse.wst.wsdl.internal.util.WSDLResourceFactoryImpl (by putting
that in the extension-to-factory map.) When I put XMIResourceFactoryImpl
into the extension-to-factory map alone I get proper namespaces:

<?xml version="1.0" encoding="ASCII"?>
<wsdl:Definition xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns:wsdl="http://www.ibm.com/wsdl/2003/WSDL"/>

... but that factory impl can't serialize the full WSDL I want to generate
(EMF complains the embedded schemas aren't contained in a file when
serializing using XMIResourceFactoryImpl).

Any advice?
Re: org.eclipse.wst.wsdl.Definition serialization namespace [message #146132 is a reply to message #145995] Thu, 03 November 2005 10:49 Go to previous messageGo to next message
Eclipse UserFriend
It sounds to be a bug in the WSDL model.

Try to associate it with a namespace prefix like the following as a
workaround, and open a defect.

...
Definition definition = WSDLFactory.eINSTANCE.createDefinition();
resource.getContents().add(definition);
...
definition.addNamespace("wsdl", "http://schemas.xmlsoap.org/wsdl/");
...

- Kihup
Re: org.eclipse.wst.wsdl.Definition serialization namespace [message #146178 is a reply to message #145995] Thu, 03 November 2005 11:36 Go to previous message
Eclipse UserFriend
Originally posted by: esnible.acm.org

With some help from an IBM colleage I discovered a fix.

Adding

d.addNamespace("wsdl", "http://schemas.xmlsoap.org/wsdl/");

to the EMF instance fixed the serialization problems. I post here in case
others encounter the same problem.
Previous Topic:WTP XDoclet EJB spec version
Next Topic:Help with Eclipse - BIRT
Goto Forum:
  


Current Time: Mon Apr 21 02:07:06 EDT 2025

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

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

Back to the top