synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Veithen <andreas.veit...@skynet.be>
Subject Re: Publishing WSDL files with imported WSDL/XSD
Date Tue, 18 Dec 2007 15:53:23 GMT
Paul,

I created a new issue for that (SYNAPSE-200). However as I said in my  
initial mail, the patch only solves a small part of the problem by  
making this work for absolute URLs (which I don't want). I think a  
better and more general solution is needed. Ideally, Synapse should  
also be able to load imported artifacts from its registry. What I  
would like to have is something like this:

<publishWSDL key="conf/bis.wsdl">
   <resource location="bis.xsd" key="conf/bis.xsd"/>
</publishWSDL>

Technically this can be implemented by setting a custom URIResolver on  
the WSDLToAxisServiceBuilder.

If I provide a patch that implements this, would you (or somebody  
else) agree to review it and to commit it?

Andreas


On 18 Dec 2007, at 15:28, Paul Fremantle wrote:

> Andreas
>
> Thanks for reporting the bug. Please can you raise a JIRA and attach  
> your patch - clicking on the box granting the ASF a license to use  
> your patch.
>
> We will try to get this into the next release.
>
> Paul
>
> On Dec 18, 2007 11:35 AM, Andreas Veithen  
> <andreas.veithen@gmail.com> wrote:
> Hi all!
>
> I'm writing a Web service proxy and I have a some trouble to publish
> WSDL files that import other WSDL or XSD files. In my case I have a
> WSDL file bis.wsdl (placed in the conf directory in the repository
> directory) importing an XSD located in the same directory. The WSDL
> file uses a relative URL for the schemaLocation attribute:
>
> <xsd:import namespace="..." schemaLocation="bis.xsd"/>
>
> When I try to use publishWSDL with
> uri="file:repository/conf/bis.wsdl", I get the following error:
>
> java.io.FileNotFoundException: This file was not found:
> file:/Users/veithen/workspace/pim-ebxml/synapse/bis.xsd
>
> Obviously Synapse (or Axis in this case) doesn't resolve bis.xsd
> relative to the location of the WSDL, but relative to the working
> directory. I get the same result when using
> uri="file:///Users/veithen/workspace/pim-ebxml/synapse/repository/conf/bis.wsdl 
> "
> or key="conf/bis.wsdl". When I try with uri="repository/conf/bis.wsdl"
> I get the following error:
>
> java.lang.IllegalArgumentException: URI is not absolute
>
> There seems to be no way to make this work.
>
> One part of the problem is that the code in ProxyService only calls
> WSDLToAxisServiceBuilder#setBaseUri for WSDL 2.0 documents (in my case
> it's a WSDL 1.1 document). This is obviously a bug. After correcting
> this (see attached patch), I can use
> uri="file:///Users/veithen/workspace/pim-ebxml/synapse/repository/conf/bis.wsdl 
> "
> to get the expected result. However, using absolute filenames in
> synapse.xml is not appropriate. When using
> uri="file:repository/conf/bis.wsdl" I now get the following error:
>
> org.apache.ws.commons.schema.XmlSchemaException:
> /Users/veithen/workspace/pim-ebxml/synapse/bis.xsd (No such file or
> directory)
>
> This is not so surprising since "file:repository/conf/bis.wsdl" is
> actually an invalid URL (even if Synapse seems to accept it in some
> contexts): only "repository/conf/bis.wsdl" and
> "file:///Users/veithen/workspace/pim-ebxml/synapse/repository/conf/bis.wsdl 
> "
> are strictly valid, one as relative URL, the other as absolute URL.
>
> For the two other alternatives (uri="repository/conf/bis.wsdl" and
> key="conf/bis.wsdl") I get, not surprisingly, the same error as
> before.
>
> Does anybody have a solution for this problem?
>
> Regards,
>
> Andreas
>
> PS: I'm using the latest code from the Subversion repository.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-user-help@ws.apache.org
>
>
>
> -- 
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> OASIS WS-RX TC Co-chair
>
> blog: http://pzf.fremantle.org
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com


Mime
View raw message