zygimantus
zygimantus

Reputation: 3777

Error when using defined Endpoint in WSO2 ESB from registry

I have created an endpoint using WSO2 GREG and then added it to ESB ProxyService from registry but trying this service gave me this error:

TID: [-1234] [] [2015-10-21 08:12:49,178]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: /services/TestProxyReg, MessageID: urn:uuid:a1c1994a-56b9-44e2-b567-f290a3411275, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 0, ERROR_MESSAGE = Invalid endpoint configuration., Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body/></soapenv:Envelope> {org.apache.synapse.mediators.builtin.LogMediator}

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
   name="TestProxyReg"
   transports="https,http"
   statistics="disable"
   trace="disable"
   startOnLoad="true">
   <target endpoint="gov:/trunk/endpoints/ep-myUrl.wso2.services-test-testEndpoint">
      <outSequence>
         <log level="custom">
            <property name="text" value="A test"/>
         </log>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>

What is wrong here?

Edit:

One additional thing: I noticed that endpoints created in G-Reg are not the same as in ESB server, for example:

In G-Reg:

<metadata xmlns="http://www.wso2.org/governance/metadata">
  <overview>
  <name>testEndpoint</name>
  <version>1.0.0</version>
  <address>https://localhost:8245/services/test</address>
  </overview>
</metadata>

In ESB:

<?xml version="1.0" encoding="UTF-8"?>
<endpoint xmlns="http://ws.apache.org/ns/synapse" name="gov/testEndpointA">
   <address uri="localhost:9443/services/Persons_DataService/select_all_Persons_operation">
      <suspendOnFailure>
         <progressionFactor>1.0</progressionFactor>
      </suspendOnFailure>
      <markForSuspension>
         <retriesBeforeSuspension>0</retriesBeforeSuspension>
         <retryDelay>0</retryDelay>
      </markForSuspension>
   </address>
</endpoint>

So I think I know why there is an error like this - I should have created Endpoint that I need via ESB, not using G-Reg?

Upvotes: 1

Views: 743

Answers (1)

krishan
krishan

Reputation: 579

Create the endpoint using WSO2 ESB management console and save it in the governance registry. you can follow the official doc. According to the document create the endpoint and as the final step save it in registry (click save in registry).

Then refer that endpoint to you proxy service.

Upvotes: 1

Related Questions