Hany Shafik

Ranch Hand
+ Follow
since Jun 21, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Hany Shafik

What the user is viewing is from the cache you can prevent caching by adding
<meta HTTP-EQUIV="Pragma" content="no-cache"> and
<meta HTTP-EQUIV="Expires" content="-1">
this will cause the browser to issue new request to your server and since you have filter to protect your pages it should forward the user to the login form
14 years ago
JSF
Glassfish v3 implements jax-ws 2.2. As I told you before please try wsgen -v for the one that resides inside glassfish bin directory.
Hi Kumar,

I assume this is because the jax-ws wsgen you used to generate the wsdl is of different version than the one used in glassfish.
Please try wsgen -v to print the jax-ws version for both the wsgen tool you used and go inside the glassfish bin directory and try wsgen -v.
Hi Kumar,

You should add the annotation @XmlAccessorType(XmlAccessType.FIELD) to your class (or remove the getter method), as by default jaxb will try to bind both field and getter method to the same element name, that is why this exception is raised.

May be you got me wrong, What I meant is the JAXB annotated class and not the SEI. please see below an example that can help you



in your case you will annotate the image instance variable inside the GetImageResponse JAXB generated class
declaring that your ejb can throws EJBException isn't considered wise as by default any enterprise Bean instance can throw this exception (as it extends RuntimeException) to it's container to report that the invoked business method or callback method could not be completed because of an unexpected error. however to answer your question ejb container intercepts any call to your beans, throwing EJBException indicates to the container as mentioned before there is unexpected problem may be database connection problem so the ejb container should log this error for the administrator to check as it is not business logic error. In the end you can control what is logged depending on the configuration of your application server.
Hi Mohamed,

probably you are using the wrong version of el jars. please post the version jsf, seam & el you are using.
14 years ago
JSF
Sorry forgot to answer your original question I am using soapUI 3.5 you just right click and click insert file as Base64 and you must enable and force using MTOM in the request properties.
To reply your first question, as quoted from the ws-policy specification optional-policy optional means

A policy assertion is marked as optional using the wsp:Optional attribute. Optional assertions represent the capabilities of the service provider as opposed to the requirements of the service provider.



To answer your second question about encodedContentType (it should be expectedContentTypes instead) attribute you should add annotation @XmlMimeType("image/gif") to the instance variable of the JAXB class. this will cause to generate expectedContentTypes="image/gif" in the respective element.
eclipse is not intelligent enough to recognize that the car var is of type Car class, actually unless you are using generics and you have the required plugin that can support it, there is no way for eclipse to know what type of items are in this list and what is the car var variable is referencing.
14 years ago
JSF
Hi Nirvan,

This has been discussed before in similar posts as it is one of the famous issues in JSF, the problem is in time zone.
By default JSF uses GMT timezone to convert the date into display format, however you can change this behavior is several ways, one is to specify explicitly the timeZone attribute in the f:convertDateTime tag. Two is you can create a custom date converter as suggested in this post date problem. Three if you are using JSF 2 you can apply a global settings for the time zone by adding a context param in the web xml. the context param name is javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE and you can set it to true, this will cause the datetimeconverter to use the default system time zone instead. Hope this can help
14 years ago
JSF
Hi All,

I tired flash scope in JSF 2 (mojarra project) and I found it not working when redirecting to a page in a different path other than source page.
For example you can see from the http requests below that the cookie isn't resent, this is because the path of the cookie hasn't been set to the root.

POST /Test/admin/editUser.jsf HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; GTB6.6; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2; OfficeLiveConnector.1.3; OfficeLivePatch.0.0)
Host: localhost:8280
Content-Length: 150
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: csfcfc=4Xfn_5Xfn; JSESSIONID=0CF90B01B8329B0174BA4B40C2D5C275



HTTP/1.1 302 Moved Temporarily
Server: Apache-Coyote/1.1
X-Powered-By: JSF/2.0
Set-Cookie: csfcfc=_8Xfr
Location: http://localhost:8280/Test/success.jsf
Content-Length: 0
Date: Mon, 29 Nov 2010 12:35:15 GMT

GET /Test/success.jsf HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; GTB6.6; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2; OfficeLiveConnector.1.3; OfficeLivePatch.0.0)
Host: localhost:8280
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: JSESSIONID=0CF90B01B8329B0174BA4B40C2D5C275


I did some debugging and I found the following in method encode in class com.sun.faces.context.flash.ELFlash.PreviousNextFlashInfoManager that is responsible for creating this cookie. it is seems that when the length of value of the cookie is not equal to 1 character then don't set the path of the cookie to the root.

I don't understand what was the intention for doing so? it causes problems when redirecting to a page in a different path, is it a bug?





14 years ago
JSF
Not sure, but can you check whether or not the request parameters has command link id as one of it's parameters
14 years ago
JSF
oncomplete event means when the ajax response from the server side is returned successfully to the browser, so it doesn't have a meaning to execute java code at this point. However a4j:ajaxListener may help you.
It adds an action listener to the parent component that is fired during the Render Response phase.
14 years ago
JSF