It seems the email has been corrupted with the unwanted characters. Sorry for that .I am resending mail .

In the ESB 1.5 release , we haven't provided a Custom URI Resolver for resolving WSDL and schema imports. Therefore , all the imports were resolved relatively to the ESB home. I have just changed the existing code and committed the required changes to the synapse. If you could check the your scenario with the ESB and synapse current svn, then you would have following options for resolving imports.


   * For Proxy service WSDL


option 1 : You can use the actual WSDL and schema without any changes. All imports are resolved against the parent URI(base URI).


option2 : If you want to use the actual service WSDL without any changes but schema have to keep in the registry. Then, you can do it as follows .

Example : The External service WSDL is located at http://localhost:9443/service/proxy/test_proxy.wsdl <http://localhost:9443/service/proxy/test_proxy_1.wsdl> and It has following the schema import

                   <wsdl:types>

<xs:schema targetNamespace="http://services.samples/xsd";>

<xs:import schemaLocation="/*test_proxy.xsd*/" namespace="http://services.samples/xsd"/>

                           </xs:schema>

                   </wsdl:types>

if you want to keep the XSD file in the registry under *registry/schema/new_schema.xsd* and then use it as the schema for the actual WSDL.

               Then ,you have edit the synape.xml as  follows .

               add the registry definition

<registry provider="org.apache.synapse.registry.url.SimpleURLRegistry">

<parameter name="root">*file:registry/*</parameter>

<parameter name="cachableDuration">15000</parameter>

                       </registry>

               And then add proxy service as


               <proxy name="....">

                       ..............

<publishWSDL uri="http://localhost:9443/service/proxy/test_proxy.wsdl <http://localhost:9443/service/proxy/test_proxy_1.wsdl> ">

/<resource location="*test_proxy.xsd*" key="/*schema/new_schema.xsd*/"/>
/

               </publishWSDL>

               </proxy>

if you doesn't specify the <resource > , then the imported schema will be resolved against WSDL base URI then there should be a schema at http://localhost:9443/service/proxy/test_proxy.wsd <http://localhost:9443/service/proxy/test_schema.wsd>.


   * For WSDL endpoint

Only has one option (option 1), that means it resolves URI relative to the parent URI.

NOTE : For Inlined WSDL ( both of endpoints and proxy services) , the base URI is computed by a system property called “resolve.root” and it's default value is $ESB_HOME/repository. This is because , in the inlined case , there is no base URI.


Thanks

Indika





indika kumara wrote:
Hi Alan


In the ESB 1.5 release , we haven't provided a Custom URI Resolver for resolving WSDL and schema imports. Therefore , all the imports were resolved relatively to the ESB home. I have just changed the existing code and committed the required changes to the synapse. If you could check the your scenario with the ESB and synapse current svn, then you would have following options for resolving imports.


   *

     For Proxy service WSDL


option 1 : You can use the actual WSDL and schema without any changes. All imports are resolved against the parent URI(base URI).


option2 : If you want to use the actual service WSDL without any changes but schema have to keep in the registry. Then, you can do it as follows .

Example : The External service WSDL is located at http://localhost:9443/service/proxy/test_proxy.wsdl <http://localhost:9443/service/proxy/test_proxy_1.wsdl> and It has following the schema import

<wsdl:types>

<xs:schema targetNamespace="http://services.samples/xsd";>

<xs:import schemaLocation="/*test_proxy.xsd*/" namespace="http://services.samples/xsd"/>

</xs:schema>

</wsdl:types>

if you want to keep the XSD file in the registry under *registry/schema/new_schema.xsd* and then use it as the schema for the actual WSDL.

Then ,you have edit the synape.xml as follows .

add the registry definition

<registry provider="org.apache.synapse.registry.url.SimpleURLRegistry">

<parameter name="root">*file:registry/*</parameter>

<parameter name="cachableDuration">15000</parameter>

</registry>

And then add proxy service as


<proxy name="....">

..............

<publishWSDL uri="http://localhost:9443/service/proxy/test_proxy.wsdl <http://localhost:9443/service/proxy/test_proxy_1.wsdl> ">

/<resource location="//*test_proxy.xsd*//" key="/*schema/new_schema.xsd*/"/> /

</publishWSDL>

</proxy>

if you doesn't specify the <resource > , then the imported schema will be resolved against WSDL base URI then there should be a schema at http://localhost:9443/service/proxy/test_proxy.wsd <http://localhost:9443/service/proxy/test_schema.wsd>.


   *

     For WSDL endpoint

Only has one option (option 1), that means it resolves URI relative to the parent URI.

NOTE : For Inlined WSDL ( both of endpoints and proxy services) , the base URI is computed by a system property called “resolve.root” and it's default value is $ESB_HOME/repository. This is because , in the inlined case , there is no base URI.


Thanks

Indika



Jones, Alan R wrote:
OK, so should I still put the schema physically into the Integrtaed
Registry, and then make the import statement change or it does not
matter? I am just wondering if there is any logical correlation of an
actual XSD file and the WSDL  as parts of a configured proxy, as if they
were all assets of a configured proxy, to be held in the registry.

Thanks,

Alan J

_______________________________________________
Esb-java-user mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/esb-java-user


_______________________________________________
Esb-java-user mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/esb-java-user


_______________________________________________
Esb-java-user mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/esb-java-user

Reply via email to