1
votes

We have just installed our WSO2 ESB, and we are trying to create some proxies services with customs endpoints.

The default endoint format is:

  • http://{host}:{port}/services/{Proxy Service Name}

I'd like to have something like:

  • http://{host}:{port}/services/utilities/{Proxy Service Name}
  • http://{host}:{port}/services/public/{Proxy Service Name}

I followed this tutorial:

but we have a problem, when I send a request to my custom endpoint, I have no answer.

suggestions?

2

2 Answers

1
votes

I assume that you were able to properly create a custom endpoint and "I have no answer" means you didn't get any response. If it is the case following are the possible reasons for that,

  1. Proxy service endpoint didn't receive the request
  2. Proxy service didn't configured properly to response back

So test whether the 1 is the reason you can simply put a log mediator with following configuration in inSequence,

<log level="full"/>

then if the proxy service received a message it will log it in console. If that works could you please post your proxy service configuration to check whether it is properly defined.

0
votes

Well, it seems that we've found a solution, I'm going to resume the full solution.

As the tutorial indicates, to costumize your proxy service endpoint, you have to add the following handler on the axis2.xml configuration:

<handler name="CustomURIBasedDispatcher" class="org.apache.synapse.core.axis2.CustomURIBasedDispatcher"/>

Then, you can customize your endpoint on the design view or on the source view, I've choosen the source view, adding this parameter:

<parameter name="ServiceURI">/services/intern</parameter>

The custom endpoint is autogenerated as:

http://{host}:{port}/services/intern.myWebservice

But I has not worked for me. If I send a request to the custom endpoint, I have no response.

I've solved the problem, adding to the "ServiceURI" parameter the name of the service:

<parameter name="ServiceURI">/services/intern/myWebService</parameter>

then you have to send the request to the following endpoint:

http://{host}:{port}/services/intern/myWebService

So now you have a custom endpoint for every proxy service.

Thanks Malith for your help.