Why so much code getting data out of DB & into web services
I am new to Java and I am experimenting with web services.
I am trying to get data out of a database and into a web service
This is the code I had to build just to get a little bit of data out of a DB and into a web service.
// Open a database connection and statement.
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").newInstance();
Connection dbConn = DriverManager.getConnection("jdbc:db2:sample","myuser","mypass");
Statement statement = dbConn.createStatement();
// Build the message.
SOAPMessageContext ctx = (SOAPMessageContext) messageContext;
try {
MessageFactory messageFactory = MessageFactory.newInstance();
SOAPMessage m = messageFactory.createMessage();
SOAPEnvelope env = m.getSOAPPart().getEnvelope();
SOAPBody body = env.getBody();
SOAPElement elem =
body.addBodyElement(env.createName("ns1:getEmployees"));
elem.addNamespaceDeclaration("ns1",
"http://www.abc.com/SampleApplication/Employee.wsdl");
elem.addNamespaceDeclaration("ns2",
"http://www.abc.com/SampleApplication/Employee.xsd");
SOAPElement elem1 = new SOAPElementImpl("Response", null, null);
// Execute the query.
String sql = "SELECT EMPNO, FIRSTNME, MIDINIT, LASTNAME, HIREDATE FROM EMPLOYEE";
ResultSet result = statement.executeQuery(sql);
Isn't there a way with less code to get data out and stick into a web service?
I left the part of the code out that is bugging me - I was talking about all of the code to get the data into XML..
here's the whole code..
// Open a database connection and statement.
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").newInstance();
Connection dbConn = DriverManager.getConnection("jdbc:db2:sample","myuser","mypass");
Statement statement = dbConn.createStatement();
// Build the message.
SOAPMessageContext ctx = (SOAPMessageContext) messageContext;
try {
MessageFactory messageFactory = MessageFactory.newInstance();
SOAPMessage m = messageFactory.createMessage();
SOAPEnvelope env = m.getSOAPPart().getEnvelope();
SOAPBody body = env.getBody();
SOAPElement elem =
body.addBodyElement(env.createName("ns1:getEmployees"));
elem.addNamespaceDeclaration("ns1",
"http://www.abc.com/SampleApplication/Employee.wsdl");
elem.addNamespaceDeclaration("ns2",
"http://www.abc.com/SampleApplication/Employee.xsd");
SOAPElement elem1 = new SOAPElementImpl("Response", null, null);
// Execute the query.
String sql = "SELECT EMPNO, FIRSTNME, MIDINIT, LASTNAME, HIREDATE FROM EMPLOYEE";
ResultSet result = statement.executeQuery(sql);
SOAPElement employee = new SOAPElementImpl("Employees", "ns2", "http://www.abc.com/SampleApplication/Employee.xsd");
employee.addChildElement("ns2:EMPNO").addTextNode(result.getString("EMPNO"));
employee.addChildElement("ns2:FIRSTNME").addTextNode(result.getString("FIRSTNME"));
employee.addChildElement("ns2:FIRSTNME").addTextNode(result.getString("MIDINIT"));
employee.addChildElement("ns2:LASTNAME").addTextNode(result.getString("LASTNAME"));
employee.addChildElement("ns2:FIRSTNME").addTextNode(result.getString("HIREDATE"));
elem1.addChildElement(employee);
elem.addChildElement(elem1);
ctx.setMessage(m);
dbConn.close();
} catch (Throwable e) {
weblogic.utils.Debug.say("(hbs):e " + e);
e.printStackTrace(System.out);
putting the data in the node seems excessive to me.
thanks
AP
Similar Messages
-
HT1454 why i can not get video out from my ipod touch after i did the upgrade
why i can not get video out from my ipod touch after i did the upgrade
why i can not get video out from my ipod touch after i did the upgrade
-
As a novice computer user, I wonder why I'm often getting "white-out" (program/app/site I'm working in goes totally blank onscreen). This is when I'm Internet online. If it makes a difference, I'm working 99% of the time on battery, not AC, power. Some of the possibilities I'm guessing are: glitches in my Verizon FiOS Wi-Fi providership?; staying too long on a site that's waiting for me to finish and "Submit"?; computer hardware prob (yikes, I hope not! It's brand new). Any ideas out there?
When this 'white-out' occurs, is the display 100% white with no error message and no menu bar?
Does this occur when you are using Wi Fi or connected to the Internet via the Ethernet cable?
Ciao. -
Getting data out of Oracle to SQL Server 2005
Hello,
I am new in Oracle and I have this question.
I need to transfer lots of data frequently at day from a large Oracle DB to a SQL Server 2005 Database.
Could you tell me what tools (including PL/SQL) ORACLE offers to reach this goal?
*.Dat files are still a way to perform this job or other method more performance (quickly and efficiently) are available?
Using MS SSIS is better ?
Thank for your helpI've done getting data out of Oracle to MS Access DB using heterogenous servicing.I hope that that would be the best way for your case too..
Check this out.
http://www.datadirect.com/developer/odbc/oracle_heterogeneous/index.ssp
Regards,
Bhagat -
How to get data out of XML?
Hi,All.
I am running SAX (JAXP1.01) in Applet to process XML file. My question is how to get data out of xml format according to the field name (@age,@rank etc)
and write into string buffer seperated by comma.
Should I use SAX or DOM? (file size is big)
My xml as follow :
<ROOT>
<FormattedReportObject>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@team/relay}">
<ObjectName>Field124</ObjectName>
<FormattedValue>HUNTER</FormattedValue>
<Value>HUNTER</Value>
</FormattedReportObject>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@age}">
<ObjectName>Field125</ObjectName>
<FormattedValue> 19</FormattedValue>
<Value> 19</Value>
</FormattedReportObject>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@Rank}">
<ObjectName>Field126</ObjectName>
<FormattedValue>43</FormattedValue>
<Value>43</Value>
</FormattedReportObject>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{results.athrel_name}">
<ObjectName>Field127</ObjectName>
<FormattedValue>1-1 NORRIE</FormattedValue>
<Value>1-1 NORRIE</Value>
</FormattedReportObject>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield2}">
<ObjectName>Field128</ObjectName>
<FormattedValue>1:54.75</FormattedValue>
<Value>1:54.75</Value>
</FormattedReportObject>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield1course}">
<ObjectName>Field129</ObjectName>
<FormattedValue/>
<Value/>
</FormattedReportObject>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield1std}">
<ObjectName>Field130</ObjectName>
<FormattedValue/>
<Value/>
</FormattedReportObject>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield2course}">
<ObjectName>Field131</ObjectName>
<FormattedValue/>
<Value/>
</FormattedReportObject>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield2std}">
<ObjectName>Field132</ObjectName>
<FormattedValue>QT</FormattedValue>
<Value>QT</Value>
</FormattedReportObject>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@points(left)}">
<ObjectName>Field133</ObjectName>
<FormattedValue/>
<Value/>
</FormattedReportObject>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@pointsdecimal}">
<ObjectName>Field134</ObjectName>
<FormattedValue/>
<Value/>
</FormattedReportObject>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:decimal" FieldName="{@points(right)}">
<ObjectName>Field135</ObjectName>
<FormattedValue>0</FormattedValue>
<Value>0.00</Value>
</FormattedReportObject>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield1}">
<ObjectName>Field136</ObjectName>
<FormattedValue>1:55.98</FormattedValue>
<Value>1:55.98</Value>
</FormattedReportObject>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@Rank}">
<ObjectName>Field137</ObjectName>
<FormattedValue>43</FormattedValue>
<Value>43</Value>
</FormattedReportObject>
Repeat...
</FormattedReportObject>
</ROOT>
------------------------------------------------For big files use SAX: quicker and less memory usage.
The xerces parser from Apache has some examples. Basically what you do is scan the XML, remembering what tag you are and once you find the right tag, read the contents. -
What is the best way to export the data out of BW into a flat file on the S
Hi All,
We are BW 7.01 (EHP 1, Service Pack Level 7).
As part of our BW project scope for our current release, we will be developing certain reports in BW, and for certain reports, the existing legacy reporting system based out of MS Access and the old version of Business Objects Release 2 would be used, with the needed data supplied from the BW system.
What is the best way to export the data out of BW into a flat file on the Server on regular intervals using a process chain?
Thanks in advance,
- ShashiHello Shashi,
some comments:
1) An "open hub license" is required for all processes that extract data from BW to a non-SAP system (including APD). Please check with your SAP Account Executive for details.
2) The limitation of 16 key fields is only valid when using open hub for extracting to a DB table. There's no such limitation when writing files.
3) Open hub is the recommended solution since it's the easiest to implement, no programming is required, and you don't have to worry much about scaling with higher data volumes (APD and CRM BAPI are quite different in all of these aspects).
For completeness, here's the most recent documentation which also lists other options:
http://help.sap.com/saphelp_nw73/helpdata/en/0a/0212b4335542a5ae2ecf9a51fbfc96/frameset.htm
Regards,
Marc
SAP Customer Solution Adoption (CSA) -
Get date from portal in a web dynpro?
hi all,
how get date from portal in a web dynpro???
thanks.new Date(System.getTimeInMillis());
Good luck, Roelof -
Reference for working with a data collection retreived from a Web Service
Does anyone have a good resource / example of working with multi row data collections returned from a web service call?
In addition to the basic return of x data rows, I will also be getting parent child collections. For example,
for each Customer row, 0 or more Customer Invoices
I have found many guides the relate to single values being retrieved by the web service, but I have not found any that refer to data collections.
Best regards,
ThomasThat can all certainly be done with a 13" MBP.
You'd want to get a USB hub, preferably USB 3.0 to plug in your optical drive, keyboard and mouse.
For your external monitor you can use a Mini DisplayPort adapter to DVI or HDMI (or if it's a retina MBP use the HDMI out).
For your ethernet, it will plug right into the non-retina. If you get the retina, you'd need a Thunderbolt to Ethernet adapter (faster) or a USB to ethernet adapter (slower). -
What stub code does APEX uses when making a web service call ?
What stub code does APEX uses when making a web service call (manual web service reference)
I am using APEX (which was part of the 11g installation).Hi Steve,
Some options for the same issue:
web service time out
How to check for Web Srvice Timeout in ABAP Proxy call
Regards
Vijaya -
How to access complex data type from a soap web services?
hello
can u please tell me how can i access complex data type from a soap web service from jdeveloper 10g
Jdeveloper generates 3 classes
serviceStub
getproperties
response
i have to retreview the data which is a complex data type it gives some
unknown type. and the return value is a key-value pair data type .
regards
vsAfter you create the partner link and the invoke (to create the variables), change the element type of the response message to the complex type definition of your collection that appears in the XSD. You can do the same thing if you want to change the element type of the payload of the request message as well.
-
Oracle Ebiz R12.1: Out of the Box Web services avialable
All,
I come from intergration background, can anybody let me know about list of out of the box web services in R12.
Ex: Oracle E-Business Suite R12.1 – Integrated SOA Gateway Provides Native, Out-Of-The-Box SOAP Based Web Services
Thanks in advance.
Regards
Girish S CHi,
Please see these documents.
Note: 556540.1 - Installing Oracle E-Business Suite Integrated SOA Gateway, Release 12.1
Note: 565922.1 - Oracle E-Business Suite Integrated SOA Gateway Release Note:s, Release 12.1.1
Note: 815196.1 - Oracle E-Business Suite Integrated SOA Gateway 12.1.1 - Consolidated One-Off
Note: 726414.1 - Oracle E-Business Suite Integrated SOA Gateway Troubleshooting Guide, Release 12
Note: 755067.1 - Using Oracle BPEL 10g with E-Business Suite Release 12.1.1
Note: 755069.1 - EBS R12 Packager and Adapters for External Application Servers
Note: 782455.1 - How Can I Expose E-Business Suite Integration Interfaces as Web Services in Release 11i and R12.0 <-- Good tutorials and additional resources in this document.
You could also refer to SOA Blogs.
Steven Chan Blog - SOA
http://www.google.com/search?q=SOA&sitesearch=http%3A%2F%2Fblogs.oracle.com%2FstevenChan&domains=http%3A%2F%2Fblogs.oracle.com%2FstevenChan
Oracle SOA Suite - Team Blog
http://blogs.oracle.com/SOA/
SOA@Oracle SCA, BPEL, BPM & Service Bus
http://orasoa.blogspot.com/
Thanks,
Hussein -
Data types supported in weblogic web service
I have used byte[] (base64) array to pass binary data using weblogic in a web service, since byte[] is a java datatype that is supported, is there a definite guideline available that byte [][] ( multi-dimensional array} is not supported in weblogic 8.1? (I have tried and failed with byte [][])
ThanksHi gchirrav ,
Multi-Dimentional array support not listed in supported Data Types in weblogic 8.1.
Go through the following link, you will find supported data types.
http://e-docs.bea.com/wls/docs81/webserv/implement.html#1054236
----Anilkumar kari -
Importing test data into "Web Service Navigator Test Scenario" fails
Hello,
I'm using NW 7.2 Java and have the following problem: when I try to import a XML file containing test data as scenario in the web service navigator and when I execute the scenario or just click on the details of on entry, all input parameters are gone except the first one!
The XML file was created by the web service navigator itself. I added a few sample web service calls using the web service test function and exported the resulting scenario afterwards. The XML file looks like this (some parameters blackened):
<?xml version="1.0" encoding="UTF-8"?>
<rn1:services WSILURL='' xmlns:rn0='java:sap/standard' xmlns:rn1='http://www.sap.com/webas/2007/02/ws/wsnavigator/' xmlns:rn3='http://schemas.xmlsoap.org/soap/encoding/' xmlns:rn2='http://www.w3.org/2001/XMLSchema'>
<rn1:service name='OrderService' namespace='http://test.sap.com/Scenario/OrderService/' WSDLURL='host:port/sapws/scenario-processes-models_OrderService/OrderService_SAP_DEFAULT_PROFILE_Service/HTTPAuthOverHTTP_1?wsdl&mode=ws_policy'>
<rn1:operation name='receiveOrder'>
<rn1:input>
<Customer>Customer1</Customer>
<Product>Product1</Product>
<Quantity>100</Quantity>
<DeliveryDate>2010-08-19T14:06:24.691+02:00</DeliveryDate>
<BlockedOrder>false</BlockedOrder>
</rn1:input>
<rn1:output></rn1:output>
</rn1:operation>
<rn1:operation name='receiveOrder'>
<rn1:input>
<Customer>Customer2</Customer>
<Product>Product2</Product>
<Quantity>200</Quantity>
<DeliveryDate>2010-08-19T14:06:24.691+02:00</DeliveryDate>
<BlockedOrder>false</BlockedOrder>
</rn1:input>
<rn1:output></rn1:output>
</rn1:operation>
</rn1:service>
</rn1:services>
Thanks in advance for any comments on that issue!!!Hi
Hi,
You can use XML editors like XMLSPY to send the SOAP request or SOAP client tool provided by SAP for this purpose.
SOAP client- https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/downloads/tools/sap%20nw%20application%20server/sap%20soap%20client%20tool%20download.abst
Various methods to Testing SOAP
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7ccd3e4e-0501-0010-95ae-afa58cb46b75
http://www.soapui.org/gettingstarted/your_first_soapUI_project.html
Hope it helps,
Regards,
Abhishek -
Hi,
i have an editable instance of cl_gui_alv_grid. Is there an easy way of getting out the data or do i really need to implement an event handler catching handle_data_changed? I'm not interested in the event itself, and cause the column is a kind of free text i dont need to check the data, so it is sufficient to get the data out when the user is clicking the ok button.hi
refer this sample code... for non oops concept
TABLES: ekko.
TYPE-POOLS: slis. "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
field_style TYPE lvc_t_styl, "FOR DISABLE
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
*ALV data declarations
DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE.
DATA: it_fieldcat TYPE lvc_t_fcat, "slis_t_fieldcat_alv WITH HEADER LINE,
wa_fieldcat TYPE lvc_s_fcat,
gd_tab_group TYPE slis_t_sp_group_alv,
gd_layout TYPE lvc_s_layo, "slis_layout_alv,
gd_repid LIKE sy-repid.
*Start-of-selection.
START-OF-SELECTION.
PERFORM data_retrieval.
PERFORM set_specific_field_attributes.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM display_alv_report.
*& Form BUILD_FIELDCATALOG
Build Fieldcatalog for ALV Report
FORM build_fieldcatalog.
wa_fieldcat-fieldname = 'EBELN'.
wa_fieldcat-scrtext_m = 'Purchase Order'.
wa_fieldcat-col_pos = 0.
wa_fieldcat-outputlen = 10.
wa_fieldcat-emphasize = 'X'.
wa_fieldcat-key = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'EBELP'.
wa_fieldcat-scrtext_m = 'PO Item'.
wa_fieldcat-col_pos = 1.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'STATU'.
wa_fieldcat-scrtext_m = 'Status'.
wa_fieldcat-col_pos = 2.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'AEDAT'.
wa_fieldcat-scrtext_m = 'Item change date'.
wa_fieldcat-col_pos = 3.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-scrtext_m = 'Material Number'.
wa_fieldcat-col_pos = 4.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'MENGE'.
wa_fieldcat-scrtext_m = 'PO quantity'.
wa_fieldcat-col_pos = 5.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'MEINS'.
wa_fieldcat-scrtext_m = 'Order Unit'.
wa_fieldcat-col_pos = 6.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'NETPR'.
wa_fieldcat-scrtext_m = 'Net Price'.
wa_fieldcat-edit = 'X'. "sets whole column to be editable
wa_fieldcat-col_pos = 7.
wa_fieldcat-outputlen = 15.
wa_fieldcat-datatype = 'CURR'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'PEINH'.
wa_fieldcat-scrtext_m = 'Price Unit'.
wa_fieldcat-col_pos = 8.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
ENDFORM. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
Build layout for ALV grid report
FORM build_layout.
Set layout field for field attributes(i.e. input/output)
gd_layout-stylefname = 'FIELD_STYLE'.
gd_layout-zebra = 'X'.
ENDFORM. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
Display report using ALV grid
FORM display_alv_report.
gd_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_callback_program = gd_repid
i_callback_user_command = 'USER_COMMAND'
is_layout_lvc = gd_layout
it_fieldcat_lvc = it_fieldcat
i_save = 'X'
TABLES
t_outtab = it_ekko
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
UP TO 10 ROWS
FROM ekpo
INTO CORRESPONDING FIELDS OF TABLE it_ekko.
ENDFORM. " DATA_RETRIEVAL
*& Form set_specific_field_attributes
populate FIELD_STYLE table with specific field attributes
form set_specific_field_attributes .
DATA ls_stylerow TYPE lvc_s_styl .
DATA lt_styletab TYPE lvc_t_styl .
Populate style variable (FIELD_STYLE) with style properties
The NETPR field/column has been set to editable in the fieldcatalog...
The following code sets it to be disabled(display only) if 'NETPR'
is gt than 10.
LOOP AT it_ekko INTO wa_ekko.
IF wa_ekko-netpr GT 10.
ls_stylerow-fieldname = 'NETPR' .
ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
"set field to disabled
APPEND ls_stylerow TO wa_ekko-field_style.
MODIFY it_ekko FROM wa_ekko.
ENDIF.
ENDLOOP.
endform. " set_specific_field_attributes -
Getting data out of an input box (textField1)
Page1 has an input field and a submit button... I'm trying to grab the data that is keyed into the input field, store it in a session bean, and then go to a new page.
I've created Temp1 two different ways
private String Temp1 = "Begin";in the instantiation method as well as you see in the action method below.
I keep getting null pointer exceptions, which as near as I can tell are because I never actually get the text that was keyed into textField1. In the debugger the Value of my watch shows "null"
public String submitbuttonpage1_action() {
// TODO Replace with your code
try {
String Temp1 = (String)textField1.getValue();
// this seems to return a null value???
getSessionBean1().setTransport_order_num((String)textField1.getValue());
java.lang.System.out.println("what is the value of Temp1 " + Temp1);
catch (Exception e) {
log("Page1 submitbuttonaction Failure", e);
throw e instanceof javax.faces.FacesException ? (FacesException) e: new FacesException(e);
// Select the ILAUDT1 records for the current order number
return "TransOrder";I'm obviously missing something simple...
Do I have to acces the inputField1 in a different method in order to get to the contents typed in on the screen?
thanks
CraigI've read the thread you referenced... but I'm not sure I understand the issue...
Let me say that I have gotten the session beans to work marvelously as long as I am assigning the value using a text string, for example, getSessionBean1().setTransport_order_num("FJVP62865");
I have gone to my Page2 and made sure that there is no outputText1 variable even referenced in it.
I have modified the session bean upate to be:
this.getSessionBean1().setTransport_order_num(textField1.getValue().toString());
but when that line of code executes, I still get:
Exception Details: javax.faces.FacesException
#{Page1.submitbuttonpage1_action}: javax.faces.el.EvaluationException: javax.faces.FacesException: java.lang.NullPointerException
I also get a null pointer exceptoin when I try to simply set a String variable using that code:
Temp1 = textField1.getValue().toString();
Do I need to modify the Page1.jsp file for the textField1??
<h:inputText binding="#{Page1.textField1}" id="textField1" style="left: 72px; top: 48px; position: absolute" title="Enter Order Number including leading zeros."/>
I seem to be lost somewhere between JSC, JAVA, and JSF here.... thanks for helping me though this..
Craig
Maybe you are looking for
-
External Hard Drive Won't Mount- Need to recover files
Hello Everyone, I am hoping that one of you fine mac experts may be able to assist ~ Problem: External Seagate FreeAgent Desktop USB external hard drive won't mount on desktop=ie: no access to my important files.. Please Help! Details: External seaga
-
HELP with weird Suitcase Message in Entourage...
Hello all. I would have to say that my office PM G5 has been "plagued" with fonts problem recently... and the bottomline is, it seems that all my fonts are corrupted?? Lately when I launch Entourage and click on a new email to read, a little window p
-
Service Callout to HTTP Post Business Service?
Hi, I have created a "Business Service" with following config, 1) Any XML Service 2) Prtocol- HTTP 3) HTTP Request Method- Post. I have created a Proxy Service , which is "Any XML Service" based on HTTP ptotocol. inside the message flow of proxy serv
-
Does your 5800 exhibit this bug too?
Can someone try this on their 5800 (mine is v40) too and see if it happens? With your phone in predictive/portrait mode: 1) Open a text message and go through some process to get the view window (http://www.allaboutsymbian.com/images/features/nokia58
-
i have a Blackberry Curve 8520. I want to remove some of my icons from my Home Screen and take and take an icon from my main menu and replace it with it. I know u can hide icons on the main menu but i cant hide the ones on the Home Screen . Need help