Re: Extracting the data from web service response
Hi Odie,
I am getting an runtime error when I ran this procedure. Also noticed that, if I remove all prefix from p_path variable, I do not get any runtime error but the result are blanks.
Would apprecaite, any help.
===============================================
ORA-19112: error raised during evaluation:
XVM-01081: [XPST0081] Invalid prefix
1 /soap:Envelope/soap:Body/ns0:GetOptOutAllResponse/ns0:GetOptOutAllResult/di
- ^
============================================
create or replace procedure temp34 as
p_path varchar2(400) := '/soap:Envelope/soap:Body/ns0:GetOptOutAllResponse/ns0:GetOptOutAllResult/diffgr:diffgram/NewDataSet/OptOutAll';
begin
for r in (
SELECT x.*
FROM tmp_xml t
, XMLTable(
XMLNamespaces(
'http://www.w3.org/2003/05/soap-envelope' as "soap"
, 'urn:schemas-microsoft-com:xml-diffgram-v1' as "diffgr"
, 'http://api.***.com/' as "ns0"
, p_path
PASSING t.XML
COLUMNS OptOutTime TIMESTAMP WITH TIME ZONE PATH 'OptOutTime'
, MailingList VARCHAR2(100) PATH 'MailingList'
, Reason VARCHAR2(150) PATH 'Reason'
) x
loop
dbms_output.put_line(r.MailingList );
end loop;
end;
Thanking you, in advance.
Hi,
Any good reasons to use a dynamic XQuery expression via a PL/SQL variable?
It's not a good idea for two reasons :
It doesn't work with the XMLNamespaces clause, it is simply ignored.
It disables parse-time optimization, so no streaming evaluation even tough you're using a binary xmltype source.
Use a static XQuery string as shown in the beginning of this thread.
Or, if you really need a variable expression you'll have to declare the namespace mappings in it as well :
'declare namespace soap = "http://www.w3.org/2003/05/soap-envelope";
declare namespace diffgr = "urn:schemas-microsoft-com:xml-diffgram-v1";
declare namespace ns0 = "http://api.***.com/";
/soap:Envelope/soap:Body/ns0:GetOptOutAllResponse/ns0:GetOptOutAllResult/diffgr:diffgram/NewDataSet/OptOutAll'
but again that usage is discouraged.
Also note that declaring namespaces that way only apply to the scope of the main XQuery expression, so if there are any namespace-qualified PATH expressions in the COLUMNS clause, it won't work either.
Similar Messages
-
Extracting the data from web service response
Hi,
I called a web service and in response got an XML data, now I have to extract the values and store in table
My steps,
1,call web service
2,stored response in CLOB column
3,Then used following query
SELECT loc.*
FROM my_xml PO,
XMLTable(XMLNAMESPACES(
'urn:schemas-microsoft-com:xml-diffgram-v1' as "diffgr"
,'http://api.***.com/' as "ns0"
,'/ns0:DataSet/diffgr:diffgram/NewDataSet/OptOutAll'
PASSING xmltype.createxml(PO.xml_data)
COLUMNS
"Email" CHAR(100) PATH 'Email',
"Reason" CHAR(150) PATH 'Reason'
) As loc
WHERE ROWNUM <= 10;
I have written it by using this example
But it is not working, dont know why
/ZabIf I use the following sample XML (stored in XMLType table TMP_XML) :
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetOptOutAllResponse xmlns="http://api.***.com/">
<GetOptOutAllResult>
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas- microsoft-com:xml-msdata">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="OptOutAll">
<xs:complexType>
<xs:sequence>
<xs:element name="OptOutTime" type="xs:dateTime" minOccurs="0"/>
<xs:element name="Email" type="xs:string" minOccurs="0"/>
<xs:element name="MailingList" type="xs:string" minOccurs="0"/>
<xs:element name="SendQueueId" type="xs:int" minOccurs="0"/>
<xs:element name="Reason" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<NewDataSet xmlns="">
<OptOutAll diffgr:id="OptOutAll1" msdata:rowOrder="0" diffgr:hasChanges="inserted">
<OptOutTime>2012-05-09T22:40:00+02:00</OptOutTime>
<MailingList>information</MailingList>
<SendQueueId>111111</SendQueueId>
<Reason>Subscriber confirmed</Reason>
</OptOutAll>
<OptOutAll diffgr:id="OptOutAll2" msdata:rowOrder="1" diffgr:hasChanges="inserted">
<OptOutTime>2012-06-07T22:30:00+02:00</OptOutTime>
<MailingList>information</MailingList>
<SendQueueId>111111</SendQueueId>
<Reason>Subscriber confirmed</Reason>
</OptOutAll>
<OptOutAll diffgr:id="OptOutAll3" msdata:rowOrder="2" diffgr:hasChanges="inserted">
<OptOutTime>2012-06-14T00:20:00+02:00</OptOutTime>
<MailingList>information</MailingList>
<SendQueueId>111111</SendQueueId>
<Reason>Subscriber confirmed</Reason>
</OptOutAll>
<OptOutAll diffgr:id="OptOutAll4" msdata:rowOrder="3" diffgr:hasChanges="inserted">
<OptOutTime>2012-06-19T20:50:00+02:00</OptOutTime>
<MailingList>information</MailingList>
<SendQueueId>111111</SendQueueId>
<Reason>Subscriber confirmed</Reason>
</OptOutAll>
</NewDataSet>
</diffgr:diffgram>
</GetOptOutAllResult>
</GetOptOutAllResponse>
</soap:Body>
</soap:Envelope>Then I can do :
SQL> SELECT x.*
2 FROM tmp_xml t
3 , XMLTable(
4 XMLNamespaces(
5 'http://www.w3.org/2003/05/soap-envelope' as "soap"
6 , 'urn:schemas-microsoft-com:xml-diffgram-v1' as "diffgr"
7 , 'http://api.***.com/' as "ns0"
8 )
9 , '/soap:Envelope/soap:Body/ns0:GetOptOutAllResponse/ns0:GetOptOutAllResult/diffgr:diffgram/NewDataSet/OptOutAll'
10 PASSING t.object_value
11 COLUMNS OptOutTime TIMESTAMP WITH TIME ZONE PATH 'OptOutTime'
12 , MailingList VARCHAR2(100) PATH 'MailingList'
13 , Reason VARCHAR2(150) PATH 'Reason'
14 ) x
15 ;
OPTOUTTIME MAILINGLIST REASON
09/05/12 22:40:00,000000 +02:00 information Subscriber confirmed
07/06/12 22:30:00,000000 +02:00 information Subscriber confirmed
14/06/12 00:20:00,000000 +02:00 information Subscriber confirmed
19/06/12 20:50:00,000000 +02:00 information Subscriber confirmed
Are you getting anything different? -
Don't show data from web service to Cross-Tab in xcelsius
Hi all visitors
I have created one web service and my web service will show data like this.
Group ___Floor ____Amount
Member__Floor 1__1000000
Member__Floor 2__1000000
Member__Floor 1__1000000
Member__Floor 2__1000000
Member__Floor 2__2200000
Member__Floor 1__ 1000000
Member__Floor 1__ 1000000
In my xcelsius, i have option to make it to cross-tab.
when i use that data( data above by manual) to excel spreadsheet. The data will change to
Group______________Floor1________________Floor2______________GrandTotal
Member____________5000000_____________ 3200000_____________8200000
GrandTotal__________5000000_____________ 3200000_____________8200000
But when i load the data from web service,It doesn't show anything.
(when i use list view to show data from web server, i see all data)
How can i load data from web service and show the data like manually?
Best Regards,Hi Tony,
As per your example i have used the SUMIF fucntion
have a glance at that and let me know if you need help
Data coming from webservice >> Concat Group Floor Amount
=C7&D7 Member Floor1 1000000
=C8&D8 Member Floor2 1000000
=C9&D9 Member Floor1 1000000
=C10&D10 Member Floor2 1000000
=C11&D11 Member Floor2 2200000
=C12&D12 Member Floor1 1000000
=C13&D13 Member Floor1 1000000
Cross Tab >>Group Floor1 Floor2
Member =SUMIF($B$7:$B$13,$H$7&I6,$E$7:$E$13) =SUMIF($B$7:$B$13,$H$7&J6,$E$7:$E$13)
Grand Total =SUM(I7) =SUM(J7)
Original data after
Group Floor1 Floor2
Member 4,000,000 4,200,000
Grand Total 4,000,000 4,200,000
Hope this may solve your issue.
Ley me know if you have any other issues.
Regards,
AnjaniKumar C.A. -
Unable to extract the data from ECC 6.0 to PSA
Hello,
I'm trying to extract the data from ECC 6.0 data source name as 2LIS_11_VAHDR into BI 7.0
When i try to load Full Load into PSA , I'm getting following error message
Error Message: "DataSource 2LIS_11_VAHDR must be activated"
Actually the data source already active , I look at the datasource using T-code LBWE it is active.
In BI on datasource(2LIS_11_VAHDR) when i right click selected "Manage" system is giving throughing below error message
"Invalid DataStore object name /BIC/B0000043: Reason: No valid entry in table RSTS"
If anybody faced this error message please advise what i'm doing wrong?
Advance thanksECC 6.0 side
Delete the setup tables
Fill the data into setup tables
Schedule the job
I can see the data using RSA3 (2LIS_11_VAHDR) 1000 records
BI7.0(Service Pack 15)
Replicate the datasource in Production in Backgroud
Migrate Datasource 3.5 to 7.0 in Development
I did't migrate 3.5 to 7.0 in Production it's not allowing
When i try to schedule the InfoPakage it's giving error message "Data Source is not active"
I'm sure this problem relate to Data Source 3.5 to 7.0 convertion problem in production. In Development there is no problem because manually i convert the datasource 3.5 to 7.0
Thanks -
How get data from Web Service with token?
Can I get data from Web Service made with Java?
This WS has a Token.
Any ideas o reference?
Regards!
Fran Díaz | twitter: @frandiaz_ | Blog: {geeks.ms/blogs/fdiaz/} | Communities: {onobanet.es} & {secondnug.com}We've now added this ability to Web.Contents. You can say something like
Web.Contents("http://my.web.service/1", [Headers=[#"The-Token"="0a0138ef2d"]])
and it will pass a header with the key "The-Token" and the value "0a0138ef2d" as part of the HTTP request. For security reasons, this will only work for anonymous web requests.
The December preview can be downloaded from
http://www.microsoft.com/en-us/download/details.aspx?id=39933&WT.mc_id=blog_PBI_Update_PowerQuery -
HOw to connect and extract the data from MS ACCESS SOURCE(Database) system
Hi experts ,
I have to extract the data from MS access database system using JDBC adapter will it work if Yes HOW?Hi Sushma,
how to configure sendor JDBC adapter ..
Select adapter type is JDBC..
Give the Transport Protocol:.JDBC 2.0 (Example)............
Message Protocol:...JDBC...........
IAdapter Engine : Integration Server
Processing Parameters..
Quality of service.....(Example)..Exactly once
Poll Interval .... Example ..10
Query Sql statement..Example ..select * from XXXXX
Document Name.....
Update Sql stetement.....
Thanks,
Satya
Reward points if it id useful... -
Can't extract the data from sourse system
hi,everyone
i have a question about extracting the data from sourse system.i created a general datasourse.in the r3 system,i used t-code:rsa3 to extract the data successful. but ,when i replicate the datasourse to the bw system,i can't extract the data to the psa. in the process of the extracting,accur a error like below:
Errors while sending packages from OLTP to BI
Diagnosis
No IDocs could be sent to BI using RFC.
System Response
There are IDocs in the source system ALE outbox that did not arrive in the ALE inbox of BI.
Further analysis:
Check the TRFC log.
You can access this log using the wizard or the menu path "Environment -> Transact. RFC -> In source system".
Error handling:
If the TRFC is incorrect, check whether the source system is fully connected to BI. In particular, check the
authorizations of the background user in the source system.
who can tell me why?
thx
zhangHi zhang,
Please check the below points.
1. Perform the connection and authorization test in SM59 for the RFC connecion.
2. Make sure the RFC user extracting the data is having sufficient authorization and correct profile as per note 150315.
3. make sure there are sufficient number of Dialog process in BW in SM50.
4. check T code SM58 in source system for any more errors.
5. check the connection between the systems.
Check
Note 561880 - Requests hang because IDocs are not processed.
Note 535172 - IDoc: Dup. IDocs in tRFC inbound processing w/ runtime error
Note 555229 - IDocs hang in status 64 for tRFC with immediate processing
Hope this helps.
Regards,
Suman.T -
How can I extract the data from Xstring .
Hi Gurus ,
How can I extract the data from a XSTRING .
I have to get the data which is filled in the survey form the data is getting saved in form of xstring .
Someone told me that there is a standard FM for that . but I am not able to find .
Please reply with the FM in case some one knows about it .
Thanks in advance .The following code works as of 7.0 (in any SAP system):
FORM XSTRING_TO_STRING USING input TYPE xstring CHANGING output TYPE string.
TYPES : BEGIN OF ty_struc,
line TYPE c LENGTH 100,
END OF ty_struc.
DATA lt_char TYPE TABLE OF ty_struc.
DATA length TYPE i.
length = xstrlen( input ) / cl_abap_char_utilities=>charsize.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = input
tables
binary_tab = lt_char.
CONCATENATE LINES OF lt_char INTO output RESPECTING BLANKS.
output = output(length).
ENDFORM.
Edited by: Sandra Rossi on Mar 30, 2010 12:24 AM -
Hi guys ,
I am new to j2me ,i am going to start a project named onlineNews
for this project i need to read the data from web.can anyone help me with a sample code for reading a data from web
thank u for spending your precious timethat depends on the used technology on top of the web. I believe with J2ME you have access to the URLConnection class, so you can send HTTP requests manually. Otherwise you will need to use low level sockets, or use webservices such as SOAP or XML-RPC.
There is a lightweight XML-RPC client available for J2ME. It is no longer in development, but that doesn't mean that it doesn't work.
http://kxmlrpc.objectweb.org/ -
Regarding how to pass the data from web dynpro to workflow
hi gurus,
how to pass the data from web dynpro to workflow.
Regards
vijayCheck this [thread|SAP_WAPI_START_WORKFLOW;
-
How to pass the data from web dynpro to workflow.
hi gurus,
how to pass the data from web dynpro to workflow.
Regards
vijayHi
you can use function module
data ls_input_container TYPE swr_cont.
data lt_input_container TYPE TABLE OF swr_cont.
CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
EXPORTING
task = ptask
IMPORTING
return_code = lv_return_code
new_status = lv_new_status
TABLES
input_container = pinput_container
message_lines = lt_message_lines
message_struct = lt_message_struct.
where you pass the data in imnternal table "pinput_container" as
ls_input_container-element = 'KUNNR'.
ls_input_container-value = ls_skna1-kunnr ."wd_this->lv_kunnr.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'CLUSER'.
ls_input_container-value = lv_cluser.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'BUKRS'.
ls_input_container-value = lv_bukrs. " youe value as per requirement.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'VKORG'.
ls_input_container-value = ls_sknvv-vkorg. " youe value as per requirement
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'VTWEG'.
ls_input_container-value = ls_sknvv-vtweg. "youe value as per requirement.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'SPART'.
ls_input_container-value = ls_sknvv-spart. "youe value as per requirement.
APPEND ls_input_container TO lt_input_container .
*Also Forgot to mention where ptask is your workflow ID *
Regards,
Arvind
Edited by: Arvind Patel on May 14, 2010 7:38 AM -
Use LINQ to extract the data from a file...
Hi,
I have created a Subprocedure CreateEventList
which populates an EventsComboBox
with a current day's events (if any).
I need to store the events in a generic List communityEvents
which is a collection of
communityEvent
objects. This List needs to be created and assigned to the instance variable
communityEvents.
This method should call helper method ExtractData
which will use LINQ to extract the data from my file.
The specified day is the date selected on the calendar control. This method will be called from the CreateEventList.
This method should clear all data from List communityEvents.
A LINQ
query that creates CommunityEvent
objects should select the events scheduled for selected
day from the file. The selected events should be added to List
communityEvents.
See code below.
Thanks,
public class CommunityEvent
private int day;
public int Day
get
return day;
set
day = value;
private string time;
public string Time
get
return time;
set
time = value;
private decimal price;
public decimal Price
get
return price;
set
price = value;
private string name;
public string Name
get
return name;
set
name = value;
private string description;
public string Description
get
return description;
set
description = value;
private void eventComboBox_SelectedIndexChanged(object sender, EventArgs e)
if (eventComboBox.SelectedIndex == 0)
descriptionTextBox.Text = "2.30PM. Price 12.50. Take part in creating various types of Arts & Crafts at this fair.";
if (eventComboBox.SelectedIndex == 1)
descriptionTextBox.Text = "4.30PM. Price 00.00. Take part in cleaning the local Park.";
if (eventComboBox.SelectedIndex == 2)
descriptionTextBox.Text = "1.30PM. Price 10.00. Take part in selling goods.";
if (eventComboBox.SelectedIndex == 3)
descriptionTextBox.Text = "12.30PM. Price 10.00. Take part in a game of rounders in the local Park.";
if (eventComboBox.SelectedIndex == 4)
descriptionTextBox.Text = "11.30PM. Price 15.00. Take part in an Egg & Spoon Race in the local Park";
if (eventComboBox.SelectedIndex == 5)
descriptionTextBox.Text = "No Events today.";Any help here would be great.
Look, you have to make the file a XML file type -- Somefilename.xml.
http://www.xmlfiles.com/xml/xml_intro.asp
You can use NotePad XML to make the XML and save the text file.
http://support.microsoft.com/kb/296560
Or you can just use Notepad (standard), if you know the basics of how to create XML, which is just text data that can created and saved in a text file, which, represents data.
http://www.codeproject.com/Tips/522456/Reading-XML-using-LINQ
You can do a (select new CommunityEvent) just like the example is doing a
select new FileToWatch and load the XML data into the CommunityEvent properties.
So you need to learn how to make a manual XML textfile with XML data in it, and you need to learn how to use LINQ to read the XML. Linq is not going to work against some flat text file you created. There are plenty of examples out on Bing and Google
on how to use Linq-2-XML.
http://en.wikipedia.org/wiki/Language_Integrated_Query
<copied>
LINQ extends the language by the addition of query
expressions, which are akin to
SQL statements, and can be used to conveniently extract and process data from
arrays, enumerable
classes, XML documents,
relational databases, and third-party data sources. Other uses, which utilize query expressions as a general framework for readably composing arbitrary computations, include the construction of event handlers<sup class="reference" id="cite_ref-reactive_2-0">[2]</sup>
or
monadic parsers.<sup class="reference" id="cite_ref-parscomb_3-0">[3]</sup>
<end>
<sup class="reference" id="cite_ref-parscomb_3-0"></sup> -
Is it possible to Extract the Data from Website?
Dear Experts,
Is it possible to Extract the Data from Website and Upload it in the SAP Table?.It is very Urgent.Please help me.
Thanks & Regards,
Ashok.Hi Friend,
Generaly if it is one time activity you can do it manually by copy paste in excel.
But if it is weekly or monthly activity then you have to ask website provide to provide data in excel or CSV file and upload it into SAP.
I have a situtation like this, and they (Rapaport price) provide it in CSV format with defined columns.
So it is better to raise the issue to website provider.
Regards
Krishnendu -
How to Extract the data from Microsoft BI to SAP BI 7
Dear All,
We have a requirement to Extract the data from Microsoft BI to Sap BI 7. How can we achieve this??
Shall we use the DB connection for this??
If anyone knows about this please give me some suggestion.
Thanks in advance
SathiyaHi All,
How to include the DBMS name when I give the connection. We are using the Data base as MS-BI.
Please guide me
Thanks in advance.
Regards
Sathiya -
How to extract the data from R/3?
Gurus,
I need to extract the data from R/3 to BI . Below i am giving Table name followed by field name and field description.
I am using BI 7.0 and ECC 6.0
I am having following doubts.
1. Based on below information which extract method I need to use (Generic data Extraction?)?
2. I try to create a one view but I could not find Join between the tables. I found only few joins. how to join other tables?
3. Without joining these table how can I collect the data ?
4. Do i need to create multiple tables?
SAP Table SAP Field Field Description
VBAK-> VBELN-> Sales Document
VBAP-> WERKS-> Plant
VBAK-> AUART-> Doc Type
VBAP-> PSTYV-> Item Category
VBAP-> MATNR-> Material
VBAP-> ARKTX-> Description
MATNR-> GROES->
VBAP-> ZIEME-> Target Quantity UOM
VBAP-> WAVWR-> Cost
VBAK-> ERNAM-> Name of a person who created the object
VBAKA-> KUNNR-> Customer Number 1
VBAP-> BSTNK-> Customer purchase Order no
VBEP-> BANFN-> Purchase Requisition Number
QMFE-> FEGRP-> Cause Code(Code Group Problem)
QMFE-> FECOD-> Damage Code(Problem or Damage Code)
QMEL-> QMNUM-> Notification No
EQUI-> EQUNR-> Equipment Number
QMEL-> QMART-> Notification Type
QMELI-> ERDAT-> Date on Which Record Was Created
============================================================================================
Gurus I will assign full points .
ThanksHi,
I would use the standard extractor 2lis_11_vaitm and enhance it for the following fields:
VBEP-> BANFN-> Purchase Requisition Number
QMFE-> FEGRP-> Cause Code(Code Group Problem)
QMFE-> FECOD-> Damage Code(Problem or Damage Code)
QMEL-> QMNUM-> Notification No
EQUI-> EQUNR-> Equipment Number
QMEL-> QMART-> Notification Type
QMELI-> ERDAT-> Date on Which Record Was Created
regards
Siggi
Maybe you are looking for
-
How do i find what generation my iPad is
how do i find what generation my iPad is
-
How to cpoy a window from one smartform to another smartform
Hi experts, can u please help me . how to copy one window from one smartform to another smartform.. Thanks Sai
-
I need to store XMLs files having content in all Asian and European languages without altering the charset encoding of the Oracle 9i database. Also is there any way to index the XML files? Thanks, Ravi
-
If I rent a movie from iTunes and I download it to my phone. Do I need to be connected to the internet to watch the movie?
-
JDO object id problem when working with an appserver
Hi, I'm running into a problem when passing a JDO object id as an argument to a bean. My client is finding a JDO object locally, then attempting to instantiate a bean which wraps the JDO object. Since the JDO object is not Serializable, I'm passing t