Forwarding array of String to jsp
Hi all
I want to forward an array of string to jsp page. I use the following code:
servlet:
request.setAttribute("list", list);and
jsp:
<% String[] symptomslist = (String[])request.getAttribute("symptomslist"); %>But the values in the array are null. The length is correct. Can anyone please help me in this?
Thanks a lot.
dude
Hey Hey,
Sorry,
My code was suppose to be this:
String[] list = (String[])request.getAttribute("list");Thanks for noticing. Can anyone still help me?
dude
Similar Messages
-
JSP Tag- Passing an array of string as an Attribute
Can I pass an array of String as an attribute to a JSP Tag? I read the specification but It does not say any thing about this.
Thanks in Advance.I thought JSP tags had to deal strictly with string values?
-
"&" character not being sent in parameter value string with jsp:forward
String _url =
"controller.jsp?_page="+nextPage+"&_count="+sessionManager.getCounter();
<jsp:forward page="<%= (String) pageMap.get(nextPage) %>">
<jsp:param name="_url" value="<%= _url %>"/>
</jsp:forward>
Receiving page:
<% String url = request.getParameter("url");
application.log("\n\t[skybook:home]_url = " + _url);
%>
Log:
[skybook:home]_url = controller.jsp?_page=home
If I remove the "&" from _url, then the rest of the string will appear.
Anyone ever seen this?
Thanks!
I'm having a similar problem where I cannot even get the params to show up in the forwarded page.
-
How to pass an array which in the jsp to a javascript file
now i have 2 files: jsp and js(javascript)
i want pass an array which in the jsp to another file--> js file
how can i do it ???
can u give me some related links or some source codes as the references???
thxbcos ....my senior has resigned!!! so i take over his job !!!!!
depend on the talent and the project ....only that way to implement to whole project !!!!
but , i had settled it already ....
it is very simple
in the middle.jsp
Collection result = menuManager.getUserRoleMenu(webSessionUser.getGnuserId());
String menuname[]=new String[110];
int menucounter=0;
Iterator vi = result.iterator();
while(vi.hasNext())
HashMap hm=(HashMap)vi.next();
menuname[menucounter]=hm.toString();
menucounter++;
int i;
String tempstr="";
for(i=0;i<menuname.length;i++)
tempstr+=menuname[i]+",";
session.setAttribute("menuname",tempstr);
%>
<script language="javascript">
menu123("<%=tempstr %>");
</script>
in the body,js
function menu123(string123)
//doing
so ....through the script --menu123
i can get the string from jsp to the js!!!!!
is it very simple, but it spends my 2 days!!!
i just learn javascript ....about 1 month !!! -
Servlet not forwarding a control to the jsp with req dspher
hi ppl,my servlet code is supposed to forward a control to a jsp page so as to display the value in the jsp.but the request dispatcher's forward is not forwarding the control to the jsp page.....here is my servlet code----
// Decompiled by DJ v3.4.4.74 Copyright 2003 Atanas Neshkov Date: 7/4/2003 12:37:00 PM
// Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!
// Decompiler options: packimports(3)
// Source File Name: BdgtMaster.java
package publicity;
import java.io.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class BdgtMaster extends HttpServlet
public synchronized void service(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse)
throws ServletException, IOException
Object obj = null;
String s3 = "";
String s4 = "";
out = httpservletresponse.getOutputStream();
String s = "";
String s1 = "";
String s2 = httpservletrequest.getParameter("option");
s3 = httpservletrequest.getParameter("branch");
s4 = httpservletrequest.getParameter("publicity_code");
String s5 = httpservletrequest.getParameter("budget");
try
String s6 = "0";
String s7 = "0";
String s8 = "INSERT INTO Budget_Master(Branch,Publicity_Code,Budget_Alloted,Work_In_Progress,Amount_Paid) VALUES (?,?,?,?,?)";
String s9 = "update budget_master set old_budget = budget_alloted where branch='" + s3 + "' and publicity_code=" + s4;
String s10 = "UPDATE Budget_Master set budget_alloted=" + s5 + " where Branch='" + s3 + "' and publicity_code=" + s4;
datasource = "jdbc:odbc:budget";
con = DriverManager.getConnection(datasource);
int i = con.getTransactionIsolation();
con.setTransactionIsolation(2);
con.setAutoCommit(false);
if("new".equalsIgnoreCase(s2))
PreparedStatement preparedstatement = con.prepareStatement(s8);
preparedstatement.setString(1, s3);
preparedstatement.setString(2, s4);
preparedstatement.setString(3, s5);
preparedstatement.setString(4, s7);
preparedstatement.setString(5, s6);
preparedstatement.executeUpdate();
con.commit();
preparedstatement.close();
if("update".equalsIgnoreCase(s2))
Statement statement = con.createStatement();
statement.executeUpdate(s9);
statement.executeUpdate(s10);
con.commit();
con.setTransactionIsolation(0);
/*htmlStart(out, "BUDGET MASTER");
out.println("<p> </p><div align=\"left\">");
out.println("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"50%\">");
out.print("<tr>");
out.println("<td width=\"50%\"><strong><small><font face=\"Tahoma\">Branch </font></small></strong></td>");
out.println("<td width=\"50%\"><small><font color=\"#004080\" face=\"Tahoma\">" + s3 + "</font></small></td></tr><tr>");
out.println("<td width=\"50%\"><strong><small><font face=\"Tahoma\">Budget Alloted </font></small></strong></td>");
out.println("<td width=\"50%\"><small><font color=\"#004080\" face=\"Tahoma\">" + s5 + "</font></small></td></tr><tr>");
out.println("<td width=\"50%\"><small><strong><font face=\"Tahoma\">Publicity Code</font></strong></small></td>");
out.println("<td width=\"50%\"><small><font color=\"#004080\" face=\"Tahoma\">" + s4 + "</font></small></td></tr></table></div>");
htmlEnd(out);
con.close();
httpservletrequest.getRequestDispatcher("/pages/serview/BdgM.jsp").forward(httpservletrequest,httpservletresponse);
catch(SQLException sqlexception)
cleanUp();
printSQLException(sqlexception, out);
out.flush();
public void init(ServletConfig servletconfig)
throws ServletException
super.init(servletconfig);
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
return;
catch(ClassNotFoundException classnotfoundexception)
log("Couldn't load class sun.jdbc.odbc.JdbcOdbcDriver");
throw new ServletException(classnotfoundexception.getMessage());
static void printSQLException(SQLException sqlexception, ServletOutputStream servletoutputstream)
throws IOException
servletoutputstream.print("<b>SQLException</b>\n<p>\n\n");
for(; sqlexception != null; sqlexception = sqlexception.getNextException())
servletoutputstream.print("<b>SQLState:</b> " + sqlexception.getSQLState() + "<br>\n");
servletoutputstream.print("<b>Message:</b> " + sqlexception.getMessage() + "<br>\n");
servletoutputstream.print("<b>Vendor:</b> " + sqlexception.getErrorCode() + "<br>\n");
private static boolean checkForWarning(SQLWarning sqlwarning)
throws SQLException
boolean flag = false;
if(sqlwarning != null)
System.out.println("\n *** Warning ***\n");
flag = true;
for(; sqlwarning != null; sqlwarning = sqlwarning.getNextWarning())
System.out.println("SQLState: " + sqlwarning.getSQLState());
System.out.println("Message: " + sqlwarning.getMessage());
System.out.println("Vendor: " + sqlwarning.getErrorCode());
System.out.println("");
return flag;
/*void htmlStart(ServletOutputStream servletoutputstream, String s)
throws IOException
servletoutputstream.println("<html><head><title>" + s + "</title></head>");
servletoutputstream.println("<body topmargin=\"0\" leftmargin=\"0\" bgproperties=\"fixed\">");
servletoutputstream.println("<div align=\"left\"><table border=\"0\" width=\"100%\">");
servletoutputstream.println("<tr><td width=\"100%\" bgcolor=\"#DFDFFF\">");
servletoutputstream.println("<font face=\"Tahoma\" color=\"#000000\"><strong>B u d g e t M a s t e r - D e t a i l s E n t e r e d</strong></font></td>");
servletoutputstream.println("</tr></table>");
void htmlEnd(ServletOutputStream servletoutputstream)
throws IOException
servletoutputstream.print("<hr>");
servletoutputstream.print("</body></html>\n");
String link(String s, String s1)
return "<a href=\"" + s + "\">" + s1 + "</a>";
public String getServletInfo()
return "Display and SQL manipulate JDBC databases on the server.";
public void cleanUp()
throws IOException
if(con != null)
try
out.print("Closing database connection");
con.setTransactionIsolation(0);
con.close();
return;
catch(SQLException _ex)
return;
else
return;
public BdgtMaster()
private Connection con;
private String datasource;
private String user;
private String password;
private String base;
private ServletOutputStream out;
plz tell me where im wrong...
regards....a_josephHi,
Sorry to say this but it'd be lot simple if we can avoid cross posting similar Queries.
I'd appriciate if you can continue using with your post
http://forum.java.sun.com/thread.jspa?threadID=5208928
Hope there are no hard issues on this.
REGARDS,
RaHuL -
Revision: 13412
Revision: 13412
Author: [email protected]
Date: 2010-01-11 02:02:20 -0800 (Mon, 11 Jan 2010)
Log Message:
WebPlayer: optimizing JS code to forward all query string parameters to WebPlayer.swf.
Modified Paths:
osmf/trunk/apps/samples/framework/WebPlayer/html-template/index.template.html
osmf/trunk/apps/samples/framework/WebPlayer/src/Configuration.asls -l /var/run/lighttpd/
And how are you spawning the php instances? I don't see that in the daemons array anywhere.
EDIT: It looks like the info in that page is no longer using pre-spawned instances, but lighttpd adaptive-spawn. The documentation has been made inconsistent it looks like.
You will note that with pre-spawned information, the config looks different[1].
You need to do one or the other, not both (eg. choose adaptive-spawn, or pre-spawn..not both).
[1]: http://wiki.archlinux.org/index.php?tit … oldid=8051 "change" -
How to split a string in jsp?
I have a set of strings or names in ${form.temp.name}Is there anyway I can split a string in jsp or jstl by a newline "\n" or space "\\s" character and print them separately. Or Do i have to do something in my controller as I am using spring with jsp and jstl for my web application?
Thanks.Yes I did the work as below. When I use some delimiters like ";", the code works. But for the newline character of carriage return it does nto work.
<c:set var="str" value="${form.temp.name}"/>
<c:set var="delim" value=" \r\n|\\n"/>
<c:set var="array" value="${fn:split(str, delim)}"/>
<c:forEach var="token" items="${array}">
<p><c:out value="${token}"/> </p>
</c:forEach> Icidentally for the same element, when I try to split in java with the same delimiters, it is working. I am surprised why it is not working? -
Get numerical values from 2D array of string
Hello!
I start by saying that I have a base knowledge of LabView. I'm using LabView 2011. I'm doing some communications test via Can-Bus protocol. As you can see in pictures of the block diagram and of the front panel that I've attached I'm using "Transmit Receive same Port" LabView example. It works very good but I would need to insert the 8 data bytes that I receive from the server in 8 different numerical variables so that I could use them to make some operations. How can I get numerical values from the 2D array of string that I attached?
Every example that you can provide is important!
Thank you very much!
Attachments:
1.jpg 69 KB
2.jpg 149 KBHi martiflix,
ehm: to unbundle data from a cluster I would use the function Unbundle(ByName)…
When you are new to LabVIEW you should take all the FREE online resources offered by NI on their website!
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
How do I write an array of strings to a single Excel row?
I'd like to write test data, as an array of strings, to an Excel file. Attached is my attempt to modify one of the Labview 6.1 example files. This modified example will write the data to the correct row, which is determined by serial # of the UUT, but to a new sheet for each unit. I'd like to do the same thing, but to just one sheet. This sheet's data would then be saved after 50 rows of collected test data.
Thank you in advance,
Tim Denson
Attachments:
Write Table To XL.vi 58 KBSorry I didn't get back to faster on this. I've been out of town working and just really haven't had time.
Yes,
The Report Generation toolkit would make this very easy. If you have it, I'd suggest using it.
The image shown below shows the five VIs from the toolkit that I've used to write to Excel.
What this loop does is receive a string through a Queue, either open a
template or open todays file, convert the tab delimited string to an
array, write the array to the next line of the Excel file, Save (with
todays date stamp if opened from the tempate) and close it. It's a good
idea to always save and close teh file after each write if it's not
being continuously written to. In this case, a new line will be written
only once a minute or so. This lessens the chance of losing data if the
machine locks up for some reason. Opening and closing does take time
and can slow down a loop that needs to run at a certain rate. This loop
actually runs in a background process and several other processes send
data to it through the queue to be written. The queue can buffer
several data streams if needed so you won't lose data if it's busy and
you don't have to worry about two processes accessing the Excel sheet
at the same time.
Ed
Message Edited by Ed Dickens on 02-18-2006 11:12 AM
Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Attachments:
RGTK Array to Excel.gif 14 KB -
I need to sort an array of strings based on the number in each string.
Basically, I have a directory of files that all have the same name but each with a different number on the end.
example: image 1.jpg, image 2.jpg, etc.
When I use the List Directory function that returns an array of strings containing the file names in the directory, they don't come out in a 1, 2, 3, order like they appear in the directory. It sorts them character by character so that they come out like: 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 22 etc.
Is there a simple way of sorting this array of strings with the file names (as above) so that they are in numerical order?It's a while since this thread was started, but I am sure others will have use for this so here goes:
The in-built array sort function sorts the strings the same way DOS and Windows do. Microsoft has fixed this in the Explorer that comes with XP, however the rest of the OS(s) still sorts the old way.
The attached "AlphaLogical String Array Sort" VIs will sort strings arrays the same way as the new XP Explorer. There are three different implementations of the sorting, one based on the Insertion sort algorithm, a Quick Sort based on recursive calls (the most elegant way, but unfortunately LabVIEW has too much overhead when doing recursive calls so this is actually a very slow alternative) and finally the fastest; a stack based Quick Sort. There is also a test VI that will show you how the different implementations perform.
I had not used recursive calls in LV much until I made the attached quick sort and was a bit disappointed by the fact that it is so slow, but it's a good learning example...The ability to do recursive calls this way was introduced in LV7 I believe...There is an example here on the zone that shows how you can calulate a factorial by using recursive calls, however - unlike for the quick sort (normally) - recursive calls are actually not the optimal solution for that calculation.
Message Edited by Mads on 09-13-2005 02:30 AM
MTO
Attachments:
AlphaLogical Sorting.zip 142 KB -
Problem in converting vector to array of strings
hi
i am having a vector which in turn contains hashtable as elements
Vector v=new Vector()
Hashtable ht=new Hashtable();
v.add(ht.add("key1",value1))
v.add(ht.add("key2",value2))
v.add(ht.add("key3",value3))
v.add(ht.add("key4",value4))now i am trying to conver this vector in to a array of string like
String[] str=(String[])v.toArray(new String[v.size()]);but i am getting java.lang.ArrayStoreExceptioncan anybody help me plz
ThanksHi,
The api for public Object[] toArray(Object[] a) says
Returns an array containing all of the elements in this Vector in the correct order; the runtime type of the returned array is that of the specified array.
ArrayStoreException will be thrown if the runtime type of a is not a supertype of the runtime type of every element in this Vector.
The runtime type of the elements of the vector is Hashtable.
Because String is not a supertype of Hashtable the ArrayStoreException is thrown. -
[CS3][JS] How to turn negative number in array into string
Hello,
I have a script that compares the array of the geometric bounds of all text frames to the margins for a document (all pages having the same margins). Any frames that do not match the margins are flagged.
In order to compare the array of text frame geometric bounds to two arrays of margins (because they are facing pages), I have to convert the numbers to strings.
My problem is that in the following snippet of code that creates the two margin arrays, the negative of the variables become numbers again. This would not be too difficult to solve except that all the numbers have to be 4 decimal points before converted to strings.
Thanks,
Tom
var myDoc = app.activeDocument;
var marginY1 = myDoc.pages.item(0).marginPreferences.top.toFixed(4);
var marginX1 = myDoc.pages.item(0).marginPreferences.left.toFixed(4);
var marginY2 = (myDoc.documentPreferences.pageHeight - myDoc.pages.item(0).marginPreferences.bottom).toFixed(4);
var marginX2 = (myDoc.documentPreferences.pageWidth - myDoc.pages.item(0).marginPreferences.right).toFixed(4);
var marginsRHand = [marginY1, marginX1, marginY2, marginX2];
var marginsLHand = [marginY1, -marginX2, marginY2, -marginX1];Well, I think I have solved it. But I don't know why this solves it.
I would think that in the above script all the variables would be numbers and not strings. But the data browser says they are strings.
The solution is:
var marginsLHand = [marginY1, Number(-marginX2).toFixed(4), marginY2, Number(-marginX1).toFixed(4)]
If someone can explain why now all variables in the arrays are strings and not numbers, I'll be happy.
Tom -
Mapping lookup up failure with input JavaBean with an array of strings
To receive input data our Web service defines a JavaBean one element of which is
an array of strings. When a test Java client calls the service method the call
is completed successfully. When a Perl client calls the service method an exception
is returned. If I understand BEA's Web service documentation, it isn't necessary
to do development for the service specifically to enable correct processing of
an array of strings.
In our environment we are running WL 8.1 SP 1.
Please review the problem documentation and explain to me the cause of the exception
and what I must do to prevent it.
Thank you.
The exception:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><env:Header/><env:Body><env:Fault><faultcode>env:Server</faultcode><faultstring>Exception
during processing: weblogic.xml.schema.binding.DeserializationException: mapping
lookup failure. type=['http://www.w3.org/1999/XMLSchema']:xsd:string schema context=TypedSchemaContext{javaType=java.lang.String}
(see Fault Detail for stacktrace)</faultstring><detail><bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0"/>weblogic.xml.schema.binding.DeserializationException:
mapping lookup failure. type=['http://www.w3.org/1999/XMLSchema']:xsd:string schema
context=TypedSchemaContext{javaType=java.lang.String}
at weblogic.xml.schema.binding.RuntimeUtils.lookup_deserializer(RuntimeUtils.java:461)
at weblogic.xml.schema.binding.SoapArrayCodecBase.getComponentDeserializer(SoapArrayCodecBase.java:574)
at weblogic.xml.schema.binding.SoapArrayCodecBase.deserialize(SoapArrayCodecBase.java:285)
at weblogic.xml.schema.binding.BeanCodecBase.processElement(BeanCodecBase.java:183)
at weblogic.xml.schema.binding.BeanCodecBase.processAllElements(BeanCodecBase.java:165)
at weblogic.xml.schema.binding.BeanCodecBase.processElements(BeanCodecBase.java:145)
at weblogic.xml.schema.binding.BeanCodecBase.deserialize(BeanCodecBase.java:108)
at weblogic.xml.schema.binding.RuntimeUtils.invoke_deserializer(RuntimeUtils.java:428)
at weblogic.xml.schema.binding.RuntimeUtils.invoke_deserializer(RuntimeUtils.java:328)
at weblogic.webservice.core.DefaultPart.toJava(DefaultPart.java:384)
at weblogic.webservice.core.DefaultMessage.toJava(DefaultMessage.java:458)
at weblogic.webservice.core.handler.InvokeHandler.handleRequest(InvokeHandler.java:78)
at weblogic.webservice.core.HandlerChainImpl.handleRequest(HandlerChainImpl.java:143)
at weblogic.webservice.core.DefaultOperation.process(DefaultOperation.java:518)
[more]
The XML generated for the Perl client:
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:namesp2="http://namespaces.soaplite.com/perl"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><namesp1:getWorkOrdersByFilters
xmlns:namesp1="ncr.com"><gIMServiceRequest xsi:type="ns:GIMServiceRequest" xmlns:ns="java:com.ncr.gim.bean.service"><applicationID
xsi:type="xsd:string">REVLOG</applicationID><nodeId xsi:type="xsd:string">00XH</nodeId><stopCodes
xsi:type="namesp2:array" SOAP-ENC:arrayType="xsd:string[2]"><xsd:string xsi:type="xsd:string">06</xsd:string><xsd:string
xsi:type="xsd:string">16</xsd:string></stopCodes></gIMServiceRequest></namesp1:getWorkOrdersByFilters></SOAP-ENV:Body></SOAP-ENV:Envelope>
The XML generated for a test Java client:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><env:Header/><env:Body
env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><m:getWorkOrdersByFilters
xmlns:m="ncr.com"><gIMServiceRequest xmlns:n1="java:com.ncr.gim.bean.service"
xsi:type="n1:GIMServiceRequest"><CSRCode xsi:type="xsd:string">987x00</CSRCode><applicationID
xsi:type="xsd:string">GIM</applicationID><incidentNbr xsi:nil="true"/><nodeId
xsi:type="xsd:string">00T5</nodeId><stopCodes soapenc:arrayType="xsd:string[3]"><xsd:string
xsi:type="xsd:string">00</xsd:string><xsd:string xsi:type="xsd:string">01</xsd:string><xsd:string
xsi:type="xsd:string">02</xsd:string></stopCodes></gIMServiceRequest></m:getWorkOrdersByFilters></env:Body></env:Envelope>
The JavaBean:
public class GIMServiceRequest implements Serializable {
private String applicationID = GIMConstants.UNKNOWN_APPLICATION_ID;
private String nodeId = null;
private String incidentNbr = null;
private String CSRCode = null;
private String[] stopCodes = null;
public void setStopCodes(String[] aStopCodes) {
stopCodes = aStopCodes;
public String[] getStopCodes() {
return stopCodes;
[more]
The service build.xml file:
<project name="GIMService" default="all" basedir=".">
<target name="all" depends="ear"/>
<target name="ear">
<servicegen
destEar="GIMService.ear"
contextURI="GIMContext" >
<service
ejbJar="GIMServiceEJB.jar"
targetNamespace="ncr.com"
serviceName="GIMService"
serviceURI="/GIM_URI"
generateTypes="True"
expandMethods="True"
style="rpc"
protocol="http" >
<client
clientJarName="GIMService_client.jar"
packageName="com.ncr.gim.gimservice.client" >
</client>
</service>
</servicegen>
</target>
</project>Hi Jeff,
Looks like the Perl client is using an older (deprecated) schema
namespace "http://www.w3.org/1999/XMLSchema" that is causing this
failure.
Hope this helps,
Bruce
Jeff Carey wrote:
>
To receive input data our Web service defines a JavaBean one element of which is
an array of strings. When a test Java client calls the service method the call
is completed successfully. When a Perl client calls the service method an exception
is returned. If I understand BEA's Web service documentation, it isn't necessary
to do development for the service specifically to enable correct processing of
an array of strings.
In our environment we are running WL 8.1 SP 1.
Please review the problem documentation and explain to me the cause of the exception
and what I must do to prevent it.
Thank you.
The exception:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><env:Header/><env:Body><env:Fault><faultcode>env:Server</faultcode><faultstring>Exception
during processing: weblogic.xml.schema.binding.DeserializationException: mapping
lookup failure. type=['http://www.w3.org/1999/XMLSchema']:xsd:string schema context=TypedSchemaContext{javaType=java.lang.String}
(see Fault Detail for stacktrace)</faultstring><detail><bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0"/>weblogic.xml.schema.binding.DeserializationException:
mapping lookup failure. type=['http://www.w3.org/1999/XMLSchema']:xsd:string schema
context=TypedSchemaContext{javaType=java.lang.String}
at weblogic.xml.schema.binding.RuntimeUtils.lookup_deserializer(RuntimeUtils.java:461)
at weblogic.xml.schema.binding.SoapArrayCodecBase.getComponentDeserializer(SoapArrayCodecBase.java:574)
at weblogic.xml.schema.binding.SoapArrayCodecBase.deserialize(SoapArrayCodecBase.java:285)
at weblogic.xml.schema.binding.BeanCodecBase.processElement(BeanCodecBase.java:183)
at weblogic.xml.schema.binding.BeanCodecBase.processAllElements(BeanCodecBase.java:165)
at weblogic.xml.schema.binding.BeanCodecBase.processElements(BeanCodecBase.java:145)
at weblogic.xml.schema.binding.BeanCodecBase.deserialize(BeanCodecBase.java:108)
at weblogic.xml.schema.binding.RuntimeUtils.invoke_deserializer(RuntimeUtils.java:428)
at weblogic.xml.schema.binding.RuntimeUtils.invoke_deserializer(RuntimeUtils.java:328)
at weblogic.webservice.core.DefaultPart.toJava(DefaultPart.java:384)
at weblogic.webservice.core.DefaultMessage.toJava(DefaultMessage.java:458)
at weblogic.webservice.core.handler.InvokeHandler.handleRequest(InvokeHandler.java:78)
at weblogic.webservice.core.HandlerChainImpl.handleRequest(HandlerChainImpl.java:143)
at weblogic.webservice.core.DefaultOperation.process(DefaultOperation.java:518)
[more]
The XML generated for the Perl client:
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:namesp2="http://namespaces.soaplite.com/perl"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><namesp1:getWorkOrdersByFilters
xmlns:namesp1="ncr.com"><gIMServiceRequest xsi:type="ns:GIMServiceRequest" xmlns:ns="java:com.ncr.gim.bean.service"><applicationID
xsi:type="xsd:string">REVLOG</applicationID><nodeId xsi:type="xsd:string">00XH</nodeId><stopCodes
xsi:type="namesp2:array" SOAP-ENC:arrayType="xsd:string[2]"><xsd:string xsi:type="xsd:string">06</xsd:string><xsd:string
xsi:type="xsd:string">16</xsd:string></stopCodes></gIMServiceRequest></namesp1:getWorkOrdersByFilters></SOAP-ENV:Body></SOAP-ENV:Envelope>
The XML generated for a test Java client:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><env:Header/><env:Body
env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><m:getWorkOrdersByFilters
xmlns:m="ncr.com"><gIMServiceRequest xmlns:n1="java:com.ncr.gim.bean.service"
xsi:type="n1:GIMServiceRequest"><CSRCode xsi:type="xsd:string">987x00</CSRCode><applicationID
xsi:type="xsd:string">GIM</applicationID><incidentNbr xsi:nil="true"/><nodeId
xsi:type="xsd:string">00T5</nodeId><stopCodes soapenc:arrayType="xsd:string[3]"><xsd:string
xsi:type="xsd:string">00</xsd:string><xsd:string xsi:type="xsd:string">01</xsd:string><xsd:string
xsi:type="xsd:string">02</xsd:string></stopCodes></gIMServiceRequest></m:getWorkOrdersByFilters></env:Body></env:Envelope>
The JavaBean:
public class GIMServiceRequest implements Serializable {
private String applicationID = GIMConstants.UNKNOWN_APPLICATION_ID;
private String nodeId = null;
private String incidentNbr = null;
private String CSRCode = null;
private String[] stopCodes = null;
public void setStopCodes(String[] aStopCodes) {
stopCodes = aStopCodes;
public String[] getStopCodes() {
return stopCodes;
[more]
The service build.xml file:
<project name="GIMService" default="all" basedir=".">
<target name="all" depends="ear"/>
<target name="ear">
<servicegen
destEar="GIMService.ear"
contextURI="GIMContext" >
<service
ejbJar="GIMServiceEJB.jar"
targetNamespace="ncr.com"
serviceName="GIMService"
serviceURI="/GIM_URI"
generateTypes="True"
expandMethods="True"
style="rpc"
protocol="http" >
<client
clientJarName="GIMService_client.jar"
packageName="com.ncr.gim.gimservice.client" >
</client>
</service>
</servicegen>
</target>
</project> -
How can I make an array of strings?
or, depending on what the heck you're talkingabout
That's bad advice now that Java is in version 5.
The standard loop is the for-each loop. If you don't
use it you're going down in complexity which is a
very bad thing according to the "premature
optimization is evil" bunch. So use for-each if you
don't want to be accused of "premature optimization"
by jverd and yawmark and other prominent members of
that bunch.Thanks for your advice. I use version 1.4.2. I did not intend to give bad advice. My post was targeted at someone who obviously did not understand "nuts and bolts" of java. It was not intended to be a lesson about "good design" or "real life applications" or "standard for loops in version 1.5". I gave an example that i feel is both adequate and appropriate for the target audience. It's intended purpose was to demonstrate very simple and basic concepts to someone who asked a seemingly simple and basic question that could possibly irritate a seasoned programmer like yourself. I have read your helpful posts in this thread and would welcome comments from yawmark and jverd also. I am sure they would be helpful to others who would read this thread in the future but their level of experience (along with Mr Warnerja) would perhaps be lost and uncomprehended by the OP. If in the context of the original question, you believe that my posts and simple examples are inappropriate, then would you kindly explain in terms that the OP can understand? Also explain (in this context) how my posts were wrong and meaningless.
respectfully yours,
Arbie -
Array of strings strict type def not updating
I have defined an Array of Strings (ctrl) as a strict type def. When I update this array (add another string to it) the values don't update where this control is used. Can someone please explain why this is occuring.
Only the size of the array _shell_ is locked, not the size of the array data. The array shell is a window into the data of the array control. If you change the value of the index display you will change the indices visible inside the array shell.
-Jim
Maybe you are looking for
-
InDesign CS6: preflight & non-existent overset text in my document.
Hi, I'm using InDesign CS6. The preflight lists overset errors. When I click on the page icon and go to where the overset txt is supposed to be-there is none. I deleted EVERYTHING in the entire document, then did a SAVE-AS a new name; restarted InDes
-
A/P Checks-mass load(void checks)
Hi, I want to void all A/P checks in a monthly mass load Void A/P Checks in a monthly Mass Load that receive in a once a month batch up process. Any inputs on this? Note : Single checks can be voided through FCH9 T-code
-
ITunes has slowed...every function and feature...
I am having a real problem with iTunes that seems to have started when I installed the iLife 08 package and following the most recent iTunes update. I have searched the forums and support and can't find a clue. All functions appear to be slowed to a
-
Filter Dimension over DateRange
with member measures.[dummy current] as count(Nonempty(extract([Case Service].[Case Service ID].[Case Service ID].Members,{[Month ID].[Month ID].&[201401]: [Month ID].[Month ID].&[201404]}) ,[Measures].[Outcomes Count])) member measures.[dummy YTD] a
-
(Kodo 3.3.4) Generics & Xdoclet problem
My development environment is java version "1.5.0_07" on XP Professional, with eclipse 3.2. I am using annotations via Xdoclet's @jdo to generate mapping metadata for my model objecs. This particular mapping that follows fails with a <pre> kodo.jdbc.