Showing posts with label proxy service. Show all posts
Showing posts with label proxy service. Show all posts

Monday, March 16, 2015

If wso2 esb proxy service have operations more than one



If a service have more than one operations, we have to add additional entry to the proxy service,

For more information reffer this link,

<parameter name="disableOperationValidation">true</parameter>

It should be put like below,
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="xxxxxxxxx"
       transports="xxxxx"
       statistics="enable"
       trace="enable"
       startOnLoad="true">
   <target>
      <inSequence>
         <log/>
      </inSequence>
      <outSequence>
         <log/>
         <send/>
      </outSequence>
      <endpoint>
         <address uri="http://xxx.xxx.xxx.xxx:xxxx/xxxxxservice"
                  format="soap11"/>
      </endpoint>
   </target>
   <publishWSDL uri="http://xxx.xxx.xxx.xxx:xxxx/xxxxxservice?wsdl"/>
   <parameter name="disableOperationValidation">true</parameter>
   <description/>
</proxy>

Sunday, February 22, 2015

Expose two proxy services with different ports in WSO2 ESB



To do this , you need to edit axis2.xml in <carbon home>/repository/conf/axis2/axis2.xml
edit under transport ins like below. What you need to do is , if you want a new transport port crate a new transport with different name. in here I have created two recievers.
<transportReceiver name="http" class="org.apache.synapse.transport.passthru.PassThroughHttpListener">
        <parameter name="port" locked="false">8280</parameter>
        <parameter name="non-blocking" locked="false">true</parameter>
        <parameter name="bind-address" locked="false">localhost</parameter>
        <parameter name="WSDLEPRPrefix" locked="false">http://localhost:8280</parameter>
        <parameter name="httpGetProcessor" locked="false">org.wso2.carbon.transport.nhttp.api.PassThroughNHttpGetProcessor</parameter>
        <!--<parameter name="priorityConfigFile" locked="false">location of priority configuration file</parameter>-->
    </transportReceiver>

               
                <transportReceiver name="http1" class="org.apache.synapse.transport.passthru.PassThroughHttpListener">
        <parameter name="port" locked="false">8281</parameter>
        <parameter name="non-blocking" locked="false">true</parameter>
        <parameter name="bind-address" locked="false">localhost</parameter>
        <parameter name="WSDLEPRPrefix" locked="false">http://localhost:8281</parameter>
        <parameter name="httpGetProcessor" locked="false">org.wso2.carbon.transport.nhttp.api.PassThroughNHttpGetProcessor</parameter>
        <!--<parameter name="priorityConfigFile" locked="false">location of priority configuration file</parameter>-->
    </transportReceiver>
Now when you create proxy services from carbon console, you need to mention the transport method you are going to use. You can check or uncheck your transport method or directly edit the xml like below.
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="portChangeTest1"
       transports="http1"
       statistics="disable"
       trace="disable"
       startOnLoad="true">