I also want to make it clear that when you do what Andreas has
proposed, we cache the config in memory. You can configure the cache
here:
<registry provider="org.apache.synapse.registry.url.SimpleURLRegistry">
<!-- the root property of the simple URL registry helps
resolve a resource URL as root + key -->
<parameter
name="root">file:./repository/conf/sample/resources/</parameter>
<!-- all resources loaded from the URL registry would be
cached for this number of milli seconds -->
<parameter name="cachableDuration">15000</parameter>
</registry>
Paul
On Fri, Apr 11, 2008 at 9:56 AM, Wayne Keenan <[EMAIL PROTECTED]> wrote:
> Ah, thank you very much for the information. I will try that.
>
> All the best
> Wayne
>
> On Fri, Apr 11, 2008 at 9:46 AM, Andreas Veithen <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > Wayne,
> >
> > There is a more transparent solution that has been implemented as part of
> > SYNAPSE-200 [1]. As Ruwan suggested, you need to store the WSDL and
> > XSD documents in a registry you have to set up in Synapse. However, you
> > don't need to modify them because Synapse is able to configure a custom
> > resolver that resolves WSDL and XSD locations to registry entries.
> >
> > In your Synapse configuration this looks as follows:
> >
> > <publishWSDL key="conf/bis.wsdl">
> > <resource location="bis.xsd" key="conf/bis.xsd"/>
> > </publishWSDL>
> >
> > In this example, bis.wsdl imports an XSD by using the (relative) location
> > bis.xsd. The configuration tells Synapse to pull this XSD from the registry
> > by using "conf/bis.xsd" as key.
> >
> > This mechanism should work for WSDL (1.1 and 2.0) and XSD imports and
> > support both relative and absolute URLs. Therefore you should be able to
> use
> > something like:
> >
> > <resource location="http://www.standards.org/standard.wsdl"
> > key="standard.wsdl"/>
> >
> > However, probably not all possible cases have been tested yet. If you
> > encounter any problem, please file a JIRA.
> >
> > Regards,
> >
> > Andreas
> >
> > [1] http://issues.apache.org/jira/browse/SYNAPSE-200
> >
> >
> > Quoting Wayne Keenan <[EMAIL PROTECTED]>:
> >
> > Hi
> > >
> > > Thanks for the suggestion. I was hoping for a more transparent solution.
> > > The XSD that are directly included by the WSDL include furhter XSD's. I
> > > will
> > > be working with umpteen unknown WSDL's as the system grows and so would
> > > like
> > > to avoid the maintenance by introducing some kind of transparent and
> > > persisted cache without altering the original WSDL.
> > >
> > > This is potentially not directly a Synapse problem, but a XML parser
> > > issue,
> > > but I would like to understand how to get the XML parser using a Synapse
> > > compatible repository, if that's one way to solve it.
> > >
> > > Regards
> > > Wayne
> > >
> > > On Fri, Apr 11, 2008 at 6:13 AM, Ruwan Linton <[EMAIL PROTECTED]>
> > > wrote:
> > >
> > > Hi Wayne,
> > > >
> > > > Yes. It is already possible with the Synapse registry. In-order to get
> > > > this
> > > > functionality you need to enable the registry in the synapse.xml and
> > > > change
> > > > the wsdl in such a way that the include URIs refer to the XSDs
> > > > uploaded to
> > > > the registry rather than the once available over the internet.
> > > >
> > > > You can enable the registry by putting the following configuration
> > > > fragment
> > > > to the top of the synapse.xml under the definitions tag;
> > > >
> > > > <registry
> > > > provider="org.apache.synapse.registry.url.SimpleURLRegistry">
> > > > <parameter name="root">file:./registry/</parameter>
> > > > <parameter name="cachableDuration">15000</parameter>
> > > > </registry>
> > > >
> > > > Thanks,
> > > > Ruwan
> > > >
> > > > On Thu, Apr 10, 2008 at 7:28 PM, Wayne Keenan <[EMAIL PROTECTED]>
> > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I have an 'industry standard' WSDL published thru a Synapse proxy
> > > > which
> > > > > pulls in about 30 external XSD's off the internet.
> > > > > I was wondering if anyone had manage to create an xinclude URI
> > > > resolver
> > > > > that
> > > > > would use a local registry as opposed to pulling
> > > > > the XSD's off the net.
> > > > > I guess a secondary solution would be to introduce something a the
> > > > network
> > > > > level but I was hoping anyone could point me in the direction of
> > > > some
> > > > sort
> > > > > of repository integration for the XML parser.
> > > > >
> > > > > If this isn't directly possible at the moment, would anyone care to
> > > > > outline
> > > > > thoughts on the feasibility, possible leverage of existing solutions
> > > > and
> > > > > perhaps touch points in various code modules I might need analyse to
> > > > > support
> > > > > such functionality in the: XML Parser, Synapse Proxy and Synapse
> > > > > Repository.
> > > > >
> > > > >
> > > > > Regards
> > > > > Wayne
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Ruwan Linton
> > > > http://www.wso2.org - "Oxygenating the Web Services Platform"
> > > >
> > > >
> > >
> >
> >
> >
> >
>
--
Paul Fremantle
Co-Founder and CTO, WSO2
Apache Synapse PMC Chair
OASIS WS-RX TC Co-chair
blog: http://pzf.fremantle.org
[EMAIL PROTECTED]
"Oxygenating the Web Service Platform", www.wso2.com