asmita singh

Greenhorn
+ Follow
since Feb 04, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by asmita singh

Dave Tolls wrote:

Bear Bibeault wrote:From the stack trace it looks like something in Struts is using it.



It'll be something associated with the bean representing that Form.
Been a while since I've done struts, but I think if you don't define a scope for the bean it defaults to session.



Yes i am using a bean like:

<html:form action="feedback" name="feedbackBean"

I should try setting its scope to request?>
8 years ago
I have my webservices in 4 different environment and urls are stored in properties files picked up .

currently I am getting endpoint from properties file and putting into requestcontext in proxy class. requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,endPointURLprop);

Somehow I get Connectionrefused due to this. But when I hard code the endpoint in WSDL, it works.

Hence my question if I can get endpoint dynamically in WSDL or is there some other way to avoid this issue?


8 years ago

Bear Bibeault wrote:OK, so then apparently something is needing the session. Just leave it on. The micro-milli-nano-seconds that might be saved by turing it off will have no real effect on your application's performance.



I agree, but theres nothing 'coded' in my app to use session. I am really intrigued by this. what could cause it.
8 years ago

Bear Bibeault wrote:Does it work if you remove the directive?



Yes, I get this error only when I put session="false"
8 years ago

Bear Bibeault wrote:Why?



Removing overhead of creating a new session object for performance and memory. I am not using session in my app.
8 years ago

Bear Bibeault wrote:Why do you specify session as false?



I am not using sessions and I wanted to stop the JSP from creating one on its own.
8 years ago
This is my JSP code and I am trying to set session = false

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c"%>
<html:html>
<head>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8" session="false"%>

which throws IllegalStateException: jsp.error.page.noSession.

[6/24/15 11:13:16:337 EDT] 000001ac webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[action]: java.lang.IllegalStateException: jsp.error.page.noSession
at org.apache.jasper.runtime.PageContextImpl.getAttribute(PageContextImpl.java:312)
at org.apache.struts.taglib.html.FormTag.initFormBean(FormTag.java:537)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:520)
at com.ibm._jsp._corporate._jspService(_corporate.java:173)



What might be causing it?

thanks!
8 years ago
But is there any way to introduce Message queues in between which would absorb failed requests and post them to webservice once the application servers are up?
9 years ago
Hi,

We have build a webservice and wanted to know what to do when webservcie goes down due to server issues or any other region.
We don't want to miss any data that client might be trying to push into webservice during an outage. How to grab hold of that data and push into webservice once its up without any manual intervention?

Please advise.

Regards
Asmita
9 years ago

Vivek SharmaJi wrote:Your context does't have usws please try without this. https://dev7.something.com:8462/CMSService



The context root has usws. I deployed a JSP -> https://dev7.something.com:8462/usws/JSP/TestJNDI.jsp, and it works, but Webservice URL doesnt.
10 years ago
Hello!

I have created a webservice but when I try to access the URL, it gives me error 404. the plugin when regenerated doesn't pick up CMSService. My URL is https://dev7.something.com:8462/usws/CMSService
My web.xml is
- <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>usws</display-name>
- <servlet>
<description />
<servlet-name>CMSServiceSOAPImpl</servlet-name>
<servlet-class>com.jaxws.CMSServiceSOAPImpl</servlet-class>
- <init-param>
<param-name>log4j-init-file</param-name>
<param-value>log4j.properties</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
- <servlet-mapping>
<servlet-name>CMSServiceSOAPImpl</servlet-name>
<url-pattern>/CMSService</url-pattern>
</servlet-mapping>
- <welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>

what could possibly be wrong? Please help. Thanks
10 years ago

Ulf Dittmer wrote:Well, I'm not sure what that code snippet does - it doesn't seem to involve SOAP ... ?

Real time? Nothing about Java is real time (not unless you use a special JVM, anyway, and even then handling 30MB of data is not going to be happening on a real-time basis); is that really what you want?

I'll ask a third time:

Ulf Dittmer wrote:Have you changed the memory settings of the JVM from their defaults? If not, try that first.



Yes, I need the input xml files to be processed realtime. they will also lead to generation of output xml files which will be send as webservice response.
10 years ago

Ulf Dittmer wrote:OK, that's sizable. Are you sending it as a SOAP attachment? Otherwise, the performance will most likely suck no matter what you do.

Ulf Dittmer wrote:Have you changed the memory settings of the JVM from their defaults? If not, try that first.



Yes, I intend to send it as a SOAP attachment. I went with the approach I posted in the Code snippet above. Will this work in real time situation? If not then can you guide me through what is the most optimum way to achieve Passing XML file as input?
10 years ago

Ulf Dittmer wrote:How big a file are we talking about? Have you changed the memory settings of the JVM from their defaults? If not, try that first.



We are talking about File about 30 MB in size and will be in multitudes based on number of concurrent requests the web service receives. Max number of concurrent users will be 6.
10 years ago
Hi,

I am creating a webservice which needs to get huge xml documents as input from Client (Uploader). I tried to create a service with the below code but it gives me OutOfMemory Exception. Whats the best way to do this?
public String attachAnyFile(DataHandler dataHandler, String file)
{
String filename="";
try {
//DataHandler dataHandler=new DataHandler(fileDataSource);
File f=new File("C:/"+file);
filename=f.getName();
System.out.println("\n\t Writing to File /" + filename);
BufferedOutputStream bout = new BufferedOutputStream(new FileOutputStream("C:/WS Projects/CMSWS/"+file));
BufferedInputStream bin = new BufferedInputStream(dataHandler.getInputStream());

byte[] buffer = new byte[256];
while (true)
{
int bytesRead = bin.read(buffer);
if (bytesRead == -1)
break;
bout.write(buffer, 0, bytesRead);
}
bin.close();
bout.close();


Thanks for help!
10 years ago