Gurvinder Singh

Greenhorn
+ Follow
since Nov 10, 2008
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 Gurvinder Singh

Hi

I have a problem where i am exposing a webservice to a third party.
The request size is very huge around 8MB, so by the time the request gets processed at my server end, the request times out and the response is not able to reach the source.
We have increased the time out settings on Jboss and Apache but we cannot increase it beyond some point.
So is there away the i can send keep alive signal to the source to prevent the request from getting timedout.


Thanks
Gurvinder
11 years ago
Hi

I downloaded soap-ui pro 2.5.1 and tried to test my requests for my webservice.
It works fine for small files. But when i try to test large files say 2MB, i am not able to get the response.
Instead i see the following error in the soap ui logs.
After debugging in eclipse i saw that the my service class is executing the request properly and the "OK" response is also getting generated,
but somehow it is not able to reach the soap-ui.

Can someone explain to me how to resolve this?

14:17:14,183 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Notifying no-one,
there are no waiting threads
java.lang.NullPointerException
at org.apache.commons.httpclient.HttpMethodBase.getStatusCode(HttpMethod
Base.java:570)
at com.eviware.soapui.impl.wsdl.submit.transports.http.BaseHttpResponse.
<init>(BaseHttpResponse.java:71)
at com.eviware.soapui.impl.wsdl.submit.transports.http.SinglePartHttpRes
ponse.<init>(SinglePartHttpResponse.java:40)
at com.eviware.soapui.impl.wsdl.submit.transports.http.support.attachmen
ts.WsdlSinglePartHttpResponse.<init>(WsdlSinglePartHttpResponse.java:35)
at com.eviware.soapui.impl.wsdl.submit.filters.WsdlPackagingResponseFilt
er.afterWsdlRequest(WsdlPackagingResponseFilter.java:45)
at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.aft
erAbstractHttpResponse(AbstractRequestFilter.java:62)
at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.aft
erRequest(AbstractRequestFilter.java:56)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequest
Transport.sendRequest(HttpClientRequestTransport.java:164)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:118)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at com.eviware.soapui.impl.wsdl.submit.transports.http.BaseHttpResponse.
initHeaders(BaseHttpResponse.java:90)
at com.eviware.soapui.impl.wsdl.submit.transports.http.BaseHttpResponse.
<init>(BaseHttpResponse.java:81)
at com.eviware.soapui.impl.wsdl.submit.transports.http.SinglePartHttpRes
ponse.<init>(SinglePartHttpResponse.java:40)
at com.eviware.soapui.impl.wsdl.submit.transports.http.support.attachmen
ts.WsdlSinglePartHttpResponse.<init>(WsdlSinglePartHttpResponse.java:35)
at com.eviware.soapui.impl.wsdl.submit.filters.WsdlPackagingResponseFilt
er.afterWsdlRequest(WsdlPackagingResponseFilter.java:45)
at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.aft
erAbstractHttpResponse(AbstractRequestFilter.java:62)
at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.aft
erRequest(AbstractRequestFilter.java:56)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequest
Transport.sendRequest(HttpClientRequestTransport.java:164)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:118)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
14:17:14,191 ERROR [WsdlSubmit] Exception in request: java.lang.Exception: java.
net.SocketTimeoutException: Read timed out
14:17:14,191 ERROR [SoapUI] An error occured [java.net.SocketTimeoutException: R
ead timed out], see error log for details
14:17:14,198 INFO [AbstractHttpRequestDesktopPanel] Error getting response for
[InventoryServiceSEIBinding.inventoryService:Request 1]; java.lang.Exception: ja
va.net.SocketTimeoutException: Read timed out
11 years ago
I tried to use jaxb with my current ADB beans but when ever i try to create the marshaller, it says Object Factory not found, since adb beans does not have an object factory class in it.
I tried using XStream, but the final xml that i get, the elements are appended with some extra attributes. and the structure is also somewhat not the expected structure.
I tried with XMLEncoder too. seems it is also not sufficing my need.
Hi all

I have a problem.
I have generated beans using axis2 wsdl2java technique.
I am populating these beans and then finally sending the complete bean containing all the other beans through webservice to the third party.

Now my requirement is to convert this big bean object to xml and keep it in the archive directory.
Now can someone tell me a nice way to convert my java bean object to xml.

Earlier i was using JAXB, but the third party was using axis2 and there was a mismatch while sending my request. So i had to switch to axis2 generated beans.
And now i dont have a parser option to parse my beans to xml.



Thanks


I am facing a problem unmarshalling some xml data.

My xml has elements like

