Create a Web Service for Exchange with form based authentication ?
I want to create a Web Service in Apex that can create appointments in my exchange calendar. Exchange is offering web services for that.
When i try to create the web service reference in Apex i provide the URL and my Exchange login, but it is failing.
The exchange guys told me, that there is a ISA Server running where i need to authenticate through a form.
Does anyone know, how i can implement a webservice in Apex, when the access to the wsdl url needs login through a form ?
Or : what other types of authentication does Apex know ? What possibilities do i have ?
Thanks for answers.
Bernd
Hi
Presume you've already found this information, but in case not ....
Exchange 2007 provides out of the box web services, see
http://msdn.microsoft.com/en-us/library/bb408417.aspx
As a disclaimer - neither myself of the team I work with have tried to use these web services within APEX.
Regards
Chris
Similar Messages
-
Ask for help with form based authentication & authorization
Hi:
I encountered the following problem when I tried the form based authentication & authorization (see the attached part of the config files, web.xml, weblogic.xml & weblogic.properties)
1. authorization seems not invoked against the rules specfied, it doesn't go the login error page as long as the user/pwd match, even though the user does not have the necessary role
in the example below, user3 should be denied to access the signin page, but seems no login error page returned, actually I never see any page / error message which complain about the authorization / access control error
2. after authenticate correctly, always get redirected to the / (context root) url, instead of the url prior the login page, for e.g., signin page
Any idea ?
Thanks in advance.
HaiMing
attach config files
web.xml
<security-constraint>
<web-resource-collection>
<web-resource-name>MySecureBit1</web-resource-name>
<description>no description</description>
<url-pattern>/control/signin</url-pattern>
<http-method>POST</http-method>
<http-method>GET</http-method>
</web-resource-collection>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>default</realm-name>
<form-login-config>
<form-login-page>/control/formbasedlogin</form-login-page>
<form-error-page>/control/formbasedloginerror</form-error-page>
</form-login-config>
</login-config>
<security-role>
<description>the customer role</description>
<role-name>customer</role-name>
</security-role>
weblogic.xml
<security-role-assignment>
<role-name>
customer
</role-name>
<principal-name>
customer_group
</security-role-assignment>
weblogic.properties
weblogic.password.user1=user1pass
weblogic.password.user2=user2pass
weblogic.password.user3=user3pass
weblogic.security.group.customer_group=user1,user2Hi, Paul:
Thanks a lot for your reply.
Firstly let me just correct a little in the attachment I put previously, I think I missed following lines :
<auth-constraint>
<description>no description</description>
<role-name>customer</role-name>
</auth-constraint>
So, user1 & user2 are in the customer group, but user3 not, and /control/singin is protected by this security constraint, as a result, when anyone click the link to /control/singin, he was led to the login page, if he tries to login as user1 & user2, he should pass & led to original page (in this case /control/singin, and my code's logic, once /control/signin is used, means that he already login successfully & redirected to the login success page), but if he tries to login as user3, he should only pass the authentication check, but fail the authorization check, and led to login error page.
What not happen are :
1. user1 & user2 pass, but redirect to /
2. user3 also pass, because I see that debug message shows also get redirected to /, instead of login error page
(login error page will be displayed, only if I try to login as a user with either wrong userid, or wrong password)
3. one more thing I notice after I first time post the message, the container does not remember the principal, after 1. is done, not even for a while
And the similar configuration works under Tomcat 3.2.1, for all 3. mentioned above.
Any idea ?
HaiMing
"Paul Patrick" <[email protected]> wrote:
If I understand what your trying to do, everyone should get access to the
login page since roles are not
associated with principals until after they authenticate. If I follow what
you specified in the XML files,
authenticated users user1 and user2 are members of a group called
customer_group.
The principal customer_group (and therefore its members) is mapped in the
weblogic.xml file to the role
customer.
I can't speak to the reason your being redirected to the document root.
Paul Patrick
"HaiMing" <[email protected]> wrote in message
news:[email protected]...
Hi:
I encountered the following problem when I tried the form basedauthentication & authorization (see the attached part of the config files,
web.xml, weblogic.xml & weblogic.properties)
1. authorization seems not invoked against the rules specfied, itdoesn't go the login error page as long as the user/pwd match, even though
the user does not have the necessary role
in the example below, user3 should be denied to access the signinpage, but seems no login error page returned, actually I never see any page
/ error message which complain about the authorization / access control
error
2. after authenticate correctly, always get redirected to the / (contextroot) url, instead of the url prior the login page, for e.g., signin page
Any idea ?
Thanks in advance.
HaiMing
attach config files
web.xml
<security-constraint>
<web-resource-collection>
<web-resource-name>MySecureBit1</web-resource-name>
<description>no description</description>
<url-pattern>/control/signin</url-pattern>
<http-method>POST</http-method>
<http-method>GET</http-method>
</web-resource-collection>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>default</realm-name>
<form-login-config>
<form-login-page>/control/formbasedlogin</form-login-page>
<form-error-page>/control/formbasedloginerror</form-error-page>
</form-login-config>
</login-config>
<security-role>
<description>the customer role</description>
<role-name>customer</role-name>
</security-role>
weblogic.xml
<security-role-assignment>
<role-name>
customer
</role-name>
<principal-name>
customer_group
</security-role-assignment>
weblogic.properties
weblogic.password.user1=user1pass
weblogic.password.user2=user2pass
weblogic.password.user3=user3pass
weblogic.security.group.customer_group=user1,user2 -
Web Services for a State Machine Based VI
Hello,
I am new to the Web Services approach but so far I have managed to build a simple VI which is used with Web Services to display a Graph and make some simple calculations.
However, I have a more complex application which uses a State Machine architecture to command some circuitry using the NI USB 6211 device. This program includes different states and all the action takes place inside a while loop. This loop uses shift registers to pass the states arround (the JKI State Machine).
My question is: Could such a program be used with the Web Services without modifying this structure?
In the programs that I have tried, if I place the execution inside a While structure then I get no result with the Web Services.
An example of a simple program which includes a while loop and the Web Services approach would be helpful, if possible.
Thank you in advance.Hello again,
I was trying to do what Nathand indicated.
1. "Put a functional global in it that stores whatever value you want to be queried over the web,"
So I opened a new Project and added the Index.vi just to generate the numbers continuously. This VI writes to a global variable entitled "GlobalOutput.vi".
This works as I have attached the jpg image.
2. "and make that VI accessible through VI server."
This I am not so sure I did correctly. I opened the Tools->Options->VI Server, and here at the section Exported VIs, I added the GlobalOutput.vi. I have attached the image.
3. "Then, in your web services VI, open a VI server connection to that functional global and run it, by reference, to obtain the value stored there."
Now I have created another VI, called ServerConnection.vi which runs the GlobalOutput.vi. I have attached the image with the error I get. Something is wrong in what I am doing. In the end I thought that I would create a Web Service for this last vi and basically be able to read the global variable.
As I understand it, you have a VI which runs locally, in a while loop and updates some global variables. Then another vi reads the values of those global variables.
It is this last vi that you should create a web service and interogate to find out the values of those variables. What am I missing?
Thank you in advance.
Attachments:
GlobalVariable.JPG 21 KB
ViServer.JPG 36 KB
error message.JPG 38 KB -
Issue with form based Authentication in three tier sharepoint 2013 environment.
Hi,
We are facing issue with form based Authentication in three tier environment.
We are able to add users to the database and in SharePoint.
But we are not able to login with created users.
In single tier everything working fine
Please help , Its urgent ... Thanks in advance.
Regards,
Hari
Regards, Hariif the environments match, then it sounds like a kerberos double-hop issue
Scott Brickey
MCTS, MCPD, MCITP
www.sbrickey.com
Strategic Data Systems - for all your SharePoint needs -
How To Use HttpUnit With FORM-based Authentication?
I'm just getting started with HttpUnit, and I'm having a problem:
How does one use HttpUnit with FORM-based authentication?
I have a Web app where I specify a number of protected URLs. When a user tries to invoke one of them in a browser, Tomcat 4.1.30 brings up a login page that I specified and asks for a username and password. The values given by the user is checked against the tomcat-users.xml file. If the user is valid, Tomcat
forwards the response from the original request. If invalid, an error page is displayed. The user is considered valid until either the session times out or the browser is closed.
Does HttpUnit have to log into the app every time I run a test? How does it manage subsequent pages after login?I don't think that's true. HttpUnit is 100% Java and based on JUnit. HttpUnit has nothing to do with Apache, AFAIK. HttpUnit is for unit testing servlets and JSPs. Apache is a Web server. It doesn't have a servlet/JSP engine, unless you bolt Tomcat on top of it.
Perhaps we're talking about two different packages. - % -
Creating a web service for F4 help
Hi All,
I want to create a web service that I can consume using JavaScript and thus can integrate with normal HTML web site. I want to achieve this by two ways
Pass table name and field name to the service and it will return the default search help
In some cases search helps are collective search helps and they have search criteria to filter data
How can I tackle with the 2nd point. First one looks straight. Pass table-field and the system will pick default DDIC search help and return values in table. However in case of collective help, I need to cater for the search parameters and I am not aware of any FM that will allow me to do it.
Any help appreciated .
Regards
AbhiHi Marcin and everyone,
Thanks for the precious explanations.
I created a client and I have an exception.
1) I made a portal service from wsdl - client side.
2) I created a DynPage.
3) Here is the code :
IMyBAPI4Service client = (IMyBAPI4Service) PortalRuntime.getRuntimeResources().getService(
IMyBAPI4Service.KEY);
IMyBAPI4Service securedClient = (IMyBAPI4Service) client.getSecurisedServiceConnection( request.getUser());
//this is null.
if (securedClient.getURLEndPoint().getURL() == null) {
securedClient.setURLEndPoint(new URLEndpoint("http://<server>:<port>/irj/servlet/prt/soap/com.sap.portal.prt.soap.MyBAPI4Service?style=doc_lit"));
Bapi_Companycode_Getdetail_Input importParams = new Bapi_Companycode_Getdetail_Input();
importParams.setCompanycodeid("0500");
Bapi_Companycode_Getdetail_Output exportParams = null;
securedClient.execute_BAPI_COMPANYCODE_GETDETAIL(importParams);
Do I have to use a secured client ? What is it ?
The exception is :
Problem at execution: SOAP Fault Error (java.lang.NoClassDefFoundError) : java.lang.NoClassDefFoundError
Thanks Marcin....
Message was edited by: David Fryda -
Creating RESTful Web Service for BLOB retrieval
Hi,
Just got RESTful web services working in Apex 4.2.1 with new Listener 2.1.
I have now been asked to create a RESTful web service by which photos in BLOB column can be retrieved upon providing the ID for that photo. Can this be done using the Creating RESTful Service Module of Apex 4.2.1? Looking at the Apex 4.2 documentation, I would assume this can be done, but has anyone used this with BLOB data?
Thanks,
PatHi Pat,
Yes this can be done using RESTful Services - you just need to ensure the query used is in the required format. To obtain a BLOB for a given ID, you would need create a Resource template and handler with the following settings:
Resource Template Settings:
URI template: emppic/{id}
Resource Handler Settings:
Source query: select mimetype, product_image from demo_product_info where product_id = :id..where the format of the SQL query is SELECT 'content_type', blob_column FROM . . ., as mentioned in Rick Greenwald's Cloud White paper "RESTful Web Services for the Oracle Database Cloud", under the "SQL Source Type" section (see www.oracle.com/technetwork/database/database-cloud/public/restful-wp-1844130.pdf ):
where 'content_type' is a string passed to the browser to be used to identify the incoming data, and the column to identify the source of the data being sent back. This data is sent back untouched by the Oracle Database Cloud Service. The Media Resource Source Type is typically used for media objects, such as images, where the data will be directly handled by the recipient making the call.The MIMETYPE column in the sample query above holds the necessary setting for the 'content_type' i.e. 'image/jpeg'. The value of ID is then passed in as a parameter when calling the service e.g. emppic/1234. The item level help text would be more helpful if it included additional information, and this is something we intend on addressing in a future release.
I hope this example helps.
Regards,
Hilary -
Really impossible to create a web service for JBoss using eclipse's WTP?
I'm starting to get nuts!!!
I'm an experienced J2SE and J2ME Java developer... but I have huge problems creating a web service using eclipse WTP!
The tutorials I found are for tomcat... But I want to code for JBoss and not for tomcat...!!!
There must be somebody out there with the same issues...
This tutorial works fine for Tomcat...
http://www.eclipse.org/webtools/community/tutorials/BottomUpWebService/BottomUpWebService.html
But if I do the same with JBoss... it's not possible to incoke my web service method... ok, I thought... just need to check google... BUT I didn't find any solution in the whole WWW. Found a lot of questions of people with the same problems... but no solution! :(
Still getting that:
ERROR [EngineConfigurationFactoryServlet] Unable to find config file. Creating new servlet engine config file: /WEB-INF/server-config.wsdd
I know a little bit what a wsdd does... but isn't it the job of the WTP to create that file???
I really hope you have some places for me to start, 'cause I don't know anymore places to ask for...
Maybe this is a JBoss issue... I don't know...
Or is there a tutorial on how to create a web Service using JBoss IDE?
SaschaHi Massimo,
Quiet a few points here.
1. Oracle Type objects do not map to XML Complex type
2. Oracle Type objects do not map to Apex Page Item Types
3. Apex Page Item types are substituted into the WS Request XML by a process which is part of the Web Service Reference creation through the Wizard in Apex.
>
After created the web service (without any errors), I click on test.
- I can select the Operation --> CREATE_LINGUA
- I can input data for Basic Authentication
- I can't view Input Parameters --> Report returned no rows.
I've tried with normal type like Varchar2 and all was ok.
Is possible in Apex to use web services based on complex type, tipically an Array?
>
As you have guessed the Wizard driven Web Service Reference definition process cannot handle complex types of input parameters required by a Request. By definition the number of complex types possible are infinite, so they are not likely to come built in.
Passing an array is no solution because finally the values passed have to be plugged into the right SimpleTypes inside a ComplexType in the Request.
Based on your WSDL your Request will be
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cre="http://xmlns.oracle.com/orawsv/GRIMALDI/PKG_WEBSERVICES/CREATE_LINGUA">
<soapenv:Header/>
<soapenv:Body>
<cre:SNUMBER-CREATE_LINGUAInput>
<cre:PLINGUA-LINGUAT-CIN>
<cre:LINGUAT>
<cre:CODICE>?</cre:CODICE>
<cre:DESCRIZIONE>?</cre:DESCRIZIONE>
</cre:LINGUAT>
</cre:PLINGUA-LINGUAT-CIN>
</cre:SNUMBER-CREATE_LINGUAInput>
</soapenv:Body>
</soapenv:Envelope>However, all is not lost. You can always use the UTL_HTTP package API to construct your Request.
Regards, -
Creating a WEB Service for SAP enterprise connector
Hi,
I am using the SAP enterprise connector plugin for Netweaver 04.
It generated me all the classes that I need for the BAPI.
It also generated me a Proxy class.
I want to create a service.
This is what I've done :
1) create a portal service.
2) create a methode in the service :
public Bapi_Companycode_Getdetail_Output execute_BAPI_COMPANYCODE_GETDETAIL(
Bapi_Companycode_Getdetail_Input arg1)
try {
return new MyProxy_PortType().bapi_Companycode_Getdetail (arg1);
} catch (Exception e) {
return null;
3) after I created a web service from the portal service.
Is it the right way ?
Thanks a lot.Hi Marcin and everyone,
Thanks for the precious explanations.
I created a client and I have an exception.
1) I made a portal service from wsdl - client side.
2) I created a DynPage.
3) Here is the code :
IMyBAPI4Service client = (IMyBAPI4Service) PortalRuntime.getRuntimeResources().getService(
IMyBAPI4Service.KEY);
IMyBAPI4Service securedClient = (IMyBAPI4Service) client.getSecurisedServiceConnection( request.getUser());
//this is null.
if (securedClient.getURLEndPoint().getURL() == null) {
securedClient.setURLEndPoint(new URLEndpoint("http://<server>:<port>/irj/servlet/prt/soap/com.sap.portal.prt.soap.MyBAPI4Service?style=doc_lit"));
Bapi_Companycode_Getdetail_Input importParams = new Bapi_Companycode_Getdetail_Input();
importParams.setCompanycodeid("0500");
Bapi_Companycode_Getdetail_Output exportParams = null;
securedClient.execute_BAPI_COMPANYCODE_GETDETAIL(importParams);
Do I have to use a secured client ? What is it ?
The exception is :
Problem at execution: SOAP Fault Error (java.lang.NoClassDefFoundError) : java.lang.NoClassDefFoundError
Thanks Marcin....
Message was edited by: David Fryda -
We are using .asmx services for SharePoint features such as comments, and rating.
Service
Feature used
http://<<hostname>>/_vti_bin/socialdataservice.asmx
Commenting, Rating
http://<<hostname>>/_vti_bin/UserProfileService.asmx
For out of box workflows
In SharePoint 2013,
SharePoint – 80 web application is on claims based mode and user is logging in with windows authentication. With logged-in client context used to call SharePoint's default web service, we are getting below error message from
web service (Social data and user profile services).
Server was unable to process request. ---> The corresponding SID in the domain is not part of the intended account type.
When the service is accessed using console application with Visual Studio credentials (logged in user), we are able to access the service. Below is the code snippet
using (SocialDataService
service = new
SocialDataService())
service.Credentials =
CredentialCache.DefaultCredentials;
SocialCommentDetail detail = service.AddComment("<<url>>",
"Test Comment",
null,
null);
Are SharePoint 2013 web services not supporting request coming with claim based authentication web application?
Thanks, Pratik Agrawal (MAQ Software)While this applies to 2010, I believe the same is true with 2013:
http://social.technet.microsoft.com/Forums/sharepoint/en-US/925e5f46-317f-46d3-bc55-c67f07eb2372/call-sharepoint-web-services-using-claimbased-authentication?forum=sharepointgeneralprevious
Trevor Seward
Follow or contact me at...
  
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs. -
How to generate web services for OAS with wsdl extension
Hi,
I wanted to know how to generate web services from Oracle Application Server especially with .wsdl extension and with document/literal style.
I know that earlier there was a tool called SmartConnect from BEA WebLogic.
But that will work only with ALSB (Aqua logic Service Bus). I guess that ALSB has been renamed as Oracle Service Bus by Oracle after the acquisition of WebLogic. My question is what is the new name for the SmartConnect Tool from WebLogic, which generates wsdl very easily from Oracle database.
I am unable to know the new name for SmartConnect and how to download that tool from Oracle web site.
Also, I want to know, whether there is any other way to generate the wsdl from Oracle, if so, please let me know.
Regards
RamanHi Jeethandra,
Please refere to the below link might be some help.
[http://help.sap.com/saphelp_mdmgds55/helpdata/en/45/069152856241e1e10000000a1553f6/frameset.htm]
regards
shankar -
Re: Error while using Web services for working with Informatica workflow
Hi All,
I am getting below error when i am calling Informatica wokrflow using Web Services HUB.
able to establish connection with the informatica server.
please can any one help out me in this.
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.NullPointerException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.lang.NullPointerException
at org.apache.axis.message.SOAPEnvelope.addHeader(SOAPEnvelope.java:230)
at org.apache.axis.client.Call.invoke(Call.java:2789)
at org.apache.axis.client.Call.invoke(Call.java:2501)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:1835)
at AI.Informatica.proxyclasses.DataIntegrationServiceSoapBindingStub.startWorkflow(DataIntegrationServiceSoapBindingStub.java:1101)
at AI.Informatica.javasrc.GSS_Informatica.start_workflow(GSS_Informatica.java:745)
at AI.Informatica.javasrc.GSS_Informatica.execute(GSS_Informatica.java:1384)
at AI.Informatica.javasrc.GSS_Informatica.main(GSS_Informatica.java:382)
{http://xml.apache.org/axis/}hostname:win2k3sami
java.lang.NullPointerException
at org.apache.axis.AxisFault.makeFault(AxisFault.java:104)
at org.apache.axis.client.Call.invoke(Call.java:2504)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:1835)
at AI.Informatica.proxyclasses.DataIntegrationServiceSoapBindingStub.startWorkflow(DataIntegrationServiceSoapBindingStub.java:1101)
at AI.Informatica.javasrc.GSS_Informatica.start_workflow(GSS_Informatica.java:745)
at AI.Informatica.javasrc.GSS_Informatica.execute(GSS_Informatica.java:1384)
at AI.Informatica.javasrc.GSS_Informatica.main(GSS_Informatica.java:382)
Caused by: java.lang.NullPointerException
at org.apache.axis.message.SOAPEnvelope.addHeader(SOAPEnvelope.java:230)
at org.apache.axis.client.Call.invoke(Call.java:2789)
at org.apache.axis.client.Call.invoke(Call.java:2501)
... 6 more
Thanks in advance.
Mahesh.Hi All,
I am getting below error when i am calling Informatica wokrflow using Web Services HUB.
able to establish connection with the informatica server.
please can any one help out me in this.
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.NullPointerException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.lang.NullPointerException
at org.apache.axis.message.SOAPEnvelope.addHeader(SOAPEnvelope.java:230)
at org.apache.axis.client.Call.invoke(Call.java:2789)
at org.apache.axis.client.Call.invoke(Call.java:2501)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:1835)
at AI.Informatica.proxyclasses.DataIntegrationServiceSoapBindingStub.startWorkflow(DataIntegrationServiceSoapBindingStub.java:1101)
at AI.Informatica.javasrc.GSS_Informatica.start_workflow(GSS_Informatica.java:745)
at AI.Informatica.javasrc.GSS_Informatica.execute(GSS_Informatica.java:1384)
at AI.Informatica.javasrc.GSS_Informatica.main(GSS_Informatica.java:382)
{http://xml.apache.org/axis/}hostname:win2k3sami
java.lang.NullPointerException
at org.apache.axis.AxisFault.makeFault(AxisFault.java:104)
at org.apache.axis.client.Call.invoke(Call.java:2504)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:1835)
at AI.Informatica.proxyclasses.DataIntegrationServiceSoapBindingStub.startWorkflow(DataIntegrationServiceSoapBindingStub.java:1101)
at AI.Informatica.javasrc.GSS_Informatica.start_workflow(GSS_Informatica.java:745)
at AI.Informatica.javasrc.GSS_Informatica.execute(GSS_Informatica.java:1384)
at AI.Informatica.javasrc.GSS_Informatica.main(GSS_Informatica.java:382)
Caused by: java.lang.NullPointerException
at org.apache.axis.message.SOAPEnvelope.addHeader(SOAPEnvelope.java:230)
at org.apache.axis.client.Call.invoke(Call.java:2789)
at org.apache.axis.client.Call.invoke(Call.java:2501)
... 6 more
Thanks in advance.
Mahesh. -
Error while using Web services for working with Informatica
[Status] : Initializing...
[Status] : Done
[Status] : Calling StartWorkflow...
From : DataIntegrationServiceSoapBindingStub
Reason getting : null
Jun 25, 2007 6:15:06 AM org.apache.axis.encoding.ser.BeanSerializer serialize
SEVERE: Exception:
java.io.IOException: Non nillable element 'reason' is null.
at org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:215)
at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1426)
at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:914)
at org.apache.axis.message.RPCParam.serialize(RPCParam.java:200)
at org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:477)
at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
at org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:530)
at org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount(AttachmentsImpl.java:519)
at org.apache.axis.Message.getContentType(Message.java:475)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:343)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at samples.axis.proxyclasses.DataIntegrationServiceSoapBindingStub.startWorkflow(DataIntegrationServiceSoapBindingStub.java:744)
at samples.axis.dataintegration.Sample1.main(Sample1.java:227)
Jun 25, 2007 6:15:06 AM org.apache.axis.attachments.AttachmentsImpl getAttachmentCount
WARNING: Exception:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.io.IOException: java.io.IOException: Non nillable element 'reason' is null.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.io.IOException: java.io.IOException: Non nillable element 'reason' is null.
at org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:275)
at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1426)
at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:914)
at org.apache.axis.message.RPCParam.serialize(RPCParam.java:200)
at org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:477)
at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
at org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:530)
at org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount(AttachmentsImpl.java:519)
at org.apache.axis.Message.getContentType(Message.java:475)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:343)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at samples.axis.proxyclasses.DataIntegrationServiceSoapBindingStub.startWorkflow(DataIntegrationServiceSoapBindingStub.java:744)
at samples.axis.dataintegration.Sample1.main(Sample1.java:227)
{http://xml.apache.org/axis/}hostname:daa30144app003b
java.io.IOException: java.io.IOException: Non nillable element 'reason' is null.
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:317)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
at org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:530)
at org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount(AttachmentsImpl.java:519)
at org.apache.axis.Message.getContentType(Message.java:475)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:343)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at samples.axis.proxyclasses.DataIntegrationServiceSoapBindingStub.startWorkflow(DataIntegrationServiceSoapBindingStub.java:744)
at samples.axis.dataintegration.Sample1.main(Sample1.java:227)
Caused by: java.io.IOException: java.io.IOException: Non nillable element 'reason' is null.
at org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:275)
at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1426)
at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:914)
at org.apache.axis.message.RPCParam.serialize(RPCParam.java:200)
at org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:477)
at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
... 17 more
Reason getting : null
Jun 25, 2007 6:15:06 AM org.apache.axis.encoding.ser.BeanSerializer serialize
SEVERE: Exception:
java.io.IOException: Non nillable element 'reason' is null.
at org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:215)
at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1426)
at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:914)
at org.apache.axis.message.RPCParam.serialize(RPCParam.java:200)
at org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:477)
at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
at org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:530)
at org.apache.axis.SOAPPart.getContentLength(SOAPPart.java:229)
at org.apache.axis.Message.getContentLength(Message.java:499)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:371)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at samples.axis.proxyclasses.DataIntegrationServiceSoapBindingStub.startWorkflow(DataIntegrationServiceSoapBindingStub.java:744)
at samples.axis.dataintegration.Sample1.main(Sample1.java:227)
Exception Occurred: java.io.IOException: java.io.IOException: Non nillable element 'reason' is null.
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.io.IOException: java.io.IOException: Non nillable element 'reason' is null.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.io.IOException: java.io.IOException: Non nillable element 'reason' is null.
at org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:275)
at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1426)
at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:914)
at org.apache.axis.message.RPCParam.serialize(RPCParam.java:200)
at org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:477)
at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
at org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:530)
at org.apache.axis.SOAPPart.getContentLength(SOAPPart.java:229)
at org.apache.axis.Message.getContentLength(Message.java:499)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:371)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at samples.axis.proxyclasses.DataIntegrationServiceSoapBindingStub.startWorkflow(DataIntegrationServiceSoapBindingStub.java:744)
at samples.axis.dataintegration.Sample1.main(Sample1.java:227)
{http://xml.apache.org/axis/}hostname:daa30144app003b
java.io.IOException: java.io.IOException: Non nillable element 'reason' is null.
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:317)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
at org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:530)
at org.apache.axis.SOAPPart.getContentLength(SOAPPart.java:229)
at org.apache.axis.Message.getContentLength(Message.java:499)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:371)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at samples.axis.proxyclasses.DataIntegrationServiceSoapBindingStub.startWorkflow(DataIntegrationServiceSoapBindingStub.java:744)
at samples.axis.dataintegration.Sample1.main(Sample1.java:227)
Caused by: java.io.IOException: java.io.IOException: Non nillable element 'reason' is null.
at org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:275)
at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1426)
at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:914)
at org.apache.axis.message.RPCParam.serialize(RPCParam.java:200)
at org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:477)
at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
... 17 moreHi All,
Now again i am getting below error when i am calling wokrflow to run using Web Services HUB.
please can any one help out me in this.
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.NullPointerException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.lang.NullPointerException
at org.apache.axis.message.SOAPEnvelope.addHeader(SOAPEnvelope.java:230)
at org.apache.axis.client.Call.invoke(Call.java:2789)
at org.apache.axis.client.Call.invoke(Call.java:2501)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:1835)
at AI.Informatica.proxyclasses.DataIntegrationServiceSoapBindingStub.startWorkflow(DataIntegrationServiceSoapBindingStub.java:1101)
at AI.Informatica.javasrc.GSS_Informatica.start_workflow(GSS_Informatica.java:745)
at AI.Informatica.javasrc.GSS_Informatica.execute(GSS_Informatica.java:1384)
at AI.Informatica.javasrc.GSS_Informatica.main(GSS_Informatica.java:382)
{http://xml.apache.org/axis/}hostname:win2k3sami
java.lang.NullPointerException
at org.apache.axis.AxisFault.makeFault(AxisFault.java:104)
at org.apache.axis.client.Call.invoke(Call.java:2504)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:1835)
at AI.Informatica.proxyclasses.DataIntegrationServiceSoapBindingStub.startWorkflow(DataIntegrationServiceSoapBindingStub.java:1101)
at AI.Informatica.javasrc.GSS_Informatica.start_workflow(GSS_Informatica.java:745)
at AI.Informatica.javasrc.GSS_Informatica.execute(GSS_Informatica.java:1384)
at AI.Informatica.javasrc.GSS_Informatica.main(GSS_Informatica.java:382)
Caused by: java.lang.NullPointerException
at org.apache.axis.message.SOAPEnvelope.addHeader(SOAPEnvelope.java:230)
at org.apache.axis.client.Call.invoke(Call.java:2789)
at org.apache.axis.client.Call.invoke(Call.java:2501)
... 6 more
Thanks in advance.
Mahesh. -
Retrieving results for comparison in form based authentication with entitie
Hi,Im developing an application using EJB3.0 and at the moment im working on a module involving user authentication.I work with the sun java system appserver 9.1 and netbeans 5.5.2 using the default toplink as the persistent provider.I have problems performing user based authentication.where am at is at shown below.I used a SLSB facade design pattern and created an entity from an existing database I built solely for the application (table name user_table). This is the code I have currently:
Entity
* UserTable.java
* Created on 31 March 2008, 16:06
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
package Entities;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
* Entity class UserTable
* @author Ayo
@Entity
@Table(name = "user_table")
public class UserTable implements Serializable {
@Id
@Column(name = "user_id", nullable = false)
private Integer userId;
@Column(name = "username")
private String username;
@Column(name = "password")
private String password;
@Column(name = "user_type")
private String userType;
@Column(name = "access_level")
private String accessLevel;
@Column(name = "staff_id")
private Integer staffId;
@Column(name = "staff_type", nullable = false)
private String staffType;
@Column(name = "time_created")
private String timeCreated;
@Column(name = "time_modified")
private String timeModified;
@Column(name = "time_logged_in")
private String timeLoggedIn;
@Column(name = "time_logged_out")
private String timeLoggedOut;
@Column(name = "created_by")
private String createdBy;
/** Creates a new instance of UserTable */
public UserTable() {
* Creates a new instance of UserTable with the specified values.
* @param userId the userId of the UserTable
public UserTable(Integer userId) {
this.userId = userId;
* Creates a new instance of UserTable with the specified values.
* @param userId the userId of the UserTable
* @param staffType the staffType of the UserTable
public UserTable(Integer userId, String staffType) {
this.userId = userId;
this.staffType = staffType;
* Gets the userId of this UserTable.
* @return the userId
public Integer getUserId() {
return this.userId;
* Sets the userId of this UserTable to the specified value.
* @param userId the new userId
public void setUserId(Integer userId) {
this.userId = userId;
* Gets the username of this UserTable.
* @return the username
public String getUsername() {
return this.username;
* Sets the username of this UserTable to the specified value.
* @param username the new username
public void setUsername(String username) {
this.username=username;
* Gets the password of this UserTable.
* @return the password
public String getPassword() {
return this.password;
* Sets the password of this UserTable to the specified value.
* @param password the new password
public void setPassword(String password) {
this.password=password;
* Gets the userType of this UserTable.
* @return the userType
public String getUserType() {
return this.userType;
* Sets the userType of this UserTable to the specified value.
* @param userType the new userType
public void setUserType(String userType) {
this.userType = userType;
* Gets the accessLevel of this UserTable.
* @return the accessLevel
public String getAccessLevel() {
return this.accessLevel;
* Sets the accessLevel of this UserTable to the specified value.
* @param accessLevel the new accessLevel
public void setAccessLevel(String accessLevel) {
this.accessLevel = accessLevel;
* Gets the staffId of this UserTable.
* @return the staffId
public Integer getStaffId() {
return this.staffId;
* Sets the staffId of this UserTable to the specified value.
* @param staffId the new staffId
public void setStaffId(Integer staffId) {
this.staffId = staffId;
* Gets the staffType of this UserTable.
* @return the staffType
public String getStaffType() {
return this.staffType;
* Sets the staffType of this UserTable to the specified value.
* @param staffType the new staffType
public void setStaffType(String staffType) {
this.staffType = staffType;
* Gets the timeCreated of this UserTable.
* @return the timeCreated
public String getTimeCreated() {
return this.timeCreated;
* Sets the timeCreated of this UserTable to the specified value.
* @param timeCreated the new timeCreated
public void setTimeCreated(String timeCreated) {
this.timeCreated = timeCreated;
* Gets the timeModified of this UserTable.
* @return the timeModified
public String getTimeModified() {
return this.timeModified;
* Sets the timeModified of this UserTable to the specified value.
* @param timeModified the new timeModified
public void setTimeModified(String timeModified) {
this.timeModified = timeModified;
* Gets the timeLoggedIn of this UserTable.
* @return the timeLoggedIn
public String getTimeLoggedIn() {
return this.timeLoggedIn;
* Sets the timeLoggedIn of this UserTable to the specified value.
* @param timeLoggedIn the new timeLoggedIn
public void setTimeLoggedIn(String timeLoggedIn) {
this.timeLoggedIn = timeLoggedIn;
* Gets the timeLoggedOut of this UserTable.
* @return the timeLoggedOut
public String getTimeLoggedOut() {
return this.timeLoggedOut;
* Sets the timeLoggedOut of this UserTable to the specified value.
* @param timeLoggedOut the new timeLoggedOut
public void setTimeLoggedOut(String timeLoggedOut) {
this.timeLoggedOut = timeLoggedOut;
* Gets the createdBy of this UserTable.
* @return the createdBy
public String getCreatedBy() {
return this.createdBy;
* Sets the createdBy of this UserTable to the specified value.
* @param createdBy the new createdBy
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
* Returns a hash code value for the object. This implementation computes
* a hash code value based on the id fields in this object.
* @return a hash code value for this object.
@Override
public int hashCode() {
int hash = 0;
hash += (this.userId != null ? this.userId.hashCode() : 0);
return hash;
* Determines whether another object is equal to this UserTable. The result is
* <code>true</code> if and only if the argument is not null and is a UserTable object that
* has the same id field values as this object.
* @param object the reference object with which to compare
* @return <code>true</code> if this object is the same as the argument;
* <code>false</code> otherwise.
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof UserTable)) {
return false;
UserTable other = (UserTable)object;
if (this.userId != other.userId && (this.userId == null || !this.userId.equals(other.userId))) return false;
return true;
* Returns a string representation of the object. This implementation constructs
* that representation based on the id fields.
* @return a string representation of the object.
@Override
public String toString() {
return "Entities.UserTable[userId=" + userId + "]";
SLSB
* UserTableFacade.java
* Created on 31 March 2008, 16:07
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
package Entities;
import java.util.*;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
* @author Ayo
@Stateless
public class UserTableFacade implements UserTableFacadeLocal {
@PersistenceContext
private EntityManager em;
/** Creates a new instance of UserTableFacade */
public UserTableFacade() {
public void create(UserTable userTable) {
em.persist(userTable);
public void edit(UserTable userTable) {
em.merge(userTable);
public void destroy(UserTable userTable) {
em.merge(userTable);
em.remove(userTable);
public List findAll() {
return em.createQuery("select Object(o)from UserTable as o").getResultList();
local interface
* UserTableFacadeLocal.java
* Created on 31 March 2008, 16:07
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
package Entities;
import java.util.*;
import javax.ejb.Local;
* @author Ayo
@Local
public interface UserTableFacadeLocal {
void create(UserTable userTable);
void edit(UserTable userTable);
void destroy(UserTable userTable);
List findAll();
controller servlet
* userCheck.java
* Created on 15 March 2008, 22:41
package servlets;
import Entities.UserTable;
import Entities.UserTableFacadeLocal;
import Entities.userValidationBean;
import Entities.userValidationRemote;
import java.io.*;
import java.util.Iterator;
import java.util.List;
import java.util.Collection;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.ejb.*;
* @author Ayo
* @version
public class userCheck extends HttpServlet {
@EJB
private UserTableFacadeLocal userTableFacade;
UserTable u;
String userFellow;
String pass;
String username,password;
/** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
* @param request servlet request
* @param response servlet response
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
/*con=null;
ps=null;
rs=null;
s=null;
*/response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
username=request.getParameter("username");
password=request.getParameter("password");
if(username==""||password=="")
showError("<b><font color=\"red\">Please fill in the required blanks.</font></b>",request,response);
else
List user=userTableFacade.findAll();
for(Iterator it=user.iterator();it.hasNext();)
u=(UserTable)it.next();
userFellow= u.getUsername();
pass=u.getPassword();
//out.println(" <b>"+elem.getTitle()+" </b><br />");
//out.println(elem.getBody()+"<br /> ");
//I used the following two lines to determing if im actually accessing the database and retrieving results, and I get all records in the table(usernames and passwords).
//BUT I NEED A SPECIFIC RECORD TO MATCH THE USERNAME AND PASSWORD FROM THE FORM AND IF IT DOES NOT MATCH,I REDIRECT TO THE ERROR PAGE.THAT'S WHERE IM STUCK.
out.println(userFellow);
out.println(pass);
/* if(username.equals(userFellow)&&password.equals(pass))
RequestDispatcher d=request.getRequestDispatcher("blah.jsp");
d.forward(request,response);
else
showError("<b><font color=\"red\">Invalid Login details!</font></b>",request,response);
private void showError(String errorMsg,HttpServletRequest request,HttpServletResponse response)throws ServletException,IOException
request.setAttribute("error_msg",errorMsg);
RequestDispatcher dispatcher=request.getRequestDispatcher("admin_error.jsp");
dispatcher.forward(request,response);
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
/** Handles the HTTP <code>GET</code> method.
* @param request servlet request
* @param response servlet response
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
/** Handles the HTTP <code>POST</code> method.
* @param request servlet request
* @param response servlet response
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
/** Returns a short description of the servlet.
public String getServletInfo() {
return "Short description";
// </editor-fold>
I NEED HELP.ive been on this for 5 days and i cant seem to get a solution. I tried creating a method (private Collection findByUsername()) and(private Collection
findByPassword()) in the local interface that would supposedly return records based on input from the form but I got a null pointer and an ejb exception saying
unknown find method or something, as in ,or an error message that said i cant search records by name or something.I dont know. Or is it the query that is not
specific enough. I didnt seem to get the syntax right when i was trying to search by username and password.Please someone help me.
Ayo.Hey everyone,
Is the question I posted that hard?
I even tried to just load a HTML <img src="picture.jpg"/> tag
on the login.jsp and even this won't show.
I'm thinking that the container, with the security mechanism, is blocking
styles and images???
Anyone...please help.
-Yuri -
Web service for SAP R/3 user authentication
Hi Experts,
We are searching for any standard web service/ Bapi to authenicate an SAP user from an external system which needs WSDL to check this . External system will be providing the SAP user ID and password and expects an acknowledgemnt that whether the user is authenticated or not .
Is there any webservice/Bapi available for this purpose? if not how we can achieve this?
Thanks in advance
SanuHi,
I don't think there is any web service to just check authentication but the work around is simple :
Call any web service which just display some information (for example call STFC_CONNECTION function module as a web service).
As you need to authenticate to call the web service, send the user/password.
If you get the release information, the user/password is OK.
If you get HTTP 401 error, the user/password is KO.
Of course the user needs the authorisation to execute the STFC_CONNECTION function module.
Regards,
Olivier
Maybe you are looking for
-
My iPod won't take the songs from my iTunes.
I used to use my main desktop for getting my music on iTunes. The family and I have been using an account that none of us can remember the password for. And the e-mail that was used must be expired because we no longer use AOL. My iPod was used on th
-
Access to external drives connected to Airport Extreme via USB Hub
I have 2 computers connected wirelessly to an Airport Extreme 802.11n base station. I have a Belkin powered USB hub connected to the USB port on the Extreme. There is a Lacie hard drive, a USB printer and a Kingston flash drive connected to the USB h
-
ITunes not recognizing/syncing replaced iPhone. Please help ASAP
i just got my cracked screen on my old phone replaced with a new iphone and ever since then when i plug my phone into my computer iTunes is not popping up and automatically sycning like usual. any ideas/advice on what i should do? thanks alot ben Mes
-
RV220W - Can't open port 20 and 549
Hi there, I have a static IP address over 100Mbit fiber. I've installed a Mac Mini as a webserver and opened the ports 80, 443 and 5900 and a few others for minor services. Everything works fine: the http server (and https as well) is up and pepole
-
Scheduled ship date using PO / On-hand Quantity
Hi All, ATP calculates the scheduled ship date using the pegging from PO or from the available On-Hand-Quantity when the order lines are created. I couldn't find any difference in the order tables whichever way the scheduled ship date is created. Any