You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Sean O'Callaghan <na...@gmail.com> on 2008/12/01 12:45:11 UTC
Re: Schemas embedded within wsdl.
On Mon, Dec 1, 2008 at 11:40 AM, Sean O'Callaghan <na...@gmail.com> wrote:
> Hi,
>
> I'm currently looking at the Apache CXF xmlbeans binding, and am seeing
> some behaviour which I'd like someone with more xmlbeans experience to
> comment on.
>
> Taking a simple wsdl with an embedded schema the binding generates a
> number of .xsb files. However there is an issue with the way the schema
> embedded within the wsdl is handled.
>
> When generating the types a filename is generated for the embedded schema,
> typically something like:
>
> URI_SHA_1_5EE578133C4B175757FF36B397573334CE0BE075/xmlbeanstest.wsdl
>
> where xmlbeanstest.wsdl is the wsdl file containg the embedded schema.
>
> The call stack for this:
>
> StscTranslator.findFilename(XmlObject) line: 722
> StscTranslator.translateGlobalComplexType(TopLevelComplexType, String,
> boolean, boolean) line: 775
> StscTranslator.addAllDefinitions(StscImporter$SchemaToProcess[]) line:
> 158
> SchemaTypeSystemCompiler.compileImpl(SchemaTypeSystem, String,
> SchemaDocument$Schema[], BindingConfig, SchemaTypeLoader, XmlOptions,
> Collection, boolean, URI, Map, File) line: 304
> SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler$Parameters) line:
> 181
>
>
> When trying to discover the schema at runtime, CXF will call;
>
> InputStream ins = sts.getSourceAsStream(filename);
> where sts is a SchemaTypeSystem
>
> but this returns a null InputStream.
>
>
> So what I'd like to know is this type of filename the expected behaviour
> when creating xmlbeans types for an embedded schema?
>
> Is there another way of accessing this schema through xmlbeans at runtime?
>
> Thanks,
>
> Sean O'Callaghan.
>
> The wsdl file used:
>
> <wsdl:definitions name="HelloWorld" targetNamespace="
> http://cxf.apache.org/xmlbeans/wsdltest"
> xmlns="http://schemas.xmlsoap.org/wsdl/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="http://cxf.apache.org/xmlbeans/wsdltest"
> xmlns:x1="http://cxf.apache.org/xmlbeans/wsdltest"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
>
> <wsdl:types>
> <schema xmlns="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://cxf.apache.org/xmlbeans/wsdltest"
> xmlns:x1="http://cxf.apache.org/xmlbeans/wsdltest"
> elementFormDefault="qualified">
>
> <complexType name="StringListType">
> <all>
> <element minOccurs="1" maxOccurs="1" name="myname"
> type="string" />
> <element minOccurs="1" maxOccurs="1"
> name="myaddress" type="string"/>
> </all>
> </complexType>
>
> <element name="sayHi2Message" type="x1:StringListType" />
>
> </schema>
> </wsdl:types>
>
> <wsdl:message name="sayHiRequest2">
> <wsdl:part element="x1:sayHi2Message" name="in"/>
> </wsdl:message>
>
> <wsdl:portType name="GreeterMine">
> <wsdl:operation name="sayHi2">
> <wsdl:input message="tns:sayHiRequest2" name="sayHiRequest2"/>
> </wsdl:operation>
>
> </wsdl:portType>
> <wsdl:binding name="Greeter_SOAPBinding" type="tns:GreeterMine">
> <soap:binding style="document" transport="
> http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="sayHi2">
> <soap:operation soapAction="sayHi2" style="document"/>
> <wsdl:input name="sayHiRequest2">
> <soap:body use="literal"/>
> </wsdl:input>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="SOAPMineService">
> <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort">
> <soap:address location="
> http://localhost:9000/SoapContext/SoapPort"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
>
>
>
>
>
>
>