Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Access the WSDL for a customURI - WSO2 ESB

DZone's Guide to

Access the WSDL for a customURI - WSO2 ESB

Free Resource

Today’s data climate is fast-paced and it’s not slowing down. Here’s why your current integration solution is not enough. Brought to you in partnership with Liaison Technologies.

The URL of a proxy service can be customized. It is explained at  http://achala11.blogspot.com/2012/07/wso2-esb-proxy-services-with-custom.html

Ok,  lets try to access the WSDL.

The WSDL of a custom service url can be accessed from the following workaround.

You can use "main" sequence to route ?wsdl requests to appropriate working WSDL urls.
With this configuration, you can fetch wsdl for proxy service via http://localhost:8280/CustomURL/Part1/Part2?wsdl

If you have multiple proxy services with custom uris, you have to add a <case> statement per proxy service with appropriate wsdl urls.
<proxy xmlns="http://ws.apache.org/ns/synapse" name="CustomerProxy" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
   <target>
      <outSequence>
         <send />
      </outSequence>
      <endpoint>
         <address uri="http://localhost:8280/services/Version" />
      </endpoint>
   </target>
   <publishWSDL uri="http://localhost:8280/services/Version?wsdl" />
   <parameter name="ServiceURI">/CustomURL/Part1/Part2</parameter>
</proxy> 

<sequence xmlns="http://ws.apache.org/ns/synapse" name="main">
   <in>
      <property name="REST_URL_POSTFIX" action="remove" scope="axis2" />
      <switch xmlns:ns="http://org.apache.synapse/xsd" xmlns:ns3="http://org.apache.synapse/xsd" source="get-property('To')">
         <case regex="/CustomURL/Part1/Part2\?wsdl">
            <send>
               <endpoint>
                  <address uri="http://localhost:8280/services/CustomerProxy?wsdl" format="get" />
               </endpoint>
            </send>
         </case>
      </switch>
   </in>
   <out>
      <send />
   </out>
</sequence> 
 

Is iPaaS solving the right problems? Not knowing the fundamental difference between iPaaS and iPaaS+ could cost you down the road. Brought to you in partnership with Liaison Technologies.

Topics:

Published at DZone with permission of Achala Chathuranga Aponso, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}