Sap4rails - Problem with automatic handling of data types under Windows
Hello all,
I've been trying to develop my own application using sap4rails library but whenever I call one of standard RFCs I always get strange results. Here is the piece of the code from my model which gets data from CURRENCY_LIST table:
require "sap4rails"
class App < SAP4Rails
@@funcs = [
'BAPI_CURRENCY_GETLIST',
# User defined instance methods here
attr_accessor :message
class << self
def getlist()
RAILS_DEFAULT_LOGGER.info("[App]#getlist ")
App.BAPI_CURRENCY_GETLIST.call()
return App.BAPI_CURRENCY_GETLIST.currency_list.rows()
end
end
here is the code from the controller
class AppController < ApplicationController
layout "standard-layout"
def index
list
render_action 'list'
end
def list
RAILS_DEFAULT_LOGGER.info("[LIST] action started...")
@currencies = App.getlist()
end
end
end the code from the view:
<html>
<head>
<title> Currencies </title>
</head>
<body>
<h1>Listing Currencies</h1>
<table border="1">
<tr>
<% @currencies.first.each_key {|key| %>
<th><%= key %></th>
<% } %>
</tr>
<% for currency in @currencies %>
<tr>
<% currency.each_value {|val| %>
<td><%= val %></td>
<% } %>
</tr>
<% end %>
</table>
</body>
</html>
As you can see everything is just simple. I run my application on the Windows XP OS and always get such result:
<html>
<head>
<title>Currencies and Exchange Rates: index</title>
</head>
<body>
<html>
<head>
<title> Currencies </title>
</head>
<body>
<h1>Listing Currencies</h1>
<table border="1">
<tr>
<th>VALID_TO</th>
<th>ALT_CURR</th>
<th>LONG_TEXT</th>
<th>CURRENCY_ISO</th>
<th>CURRENCY</th>
</tr>
<tr>
<td>oran peseta </td>
<td>231And</td>
<td> </td>
<td>099991</td>
<td>ADP ADP02</td>
</tr>
<tr>
<td>babwean Dollar </td>
<td>231Zim</td>
<td> </td>
<td>699991</td>
<td>ZWD ZWD71</td>
</tr>
</table>
</body>
</html>
It seems like there is sth wrong with mapping data types from R/3 to data types in Ruby. Does anyone has an idea what could be wrong? I would be very grateful for any help.
Best Regards
Michal M.
First can you please post all log file errors
>> I can't really give you a solution or specific recommendation since I did not saw this error yet myself, but on your own risk you can try:
1. You may try to just register 'dts.dll' using regsvr32.exe, but this error may indicate a bigger problem with setup.
If you are running SQL Server 64bit then try running this at the command prompt: %windir%\syswow64\regsvr32 "%ProgramFiles(x86)%\Microsoft SQL Server\90\dts\binn\dts.dll"
2. You can try reinstall from start (In this case you have to make sure that you un-install all)
[Personal Site] [Blog] [Facebook]
Similar Messages
-
Problems with java constructor: "inconsistent data types" in SQL query
Hi,
I tried to define a type "point3d" with some member functions, implemented in java, in my database. Therefor I implemented a class Point3dj.java as you can see it below and loaded it with "loadjava -user ... -resolve -verbose Point3dj.java" into the database.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
package spatial.objects;
import java.sql.*;
public class Point3dj implements java.sql.SQLData {
public double x;
public double y;
public double z;
public void readSQL(SQLInput in, String type)
throws SQLException {
x = in.readDouble();
y = in.readDouble();
z = in.readDouble();
public void writeSQL(SQLOutput out)
throws SQLException {
out.writeDouble(x);
out.writeDouble(y);
out.writeDouble(z);
public String getSQLTypeName() throws SQLException {
return "Point3dj";
public Point3dj(double x, double y, double z)
this.x = x;
this.y = y;
this.z = z;
public static Point3dj create(double x, double y, double z)
return new Point3dj(x,y,z);
public double getNumber()
return Math.sqrt(this.x*this.x + this.y*this.y + this.z*this.z);
public static double getStaticNumber(double px, double py, double pz)
return Math.sqrt(px*px+py*py+pz*pz);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Additionally, I created the corresponding type in SQL by
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CREATE OR REPLACE TYPE point3dj AS OBJECT EXTERNAL NAME
'spatial.objects.Point3dj' LANGUAGE JAVA USING SQLDATA (
x FLOAT EXTERNAL NAME 'x',
y FLOAT EXTERNAL NAME 'y',
z FLOAT EXTERNAL NAME 'z',
MEMBER FUNCTION getNumber RETURN FLOAT
EXTERNAL NAME 'getNumber() return double',
STATIC FUNCTION getStaticNumber(xp FLOAT, yp FLOAT, zp FLOAT) RETURN FLOAT
EXTERNAL NAME 'getStaticNumber(double, double, double) return double')
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
After that I tried some SQL commands:
create table pointsj of point3dj;
insert into pointsj values (point3dj(2,1,1));
SELECT x, a.getnumber() FROM pointsj a;Now, the problem:
Everything works fine, if I delete the constructor
public Point3dj(double x, double y, double z)
this.x = x;
this.y = y;
this.z = z;
in the java class, or if I replace it with a constructor that has no input arguments.
But with this few code lines in the java file, I get an error when executing the SQL command
SELECT x, a.getnumber() FROM pointsj a;The Error is:
"ORA-00932: inconsistent data types: an IN argument at position 1 that is an instance of an Oracle type convertible to an instance of a user defined Java class expected, an Oracle type that could not be converted to a java class received"
I think, there are some problems with the input argument of the constructor, but why? I don't need the constructor in SQL, but it is used by a routine of another java class, so I can't just delete it.
Can anybody help me? I would be very glad about that since I already tried a lot and also search in forums and so on, but wasn't successful up to new.
Thanks!Dear Avi,
This makes sense when it is a short code sample (and i think i've done that across various posts), but sometime this is too long to copy/paste, in these cases, i refer to the freely available code samples, as i did above on this forum; here is the quote.
Look at examples of VARRAY and Nested TABLES of scalar types in the code samples of my book (chapter 8) http://books.elsevier.com/us//digitalpress/us/subindex.asp?maintarget=companions/defaultindividual.asp&isbn=9781555583293&country=United+States&srccode=&ref=&subcode=&head=&pdf=&basiccode=&txtSearch=&SearchField=&operator=&order=&community=digitalpress
As you can see, i was not even asking people to buy the book, just telling them where to grab the code samples.
I appreciate your input on this and as always, your contribution to the forum, Kuassi -
Problem with pl/sql table data type
hai friends,
i have one procedure it has some in parameters and one out parameter which fetches values to front end.
But the out parameter will be pl/sql table data type.
if it is ref cursor
then i declared as
var x refcursor;
exec procedure_name(1,:x);
it is ok.
but for pl/sql table data type is out parameter then what i will do in the prompt .
give me syntax and clarify my doubt.
advanced thanks...
madhavaThe SQL*Plus VARIABLE statement does not support user-defined types, hence it cannot support nested tables. It can support cursors because they can be weakly typed (so we can use the one SQL*Plus VAR to hold any shape of resultset). Nested tables are strongly typed; SQL*Plus is a relatively stupid interface and cannot be expected to understand UDT.
So, it you want to use nested tables as output you'll need to code a wrapping procedure that can understand your nested table type and handle it accordingly.
Sorry.
Cheers, APC -
Problem with Intrastat handling (MEIS)
Dear SCN Members,
we have a problem with Intrastat handling:
Our company is in Great Britain (example VAT-No. GB123456789)
We have a vendor in Switzerland (no EU VAT-No.), who has a fiscal representative in Belgium (example VAT-No. BE1234567890).
Both have a separate vendor number (swiss vendor: 23176, belgian vendor: 33179).
We created a partner "WL" (Goods Supplier) in the vendor master data of the swiss vendor and assigend the belgian vendor number. The swiss vendor master data has nothing filled in the "VAT Reg. No." field (LFA1-STCEG) of the vendor master data. The belgian vendor number has the belgian VAT-No. filled in the "VAT Reg. No." field (LFA1-STCEG) of the vendor master data.
The partner "WL" is automatically taken into the purchase order header partners and is also taken into account for the goods receipt posting.
After I have posted the vendor invoice, the line is shown in transaction MEIS, but the incompletion log is always showing message no. EIP029:
The system did not find the VAT registration number of vendor 23176.
In my opinion, the VAT no. of the fiscal representative (BE1234567890) should be taken into account for the Intrastat reporting, as the swiss vendor has no VAT number. We have not yet managed to get the belgian VAT into the Intrastat report.
Could you please clarify. Thanks in advance for your help!Hi,
Please refer the KBA: 1988909 - MEIS: Error EIP 029 "The system did not find the VAT registration number of vendor The reason and the solution is well explained in the KBA. You may change the configuration as explained in the KBA and test again.
Regards,
AKPT -
Problem with Automatic Replies or Out of Office
Hi mates!
I´ve just finished migration Exchange 2003 to Exchange 2010.
Today I´ve removed Exchange 2003.
I have a problem with Automatic Replies or Out of Office. When the user active Automatic Replies in Outlook 2010, He has this Error:
Your Out of Office settings cannot be displayed, because the server is currently unavailable. Try again later.
If I logged into OWA, (Options > Set Automatic Replies) I could set it up and it worked fine.
I run Test E-mail AutoConfiguration command to see if AutoDiscover has been configured and the OOF URL is correct:
https://mail.domain.com/ews/exchange.asmx
I try to browse the OOF URL from IE, It works fine.
Authentication Permission for EWS Virtual Directory is:
Anonymous – Enabled (For IUSER)
Basic – Enabled
Windows – Enabled
Other authentication methods are disabled.
WebServicesVirtualDirectory configuration for URL:
InternalNLBBypassUrl :
https://Server1.domain.local/ews/exchange.asmx
InternalUrl
: https://mail.domain.local/EWS/Exchange.asmx
ExternalUrl
: https://mail.domain.com/EWS/Exchange.asmx
InternalNLBBypassUrl : https:// Server2.domain.local /ews/exchange.asmx
InternalUrl
: https:// mail.domain.local /EWS/Exchange.asmx
ExternalUrl
: https:// mail.domain.com /EWS/Exchange.asmx
I use a certificate for Server HUB/CAS from my CA (Active Directory).
In EMC I have this error for certificate:
The certificate status could not be determinated because the revocation check failed.
But when I generated in the past, this status of this certificate was This certificate is valid for Microsoft Exchange.
I need help, because I don´t know I do…
Thanks.Hi MAS,
As soon as possible I will install this kb in a PC with Outlook 2010.
Yes, I reset IIS, with the same result.
I check this URL, and I run this command: TestOutlookWebServices -identity user01 with this result:
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1019
Type : Information
Message : A valid Autodiscover service connection point was found. The Autodiscover URL on this object is https://mail.domain.local/Autodiscover/Autodiscover.xml.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1006
Type : Information
Message : Contacted the Autodiscover service at https://mail.domain.local/Autodiscover/Autodiscover.xml.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1016
Type : Information
Message : [EXCH] The AS service is configured for this user in the Autodiscover response received from https://mail.domain.local/Autodiscover/Autodiscover.xml.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1015
Type : Information
Message : [EXCH] The OAB service is configured for this user in the Autodiscover response received from https://mail.domain.local/Autodiscover/Autodiscover.xml.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1014
Type : Information
Message : [EXCH] The UM service is configured for this user in the Autodiscover response received from https://mail.domain.local/Autodiscover/Autodiscover.xml.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1016
Type : Information
Message : [EXPR] The AS service is configured for this user in the Autodiscover response received from https://mail.domain.local/Autodiscover/Autodiscover.xml.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1015
Type : Information
Message : [EXPR] The OAB service is configured for this user in the Autodiscover response received from https://mail.domain.local/Autodiscover/Autodiscover.xml.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1014
Type : Information
Message : [EXPR] The UM service is configured for this user in the Autodiscover response received from https://mail.domain.local/Autodiscover/Autodiscover.xml.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1022
Type : Success
Message : Autodiscover was tested successfully.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1106
Type : Information
Message : Contacted the Autodiscover service at https://SERVER1.domain.local:443/Autodiscover/Autodiscover.xml.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1116
Type : Information
Message : [EXCH] The AS service is configured for this user in the Autodiscover response received from https://SERVER1.domain.local:443/Autodiscover/Autodiscover.xml.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1115
Type : Information
Message : [EXCH] The OAB service is configured for this user in the Autodiscover response received from https://SERVER1.domain.local:443/Autodiscover/Autodiscover.xml.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1114
Type : Information
Message : [EXCH] The UM service is configured for this user in the Autodiscover response received from https://SERVER1.domain.local:443/Autodiscover/Autodiscover.xml.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1116
Type : Information
Message : [EXPR] The AS service is configured for this user in the Autodiscover response received from https://SERVER1.domain.local:443/Autodiscover/Autodiscover.xml.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1115
Type : Information
Message : [EXPR] The OAB service is configured for this user in the Autodiscover response received from https://SERVER1.domain.local:443/Autodiscover/Autodiscover.xml.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1114
Type : Information
Message : [EXPR] The UM service is configured for this user in the Autodiscover response received from https://SERVER1.domain.local:443/Autodiscover/Autodiscover.xml.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1122
Type : Success
Message : Autodiscover was tested successfully.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1013
Type : Error
Message : When contacting https://mail.domain.local/EWS/Exchange.asmx received the error The request failed withHTTP status 401: Authorization Required.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1025
Type : Error
Message : [EXCH] Error contacting the AS service at https://mail.domain.local/EWS/Exchange.asmx. Elapsed time was694 milliseconds.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1026
Type : Success
Message : [EXCH] Successfully contacted the UM service at https://mail.domain.local/EWS/Exchange.asmx. The elapsed time was 31 milliseconds.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1013
Type : Error
Message : When contacting https://mail.domain.com/EWS/Exchange.asmx received the error The request failed withHTTP status 401: Authorization Required.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1025
Type : Error
Message : [EXPR] Error contacting the AS service at https://mail.domain.com/EWS/Exchange.asmx. Elapsed time was15 milliseconds.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1026
Type : Success
Message : [EXPR] Successfully contacted the UM service at https://mail.domain.com/EWS/Exchange.asmx. The elapsed time was 31 milliseconds.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1124
Type : Success
Message : [Server] Successfully contacted the AS service at https://SERVER1.domain.local/ews/exchange.asmx. The elapsed time was 934 milliseconds.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1126
Type : Success
Message : [Server] Successfully contacted the UM service at https://SERVER1.domain.local/ews/exchange.asmx. The elapsed time was 93 milliseconds.
All ok, but with these errors:
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1013
Type : Error
Message : When contacting https://mail.domain.local/EWS/Exchange.asmx received the error The request failed withHTTP status 401: Authorization Required.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1025
Type : Error
Message : [EXCH] Error contacting the AS service at https://mail.domain.local/EWS/Exchange.asmx. Elapsed time was694 milliseconds.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1013
Type : Error
Message : When contacting https://mail.domain.com/EWS/Exchange.asmx received the error The request failed withHTTP status 401: Authorization Required.
RunspaceId : 1a13d412-b75d-48b5-8938-72ad53f11cb7
Id : 1025
Type : Error
Message : [EXPR] Error contacting the AS service at https://mail.domain.com/EWS/Exchange.asmx. Elapsed time was15 milliseconds.
In IIS for EWS has this method Authentication:
- Anonymous
- Basic
- Windows
For SSL Settings in EWS has this configuration:
- Require SSL
- Client Certificate: Ignore
For Default Website in IIS, SSL Settings:
- Require SSL
- Client Certificate: Ignore
I don´t have ISA/TMG. I use HLB KEMP for publishing OWA... -
Problems with reference field in material type
Hi,
I have problem with field reference in material type creation.
When I define a self-defined field reference ZERS (copy of standard field reference HERS) for a own defined material type ZERS (copy of material type HERS), I get the following error message:
Field reference ZERS has not been set up
Message no. CZ127
Diagnosis
You have specified a field reference that has not been set up.
Procedure
Set up the new field reference or use an already existing field reference.
I do not understand why because the entry ZERS is present in table T130A.
Here is the IMG config I have made:
1. Logistics general->Material Master->Field selection->Maintain field selection for Data Screens (here I made copy of field reference HERS and named it ZERS)
2. Logistics general->Material Master->Basic Settings->Material types->Define attributes of Material types (here I made a copy of material type HERS and named it ZERS. I then tried to set the field T134-FLREF "Field reference" to ZERS, but then the error message appears)
Does anyone know what config I am missing?
Or any reason why the error message CZ127 is coming up?
ThanksMust have been system error, I deleted all entries and did it all over again, it worked.
-
How to handle "byte" data type
Hi,
In web dynpro java project to consume a web service, I am unable to handle "byte" data type in binding wizard. It is not allowing to bind a element saying that "Context Attribute with Java Native Type BYTE cannot be selected". Please help me to resolve this.
Thank you.
Regards
Bhanu.Hi
you can define byte[] in golobal area, at the end of iview.
//@@begin others
byte b1[];
//@@end
IWDResource r;
byte b[];
InputStream inputStream;
try {
inputStream = r.read(true);
int x = inputStream.read(b);
} catch (IOException e) {
e.printStackTrace();
Regards
Anup -
Problems with the O2 blackberry data package on my Curve 3G.
I have already informed O2 about this but they claim that I should be used the blackberry support services, but nothing there helps me!
I got my Blackberry Curve 3G on September 9th this year and I put on the Blackberry Data Package bolt-on onto my phone on September 16th. I then received a text to say they've taken £5 from my credit and it will be up and running in the next 24 hours. Its now September 19th and my BBM is not working at all and I am extremely upset with the services and behaviour I have received from both O2 and Blackberry.
Is there any way you can help? If this fails, I shall be forced to go back to the shop from where I got my Blackberry from and ask for their help.
Many thanks, Jade.Can a bubble whistle Problems with the O2 blackberry data package on my Curve 3G.? The seat matures in your oar. The lad ices the pursuing method inside a resident. A judge spins against the vendor! The rose wows the hello.
filipina heart -
I have been a loyal customer for years and have a hot spot because internet options are very limited in our rural area. I have stayed with 10G since the beginning. Most months I don't use the 10G. Verizon has no problem with me paying for Data I don't use. This month my daughter comes home from College and she accidentally uses 24G.....14 over get blind sided with $140.00 in overages. I called Verizon today......stopped in to the store today......My neighbor told me they waved charges for her one time. Lots of charges.....But I'm am getting no help. Not even an offer of a payment plan to help me out. I went back just 6 months and I have over paid for 19G.....Seems like they would like to help out their loyal customers!!!! Does anybody have any suggestions on how to deal with them? We are not wealthy....or I would just pay this and walk away......
There is a big misconception in what customers believe a cell carrier is obligated to do.
You pay a set price to use up to that amount of xx data. It makes no difference if you use it to the paid limit or way under. Its like peace of mind when you don't have to worry about a data counter.
Your daughter used the data, your plan is quite clear of what overage charges are. Why should or would Verizon wireless just forgive the charges because you are a customer? Your daughter used the data, get the money from her. That is the responsible thing to do.
There is no "I have been a loyal customer so please remove the $120, or $250, or $2,000.00 since I did not mean to use it"
Your electric company, or gas company or any other company does not remove valid charges. Why should Verizon wireless?
Just pay the invoice and don't think you are being mistreated because Verizon is a business and not a charity.
Good Luck -
Hello all,
I have a problem with event handling. I have two buttons in my GUI application with the same name.They are instance variables of two different objects of the same class and are put together in the one GUI.And their actionlisteners are registered with the same GUI. How can I differentiate between these two buttons?
To be more eloborate here is a basic definition of my classes
class SystemPanel{
SystemPanel(FTP ftp){ app = ftp};
FTP app;
private JButton b = new JButton("ChgDir");
b.addActionListener(app);
class FTP extends JFrame implements ActionListener{
SystemPanel rem = new SystemPanel(this);
SystemPanel loc = new SystemPanel(this);
FTP(){
add(rem);
add(loc);
pack();
show();
void actionPerformed(ActionEvent evt){
/*HOW WILL I BE ABLE TO KNOW WHICH BUTTON WAS PRESSED AS THEY
BOTH HAVE SAME ID AND getSouce() ?
In this case..it if was from rem or loc ?
} It would be really helpful if anyone could help me in this regard..
Thanks
Hari VigenshHi levi,
Thankx..
I solved the problem ..using same concept but in a different way..
One thing i wanted to make clear is that the two buttons are in the SAME CLASS and i am forming 2 different objects of the SAME class and then putting them in a GUI.THERE IS NO b and C. there is just two instances of b which belong to the SAME CLASS..
So the code
private JButton b = new JButton("ChgDir");
b.setActionCommand ("1");
wont work as both the instances would have the label "ChgDir" and have setActionCommand set to 1!!!!
Actually I have an array of buttons..So I solved the prob by writting a function caled setActionCmdRemote that would just set the action commands of one object of the class differently ..here is the code
public void setActionCommandsRemote()
for(int i = 0 ; i <cmdButtons.length ; i++)
cmdButtons.setActionCommand((cmdButtons[i].getText())+"Rem");
This just adds "rem" to the existing Actioncommand and i check it as folows in my actionperformed method
if(button.getActionCommand().equals("DeleteRem") )
deleteFileRemote();
else if(button.getActionCommand().equals("Delete") )
deleteFileLocal();Anyway thanx a milion for your help..this was my first posting and I was glad to get a prompt reply!!! -
I got a problem with my personal account data how can i recovery my icloud id information back i can't remember even my birthday pls help me how to recovery my id information back
Did you follow all of the instructions provided in the article that you linked from? If not, you must follow each and every step.
If you have, then all you can do is contact iTunes Support:
http://support.apple.com/kb/HT5699?viewlocale=en_US
or by email: https://ssl.apple.com/emea/support/itunes/contact.html
Cheers,
GB -
Problem while accessing a complex data type
hi,
I am getting a problem while accessing a complex data type
I have a wsdl as:
<?xml version="1.0" encoding="UTF-8" ?>
- <definitions name="OutlookReminderService" targetNamespace="http://ws.aftek.com/outlook-reminder" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns2="http://ws.aftek.com/outlook-reminder/schemas" xmlns:ns3="http://java.sun.com/jax-rpc-ri/internal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ws.aftek.com/outlook-reminder" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <types>
- <schema targetNamespace="http://ws.aftek.com/outlook-reminder/schemas" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://ws.aftek.com/outlook-reminder/schemas" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<import namespace="http://java.sun.com/jax-rpc-ri/internal" />
- <complexType name="TaskVO">
- <sequence>
<element name="dueDate" type="long" />
<element name="percentageComplete" type="int" />
<element name="priorty" type="int" />
<element name="reminderDate" type="long" />
<element name="reminderSet" type="boolean" />
<element name="startDate" type="long" />
<element name="status" type="int" />
<element name="subject" type="string" />
<element name="taskId" type="string" />
</sequence>
</complexType>
- <complexType name="NoSuchUserException">
- <sequence>
<element name="message" type="string" />
</sequence>
</complexType>
- <complexType name="ArrayOfContactVO">
- <complexContent>
- <restriction base="soap11-enc:Array">
<attribute ref="soap11-enc:arrayType" wsdl:arrayType="tns:ContactVO[]" />
</restriction>
</complexContent>
</complexType>
- <complexType name="ContactVO">
- <sequence>
<element name="birthDate" type="long" />
<element name="companyAddress" type="string" />
<element name="companyName" type="string" />
<element name="emailID1" type="string" />
<element name="emailID2" type="string" />
<element name="emailID3" type="string" />
<element name="faxNumber" type="string" />
<element name="firstName" type="string" />
<element name="homeAddress" type="string" />
<element name="lastName" type="string" />
<element name="middleName" type="string" />
<element name="mobileNumber" type="string" />
<element name="phoneNumber" type="string" />
<element name="workContactNumber" type="string" />
</sequence>
</complexType>
</schema>
- <schema targetNamespace="http://java.sun.com/jax-rpc-ri/internal" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://java.sun.com/jax-rpc-ri/internal" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<import namespace="http://ws.aftek.com/outlook-reminder/schemas" />
- <complexType name="arrayList">
- <complexContent>
- <extension base="tns:list">
<sequence />
</extension>
</complexContent>
</complexType>
- <complexType name="list">
- <complexContent>
- <extension base="tns:collection">
<sequence />
</extension>
</complexContent>
</complexType>
- <complexType name="collection">
- <complexContent>
- <restriction base="soap11-enc:Array">
<attribute ref="soap11-enc:arrayType" wsdl:arrayType="anyType[]" />
</restriction>
</complexContent>
</complexType>
</schema>
</types>
<message name="OutlookServer_addTaskResponse" />
- <message name="OutlookServer_getListResponse">
<part name="result" type="ns3:arrayList" />
</message>
- <message name="OutlookServer_getContactListResponse">
<part name="result" type="ns2:ArrayOfContactVO" />
</message>
- <message name="NoSuchUserException">
<part name="NoSuchUserException" type="ns2:NoSuchUserException" />
</message>
- <message name="OutlookServer_getContactList">
<part name="String_1" type="xsd:string" />
</message>
- <message name="OutlookServer_getList">
<part name="String_1" type="xsd:string" />
</message>
- <message name="OutlookServer_addTask">
<part name="String_1" type="xsd:string" />
<part name="TaskVO_2" type="ns2:TaskVO" />
</message>
- <message name="OutlookServer_reminderOccurredResponse">
<part name="result" type="xsd:boolean" />
</message>
- <message name="OutlookServer_reminderOccurred">
<part name="String_1" type="xsd:string" />
<part name="TaskVO_2" type="ns2:TaskVO" />
</message>
- <portType name="OutlookServer">
- <operation name="addTask" parameterOrder="String_1 TaskVO_2">
<input message="tns:OutlookServer_addTask" />
<output message="tns:OutlookServer_addTaskResponse" />
<fault message="tns:NoSuchUserException" name="NoSuchUserException" />
</operation>
- <operation name="getContactList" parameterOrder="String_1">
<input message="tns:OutlookServer_getContactList" />
<output message="tns:OutlookServer_getContactListResponse" />
<fault message="tns:NoSuchUserException" name="NoSuchUserException" />
</operation>
- <operation name="getList" parameterOrder="String_1">
<input message="tns:OutlookServer_getList" />
<output message="tns:OutlookServer_getListResponse" />
<fault message="tns:NoSuchUserException" name="NoSuchUserException" />
</operation>
- <operation name="reminderOccurred" parameterOrder="String_1 TaskVO_2">
<input message="tns:OutlookServer_reminderOccurred" />
<output message="tns:OutlookServer_reminderOccurredResponse" />
<fault message="tns:NoSuchUserException" name="NoSuchUserException" />
</operation>
</portType>
- <binding name="OutlookServerBinding" type="tns:OutlookServer">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
- <operation name="addTask">
<soap:operation soapAction="" />
- <input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
</input>
- <output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
</output>
- <fault name="NoSuchUserException">
<soap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="NoSuchUserException" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
</fault>
</operation>
- <operation name="getContactList">
<soap:operation soapAction="" />
- <input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
</input>
- <output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
</output>
- <fault name="NoSuchUserException">
<soap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="NoSuchUserException" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
</fault>
</operation>
- <operation name="getList">
<soap:operation soapAction="" />
- <input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
</input>
- <output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
</output>
- <fault name="NoSuchUserException">
<soap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="NoSuchUserException" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
</fault>
</operation>
- <operation name="reminderOccurred">
<soap:operation soapAction="" />
- <input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
</input>
- <output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
</output>
- <fault name="NoSuchUserException">
<soap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="NoSuchUserException" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
</fault>
</operation>
</binding>
- <service name="OutlookReminderService">
- <port binding="tns:OutlookServerBinding" name="OutlookServerPort">
<soap:address location="http://truptid:8080/outlook-reminder-service/outlook" />
</port>
</service>
</definitions>
My client is :
private static String BODY_NAMESPACE_VALUE = "http://ws.abc.com/outlook-reminder";
private static String ENCODING_STYLE_PROPERTY = "javax.xml.rpc.encodingstyle.namespace.uri";
private static String NS_XSD = "http://www.w3.org/2001/XMLSchema";
private static String URI_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
try{
ServiceFactory factory = ServiceFactory.newInstance();
Service service = factory.createService(new QName("OutlookReminderService"));
QName port =new QName("OutlookReminderService","OutlookServerPort");
Call call =service.createCall(port);
call.setTargetEndpointAddress("http://localhost:8080/outlook-reminder-service/outlook?wsdl");
call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
call.setProperty(Call.SOAPACTION_URI_PROPERTY, "");
call.setProperty(ENCODING_STYLE_PROPERTY, URI_ENCODING);
call.getReturnType();
call.setOperationName(new QName(BODY_NAMESPACE_VALUE, "getList"));
QName QNAME_TYPE_STRING = new QName(NS_XSD, "string");
call.addParameter("String_1", QNAME_TYPE_STRING, ParameterMode.IN);
//http://ws.aftek.com/outlook-reminder/schemas
QName QNAME_TYPE_VO = new QName("http://schemas.xmlsoap.org/soap/encoding/", "Array");
System.out.println("Before Add Parameter");
// call.addParameter("result", QNAME_TYPE_VO, ParameterMode.OUT);
call.setReturnType(QNAME_TYPE_VO,ArrayList.class);
System.out.println("After Add Parameter");
Object[] params ={oUserVO.getUserName()};
oArrayList =(ArrayList)call.invoke(params);
System.out.println("After Invoked");
//System.out.println("invoked"+ arrayList);
catch(SOAPFaultException faultException)
moLogger.debug("SOAPFaultException : ", faultException);
catch(RemoteException oremoteException)
moLogger.debug("RemoteException", oremoteException);
catch(ServiceException oServiceException)
moLogger.debug("ServiceException", oServiceException); }
Error got is :
trailing block elements must have an id attribute
at com.sun.xml.rpc.encoding.SOAPDeserializationContext.deserializeMultiRefObjects(SOAPDeserializationContext.java:81)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:239)
at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:103)
at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:492)
at com.ail.dhg.poc.business.dao.ContactDAO.getList(ContactDAO.java:255)
at com.ail.dhg.poc.business.facade.ContactFacade.getList(ContactFacade.java:189)
at com.ail.dhg.poc.business.AcceptInput.main(AcceptInput.java:72)
java.lang.NullPointerException
at com.ail.dhg.poc.business.dao.ContactDAO.getList(ContactDAO.java:277)
at com.ail.dhg.poc.business.facade.ContactFacade.getList(ContactFacade.java:189)
at com.ail.dhg.poc.business.AcceptInput.main(AcceptInput.java:72)
Message was edited by:
trupti_dUse lower case letters for your variable names (name, pwd). The code works then.
package com.bluenile.bean;
import java.io.*;
public class Bean1 implements Serializable
private String name="Uname";
private String pwd="Pword";
public String getName()
return name;
public String getPwd()
return pwd;
void setName(String name)
this.name = name;
void setPwd(String pwd)
this.pwd = pwd;
<HTML>
<BODY BGCOLOR="#FFFFFF">
<%@ page language="java" contentType="text/html" %>
<jsp:useBean id="b1" class="com.bluenile.bean.Bean1" />
<ul>
<li>Name : <jsp:getProperty name="b1" property="name" />
<li>Pwd : <jsp:getProperty name="b1" property="pwd" />
</ul>
</BODY>
</HTML> -
Issue with Oracle LONG RAW data type
Hi All,
I am facing some issues with Oracle LONG RAW DATA Type.
We are using Oracle 9IR2 Database.
I got a table having LONG RAW column and I need to transfer the same into another table having LONG RAW column.
When I tried using INSERT INTO SELECT * command (or) CREATE TABLE as select * , it is throwing ORA-00997: illegal use of LONG datatype.
I have gone through some docs and found we should not use LONG RAW using these operations.
So I did some basic PLSQL block given below and I was able to insert most of the records. But records where the LONG RAW file is like 7O kb, the inserting is faliling.
I tried to convert LONG RAW to BLOB and again for the record where the LONG RAW is big in size I am getting (ORA-06502: PL/SQL: numeric or value error) error.
Appreciate if anyone can help me out here.
DECLARE
Y LONG RAW;
BEGIN
FOR REC IN (SELECT * FROM TRU_INT.TERRITORY WHERE TERRITORYSEQ=488480 ORDER BY TERRITORYSEQ ) LOOP
INSERT INTO TRU_CMP.TERRITORY
BUSINESSUNITSEQ, COMPELEMENTLIFETIMEID, COMPONENTIMAGE, DESCRIPTION, ENDPERIOD, GENERATION, NAME, STARTPERIOD, TERRITORYSEQ
VALUES
REC.BUSINESSUNITSEQ, REC.COMPELEMENTLIFETIMEID, REC.COMPONENTIMAGE, REC.DESCRIPTION, REC.ENDPERIOD, REC.GENERATION, REC.NAME,
REC.STARTPERIOD, REC.TERRITORYSEQ
END LOOP;
END;
/Maddy wrote:
Hi All,
I am facing some issues with Oracle LONG RAW DATA Type.
We are using Oracle 9IR2 Database.
I got a table having LONG RAW column and I need to transfer the same into another table having LONG RAW column.
When I tried using INSERT INTO SELECT * command (or) CREATE TABLE as select * , it is throwing ORA-00997: illegal use of LONG datatype.
I have gone through some docs and found we should not use LONG RAW using these operations.
So I did some basic PLSQL block given below and I was able to insert most of the records. But records where the LONG RAW file is like 7O kb, the inserting is faliling.
I tried to convert LONG RAW to BLOB and again for the record where the LONG RAW is big in size I am getting (ORA-06502: PL/SQL: numeric or value error) error.
Appreciate if anyone can help me out here.
DECLARE
Y LONG RAW;
BEGIN
FOR REC IN (SELECT * FROM TRU_INT.TERRITORY WHERE TERRITORYSEQ=488480 ORDER BY TERRITORYSEQ ) LOOP
INSERT INTO TRU_CMP.TERRITORY
BUSINESSUNITSEQ, COMPELEMENTLIFETIMEID, COMPONENTIMAGE, DESCRIPTION, ENDPERIOD, GENERATION, NAME, STARTPERIOD, TERRITORYSEQ
VALUES
REC.BUSINESSUNITSEQ, REC.COMPELEMENTLIFETIMEID, REC.COMPONENTIMAGE, REC.DESCRIPTION, REC.ENDPERIOD, REC.GENERATION, REC.NAME,
REC.STARTPERIOD, REC.TERRITORYSEQ
END LOOP;
END;
/below might work
12:06:23 SQL> help copy
COPY
Copies data from a query to a table in the same or another
database. COPY supports CHAR, DATE, LONG, NUMBER and VARCHAR2.
COPY {FROM database | TO database | FROM database TO database}
{APPEND|CREATE|INSERT|REPLACE} destination_table
[(column, column, column, ...)] USING query
where database has the following syntax:
username[/password]@connect_identifier -
Problem with oracle.jbo.domain.Date
Hi there,
I've a problem with oracle.jbo.domain.Date,
I'm doing this code (this part of code is used in my Session Attribute Listener):
* This method is used to add the session id in the database, whenever user login
public void attributeAdded(HttpSessionBindingEvent hsbe){
if(!hsbe.getName().equals("user")){
return;
AmLogin am = (AmLogin)Configuration.createRootApplicationModule(
"com.ahm.pdt001.am.AmLogin",
"AmLoginLocal");
try{
hsbe.getSession().setAttribute("login", new Date(new Timestamp(
System.currentTimeMillis())));
am.createLogin(hsbe.getValue().toString(), hsbe.getSession().
getAttribute("login").toString());
} catch(Exception e){
e.printStackTrace();
System.out.println("Error insert data user: " + hsbe.getValue());
} finally{
Configuration.releaseRootApplicationModule(am, true);
Everything is running well in Jdev 10.1.3 (I'm using ADF Faces technology), and I'm trying to deploy it on OC4J 10.1.2 and it works. But it raised an error when this part of code is runned.
--------------caused and error------------------------
hsbe.getSession().setAttribute("login", new Date(new Timestamp(
System.currentTimeMillis())));
And this is an error:
javax.faces.FacesException: #{pdt001.loginAction}: javax.faces.el.EvaluationException: java.lang.NoSuchMethodError: oracle.jbo.domain.Date.<init>(Ljava/sql/Timestamp;)V at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78) at oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381) at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:332) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16) at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367) at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336) at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196) at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20) at com.ahm.filter.AhmFilterSession.doFilter(AhmFilterSession.java:45) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:645) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186) at java.lang.Thread.run(Thread.java:534)Caused by: javax.faces.el.EvaluationException: java.lang.NoSuchMethodError: oracle.jbo.domain.Date.<init>(Ljava/sql/Timestamp;)V at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130) at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72) ... 23 moreCaused by: java.lang.NoSuchMethodError: oracle.jbo.domain.Date.<init>(Ljava/sql/Timestamp;)V at com.ahm.pdt001.listener.Pdt001AttributeSessionListener.attributeAdded(Pdt001AttributeSessionListener.java:27) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.EvermindHttpSession.setAttribute(EvermindHttpSession.java:128) at com.ahm.pdt001.bean.Pdt001Bean.loginAction(Pdt001Bean.java:61) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
Does anybody have the same problem like this? I've used the same method in my previous project to create oracle.jbo.domain.Date with current time using java.sql.Timestamp, but I don't know why this error happened.
Thx,
AndreRe: oracle jbo.domain.Date issues in 10.1.3
Sascha -
IT0041 - employee with more than 12 date types;
Has anyone had an instance where an employee has had more than 12 valid Date Types on IT0041? If so, how did you enter their 13th date type? We have just created our 12th date type in the table and we will probably be creating a 13th date type in the near future. We have a number of employees who already use 11 date types and could use the 2 new ones as well. I tried to create a new Subtype for my new Date Type - but the new Subtype requires that Date Type 01 be entered. I am not comfortable with having two identical Date Type 01s in IT0041 (one on Subtype 0001 and one on Subtype 0098).
Has anyone used more than one Subtype on IT0041?Thank you for your responses. I don't think changing the Time Constraint class is the best solution for our organization. We did look at that option. I don't want to have multiple valid records; I want the ability to have more than 12 date types (values) on one record. Also, if we allow more than one record, SAP forces us to have Date Type 01 on both valid records - I would be concerned that these values may not match, and then Time Eval would bomb.
I'm also still curious if anyone has used more than one Subtype on IT0041? Again, we did try this, but SAP forces a Date Type 01 on both Subtypes.
Maybe you are looking for
-
Issue while archiving the processed file in sender communication channel using SFTP adapter
Hi All, In one of my scenario (File to IDOC), we are using SFTP sender communicationchannel. we are facing an issue while archiving the processed file. Some times PI processed the file successfully but unable to archive it and in the next poll PI pro
-
WebService : error to retrieve big result gzip encoded
Hi, I have a strange error with Results from Webservice SOAP when data is encoded in gzip or deflate mode. I have a webservice that return in non encoded mode a resultset of 95542 Bytes. The same resultset compressed in gzip is 8251 Bytes. No problem
-
I need a new mp3 player & have never had an Apple product. A must have "accessory" is to download e books. Is this the product for me?
-
Planned Order Creation after Sale Order MRP MD50
In a BOM of FERT material, one HALB material is present at different BOM levels. When we run sale order MRP (MD50), system will create one planned order for complete quantity (total qty of HALB material at all levels put together). Is there any way,
-
Messages do not always show up when email is opened
This problem just started happening recently. Some of the emails do no show the message when I open them. Sometimes the message appears if I reopen the email but not always.