Magento session expires immediately - magento

I have the following problem. when I call the login method of the Magento's SOAP API, using java. the return is a session that expires immediately.
I am using Apache Camel and Magento v2 SOAP API

I found the solution. In my xls file, some diference between the generated xml and the soap client xml make a invalid response, but not show any error. I solved just copying the xml in my xls as below. so make sure that your xml is equal to xml model in soap client.

Related

Using Rate Limiting doesn't add Header to response and gets CORS error in client

I'm trying to adapt this tutorial to my server using the Bucket4j Spring Boot Starter.
I'm using an application.properties file.
I can limit the api queries with no problem, but the client doesn't get a 429 error, on the client I get a CORS error.
I figure this is because I'm not adding a header to my server response when I'm limiting the api queries, but is there any way to add this throught the application.properties template?
On the official documentation there is a value called "bucket4j.filters[0].http-response-headers.<MY_CUSTOM_HEADER>=MY_CUSTOM_HEADER_VALUE" but I can't figure how to use it, did anybody use it?
Thanks
You can avoid CORS errors by adding the proper header:
bucket4j.filters[0].http-response-headers.Access-Control-Allow-Origin="https://<clientUri>:<clientPort>"
and if you are using some form of authentication you may want to also add this:
bucket4j.filters[0].http-response-headers.Access-Control-Allow-Credentials=true

Spring RestTemplate 404 error for large POST request to .NET Core REST api

I am trying to make a Java (Spring) application which invokes a REST api in a .NET Core application. Everything seems to work in the general case, but now that I am making a POST with an XML string which takes up 80 megabytes on my system, the RestTemplate produces a 404 error code saying "Not found". I have tried to remove the POST size limit in both the .NET Core application (by using the DisableRequestSizeLimit attribute in the API controller) and in the Spring configuration (by setting the variable spring.servlet.multipart.max-request-size to 200MB in application.properties). Neither of it seems to work. Is there some way to fix this? I am willing to use an alternative to the RestTemplate, if that would make sense. I am using the exchange method of the RestTemplate object.
Not found is a general error, if the problem would be sending the request, other problem will happens. I highly recommend you to test the rest api with another tool, like Postman or Insomnia. After that works with the tool try with your client application.
Clarification:
spring.servlet.multipart.max-request-size is for api in your Spring application, no for requesting another services.
Due to Milton BO's answer, I made a request in POSTMAN, which gave me a more detailed error response from the ASP.NET Core app. And it told me to change the maximum allowed post size in the web.config (or appplicationhost.config) file for IIS Express. Furthermore, I am now using the Kestrel server instead of IIS Express, so the DisableRequestSizeLimit attribute now works as expected.

How to authenticate birt report engine requests

When designing report I was getting this error:
XML data source cannot be retrieved. XML data source file is invalid or the file doesn't exist.
It was asked.
Then I found out it was because the request was intercepted by my spring security plugin. Now I disabled the plugin for a moment and my report is working. But this is not solution!
So now I want to somehow configure the report engine to use its own username and password; To be used when sending the requests.
Is there any hook in the plugin for doing this or any other workaround?
Or
when render engine sends a request to the datasource url is possible to add params?
e.g http://app/report?param1="value"&param2="value". Putting such url on the report design data source field results in invalid url.
update:
I am not using database connection as datasource.
my data source is a service that return xml response.
I think that you need to have some basic user in your DB.
When you're using the code, use this user to make it, so this user will be used only for these cases.

Tibco WSDL work at SOAP UI and failed in Iphone/Android

We have a WSDL file. WSDL working at Tibco server and we got the XML as output in soap UI. We have to cosume it in on Iphone/Android development. On making request everytime from code we are getting WSDL in response instaed of XML file. We need XML so that we can use it in our Iphone/Android development.
I am sending the WSDL for further reference. If any issues be revert back to me.The rtf is as follows.
you might have not created concreteWSDL
Without Concrete WSDL, you can't execute the same in SOAP-UI too.....
So that is not the correct response...
Are you setting the SOAPAction HTTP header?
I know its a basic type of mistake but such mistakes do happen. Have you checked the endpoint URLs? Can you provide the concrete WSDLs you have used for both SOAP UI and android/iphone? What error do you see when using it on the phone?

Getting 400 Bad request error when sending huge amont of data with post

I am using yahoo YUI Ajax call to post request.
Page is developed in JSP and server is Tomcat 6 and using Struts 2.x.
While i am sending small amount of data using Ajax call post request it is working fine.But when i am sending huge amount of data i am getting 400 bad request error.
The 400 error comes when The Web server thinks that the data stream sent by the client (e.g. your Web browser ) was 'malformed' i.e. did not respect the HTTP protocol completely. So the Web server was unable to understand the request and process it.
There could be possibilities that data is too large, so you should better encode the data using java script inbuilt function for example escape().
Please check maxPostSize attribute of Connector in conf/server.xml.
See the following doc for the details
In Tomcat, when the post data exceeds the maximum specified in maxPostSize (server.xml) it returns a 400 as error code

Resources