Array of String for input paramter + dynamic invocation
Does anybody know a place I can find an example of web service
using the following methods:
1. Array of String as input parameter
2. Client uses dynamic invocation
Specifically, 1. how do I define the parameter type in web-services.xml?
2. how do I refer to the type in a client code?
Thanks,
Hong
Hello,
The doclitparam interop round 3 example does a echo string array.
http://dev2dev.bea.com/managed_content/direct/webservice/r3server.zip
Also there is a DII example in the WebService Wizard's archive:
http://dev2dev.bea.com/managed_content/direct/webservice/wswa.html#qz29
HTH,
Bruce
Hong wrote:
Does anybody know a place I can find an example of web service
using the following methods:
1. Array of String as input parameter
2. Client uses dynamic invocation
Specifically, 1. how do I define the parameter type in web-services.xml?
2. how do I refer to the type in a client code?
Thanks,
Hong
Similar Messages
-
Search Array of String for exact match words
I need to create a search feature.
There will be a textfield where the user will input a word or words.
Then I need to check if the are any reference in the array of names.
namesArray ["ocean in the sky", "cean on sky", "cean is white"];
keywordsArray ["cean", "sky"];
matchCounter = 0;
If I input the word "cean" I dont want in my results "ocean in the sky", only "cean is sky".
I have the following code:
for (var j:int = 0; j < namesArray.length; ++j)
var tempStr:String = namesArray[j];
for (var k:int = 0; k < keywordsArray.length; ++k)
if (tempStr.indexOf(arrayKeywords[k]) != -1)
matchCounter++;
if(lengthKeywords == matchCounter)
trace("yeahhh... there's a match!!");
matchCounter = 0;
Is there a better way? How can I do this?There are few things but the main problem is that "new RegExp()" needs double escapes ("\\")
var namesArray:Array = ["ocean in the sky", "cean on sky", "cean is white"];
var keywordsArray:Array = ["cean", "sky"];
for (var j:int = 0; j < namesArray.length; j++){
var matchCounter:uint = 0;
var tempStr:String = namesArray[j];
for (var k:int = 0; k < keywordsArray.length; k++){
var regExp:RegExp = new RegExp("(\\s+|^)" + keywordsArray[k] + "(\\s+|$)");
if (tempStr.search(regExp) > -1){
matchCounter++;
if(keywordsArray.length == matchCounter){
trace("\"" + namesArray[j] + "\" matched all the keywords");
Traces:
"cean on sky" matched all the keywords -
String of letters to 1-D Array of strings for spreadsheet
What I would like to do is be able to take this string as it is the A's and B's that are being generated as the program runs,
I would like to take this string and get it into file in delimited tabs just as the numbers are. If there is a created 1-D array of
strings that works, but that is controlled on the front panel, I would like to create this from data that is comming in. In other words
I am stuck on how to create a 1-D array of Sting from the string value comming in. I want to do this so that I can get all the different
values A's or B's into the different tab fields. As it is they are comming all up in the first column and not "tabbing" Please see the
attached file in the rows 5 an
d 7.
Thanks,
Brian
Attachments:
Array_of_strings_to_spreadsheet2.vi 28 KB
Turn_data1.xls 1 KBBrian
You need to convert your string to contain single tabs as separator. The problem is that your string is "dirty", i.e. it contains a variable amount of spaces to seperate the items. If you strictly had single space separators, you could just replace all spaces with tabs.
"Scan string for tokens" by default does not allow empty tokens, thus takes care of the multiple spaces.
The attached simplified code assumes a fixed number of items (12), if this is a variable, you need to use a while loop and sense the end of the input string. Let me know if this is clear.
LabVIEW Champion . Do more with less code and in less time .
Attachments:
StringToArrayofstringsToSpreadsheetstring.vi 21 KB -
Step by step installation for Web Services Dynamic Invocation application?
please let me know the step by step process to install the Web Services Dynamic Invocation application Sample code.The install.htm that comes with the download does not give enough information.
Thanks in Advance
ShyamSorry for the confusion,i got hold of the right document.
Thanks
Shyam -
Is it possible to pass array of strings as input parameters for stored proc
Dear All,
I wrote a Stored Procedure for my crystal report. now i got a modification.
one of the parameters 'profit_center' should be modified so that it is capable to take multiple values.
now when i run report crystal report collects more than one values for parameter profit_center and sends it as input parameter to stored procedure all at a time.
the only way to handle this situation is the input parameter for stored procedure 'profit_center' should be able to take array of values and i have a filter gl.anal_to = '{?profit_center}'. this filter should also be modified to be good for array of values.
Please Help.Or you can use sys.ODCIVarchar2List
SQL> create or replace procedure print_name( In_Array sys.ODCIVarchar2List)
is
begin
for c in ( select * from table(In_Array) )
loop
dbms_output.put_line(c.column_value);
end loop ;
end ;
Procedure created.
SQL>
SQL> exec print_name(sys.ODCIVarchar2List('ALLEN','RICHARD','KING')) ;
ALLEN
RICHARD
KING
PL/SQL procedure successfully completed.SS -
Selecting DAQ channels by arrays of strings for scxi 1102/4c
Hello,
I have an urgent matter - for my project I have to modify DAQ analog acquisition on several machines. The existent applications use definitions of virtual channels AnCh0-63, and they select them by DAQ constants which are connected to AI Acquire Waveforms. Now I need to make one program for all machines (different slot numbers of the cards) that will retrieve channel selection from a database (LV 7.1, MS SQL Server 2005).
Is there a way to directly use the DAQ constants by feeding them strings from the database? The catch is that the company wishes to keep the existent programs and use a database for storing and loading parameters. Otherwise I tried with global-channel definition strings (obx!scy!mdz!0,2,...,n) but there were problems with some combinations of channels.
Thanks in advance!
simonHello Simon,
If I am understanding the question, you want to use the same program
you have been using (which uses our "legacy" driver, Traditional DAQ)
and want to integrate that into a database system. The trick seems to
be inputting the various inputs into the AI Aquire Waveforms directly
from strings you have aquired from your database.
If my understanding is correct, then we want to convert strings into
the data types required by the VI. The channels input can be fed a
string directly (as long as it is in the format it expects), while the
other inputs require numeric values. You can convert strings into
numerics with the Decimal String to Number VI (Functions
Palette»String»String/Number Conversion). Using these, you can then
input the correct inputs:
You can also parse strings with the string manipulation VIs (Functions Palette»String) if you need to. I hope this is the information you are looking for, your application sounds like it could save a lot of time in the long run.
Message Edited by Neal M on 11-28-2007 02:45 PM
Neal M.Applications Engineering National Instruments www.ni.com/support
Attachments:
TDAQString.JPG 10 KB -
Building hashtable for INPUT types dynamically
In my jsp I want to define a method which can build and return a hashtable of all the input types defined inside a form. For example if my form looks like :
<form name="detail_form" method="post" action="">
<input type="text" name="asset_name" size="15" value="ABC">
<input type="text" name="asset_desc" size="45" value="Laptop">
<input type="hidden" name="employee_id_key" value="58975">
<input type="hidden" name="asset_id_key" value="15">
</form>
then my method will be like :
<%!
public Map getCurrentData()
Map paras=new HashMap();
paras.put ("asset_name", "ABC");
paras.put ("asset_desc", "Laptop");
paras.put ("employee_id_key", "58975");
paras.put ("asset_id_key", "15");
return paras;
%>
Now the problem is :
since the code inside the form can be dynamic (like there can be different number of INPUT types with different names) so I want my method getCurrentData() to be dynamic. That probably means some sort of loop to go through all the INPUT types in the form and storing it in hashtable. But I dont know how to do it in java. Can anybody help me please. ThanksI am not exactly sure what you mean by "input types" but you could use the request.getParameterMap() method after the form is submitted. So for example you would have your form like <form ... action="nextpage.jsp"> and on nextpage.jsp you could call request.getParameterMap() to create a map of all the paramaters and their values. Here is what I mean...
<form name="detail_form" method="post" action="nextpage.jsp">
<input type="text" name="asset_name" size="15" value="ABC">
<input type="text" name="asset_desc" size="45" value="Laptop">
<input type="hidden" name="employee_id_key" value="58975">
<input type="hidden" name="asset_id_key" value="15">
</form>
then on nexpage.jsp you could say
<% Map myMap = request.getParamaterMap(); %>
Good Luck
Zac -
I have an array of channel names for a simple vi I wrote and I want to input them into the plot legend. I typically use ring controls to allow different users to select what they want to see, but beyond 3 or 4 it gets confusing. Is there a way to take an array of strings and input them directly into the legend string slots using a property node? I have spent hours searching to no avail.
Thanks!!
AdamYes, of course there is! Try this:
Message Edited by altenbach on 05-01-2009 08:45 PM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
PlotNamesII.png 7 KB -
What is the best way to convert a cluster into byte array or string
I'm writing a program that sends UDP packets and I've defined the data I want to send via large clusters (with u8/u16/u32 numbers, u8/u16/u32 arrays, and nested clusters). Right before sending the data, I need to convert the clusters either into strings or byte arrays. The flatten to string function is almost perfect for this purpose. However, it's appending lengths to arrays and strings which renders this method useless, as far as I can tell.
As I have many of these clusters, I would rather not hard code the unbundle by names and converting/typecasting to byte arrays or strings for each one.
Is there a feature or tool I am overlooking?
Thank you!deceased wrote:
Flatten to string has a boolean input of "Prepend string or array size" ... The default value is true.
That only specifies if a string or array size should be prepended if the outermost data element is a string or array. For embedded strings or arrays it has no influence. This is needed for the Unflatten to be able to reconstruct the size of the embedded strings and arrays.
The choice to represent the "Strings" (and Arrays) in the external protocol to LabVIEW strings (and arrays) is actually a pretty bad one unless there is some other element in the cluster that does define the length of the string. An external protocol always needs some means to determine how long the embedded string or array would be in order to decode the subsequent elements that follow correctly.
Possible choices here are therefore:
1) some explicit length in the protocol (usually prepended to the actual string or array)
2) a terminating NULL character for strings, (not very friendly for reliable protocol parsing)
3) A fixed size array or string
For number 1) and 2) you would always need to do some special processing unless the protocol happens to use explicitedly 32 bit integer length indicators directly prepended before the variable sized that.
For number 3) the best representation in LabVIEW is actually a cluster with as many elements inside as the fixed size.
-
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> -
Getting error for input string 0000 #
Hi ,
I am getting error on the portal that has an exception as error occured for For input string: "0000 #" .I think its because of some problem with the RFC that m getting this error but please suggest.The code done with dynamic coding is given below:
for(int j=0; j<intList; j++)
IDynamicNodeElement dynObj = wdContext.createDynamicNodeElement();
strLine = wdContext.nodeWeb_Table_Disp1_Out().getWeb_Table_Disp1_OutElementAt(j).getTline();
intLine = strLine.length();
strLine = strLine.substring(1,intLine-1);
String[] strArr = strLine.split("#");
for(int k=0;k<intCat;k++)
String strVal = strArr[k];
if(wdContext.nodeField_Catalog_Disp1_Out().getField_Catalog_Disp1_OutElementAt(k).getDatatype().equalsIgnoreCase("DATE"))
try
String strdate ="";
SimpleDateFormat ch1 = new SimpleDateFormat("yyyyMMdd");
//wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(wdContext.currentUser_ProfileElement().getDatefmt()+strVal);
String strFmt = "";
if("YYYY/MM/DD".equalsIgnoreCase(wdContext.currentUser_ProfileElement().getDatefmt()))
strFmt = "yyyy/MM/dd";
else
strFmt = "MM/dd/yyyy";
SimpleDateFormat ch2 = new SimpleDateFormat(strFmt);
strVal = strVal.trim();
if(!"".equals(strVal))
strdate = ch2.format(ch1.parse(strVal));
} dynObj.setAttributeValue(wdContext.nodeField_Catalog_Disp1_Out().getField_Catalog_Disp1_OutElementAt(k).getFieldname(),strdate);
catch(Exception e)
else if(wdContext.nodeField_Catalog_Disp1_Out().getField_Catalog_Disp1_OutElementAt(k).getDatatype().equalsIgnoreCase("QUAN"))
Double dblVal = null;
DecimalFormat sdf = new DecimalFormat("#,###.####");
dblVal = new Double(strVal);
if(!strVal.matches("(?i).-."))
dblVal = new Double(strVal);
dynObj.setAttributeValue(wdContext.nodeField_Catalog_Disp1_Out().getField_Catalog_Disp1_OutElementAt(k).getFieldname(),new BigDecimal(strVal.trim()));
else
dynObj.setAttributeValue(wdContext.nodeField_Catalog_Disp1_Out().getField_Catalog_Disp1_OutElementAt(k).getFieldname(),null);
else
dynObj.setAttributeValue(wdContext.nodeField_Catalog_Disp1_Out().getField_Catalog_Disp1_OutElementAt(k).getFieldname(),strVal);
col.add(dynObj);
wdContext.nodeDynamicNode().bind(col);
Please help.
Thanks & Regards,
Reinuka.I guess the reason for the exception is the "date format" and conversions. Try something like this.
SimpleDateFormat sdf = new SimpleDateFormat("date format you want");
java.util.Date asDate = sdf .parse(codes.getString("your date value").trim());
node element to which you want to set the date value.setfieldname(asDate.getTime());
Example:
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
java.util.Date asDate = sdf .parse(codes.getString("DELIV_DATE").trim());
outboundpr.setDel_date(asDate.getTime()); -
Java.lang.NumberFormatException: For input string: "DESCRIPTION="
Colleagues,
eBis 11.5.10.2.
I'm getting a Warning in the concurrent manager when I submit a programme that has an attached xml template. The warning is stating: -
------------- 1) PUBLISH -------------
Beginning post-processing of request 2667735 on node BAMBI at 02-SEP-2011 17:32:56.
Post-processing of request 2667735 failed at 02-SEP-2011 17:32:57 with the error message:
One or more post-processing actions failed. Consult the OPP service log for details.
------------- 2) PRINT -------------
Not printing the output of this request because post-processing failed.
When I consult the OPP log in Sysadmin, I can see a not very helpful message: -
[9/2/11 5:32:57 PM] [UNEXPECTED] [36822:RT2667735] java.lang.NumberFormatException: For input string: "DESCRIPTION="
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:447)
at java.lang.Integer.parseInt(Integer.java:497)
at oracle.apps.xdo.generator.pdf.PDFGenerator.setFont(PDFGenerator.java:629)
at oracle.apps.xdo.generator.pdf.PDFGenerator.setProperties(PDFGenerator.java:468)
at oracle.apps.xdo.generator.ProxyGenerator.setProperties(ProxyGenerator.java:1373)
at oracle.apps.xdo.template.fo.FOHandler.startElement(FOHandler.java:262)
at oracle.apps.xdo.template.fo.FOHandler.startElement(FOHandler.java:204)
at oracle.apps.xdo.common.xml.XSLTMerger.startElement(XSLTMerger.java:55)
at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:167)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1182)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149)
at oracle.apps.xdo.template.fo.FOProcessingEngine.process(FOProcessingEngine.java:320)
at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:1051)
at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5926)
at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3458)
at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3547)
at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:290)
at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:157)
[9/2/11 5:32:57 PM] [36822:RT2667735] Completed post-processing actions for request 2667735.
Now, this isn't programme specific as it's affecting all our BI Publisher reports. Also the specific report I am working on has the option to email. I'm finding that the emails still work and when I open the attachment, they are displaying in PDF format correctly - even though the concurrent manager completes with the above warning. The above warning doesn't let me view the output in PDF from Oracle Financials.
Any help would be greatly appreciated.
ThanksMaybe check if Metalink note 764180.1 applies? This appears to be a bug fixed with patch 7669965.
-
How to dynamically set connection string for report in C# code?
Hi,
I have installed CRVS2010. I have created new Crystal Report WPF Application and new report. I would like to set connection string for report in code dynamically.
Is this possible?
Thanks
IvanaLots of posts in this forum on how to set database connections. WPF should not be a consideration as it's just a viewer. The report engine is still the same. Search these forums. Use the search box at the top right corner of this page. Look at samples here:
https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
Note that none of the samples above are using WPF, but like I said, the WPF is just a different viewer and will not impact how the report engine logs on to a database. (I think of it as a gray car vs. a red car. Same engine, just the color is different)
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports] -
Exception in thread "main" java.lang.NumberFormatException:For input String
this is a code about arrylist. but when I debug it.it metion:Exception in thread "main" java.lang.NumberFormatException:For input String at java.lang.NumberFormatException.forInputString(numberFomatExceptionio java:48)
at java.lang.Integer.parseInt(integer.java:468)
at java.lang.Integer.parseInt(integer.java:497)
at Get.getInt(manerger.java:208)
at LinkList.insertFirst(manager.java:94)
at manager.main(manager.java;20)
this is my code:
import java.io.*;
import java.lang.*;
public class manager
public static void main(String args[]) throws IOException
LinkList list=new LinkList();
System.out.println("input S can scan the grade\ninput D can delete one entry\ninput U can update the entry\ninput A can add one entry\ninput E can end");
int cr=System.in.read();
switch(cr)
case 'A':
list.insertFirst();break;//this is 20 row
case 'S':
System.out.println("input the s");break;
case 'D':
System.out.println("input the d");break;
case 'U':
System.out.println("input the u");break;
class Link
public int number;
public String name=new String();
public int chs;
public int eng;
public int math;
public Link next;
public Link(int number,String name, int chs,int eng,int math)
this.number=number;
this.name=name;
this.chs=chs;
this.eng=eng;
this.math=math;
public Link()
this(0,"",0,0,0);
public void displayLink()
System.out.println(number + " "+name+ " "+chs+ " "+eng+ " "+math+ " ");
class LinkList
public Link first;
public LinkList()
first = null;
public boolean isEmpty()
return first==null;
public void displayList()
System.out.println("");
Link current=first;
while(current!=null)
current.displayLink();
current=current.next;
System.out.println("");
public Link insertFirst() throws IOException
Get getdata=new Get();
int number=getdata.getInt();//this is 94 row
String name=getdata.getString();
int chs=getdata.getInt();
int eng=getdata.getInt();
int math=getdata.getInt();
Link newLink = new Link(number,name,chs,eng,math);
first=newLink;
return first;
public Link find(int key)
Link current=first;
while(current.number!=key)
if(current.next==null)
return null;
else
current=current.next;
return current;
public Link update(int key) throws IOException
Link current=first;
while(current.number!=key)
if(current.next==null)
return null;
else
System.out.println("Input the first letter of the subject:");
int c=System.in.read();
Get get=new Get();
switch(c)
case 'c':
current.chs=get.getInt();break;
case 'e':
current.eng=get.getInt();break;
case 'm':
current.math=get.getInt();break;
return current;
public float average(char key)
Link current=first;
float total=0;
float average=0;
float counter=0;
if(current==null)
return 0;
while(current!=null)
switch(key)
case 'c':
total=current.chs+current.next.chs;break;
case 'e':
total=current.eng+current.next.eng;break;
case 'm':
total=current.math+current.next.math;break;
current=current.next.next;
counter++;
average=total/counter;
return average;
public Link delete(int key)
Link current=first;
Link previous=first;
while(current.number!=key)
if(current.next==null)
return null;
else
previous=current;
current=current.next;
if(current==first)
first=first.next;
else
previous.next=current.next;
return current;
class Get
public static String getString() throws IOException
System.out.println("Input your name:");
InputStreamReader str = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(str);
String s = br.readLine();
return s;
public static int getInt() throws IOException
System.out.println("Input your data:");
String st = getString();
return Integer.parseInt(st);//this is 208 row
}It may be that the code in getString() returns a
String that ends with a newline. If that is the
problem, you can use
return (Integer.parseInt(st)).trim();1. getString will never return a String ending in newline. BufferedReader.readLine strips off the newline.
2. Even if you had a newline, String.trim doesn't trim newlines.
3. You would need to trim the String, not the int:
return (Integer.parseInt(st.trim()));As JimDinosaur said, you are passing bad data (the value of "st").
In getInt, add this before trying to parse "st":
System.out.println("###"+st+"###");What does it print? -
Hi ,
I am getting below error when I try to create a bpel project in oracle soa suite 12C, can any one help on this issue why it is happing, earlier am able to create bpel service.
java.lang.NumberFormatException: For input string: "63420;https=127.0.0.1"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:492)
at java.lang.Integer.parseInt(Integer.java:527)
at oracle.jdeveloper.webservices.wsdl.CachedWSDLReader.getNewReaderInstance(CachedWSDLReader.java:379)
at oracle.jdeveloper.webservices.wsdl.CachedWSDLReader$1.initialValue(CachedWSDLReader.java:299)
at oracle.jdeveloper.webservices.wsdl.CachedWSDLReader$1.initialValue(CachedWSDLReader.java:295)
at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:160)
at java.lang.ThreadLocal.get(ThreadLocal.java:150)
at oracle.jdeveloper.webservices.wsdl.CachedWSDLReader.getReaderImpl(CachedWSDLReader.java:309)
at oracle.jdeveloper.webservices.wsdl.CachedWSDLReader.getExtensionRegistry(CachedWSDLReader.java:425)
at oracle.jdeveloper.webservices.wsdl.CachedWSDLReader.readWSDLWithExtensionRegistry(CachedWSDLReader.java:468)
at oracle.tip.tools.ide.utils.xml.wsdl.WSDLUtil.parseWSDL(WSDLUtil.java:1398)
at oracle.tip.tools.ide.bpel.v2.datamodels.util.TemplateUtil.createProcessWSDL(TemplateUtil.java:1208)
at oracle.tip.tools.ide.bpel.v2.designer.builder.model.ProcessBuilderUtil.createWSDLFiles(ProcessBuilderUtil.java:198)
at oracle.tip.tools.ide.bpel.v2.designer.builder.model.ProcessBuilder.createIDEProject(ProcessBuilder.java:73)
at oracle.tip.tools.ide.bpel.v2.designer.builder.ui.CreationDialogPanel.doCreate(CreationDialogPanel.java:57)
at oracle.tip.tools.ide.bpel.shared.designer.processbuilder.ui.BPELCreationDialog.handleOK(BPELCreationDialog.java:199)
at oracle.tip.tools.ide.bpel.shared.designer.processbuilder.ui.BPELCreationDialog.actionPerformed(BPELCreationDialog.java:239)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6516)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
at java.awt.Component.processEvent(Component.java:6281)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4872)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at oracle.javatools.internal.ui.EventQueueWrapper._dispatchEvent(EventQueueWrapper.java:169)
at oracle.javatools.internal.ui.EventQueueWrapper.dispatchEvent(EventQueueWrapper.java:151)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
at java.awt.Dialog.show(Dialog.java:1082)
at java.awt.Component.show(Component.java:1655)
at java.awt.Component.setVisible(Component.java:1607)
at java.awt.Window.setVisible(Window.java:1014)
at java.awt.Dialog.setVisible(Dialog.java:1005)
at oracle.tip.tools.ide.bpel.shared.designer.processbuilder.ui.BPELCreationDialog.display(BPELCreationDialog.java:83)
at oracle.tip.tools.ide.bpel.shared.designer.manager.BPELDesignerManager.launchCreationDialog(BPELDesignerManager.java:53)
at oracle.tip.tools.ide.bpel.shared.designer.manager.BPELDesignerManager.launchCreationDialog(BPELDesignerManager.java:48)
at oracle.tip.tools.ide.bpel.shared.plugins.soa.sca.BPELComponent.createImplementation(BPELComponent.java:46)
at oracle.tip.tools.ide.fabric.gui.controller.ActionComponentEdit.add(ActionComponentEdit.java:118)
at oracle.tip.tools.ide.fabric.gui.controller.ActionComponentEdit.process(ActionComponentEdit.java:95)
at oracle.tip.tools.ide.fabric.gui.controller.DiagramController.processActionRequest(DiagramController.java:358)
at oracle.tip.tools.ide.fabric.gui.controls.DiagramSOAPopupHandler.actionPerformed(DiagramSOAPopupHandler.java:117)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
at java.awt.Component.processMouseEvent(Component.java:6516)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
at java.awt.Component.processEvent(Component.java:6281)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4872)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at oracle.javatools.internal.ui.EventQueueWrapper._dispatchEvent(EventQueueWrapper.java:169)
at oracle.javatools.internal.ui.EventQueueWrapper.dispatchEvent(EventQueueWrapper.java:151)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Thanks in advance.
Cheers,
balaPlease paste composite.xml and bpel source file here. Looks like one of the endpoints is getting goofed up.
Maybe you are looking for
-
No Phone Line and Broadband Speed at 0.2 - Not hap...
Afternoon, I ordered the phone, TV, and Broadband with an activation date of the 5th December. I then received a text message to advise that a phone line engineer will visit between 1pm-6pm, I booked half a day off work but no one got in touch. At ab
-
:II've recently upgraded to OS 10.6.8 on my desktop and have had to reinstall all my software programs. I can't seem to get my Corel Painter IX to run. It appeared to install correcly and will open momemtarily, but then stops the process and shuts do
-
Adding items in JComboBox - Help
Hy, I have a JComboBox() and a JTextField(). when I input a name in the JTextField and clicks on the "Ok" button the name is added in the JComboBox(). What I want is when I click on the "Ok" button, a check is made to see whether the name input in th
-
What's with the HUGE file sizes for patches
Hi gang, Every time I install a patch my Staroffice directory bloats back up. When installing for the first time, I select english only and it only installs english but when I install the patches it installs about 5 different languages which fattens
-
EL problem in JSP page, boolean vs. String
We are migrating from WebSphere 6 to WebLogic 11g and are receiving the following error from the JSP pages where we use EL to determine if an element is readonly or not: The method setReadonly(boolean) in the type BaseHandlerTag is not applicable for