<InventoryRecord>
<InternalPartID displayName="Gold Bracelet">sku123</InternalPartID>
<StockLevel>10</StockLevel>
<AvailabilityStatus>1004</AvailabilityStatus>
<AvailabilityDate/>
<StockThreshold>10</StockThreshold>
<BackOrderLevel/>
<BackOrderThreshold/>
<PreOrderLevel/>
<PreOrderThreshold/>
</InventoryRecord>

I have generated the java beans from the xsd, and i have put some condition on elements like nillable=true and minOccurs=0

eg:
<xs:element ref="AvailabilityDate" minOccurs="0"/>
<xs:element name="AvailabilityDate" type="xs:dateTime" nillable="true"/>

Now my problem arise when i try to unmarshal the above piece of xml.
It gives me parsing errors at the AvailabilityDate.

Since i have put minOccurs="0" and nillable="true", still while unmarshalling it throws exception. If i change the type="xs:dateTime" to "xs:string" it works fine.


Can someone tell me how to resolve this, and skip the empty elements.
I am using JAXB to unmarshal the xml, where while
unmarshaller.unmarshal(byteIn); throws me the exeption.

Caused by: java.lang.IllegalArgumentException:
at org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl$Parser.parseYear(Unknown Source)
at org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl$Parser.parse(Unknown Source)
at org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl.<init>(Unknown Source)
at org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl.newXMLGregorianCalendar(Unknown Source)
at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$13.parse(RuntimeBuiltinLeafInfoImpl.java:546)


Thanks
11 years ago
Hi

I am getting the following exception while testing my webservices on my system.
Any pointers to resolve this would be appreciated.


AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
faultSubcode:
faultString: JAXRPC.TIE.04: Internal Server Error (JAXRPCTIE01: caught exception while handling request: java.lang.NullPointerException)
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:JAXRPC.TIE.04: Internal Server Error (JAXRPCTIE01: caught exception while handling request: java.lang.NullPointerException)
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.atg.www.webservices.InventoryServiceSEIBindingStub.inventoryService(InventoryServiceSEIBindingStub.java:161)
at com.scvl.commerce.inventory.TestInventoryService.main(TestInventoryService.java:36)

{http://xml.apache.org/axis/}hostname:Gurvinder-HP

JAXRPC.TIE.04: Internal Server Error (JAXRPCTIE01: caught exception while handling request: java.lang.NullPointerException)
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.atg.www.webservices.InventoryServiceSEIBindingStub.inventoryService(InventoryServiceSEIBindingStub.java:161)
at com.scvl.commerce.inventory.TestInventoryService.main(TestInventoryService.java:36)
11 years ago
Hi

I have created a webservice which seems to be working fine if i deploy it on my local server.
I am able to get proper response via a test client java file.
But when i deploy the same webservice on DEV and TEST servers, and i try to connect it via the same test java file from my local,
i get an error response saying

JAXRPC.TIE.04: Internal Server Error (JAXRPCTIE01: caught exception while handling request: java.lang.NullPointerException)



And in my dev server logs, i see the following exception

08:25:27,775 SEVERE [server]
java.lang.NullPointerException
at webservices.InventoryServiceSEIImpl.inventoryService(InventoryServiceS
EIImpl.java:53)
at webservices.InventoryServiceSEI_Tie.invoke_inventoryService(InventoryS
erviceSEI_Tie.java:54)
at webservices.InventoryServiceSEI_Tie.processingHook(InventoryServiceSEI
_Tie.java:132)
at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:3
64)
at com.sun.xml.rpc.server.http.ea.JAXRPCServletDelegate.doPost(JAXRPCServ
letDelegate.java:243)
at com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:13
3)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
cationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi




Please let me know if i am missing anything here.



Thanks
Gurvinder

11 years ago
Hi

I am trying to test a webservice locally on my system which takes a string xml input parameter as request.
For this i am converting my xml to string via string builder and passing it as a request to the webservice.
Now, the webservice call is happening fine and i can get to the backend server code.

But when i try to unmarshal the string xml through JAXB, i get the following error

18:15:43,995 ERROR [InventoryUpdateService]
javax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException: Premature end of file.]
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:315)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:514)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:215)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:184)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:184)
at com.scvl.oms.inventory.InventoryUpdateService.getJAXBObject(InventoryUpdateService.java:248)
at com.scvl.oms.inventory.InventoryUpdateService.inventoryService(InventoryUpdateService.java:105)
at webservices.InventoryServiceSEIImpl.inventoryService(InventoryServiceSEIImpl.java:53)
at webservices.InventoryServiceSEI_Tie.invoke_inventoryService(InventoryServiceSEI_Tie.java:54)
at webservices.InventoryServiceSEI_Tie.processingHook(InventoryServiceSEI_Tie.java:132)
at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:364)
at com.sun.xml.rpc.server.http.ea.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:243)
at com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at atg.webservice.filter.SOAPFactoriesFilter.doFilter(SOAPFactoriesFilter.java:153)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at atg.webservice.WSDLImportFilter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.xml.sax.SAXParseException: Premature end of file.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1414)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1059)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:211)
... 36 more


