[Architecture] Suggestions from a user to improve WSDL Generation -- Schema Resolving
Amila Suriarachchi
amila at wso2.com
Sat Sep 12 09:34:31 EDT 2009
On Sat, Sep 12, 2009 at 7:10 AM, Ruwan Linton <ruwan at wso2.com> wrote:
> Amila Suriarachchi wrote:
> > I think this situation happens when someone try to create a proxy
> > service by giving a wsdl file.
> >
> >
> > Generally there can be two situations for this,
> >
> > 1. Original service runs on a public ip machine and user wants to show
> > its locations.
> >
> > 2. Original service runs on a local machine or proxy service developer
> > wants to hide the original service location.
> >
> > I think the current synapse code is written for the second option.
> >
> > In order to handle the first case we need to add a parameter to proxy
> > service. (eg. showOriginalLocations)
> >
> > This can be implemented in one of the following two ways.
> >
> > Set the useOriginalwsdl parameter to true. Then when displaying the
> > wsdl it does not change the schema locations started with http:
> Amila, how do we deal with relatively imported schemas in the original
> WSDL?? For example lets say the wsdl1 has a schema called schema1 on the
> same location relative the WSDL location, now on the WSDL the schema
> import will say just the schema name as the location, right? So how do
> we resolve those schemas... I guess we cannot resolve them right?
>
if original wsdl has some thing like this
<wsdl:import location="foo.wsdl"/>
then the wsdl shown will be
<wsdl:import location="fooService?wsdl=foo.wsdl/>
The syntax may be wrong. But the idea is if it is a relative location then
that service?wsdl prefix
is added. And the wsdl can be retrieved by sending a request to that path.
if the original location is started with http:// ie.
<wsdl:import location="http://foo.wsdl/>
then the wsdl show is same
<wsdl:import location="http://foo.wsdl/>
IMHO case with proxy service different from an axis2 service deployed as
.aar file. So we need to
think all possibilities and address them properly.
thanks,
Amila.
>
> Thanks,
> Ruwan
> >
> > if (attribute.getNodeName().equals("schemaLocation")) {
> > attributeValue = attribute.getNodeValue();
> > if (attributeValue.indexOf("://") == -1 &&
> > attributeValue.indexOf("?xsd=") == -1) {
> > attribute.setNodeValue(this.getServiceEPR() +
> > "?xsd=" + attributeValue);
> > }
> > }
> >
> > set the CustomSchemaNamePrefix can be set to "" (not null)
> >
> > axisService.setCustomSchemaNamePrefix("")
> >
> > this stops adding the service name xsd part.
> >
> > Or is there any other thing I have missed completely.
> >
> > thanks,
> > Amila.
> >
> >
> >
> >
> >
> >
> > On Tue, Sep 8, 2009 at 11:40 PM, Indika Kumara <indika at wso2.com
> > <mailto:indika at wso2.com>> wrote:
> >
> > Hi all
> >
> > #subject is at [1].
> >
> > Thanks
> >
> > Indika
> >
> > [1] http://wso2.org/forum/thread/5821#comment-10207
> >
> >
> > _______________________________________________
> > Architecture mailing list
> > Architecture at wso2.org <mailto:Architecture at wso2.org>
> > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Architecture mailing list
> > Architecture at wso2.org
> > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
> >
>
>
> --
> Ruwan Linton
> Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
> WSO2 <http://wso2.org/esb%0AWSO2> Inc.; http://wso2.org
> email: ruwan at wso2.com; cell: +94 77 341 3097
> blog: http://blog.ruwan.org
>
>
>
> _______________________________________________
> Architecture mailing list
> Architecture at wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.wso2.org/pipermail/architecture/attachments/20090912/9ea2c41b/attachment.html>
More information about the Architecture
mailing list