Best technology for web service - jsp vs ejb
Currently we have our project fully done in jsp and servlets.
Now we have decided to bring out a new version of the product.
We are in thought of ejb and struts replacing jsp.
But we need to know the advantages and disadvantages between jsp,servlets and ejb,struts for our task..
Can anyone help in this to make our thoughts to work..
Thanks in advance ..
Bye
Pradhip
don't waste time in asking others
i think it is better to use jsp and servlets
if you don't know struts it is very difficult to study and impliment know
you start learn struts know i hope u can impliment next time
start with small example
reffer jakartha struts and struts in action books to guide
Similar Messages
-
Can you suggest me what's best book for Web Services and XML to study? I'm planning to buy..
Thanks in advance..Why does it need to be the best one? What would that even mean? Just buy something reputable, like an O'Reilly book, it's not going to be so horrifically poor that you can't learn from it
-
Best practice for web service call
I can add a web service using the standard data connection wizard - works fine. I also can do it all in Javascript which give me a bit more flexibility. Is there some guideline or wisdom for which is best?
It all depends on your requirement..
For example, if you know your webservice address at design time itself, then it would be better to put in the data connection tab.
But if your webservice address changes at run time based on the environment your application is deployed in, then you can use the java script code to change the webservice address dynamically.
Thanks
Srini -
How do i embed a scriptlet inside my JSP page for the stub of my web service? is there any examples that i can refer to?
Thanks in advance. ;)Check out the 2 How To:
9.0.4 / 10.1.2 "How to use OC4J JSP Tags for Web Services" [1].
10.1.3 (preview) "Access J2EE 1.4 JAX-RPC Java Web Services from Web Clients" [2].
Hope this helps,
Eric
[1] http://www.oracle.com/technology/sample_code/tech/java/codesnippet/webservices/wstags/index.html
[2] http://www.oracle.com/technology/products/jdev/101/howtos/jaxrpc/java14_ws_web_clients.html -
Support for xs:date types in web services generated from EJB components
I need to generate a Web Service from an EJB session bean based upon EJB entities generated from the Oracle 11g database that contain DATE type columns.
JDeveloper creates java.sql.Timestamp types in the EJB Session bean and this results in an exception error when I try to generate a web service from this bean via webservice annotations:
java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
java.sql.Timestamp does not have a no-arg default constructor
I expected the web service wizard to generate argument types xs:dateTime or xs:date so this was an unwelcomed surprise.
I tried manually adding a method to the session bean with java.util.date arguments and had no problems with the web service wizard that correctly created xs:dateTime arguments. Is there any particular reason why the EJB wizard does not generate java.util.date arguments or handle java.sql.Timestamp without failing with an exception?
Since I begin with database tables and generate EJB entity classes and then web services with the Jdeveloper wizards it seems to me that there is a problem here in JDeveloper. Would you agree?
There are several possible more or less appealing workarounds, such as doing manually adding methods to the EJB facade with java.util.date arguments and doing the conversion from/to java.sql.timestamp manually. Is this a reasonable approach or does JDeveloper support date/time for Date columns in some other way that I have missed?
Very Grateful for any comments or suggestions.
Edited by: user10601664 on May 2, 2009 1:14 PM
Edited by: user10601664 on May 2, 2009 1:43 PMCheckout this example:
http://www.manojc.com/?sample3
public class HelloWorldService{
* @wlws:exclude
public void dontExpose(){
Regards,
-manoj
http://manojc.com
"Jacob Anderson" <[email protected]> wrote in message
news:4036581e$[email protected]..
>
hello,
I created the descriptor file for a web service that had a protectedmethod in
it and noticed the protected method showed up in the descriptor file!Should
the "source2wsdd" task only output PUBLIC methods as service actions? Isthere
any way to specify methods to be 'ignored' when generating the webservices descriptor
file?
here was the generated descriptor XML:
<web-service name="BindingService"
protocol="https"
style="document"
targetNamespace="http://www.foo.com/ws/BindingService/"
portName="BindingServicePort"
uri="/BindingService"
portTypeName="BindingServicePort">
<types>
</types>
<wsdd:type-mappingxmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdd="http://www.bea.com/servers/wls70">
<wsdd:type-mapping-entrydeserializer="weblogic.xml.schema.binding.internal.builtin.DocumentCodec"
type="xsd:anyType"
class-name="org.w3c.dom.Document"
serializer="weblogic.xml.schema.binding.internal.builtin.DocumentCodec">
</wsdd:type-mapping-entry>
</wsdd:type-mapping>
<components>
<java-class name="BindingService"
class-name="com.arrow.ws.vendor.BindingService">
</java-class>
</components>
<operations>
<operation name="getConfigName"
component="BindingService"
method="getConfigName()">
<params>
<return-param xmlns:typeNS="http://www.w3.org/2001/XMLSchema"
location="body"
type="typeNS:string"
name="result"
class-name="java.lang.String">
</return-param>
</params>
</operation>
</operations>
</web-service> -
Best way for an applet to contact EJB ?
Which is the best way for an applet to connect EJB?
1) Applet --> servlet --> EJB
2) Applet --> EJB
What is the pros and cons of both approach?
ThanksHi there,
This is a tricky question and it would be interesting to hear what others think.
Probably the key factor is what is available to you in terms of communications between the EJB and the applet. If you are on an intranet then having the applet talk directly to the EJB looks favourable as you will almost certainly be able to use RMI/IIOP for communications between the applet and the EJB. If you are forced to use HTTP as the communications protocol then you can't talk directly from the applet to the EJB but there again talking to a Servlet from an applet throws up complications of it's own. In this case you should consider not using an applet at all and instead use a JSP page or pages to handle the presentation.
There is another issue that you need to consider when the applet talks directly to the EJB. If the App server that contains the EJB is on a different system to the one that runs the Web Server you'll have to address some security issues and will have to either have local policy files for the systems running the applet or you'll have to sign the applet and have the clients trust it.
Hope this helps
Amanda
Developer Technical Support
Sun Microsystems
http://www.sun.com/developers -
hi!!!
Could you pls point to any code example.
thanks
Pushpa
"Richard Berger" <[email protected]> wrote:
>
Manoj: Thanks for the answer - do you have or can you point me at any
code samples
that accomplish this? (Yes, .NET is limited to strings/ints in their
get/post
bindings).
Thanks so much!
RB
PS - Also, can you explain any apparent discrepancy between your answer
and what
the WL documentation stated (again, it may be my misunderstanding).
"manoj cheenath" <[email protected]> wrote:
WL 7.0 does allow you to access the web service through
the browser. It even allows you to invoke service methods
with complex type arguments (.Net only supports primitive
types) and also to view the request and response soap
message for the invocation.
regards,
-manoj
"Richard Berger" <[email protected]> wrote in message
news:[email protected]...
This might be a naive question, but according to the documentation,WL 7.0
does
not support http post/get bindings for web services. Thus, for meto
access a
web service, I need to write a "middle tier" of some sort (I used
the
automatically
generated Java proxy code and JSP). All works fine, but it seems
like
it
would
sure be nice to have HTML forms access web services without havingto
write a
middle tier.
NET does this and it is extremely useful - is there a reason that
BEA
chose not
to provide this feature? (e.g. is it architecturally unsound in anyway?
or is
there an easy way to simulate it?). Given some of the Web Workshoppositioning
re: ease of use and .NET comparison, this seems like an omission.
Any insights are greatly appreciated.
Enjoy,
RB
PS - Here's the info from the documentation
Web Services Description Language (WSDL) 1.1 Specification
WSDL is an XML-based language that describes Web services. WSDL definesWeb services
as a set of endpoints operating on messages; these message containeither
message-style
or RPC-style information. The operations and messages are describedabstractly
in WSDL, and then bound to a concrete network protocol and messageformat
to define
an endpoint. Related concrete endpoints are combined into abstractendpoints (services).
WSDL is extensible to allow the description of endpoints and theirassociated
messages regardless of what message formats or network protocols areused
to communicate,
however, the only bindings described in the specification describehow to
use
WSDL in conjunction with SOAP 1.1, HTTP GET/POST, and MIME.
Note: WebLogic Server supports only SOAP 1.1 bindings.
The WSDL 1.1 Specification is available at http://www.w3.org/TR/wsdl.This isn't a straight FORM Post as in the http binding support in WSDL. It posts
a soap message.
It's apparent that Workshop supports form-post and form-get.
But I dont see how it is done with straight WebLogic webservices. Does WebLogic
server read the web-services.xml or the WSDL file? I dont see a way to put in
http-post binding in the former and in the latter it seems to be ignored.
Can someone clarify.
Thanks.
Chu-chi
"manoj cheenath" <[email protected]> wrote:
Here is a live example:
http://65.193.192.35:7001/base/SoapInteropBaseService
Here is an example that you can download:
http://manojc.com/?sample2
This is how you run it:
http://manojc.com/?tutorial/doc/howtorun.html
More info can be found from the edocs:
7.0:
http://edocs.bea.com/wls/docs70/webserv/index.html
8.1:
http://edocs.bea.com/wls/docs81/webserv/index.html
Regards,
-manoj
http://manojc.com
"pushpa krishna" <[email protected]> wrote in message
news:[email protected]...
hi!!!
Could you pls point to any code example.
thanks
Pushpa
"Richard Berger" <[email protected]> wrote:
Manoj: Thanks for the answer - do you have or can you point me at
any
code samples
that accomplish this? (Yes, .NET is limited to strings/ints in their
get/post
bindings).
Thanks so much!
RB
PS - Also, can you explain any apparent discrepancy between your answer
and what
the WL documentation stated (again, it may be my misunderstanding).
"manoj cheenath" <[email protected]> wrote:
WL 7.0 does allow you to access the web service through
the browser. It even allows you to invoke service methods
with complex type arguments (.Net only supports primitive
types) and also to view the request and response soap
message for the invocation.
regards,
-manoj
"Richard Berger" <[email protected]> wrote in message
news:[email protected]...
This might be a naive question, but according to the documentation,WL 7.0
does
not support http post/get bindings for web services. Thus, for
me
to
access a
web service, I need to write a "middle tier" of some sort (I used
the
automatically
generated Java proxy code and JSP). All works fine, but it seems
like
it
would
sure be nice to have HTML forms access web services without havingto
write a
middle tier.
NET does this and it is extremely useful - is there a reason that
BEA
chose not
to provide this feature? (e.g. is it architecturally unsound in
any
way?
or is
there an easy way to simulate it?). Given some of the Web Workshoppositioning
re: ease of use and .NET comparison, this seems like an omission.
Any insights are greatly appreciated.
Enjoy,
RB
PS - Here's the info from the documentation
Web Services Description Language (WSDL) 1.1 Specification
WSDL is an XML-based language that describes Web services. WSDL
defines
Web services
as a set of endpoints operating on messages; these message containeither
message-style
or RPC-style information. The operations and messages are describedabstractly
in WSDL, and then bound to a concrete network protocol and messageformat
to define
an endpoint. Related concrete endpoints are combined into abstractendpoints (services).
WSDL is extensible to allow the description of endpoints and theirassociated
messages regardless of what message formats or network protocols
are
used
to communicate,
however, the only bindings described in the specification describehow to
use
WSDL in conjunction with SOAP 1.1, HTTP GET/POST, and MIME.
Note: WebLogic Server supports only SOAP 1.1 bindings.
The WSDL 1.1 Specification is available at http://www.w3.org/TR/wsdl. -
Why doesn't WL7.0 support get/post bindings for web services ...
This might be a naive question, but according to the documentation, WL 7.0 does
not support http post/get bindings for web services. Thus, for me to access a
web service, I need to write a "middle tier" of some sort (I used the automatically
generated Java proxy code and JSP). All works fine, but it seems like it would
sure be nice to have HTML forms access web services without having to write a
middle tier.
.NET does this and it is extremely useful - is there a reason that BEA chose not
to provide this feature? (e.g. is it architecturally unsound in any way? or is
there an easy way to simulate it?). Given some of the Web Workshop positioning
re: ease of use and .NET comparison, this seems like an omission.
Any insights are greatly appreciated.
Enjoy,
RB
PS - Here's the info from the documentation
Web Services Description Language (WSDL) 1.1 Specification
WSDL is an XML-based language that describes Web services. WSDL defines Web services
as a set of endpoints operating on messages; these message contain either message-style
or RPC-style information. The operations and messages are described abstractly
in WSDL, and then bound to a concrete network protocol and message format to define
an endpoint. Related concrete endpoints are combined into abstract endpoints (services).
WSDL is extensible to allow the description of endpoints and their associated
messages regardless of what message formats or network protocols are used to communicate,
however, the only bindings described in the specification describe how to use
WSDL in conjunction with SOAP 1.1, HTTP GET/POST, and MIME.
Note: WebLogic Server supports only SOAP 1.1 bindings.
The WSDL 1.1 Specification is available at http://www.w3.org/TR/wsdl.Manoj: Thanks for the answer - do you have or can you point me at any code samples
that accomplish this? (Yes, .NET is limited to strings/ints in their get/post
bindings).
Thanks so much!
RB
PS - Also, can you explain any apparent discrepancy between your answer and what
the WL documentation stated (again, it may be my misunderstanding).
"manoj cheenath" <[email protected]> wrote:
WL 7.0 does allow you to access the web service through
the browser. It even allows you to invoke service methods
with complex type arguments (.Net only supports primitive
types) and also to view the request and response soap
message for the invocation.
regards,
-manoj
"Richard Berger" <[email protected]> wrote in message
news:[email protected]...
This might be a naive question, but according to the documentation,WL 7.0
does
not support http post/get bindings for web services. Thus, for meto
access a
web service, I need to write a "middle tier" of some sort (I used theautomatically
generated Java proxy code and JSP). All works fine, but it seems likeit
would
sure be nice to have HTML forms access web services without havingto
write a
middle tier.
NET does this and it is extremely useful - is there a reason that BEAchose not
to provide this feature? (e.g. is it architecturally unsound in anyway?
or is
there an easy way to simulate it?). Given some of the Web Workshoppositioning
re: ease of use and .NET comparison, this seems like an omission.
Any insights are greatly appreciated.
Enjoy,
RB
PS - Here's the info from the documentation
Web Services Description Language (WSDL) 1.1 Specification
WSDL is an XML-based language that describes Web services. WSDL definesWeb services
as a set of endpoints operating on messages; these message containeither
message-style
or RPC-style information. The operations and messages are describedabstractly
in WSDL, and then bound to a concrete network protocol and messageformat
to define
an endpoint. Related concrete endpoints are combined into abstractendpoints (services).
WSDL is extensible to allow the description of endpoints and theirassociated
messages regardless of what message formats or network protocols areused
to communicate,
however, the only bindings described in the specification describehow to
use
WSDL in conjunction with SOAP 1.1, HTTP GET/POST, and MIME.
Note: WebLogic Server supports only SOAP 1.1 bindings.
The WSDL 1.1 Specification is available at http://www.w3.org/TR/wsdl. -
How to wrap a Web Service around an EJB ?
Hi all!
I need to generate a WSDL file for my EJB because I need to expose them as service on the Enterprise Service Bus.
Does anybody know how to wrap a Web Service on an EJB so that I have a WSDL file for the EJB ?
Hoep I was clear
Thanks
Francesco>>Please can someone suggest if an empty SOAP request can be processed
When you are creating your Message interface,you would be using Input/Output Messages.
These are either Message Types which you would have defined or you would have got WSDL from sender system,right.
Now in these message type or WSDL if you have described your elements as occurence from 0-unbounded,it will let you pass an empty payload,but if any of the field is mandatory,it will throw an error.
Yu can not leave Input/Output Message type empty when creating Message Interface,there should be some message structure there,could be a dummy one
Thanks
Aamir -
Best practices for search service in a sharepont farm
Hi
in a sharepoint web application there is many BI dashboards are deployed and also we have plan to
configure enterprise search for this application.
in our sharepoint 2010 farm we have
2 application server s
2 WFE servers
here one application server is running
c.a + webanalytics service and itself is a domain controller
second application server is for only running secure store service+ Performance point service only
1 - here if we run search server service in second application server can any issues to BI performance and
2 - its best practice to run Performance point service and search service in one server
3 -also is it best practice to run search service in a such a application server where already other services running
and where we have only one share point web application need to be crawled and indexed with below crawl schedule.
here we only run full crawl per week and incremental crawl at midnight daily
adilHi adil,
Based on your description, you want to know the best practices for search service in a SharePoint farm.
Different farms have different search topologies, for the best search performance, I recommend that you follow the guidance for small, medium, and large farms.
The article is about the guidance for different farms.
Search service can run with other services in the same server, if condition permits and you want to have better performance for search service and other services including BI performance, you can deploy search service in dedicated server.
If condition permits, I recommend combining a query component with a front-end Web server to avoid putting crawl components and query components on the same serve.
In your SharePoint farm, you can deploy the query components in a WFE server and the crawl components in an application server.
The articles below describe the best practices for enterprise search.
https://technet.microsoft.com/en-us/library/cc850696(v=office.14).aspx
https://technet.microsoft.com/en-us/library/cc560988(v=office.14).aspx
Best regards
Sara Fan
TechNet Community Support -
About XML Parameter for Web Service invoking
I would like to use the XML parameter as the Web Service's input(Attachment is
the XML schema) in WebLogic Server 8 sp1. When I generated the Web Service and
use the WebLogic Server generate test web page to test it, I got Exception. The
WebLogic Server can't constructe the input XML.
The correct XML should look like this:
<ids>
<desc>Description</desc>
<id>1</id>
<id>2</id>
<id>3</id>
</ids>
Is there any one can tell me whether this kind of XML was permitted for Web Service
invoking or not?
[sample.xsd]Hi Andy,
On the test page, before the invoke of the operation, did it say
something like:
<!-- Do not know how to create a sample instance for this part due to
the following exception:java.lang.InstantiationException:
javax.xml.soap.SOAPElement. Pls replace this with the correct XML before
invoking the service. --->
if so, the service itself may be working OK, the deficiency is that the
test page tries its best to determine sample values for the invoke,
however it does not know in this case.
Did you try with a client?
Your XML should be fine.
Regards,
Bruce
Andy wrote:
>
I would like to use the XML parameter as the Web Service's input(Attachment is
the XML schema) in WebLogic Server 8 sp1. When I generated the Web Service and
use the WebLogic Server generate test web page to test it, I got Exception. The
WebLogic Server can't constructe the input XML.
The correct XML should look like this:
<ids>
<desc>Description</desc>
<id>1</id>
<id>2</id>
<id>3</id>
</ids>
Is there any one can tell me whether this kind of XML was permitted for Web Service
invoking or not?
Name: sample.xsd
sample.xsd Type: ACT Project (text/xml)
Encoding: base64 -
Invalid Content Type Error for Web Service
Hi Experts,
We have a XI / PI Web Service, and have created an Adaptive Web Service Model for the same. For using this web service model, we have created a HTTP destination of type WSDL.
This configuration works great in our development and consolidation server.
While working with our production server, with all the settings same as consolidation server, the following error is generated for Web Service call. using the AWS model
java.io.IOException: Invalid content type while requesting http://<host>:<port>/webdynpro/resources/<application_package>/guicall.wsdl. Expected Content-type: text/xml, received Content-type: content/unknown, used user to connect: null
The HTTP destination address is the one specified in bold above.
Also, in later part of the stack trace we are bale to see this error:
com.sap.tc.webdynpro.model.webservice.exception.WSModelRuntimeException: Exception on creation of service metadata for WS metadata destination
Please guide us on this issue.
Best Regards,
Alka.Hi Alka,
How did you configure the Webservice Destinations in Visual Admin for a webservice explosed by XI system.
I mean what was the URL specified, did you specify XI SYSTEM userid password ???
How was the webservice published to inspection.wsil in XI system ??
Thanks,
Regards,
Aditya Metukul -
(261680070) Q SYNCH-11 How do my web service methods accees EJBs and java classes?
A<SYNCH-11> How do my web service methods accees EJBs and java classes?
A<SYNCH-11> It is simple to use java classes, just do it as you would ordinarily.
The .jws file really contains a simple class so you can program with it in the same
way that you would use a regular Java class.
To use an EJB you can go and access it directly as you would with any EJB remote
client (lookup home stub, create, etc) or if the EJB is deployed to WLS you can use
a control to provide a very simple wrapper to the EJB. We will see this in detail
on Thursday in the ADVC module.Futher information about the possibility of callback:
It may be possible for a synchronous only web service (i.e. MS .net) to even paticipant
in the callback functionality of asynchronous web services. If the client implements
the appropriate methods for the callback but listens for them on a different port
or binding than the SOAP request, then web service may be able to build a response
if the client's "callback URL" is submitted as the beginning part of a conversation.
Watch the BEA developer forum (http://dev2dev.bea.com) for more information about
this approach and other tips and techniques for building web services.
"Adam FitzGerald" <[email protected]> wrote:
>
Q<SYNCH-03> I heard that MS .net only implements synchrnonus method? If
this is true.
Does it means my async methods will only work with J2EE clients?
A<SYNCH-03> I do not know the limitations of .net but let me point out that
is very
difficult to provide asynchronous web service method invocation (this is
different
from an asynchronous web service). HTTP as a general communication protocol
is based
on a request and response paradigm so your client libraries will mostly
likely be
expecting a response even if it is empty (check the asynchronous example
from today
to see that the start method still returns an empty response). You must
distinguish
this from the notion of an asynchronous web service which is a business
operation
that occurs on the server whose return value/result is not directly associated
with
building response to the client. An asynchronous web service can (and generally
will)
be started and stopped with web service operations that are invoked synchronously.
Thus MS .net clients can still be client to WLS hosted web services. -
Custom Token For web services security
How can I implement a token based security for web services? I will return a
custom token which contains a session-id among others after a JAAS
authnetication. I want to pass this token for every web service invokation.
I want the serverside EJB methods to be authorized based the roles in token.
Any ideas or pointers on the possible solutions?
Thanks,
VishHow can I implement a token based security for web services? I will return a
custom token which contains a session-id among others after a JAAS
authnetication. I want to pass this token for every web service invokation.
I want the serverside EJB methods to be authorized based the roles in token.
Any ideas or pointers on the possible solutions?
Thanks,
Vish -
Online materials for learning Javascript, JSP and EJB
I am a core java programmer, not aware of J2EE stuffs. Please let me know the best online resources for learning Javascript, JSP and EJB
Thanks,
Gautamhttp://java.sun.com/j2ee/tutorial/1_3-fcs/doc/EJBConcepts3.html
http://otn.oracle.com/sample_code/tech/java/codesnippet/j2ee/ejbbestpractices/ejb-best.html#pattern
http://java.sun.com/webservices/docs/1.0/tutorial/doc/JSPIntro.html
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html
http://home.cogeco.ca/~ve3ll/jstutor5.htm
http://www.pageresource.com/jscript/j_a_02.htm
I think will do
Maybe you are looking for
-
Boot up problem - Compaq Presario CQ5320F Desktop PC, M2N68-LA (Narra6) mobo, 250W psu Window 7 64-bit ok here it is: Computer used to shut off intermittently After pressing the power switch a few times or holding it for a bout 5 seconds it would co
-
ActiveX Excel Prevent Open File While Writting
I'm having some of the same problems with Excel and ActiveX found here: http://forums.ni.com/ni/board/message?board.id=170&message.id=254019&view=by_date_ascending&page=1 The last post from the above link gives an acceptable workaround (not ideal, b
-
How to get a photo into mySql with java
I wonder how I can get a photo from a client-macine through web, into a mySql database. Communications too the web-user is going through a Servlet who is runnin in a Server, where the mySql database are too. I haved tryed this code-sequense but it do
-
Royalty free music is not syncing with FCP? HELP!!!
Hey Everyone, So this is an odd one. I've stepped in to help a friend who can't get the audio to line up from Royalty Free Music to sync with the video timeline of his project. It's a ballroom workout dvd where it's all one take. They used the mp3's
-
I have a ibook that powers up but has no display, is it an easy fix? how much would it cost to fix