1

I want to validate that the request url match exactly the addressing header To.

is it possible to do that in a class Mediator? how can I get the endpoint url of the proxy service?

Community
  • 1
  • 1
Spyna
  • 490
  • 3
  • 12

1 Answers1

0

I am not sure whether you can do it with class mediator. But you can match the url with in the proxy service[1].

Also you can get the 'TO' value using message context property[2].

1.https://docs.wso2.com/display/ESB451/Sample+157%3A+Conditional+Router+for+Routing+Messages+based+on+HTTP+URL,+HTTP+Headers+and+Query+Parameters 2.https://docs.wso2.com/display/ESB460/Synapse+Message+Context+Properties#SynapseMessageContextProperties-Property:MESSAGE_FORMAT

Jenananthan
  • 1,381
  • 2
  • 10
  • 20
  • the property 'To' returns the value of the ws addressing header, not the real service endpoint. – Spyna Feb 26 '15 at 14:02
  • I couldn't find any synapse constant here[1] to get the the reals service endpoint. But message context has a method(getEndpoint) to get the endpoint .see the doc[2]. hope you can take use of that withing a class mediator. 1.https://synapse.apache.org/apidocs/constant-values.html#org.apache.synapse.SynapseConstants.ERROR_CODE 2.https://synapse.apache.org/apidocs/org/apache/synapse/MessageContext.html#getEndpoint(java.lang.String) – Jenananthan Feb 27 '15 at 03:52