ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> wsdl
wsdl
Re: [wsdl] More on complicated schemas in a WSDL
by Anne Thomas Manes other posts by this author
Feb 25 2005 5:42PM messages near this date
[wsdl] More on complicated schemas in a WSDL | [wsdl] I'm new to this group
SERVICES 
First - Schemas must be imported into a <schema>  in the <types>
section using the <xsd:import>  rather than the <wsdl:import>. But in
your case, you actually want to use <xsd:include> . In order to import
multiple schemas with the same namespace into your WSDL, you need to
create a schema and then include the schemas, e.g.:

<wsdl:types> 
  <xsd:schema targetNamespace='http://www.mynamespace.org/mns'> 
    <include schemaLocation='http://schemas.myspace.mycompany.org/SchemaFile1.xsd'
/> 
   <include schemaLocation='http://schemas.myspace.mycompany.org/SchemaFile2.xsd'
/> 
  </xsd:schema> 
</wsdl:types> 

As long as you define the types properly, WebSphere should encode them
properly using SOAP encoding.

Anne




On Fri, 25 Feb 2005 15:01:09 -0000, go81816 <go81816@[...].com>  wrote:
>  
>  
>  I am trying to import a fairly complicated XML schema into my WSDL
>  file so that I can use types defined there as types for the
>  parameters I want to pass to and from my web service.  I run into a
>  few issues:
>  First, how do I import multiple schemas from one targetNamespace?
>  My tools are supposedly WSDL 1.1 compliant and the WSDL 1.1 spec.
>  mentions in the appendix that multiple schemas from the same
>  targetNamespace is valid, but my WebSphere client gives me a parsing
>  error when reading the WSDL saying duplicate namespace identified.
>  Second, when using an XML type as a parameter type, how should the
>  data actually look on the wire?  I fear this may be an encoding
>  issue because my server may not support literal encoding and so I am
>  bound to specify soap encoding.  The problem is when not using the
>  WSDL I can pass string-ified, literal XML to the SOAP message
>  building API and everything works fine.  But, when I try to use the
>  WSDL with the same string-ified XML I get a parsing error on my
>  server.  I can see from ethernet captures that when using the WSDL
>  the wire format of the SOAP mesasge is encoded differently than when
>  not using the WSDL.  If I use the xsd:string type should the data be
>  translated to the wire differently?  I'm interested in learning how
>  XML data types are "supposed" to be translated in SOAP+WSDL.  Any
>  discussion on the specifics of using WSDLs with complex XSD types
>  would be greatly appreciated.
>  
>  in my wsdl...
>  <definitions name="MyWebServices"
>    targetNamespace='http://www.myspace.mycoompany.org/soap-wsdl'
>    xmlns:mns='http://www.mynamespace.org/mns'
>    xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
>    xmlns:xsd='http://www.w3.org/2001/XMLSchema'
>    xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
>    xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
>    xmlns='http://schemas.xmlsoap.org/wsdl/'>
>      <import namespace='http://www.mynamespace.org/mns'
>  location='http://schemas.myspace.mycompany.org/SchemaFile1.xsd' />
>      <import namespace='http://www.mynamespace.org/mns'
>  location='http://schemas.myspace.mycompany.org/SchemaFile2.xsd' />
>  
>    <message name='Func1Response0'>
>      <part name='ReturnValue' type='mns:TypeInSchemaFile1' />
>    </message>
>    <message name='Func1Request0'>
>      <part name='ParamValue' type='mns:TypeInSchemaFile2' />
>    </message>
>  
>  ...portType...
>  ...binding...
>  ...service...
>  </definitions>
>  
>  -----------------------------------------------------------------
>  This group is a forum for the discussion of the WSDL specification and its implementation.
  Please stay on-topic.
>  Yahoo! Groups Links
>  
>  
>  
>  
> 


-----------------------------------------------------------------
This group is a forum for the discussion of the WSDL specification and its implementation.  
Please stay on-topic. 
Yahoo! Groups Links

<*>  To visit your group on the web, go to:
    http://groups.yahoo.com/group/wsdl/

<*>  To unsubscribe from this group, send an email to:
    wsdl-unsubscribe@[...].com

<*>  Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 
Thread:
Go81816
Anne Thomas Manes

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved