Currently we are trying to expose our Axis2 web services via WSO2 API manager. However in some cases service do not return result and looking at logs on WSO2 API manager we see the following
ERROR {org.wso2.carbon.apimgt.gateway.handlers.throttling.APIThrottleHandler} - Unable to load throttling policy using key: gov:/apimgt/applicationdata/tiers.xml {org.wso2.carbon.apimgt.gateway.handlers.throttling.APIThrottleHandler} TID: [0] [AM] [2013-01-07 16:42:22,951]
INFO {org.apache.synapse.mediators.builtin.LogMediator} - To: /TestService/1.0.0, WSAction: urn:testOperation, SOAPAction: urn:testOperation, MessageID: urn:uuid:a8f94f58-5e2d-4d51-afc7-83182b51d173, Direction: request, STATUS = Executing default 'fault' sequence, ERROR_CODE = 0, ERROR_MESSAGE = Unable to load throttling policy using key: gov:/apimgt/applicationdata/tiers.xml, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><p:testOperation xmlns:p="http://example.com"><param>d1</param></p:testOperation></soapenv:Body></soapenv:Envelope> {org.apache.synapse.mediators.builtin.LogMediator}
For configuration i use the default h2 database as registry and mysql database for user and api manager database.
This issue is a known issue [1],which will be fixed in the next AM release. We also encountered this issue at a instance,when we are trying invoking two different APIs at same time or within short time period.
Thanks;
[1] https://wso2.org/jira/browse/APIMANAGER-835
Related
I am integrating WSO2 ESB 4.8.1 with SFDC.
Using SFDC connector 1.0
In WSO2 i have written the code <salesforce.logout/>, according to WSO2 Documentation they say that it closes the current connection.
<salesforce.logout/> produces below soap message which i identified in WSO2 ESB log
TID: [0] [ESB] [2016-08-30 07:55:39,442] DEBUG {org.apache.synapse.transport.http.wire} - << "<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:partner.soap.sforce.com"><soapenv:Header><urn:SessionHeader><urn:sessionId>00D17000000BPGr!AQcAQDIggW.ikXtsb0Ckm8c8pKKDlF_8QN42jL31WUa6hDLOdEeNIjrYsevKW0FeZLDzlrjcDLwMni_7gYaZgNfdN4zv9Cgj</urn:sessionId></urn:SessionHeader></soapenv:Header><soapenv:Body><urn:logout></urn:logout></soapenv:Body></soapenv:Envelope>[\r][\n]" {org.apache.synapse.transport.http.wire}
But few times i am getting below error (INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session hash:) when <salesforce.logout/> is executed
TID: [0] [ESB] [2016-08-30 07:55:39,529] DEBUG {org.apache.synapse.transport.http.wire} - >> "<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>sf:INVALID_SESSION_ID</faultcode><faultstring>INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session hash: je59etMAEPM+m9VdYJb0AW==[\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2016-08-30 07:55:39,529] DEBUG {org.apache.synapse.transport.http.wire} - >> "This is expected, it can happen if the session has expired and swept away, or if the user logs out, or if its just someone trying to hack in. </faultstring><detail><sf:UnexpectedErrorFault xsi:type="sf:UnexpectedErrorFault"><sf:exceptionCode>INVALID_SESSION_ID</sf:exceptionCode><sf:exceptionMessage>Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session hash: je59etMAEPM+m9VdYJb0AW==[\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2016-08-30 07:55:39,529] DEBUG {org.apache.synapse.transport.http.wire} - >> "This is expected, it can happen if the session has expired and swept away, or if the user logs out, or if its just someone trying to hack in. </sf:exceptionMessage></sf:UnexpectedErrorFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>[\r][\n]" {org.apache.synapse.transport.http.wire}
Is it SFDC issue/WSO2 SFDC connector issue/WSO2 ESB configuration issue.?
For upsert operation we are using configkey attribute in entire project, below is the code
<salesforce.upsert configKey="sfdc_connection_dtls">
<allOrNone>0</allOrNone>
<allowFieldTruncate>0</allowFieldTruncate>
<sobjects xmlns:sfdc="sfdc">{//sfdc:sObjects}</sobjects>
</salesforce.upsert>
So when i use <salesforce.logout/> in the respective sequence, does it closes only the current connection which is available in sequence.? or it closes all connection which are existing.?
Where ever i am using salesforce.upsert(below is the skeleton code) can i use <salesforce.logout/> after salesforce.upsert call.?
<salesforce.upsert configKey="sfdc_connection_dtls">
<!-- sobject goes here -->
</salesforce.upsert>
Looking forward for your help
Thanks,
Tejas
In WSO2 SFDC connector, there's a single SF connection created per flow per init configuration. Therefore, if you issue a logout, your subsequent requests will fail. It is not necessary to issue logout since the connection is anyway terminated at the end of the flow.
I have 2 Stores, 2 Publihser, 2 Gateway Workers, 1 Gateway Manager working with a SVN Synchronizer.
When I'm using default user and passaword (admin:admin) everething works weel.
But When I change using [1], and I try publish a API, I receve this error:
TID[-1234] [AM] [2016-07-15 15:45:29,735] INFO {org.apache.synapse.mediators.builtin.LogMediator} - STATUS = Message dispatched to the main sequence. Invalid URL., RESOURCE = /
At Publisher node shows "Sample API is Deploying" forever.
I can't publish API's in WSO2 ESB from WSO2 API Manager. My legacy architecture has two WSO2 ESB instances, first ESB is only a Gateway component, and second ESB works conventionally.
Now, I need to use an API Manager instances to publish API's in the ESB's intances.
But, I configure APIGateway section in /repository/conf/api-manager.xml to point to ESB instance, like this:
<APIGateway>
<Environments>
<Environment type="production" api-console="true">
<Name>Production and Sandbox</Name>
<Description> Description of environment</Description>
<!--ServerURL>https://${carbon.local.ip}:${mgt.transport.https.port}${carbon.context}/services/</ServerURL-->
<ServerURL>https://localhost:8243/services/</ServerURL>
<!--Username>${admin.username}</Username-->
<Username>admin</Username>
<!--Password>${admin.password}</Password-->
<Password>admin</Password>
<!--GatewayEndpoint>http://${carbon.local.ip}:${http.nio.port},https://${carbon.local.ip}:${https.nio.port}</GatewayEndpoint-->
<GatewayEndpoint>http://localhost:8280,https://localhost:8243</GatewayEndpoint>
</Environment>
</Environments>
<EnableGatewayKeyCache>true</EnableGatewayKeyCache>
<EnableGatewayResourceCache>true</EnableGatewayResourceCache>
<ClientDomainHeader>referer</ClientDomainHeader>
</APIGateway>
And, in I tired to point to 8243 port as well, and I couldn't publish in ESB instance.
In logs, I can see following:
2016-05-05 08:33:29,551 [-] [http-nio-9443-exec-42] INFO LogMediator To: https://localhost:9443/services/APIGatewayAdmin, From: 127.0.0.1, WSAction: urn:getApi, SOAPAction: urn:getApi, Direction: request, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><ns2:getApi xmlns:ns2="http://service.gateway.apimgt.carbon.wso2.org"><ns2:apiProviderName>admin</ns2:apiProviderName><ns2:apiName>name</ns2:apiName><ns2:version>1.0</ns2:version></ns2:getApi></soapenv:Body></soapenv:Envelope>
So, API Manager tries publish in ESB, and ESB recives request but I get only one error in logs a few lines below:
2016-05-05 08:33:55,865 [-] [http-nio-9443-exec-4] DEBUG AxisServlet
java.lang.NullPointerException
at javax.servlet.GenericServlet.getServletContext(GenericServlet.java:123)
at org.apache.axis2.transport.http.AxisServlet.createMessageContext(AxisServlet.java:715)
[...]
2016-05-05 08:33:55,867 [-] [http-nio-9443-exec-4] DEBUG Options getAction (null) from org.apache.axis2.client.Options#353f3a03
Do I need to configure the ESB to do this?
I am new to OSB.
-> I have a AXIS2 webservice application running on wso2 appserver. If we pass a name as a parameter it will return hello + Name.
-> I am trying to access this application from proxyservice in WSO2 ESB application.
The project name is SampleESBConfig and proxy service name: ESBtoAxis2PS1
Steps for Implementing proxy service:
The proxy service ha wsdl url : http://localhost:9763/services/Test1?wsdl ; Wsdl Type: SOURCE_URL
InFlow
Placed LogMediator
place SendMediator
Created address endpoint which points to : http://localhost:9763/services/Test1 [ Target URL, AXIS2 webservice application URL]
OutFlow
Placed LogMediator
place SendMediator
Fault Sequence
Placed the LogMediator
Created Composite application which includes the above proxyservice
Deployed this application on WSO2 ESB server which is running on localhost.
Note:
Both ESB & appserver running on localhost
When i am trying to test the application getting the below error.
[2015-06-18 16:27:55,212] ERROR - Axis2Sender Unexpected error during
sending message out org.apache.axis2.AxisFault: The system cannot
infer the transport information from the
/services/ESBtoAxis2PS1.ESBtoAxis2PS1HttpSoap11Endpoint URL.
How do I fix this?
Let assume that your are calling the echo proxy and you are creating a soap project by providing the wsdl of your proxy service.Then the request url for echo service will be
http://localhost:8280/services/echo.echoHttpSoap11Endpoint and when you are going to invoke it, you will get the above error.
As a solution for it you need to remove the part behind the "." operator. So you proxy calling url will be http://localhost:8280/services/echo
According to the error log I found that you are calling the proxy service /services/ESBtoAxis2PS1.ESBtoAxis2PS1HttpSoap11Endpoint . So you need to call the proxy like /services/ESBtoAxis2PS1 as I mentioned earlier.
Hope this may solve the issue.
Getting an exception while running the example given at
http://wso2.com/library/articles/2012/10/implementing-restful-services-wso2-esb/
ESB version :- 4.8.1
DSS version :- 3.2.1
[2015-02-03 15:51:12,063] INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:3e75d7db-d23c-4f2c-821a-c2e9ae3faa25, Direction: response, Envelope: <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.x
mlsoap.org/soap/envelope/"><soapenv:Body><faultstring>The endpoint reference (EPR) for the Operation not found is /services/StudentService/003/GetStudent?registration_number=003 and the WSA Action = null. If this EPR was previously reachable, please contact the server administrator.</faultstring></s
oapenv:Body></soapenv:Envelope>
please suggest how to run this example.
Try How to GET a Cup of Coffee the WSO2 Way
tutorial which has comprehensive explanation for implementing RESTful service using WSO2 products (WSO2 ESB and WSO2 AS).