| NEWBIE question: how to get the contents of an XSDSchema->WSDL in Java [message #48984] | 
Wed, 14 July 2004 11:14   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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 #49319 is a reply to message #48984] | 
Wed, 21 July 2004 23:50   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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 08:35   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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 #589828 is a reply to message #48984] | 
Wed, 21 July 2004 23:50   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.04024 seconds