Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » NEWBIE question: how to get the contents of an XSDSchema->WSDL in Java
NEWBIE question: how to get the contents of an XSDSchema->WSDL in Java [message #48984] Wed, 14 July 2004 15:14 Go to next message
Eclipse UserFriend
Originally posted by: a.rutherford.dsl.pipex.com

Hi,

I've got an XSDSchema object, and I simply want to add the types defined in
here in a WSDL document, without using the <import/> tags. I actually want
to see the <types>....</types> to be filled with the types defined in my
XSDSchema.

I'm using the Infoset plugins and also wsdl4j.

I've tried the following:

Definition wsdl = WSDLFactoryImpl.eINSTANCE.createDefinition();
wsdl.setQName(.....
wsdl.setNamespace(....

Types types = wsdlFactory.createTypes();
wsdl.setTypes(types);

I need to know what method to call on the XSDSchema object to return
something I can either populate the 'types' object, or the 'wsdl' object
directly.

thanks for your help

Andy
Re: NEWBIE question: how to get the contents of an XSDSchema->WSDL in Java [message #49015 is a reply to message #48984] Thu, 15 July 2004 12:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Andy,

Doesn't the <types> section simply contain embedded schemas directly? E.g.,

<wsdl:types>
<xsd:schema ...

I don't know the WSDL model well enough to how to populate it. What
type of object do you need for it populate the <types> section?


Andy Rutherford wrote:

>Hi,
>
>I've got an XSDSchema object, and I simply want to add the types defined in
>here in a WSDL document, without using the <import/> tags. I actually want
>to see the <types>....</types> to be filled with the types defined in my
>XSDSchema.
>
>I'm using the Infoset plugins and also wsdl4j.
>
>I've tried the following:
>
>Definition wsdl = WSDLFactoryImpl.eINSTANCE.createDefinition();
>wsdl.setQName(.....
>wsdl.setNamespace(....
>
>Types types = wsdlFactory.createTypes();
>wsdl.setTypes(types);
>
>I need to know what method to call on the XSDSchema object to return
>something I can either populate the 'types' object, or the 'wsdl' object
>directly.
>
>thanks for your help
>
>Andy
>
>
Re: NEWBIE question: how to get the contents of an XSDSchema->WSDL in Java [message #49319 is a reply to message #48984] Thu, 22 July 2004 03:50 Go to previous message
foo bar is currently offline foo barFriend
Messages: 55
Registered: July 2009
Member
Hi Andy,

From your code snippet, I believe you use JWSDL to create WSDL.
JWSDL provides for registering ExtensibilityElements for the Types class.
That is the only way you can add "content" in the types section.

For my own purpose I have created an extensibility element with a serializer
that adds a schema import element.

You could create your own extensibility element, and in your
ExtensionSerializer you could print the text representation of the actual
DOM underlying your XSD schema. The XSDSchema object provides access to the
underlying DOM I think.

If you need to get back and read the schema, you could create your own
ExtensionDeserializer. You can then probably be able to create an XSDSchema
object from the DOM tree provided to you by the WSDL ExtensionDeserializer.

Valentin

"Andy Rutherford" <a.rutherford@dsl.pipex.com> wrote in message
news:cd3ii3$7r7$1@eclipse.org...
> Hi,
>
> I've got an XSDSchema object, and I simply want to add the types defined
in
> here in a WSDL document, without using the <import/> tags. I actually
want
> to see the <types>....</types> to be filled with the types defined in my
> XSDSchema.
>
> I'm using the Infoset plugins and also wsdl4j.
>
> I've tried the following:
>
> Definition wsdl = WSDLFactoryImpl.eINSTANCE.createDefinition();
> wsdl.setQName(.....
> wsdl.setNamespace(....
>
> Types types = wsdlFactory.createTypes();
> wsdl.setTypes(types);
>
> I need to know what method to call on the XSDSchema object to return
> something I can either populate the 'types' object, or the 'wsdl' object
> directly.
>
> thanks for your help
>
> Andy
Re: NEWBIE question: how to get the contents of an XSDSchema->WSDL in Java [message #589737 is a reply to message #48984] Thu, 15 July 2004 12:35 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31622
Registered: July 2009
Senior Member
Andy,

Doesn't the <types> section simply contain embedded schemas directly? E.g.,

<wsdl:types>
<xsd:schema ...

I don't know the WSDL model well enough to how to populate it. What
type of object do you need for it populate the <types> section?


Andy Rutherford wrote:

>Hi,
>
>I've got an XSDSchema object, and I simply want to add the types defined in
>here in a WSDL document, without using the <import/> tags. I actually want
>to see the <types>....</types> to be filled with the types defined in my
>XSDSchema.
>
>I'm using the Infoset plugins and also wsdl4j.
>
>I've tried the following:
>
>Definition wsdl = WSDLFactoryImpl.eINSTANCE.createDefinition();
>wsdl.setQName(.....
>wsdl.setNamespace(....
>
>Types types = wsdlFactory.createTypes();
>wsdl.setTypes(types);
>
>I need to know what method to call on the XSDSchema object to return
>something I can either populate the 'types' object, or the 'wsdl' object
>directly.
>
>thanks for your help
>
>Andy
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: NEWBIE question: how to get the contents of an XSDSchema->WSDL in Java [message #589828 is a reply to message #48984] Thu, 22 July 2004 03:50 Go to previous message
foo bar is currently offline foo barFriend
Messages: 55
Registered: July 2009
Member
Hi Andy,

From your code snippet, I believe you use JWSDL to create WSDL.
JWSDL provides for registering ExtensibilityElements for the Types class.
That is the only way you can add "content" in the types section.

For my own purpose I have created an extensibility element with a serializer
that adds a schema import element.

You could create your own extensibility element, and in your
ExtensionSerializer you could print the text representation of the actual
DOM underlying your XSD schema. The XSDSchema object provides access to the
underlying DOM I think.

If you need to get back and read the schema, you could create your own
ExtensionDeserializer. You can then probably be able to create an XSDSchema
object from the DOM tree provided to you by the WSDL ExtensionDeserializer.

Valentin

"Andy Rutherford" <a.rutherford@dsl.pipex.com> wrote in message
news:cd3ii3$7r7$1@eclipse.org...
> Hi,
>
> I've got an XSDSchema object, and I simply want to add the types defined
in
> here in a WSDL document, without using the <import/> tags. I actually
want
> to see the <types>....</types> to be filled with the types defined in my
> XSDSchema.
>
> I'm using the Infoset plugins and also wsdl4j.
>
> I've tried the following:
>
> Definition wsdl = WSDLFactoryImpl.eINSTANCE.createDefinition();
> wsdl.setQName(.....
> wsdl.setNamespace(....
>
> Types types = wsdlFactory.createTypes();
> wsdl.setTypes(types);
>
> I need to know what method to call on the XSDSchema object to return
> something I can either populate the 'types' object, or the 'wsdl' object
> directly.
>
> thanks for your help
>
> Andy
Previous Topic:Use xsd library in java applet
Next Topic:Duplicate name/target namespace error
Goto Forum:
  


Current Time: Sat Nov 28 19:47:45 GMT 2020

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

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

Back to the top