I have checked the xml and it is a well formed xml. I am not able to understand where the problem is.
My XML is as follows::

<?xml version="1.0" encoding="UTF-8"?>
<Inventory xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
payloadID="20110109.1.9832446010@test.com" timestamp="2011-02-11T23:00:06-08:00">
<Header>
<From>
<Credential domain="ATG">
<Identity>IMS</Identity>
</Credential>
</From>
<To>
<Credential domain="ATG">
<Identity>Website</Identity>
</Credential>
</To>
</Header>
<Request>
<InventoryRecords>
<InventoryRecord>
<InternalPartID displayName="Gold Bracelet">sku123</InternalPartID>
<StockLevel>10</StockLevel>
<AvailabilityStatus>1004</AvailabilityStatus>
<AvailabilityDate/>
<StockThreshold>10</StockThreshold>
<BackOrderLevel/>
<BackOrderThreshold/>
<PreOrderLevel/>
<PreOrderThreshold/>
</InventoryRecord>
<InventoryRecord>
<InternalPartID displayName="Nice Shoe">sku234</InternalPartID>
<StockLevel>23</StockLevel>
<AvailabilityStatus>1004</AvailabilityStatus>
<AvailabilityDate/>
<StockThreshold>10</StockThreshold>
<BackOrderLevel/>
<BackOrderThreshold/>
<PreOrderLevel/>
<PreOrderThreshold/>
</InventoryRecord>
</InventoryRecords>
</Request>
</Inventory>



Please provide with some pointers.

Thanks
Gurvinder
11 years ago
The requirement is that i have a pretty complex xml structure that may change in the future.
So to save time from coding again, we want that the xml be parsed and the list of value objects be returned and we use them directly.
If this can be done via any other xml parsing api other than STAX then please suggest.
11 years ago
Hi

I have a simple question to ask regarding the xml parsing logic.
My requirement is that i will get an xml file with the feed data of the products. And i want to import it to my database.
For this i am using STAX api for xml parsing.
Now my question is, is there a way that i get a list of objects with all the parsed xml data in those objects.
I have generated Xsds from Xml and from Xsds I have generated java objects.
Now instead of doing that in the code to manually set all the values in the objects and then return the list of objects to the calling api,
i want to know if there is some api available that reads the XSDs and xml and returns me List<objects> with the data in those objects?


Thanks
11 years ago
Hey

Can anybody help me in this regard of how to set any session attribute through ajax calls.
Please go through the following message chain and suggest me how should i proceed.


Thanks
Gurvinder
Yeah sure Samrat

i would like to know that. Probably if you can provide me some detailed steps of doing it, it will be great.
But yea just for your info, i want to set the attributes on click of a href in the JS function.

Thanks
Gurvinder
Actually my requirement is to do that in the JS without submitting a form.
Is there any other way i can do it or any work around for it?

Any suggestions welcome....

-Gurvinder
Hi

I have a requirement that on click of a hyperlink from a jsp, i want to set a session attribute in the javascript.
On click of the hyperlink there will be 2 parameters passed to the JS function and in that JS function i want to set the 2 variables in session.
Can i achieve this through javascript by using something like session.setAttrbute("key","value");

Thanks
Gurvinder
I read it on the following forum

http://forums.sun.com/thread.jspa?threadID=604166

which basically has the following post
Basically you are doing too much output before you decide to you need to forward to a new page.

Output could just be the plain HTML text in the jsp document - that all gets converted to out.println();
Basically if it writes more than your buffer (default is 8kb) then the buffer is flushed, and you can't forward/redirect anymore as you are committed to complete the current response.

There are two ways of handling this issue
1 - shift your forward/redirect code, so that it happens as early as possible. BEFORE any HTML is output.

2 - increase the buffer size. <%@ page buffer="16kb"%> for instance.
This means it can write out more text before you decide to forward.
That might stop the error on your page.

3 - Oh, and if you have set your buffer to zero, or you have directly called flush() somewhere in your code, that would be the cause. Don't do those things :-)



Can someone tell me does it have a performance impact if we increase or decrease page buffer

Thanks
Gurvinder
13 years ago