You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by "Sloan, John L (John)" <js...@avaya.com> on 2006/08/16 00:19:30 UTC

WSDLFlattener


SM-479 and SM-511 inspired me to look at WSDLFlattener
in servicemix-common to solve some of our WSDL and XSD
issues. So far so good with the first two WSDLs I tried.

Then I tried to flatten a WSDL that, while it does import
an XSD, it also has embedded XSD, e.g.

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

instead of importing all of its XSDs as with the prior
two WSDLs. [Walmsley] and [WSDL 1.1] seems to think this
is okay (at least, [WSDL 1.1] has it in an example). And
the problem could be still in the WSDL and I just haven't
found it yet. But using the Eclipse debugging to step
through WSDLFlattener, it seems to do

	Schema schema = schemas.getSchema(elemName.getNamespaceURI());

and throws a NPE when schema comes back null. Indeed, the
embedded schema identified in the elemName isn't in the
schemas HashMap. The contents of schemas appears to be
built only from imported schemas.

I'm hoping this is pilot error on my part with the
WSDL, but still staring at it until my eyes bleed.

Anyone have a known working example of embedded a schema
inside a WSDL and running WSDLFlattener on it?

Thanks.

--
John Sloan              email jsloan@avaya.com
Avaya Inc.              voice  +1 303 538 2746
1300 West 120th Ave.    office          B1-C46
Westminster CO 80234-2701 USA 



Re: WSDLFlattener

Posted by Bruce Snyder <br...@gmail.com>.
On 8/15/06, Sloan, John L (John) <js...@avaya.com> wrote:
>
>
> SM-479 and SM-511 inspired me to look at WSDLFlattener
> in servicemix-common to solve some of our WSDL and XSD
> issues. So far so good with the first two WSDLs I tried.
>
> Then I tried to flatten a WSDL that, while it does import
> an XSD, it also has embedded XSD, e.g.
>
> <wsdl:types>
>  <xsd:schema>
>   <xsd:element ... >
>
> instead of importing all of its XSDs as with the prior
> two WSDLs. [Walmsley] and [WSDL 1.1] seems to think this
> is okay (at least, [WSDL 1.1] has it in an example). And
> the problem could be still in the WSDL and I just haven't
> found it yet. But using the Eclipse debugging to step
> through WSDLFlattener, it seems to do
>
>         Schema schema = schemas.getSchema(elemName.getNamespaceURI());
>
> and throws a NPE when schema comes back null. Indeed, the
> embedded schema identified in the elemName isn't in the
> schemas HashMap. The contents of schemas appears to be
> built only from imported schemas.
>
> I'm hoping this is pilot error on my part with the
> WSDL, but still staring at it until my eyes bleed.
>
> Anyone have a known working example of embedded a schema
> inside a WSDL and running WSDLFlattener on it?

John, can you post the XSD so that I can try to debug the issue?

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://incubator.apache.org/activemq/
Apache ServiceMix - http://incubator.apache.org/servicemix/
Castor - http://castor.org/