Performance issue while connecting with the webservices | Community
Skip to main content
October 16, 2015
Solved

Performance issue while connecting with the webservices

  • October 16, 2015
  • 14 replies
  • 1911 views

Hello

We are migrating from 5.6.1 to 6.1 server.We have configured 3rd party webservices for profiles.

These webservices work perfectly fine with 5.6.1 but seem to give a performance issue on 6.1 and we get a delayed response(about more than a minute to respond) while saving profile records.

There is no change in the webservice code with regards to migration.

Is there any configuration I need to change as part of 6.1 while might help avoid this issue.Not sure on the root cause for this delay.Logs have not been too helpful either.

Thanks,

Sonali.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

This may be an AEM bug - i recommend opening a support ticket for this use case.

https://helpx.adobe.com/marketing-cloud/contact-support.html

However - this does not look related to invoking 3rd party web services from an AEM OSGi bundle

14 replies

smacdonald2008
New Participant
October 16, 2015

Typically to integrate SOAP based web services into AEM, you create Java proxy classes that consume the WSDL. Then you place the proxy classes into an OSGi bundle. I am not sure what you mean by using config to hook into web services? 

Did you write Java proxy classes as talked about here?

https://helpx.adobe.com/experience-manager/using/creating-cxf-bundles-consume-web.html 

smacdonald2008
New Participant
October 16, 2015

Need more details - did  you create a custom AEM service that invokes a 3rd party web service? If so - is the web service a SOAP-Based web service or Restful web service? 

October 16, 2015

All those classes are in place.And the service is working as expected on 5.6.1.This is not a code thats newly being written for 6.1.

------ERROR(error.log)----

POST /services/info HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Exception during response processing.

From this error I am guessing its something to do with Sling and the way we have set the properties for Sling in our servlets but not exactly sure whats wrong there since it works for 5.6.1.

Example of how we have set the properties - 

@Component(immediate = true, metatype = true, enabled = true)
@Properties({ 
    @Property(name = "sling.servlet.methods", value = { "GET", "POST", "PUT", "DELETE" }),
    @Property(name = "sling.servlet.paths", value = { "/services/info" }) })
@Service(value = Servlet.class)

Any suggestions ?

October 16, 2015

Yes.Its a soap service.We have configured the service through the config manager.

October 16, 2015

This is what I got in the AEM error logs -

POST /services/info HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Exception during response processing.

Lokesh_Shivalingaiah
New Participant
October 16, 2015

Can you give more details on exception.At what process are you getting this Exception ?? It would be helpful if you provide more error log !

smacdonald2008
New Participant
October 16, 2015

For testing purposes and to pin point your code - try to comment out the web service logic in your servlet, Then keep the logic very simple - try writing a log message. See if that works - this will tell you if the exception is from something wrong with how the servlet is invoked or if the issue is with the web service call. 

I am going to test our web service CFX example on AEM 6.1 to make sure there is no web service and AEM 6.1 issues. 

October 16, 2015

I got this is the browser console - 

Failed to load resource: the server responded with a status of 404 (Not Found)XMLHttpRequest.send @ csrf.js:221
csrf.js:239 Unable to read CSRF meta information

I know I need to add some clientlibs for CSRF to my code due to which it might be failing.

We have all jsp files as a part of our components no sightly code.Any directions for adding the same?

Maybe this is why its causing a delay.

smacdonald2008
New Participant
October 16, 2015

Yes - that may be the reason why there is a delay.  Something wrong with XMLHttpRequest.send . 

I have tested our AEM CFX web service article on AEM 6.1. It works fine - as shown here: 

[img]AEM61WS.png[/img]

As shown in the article - we use Apache CFX to create Java proxy classes (we do not use XMLHttpRequest.send ) to invoke the 3rd party web service. Then bundle them up and invoke from an AEM JSP. 

Also - note that the sample 6.1 artilce package is now attached to the article for local dev testing. 

October 16, 2015

Thanks for your response! 

Could you please elaborate on how I can get rid of the XMLHttpRequest.send.That would really be helpful.