Canonical Form on XML Message
Is there a way of producing a canonical form of an XML message from Java?
Also, does anyone know of a good tutorial about canonical form. I have tried reading the W3C paper on it and found it completely illegible.
Thanks in advance,
Adrian
Thanks for the reply. Yeah, I did post on Javaranch too, trying to catch the widest cross section of people in the hope of an answer to this problem.
You have a very good point about the attribute order. I must admit I hadn't thought of that. You are right, one of the things the canonical form requires is for the attributes to be in alphabetical order.
I still find it hard to believe that there isn't a Sun library that does this. There is a javax package to support the other two steps in signing a message (MessageDigest and Signature) so it seems odd that there isn't one for this. Unless I'm simply missing it.
I'm not entirely sure what you mean by an XML serializer, sorry I'm not that experienced in the whole XML, XSLT, etc firld yet. Is it the sort of thing that is Java uses when a Document is produced from a string containing XML?
Thanks again for your help,
Adrian
Similar Messages
-
Form Vs. XML Message based Workflow system
Hi all,
Recently, I came across a statement that SAP Workflow supports both Form and XML Message based techniques.
Please explain what is the difference between Form based Workflow management system and XML-Message Based Workflow Management system.
What is the advantage of one over other ?
Thanks,
DebiI would look into the Book. I don't have a copy at the moment, but I'm sure it is being addressed somehow. If not, then, google it and I hope you find something.
-
Digested value of the canonical form of xml soap body. Help!!!
<soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="id-168845">
<par:getBookPP2 xmlns:par="http://parkiranje">
<par:id_parkirno_mesto>1</par:id_parkirno_mesto>
<par:SteviloUr>1</par:SteviloUr>
<par:Uporabnik>Matjazz</par:Uporabnik>
</par:getBookPP2>
</soapenv:Body>
The digested value of this xml part is AN7bue9ilbcfMQCsbmQ2Ci7Hvr0=
What is the correct canonical form of this xml part in order to get this value?
Please help!!!There is a very good article here - http://www.ibm.com/developerworks/library/x-c14n/ and you can get Java and C++ libraries that perform the canonicalization here - http://santuario.apache.org/ .
P.S. I don't get that SHA-1 digest value.
Edited by: sabre150 on Nov 8, 2008 1:48 PM -
Unable to Execute a Report to send PAN XML messages out of SNC
Hi All,
We are unable to Execute a Report /SCA/DM_TIMESERIES_OUT to send Product Activity Notifications in the form of XML messages out of SNC. We have manitained some Planned Reciepts data in SNC and would like to transfer it out to ECC.
Could anyone help in understanding if we have to maintain mandatory settings before executing this report.
Thanks & Regards,
SadiqHi Pravin,
As per the documentation(http://help.sap.com/saphelp_snc70/helpdata/EN/48/6bdb4767a431cbe10000000a42189d/frameset.htm), we have tried both the manual and automatic features to configure the output from SNC in the form of XML messages.
The manual method gave a message "Time series data for selection is empty" and the Automated method could trigger the XML messages on every incoming message from ECC but we are unable to see the Planned Receipts in that XML messages.
Was just wondering if we can see the Planned Receipt info by changing the settings of this report or by using any other simillar report as the PR info is very important for our development.
Thanks & Regards,
Sadiq -
Groupware Integration XML message is not well formed
Hi everybody,
I have the problem that i got an message in the error log of the Groupware Connector at the Groupware server.
ERROR MIDDLEWARE - CREATE APPOINTMENT - - "[ERR: 6005]: Failed to get message from data queue: [ERR: 4001]: XML message is not well formed: [org.xml.sax.SAXException]: org.xml.sax.helpers.AttributesImpl@4cb3a4"
I also got an entry in the Groupware Connector Administrative Toll under current locks:
ORGANIZER_UNKNOWN:GWA_01 with error code 4001. (I think this belongs to the message of the error log)
Error Code 4001 stands for XML message is not well formed.
Has anybody a solution for the problem. What can I do. Where can I get more information or debugg the problem? Where can i see the XML message?
Thanks and best regards,
SebastianHi Sebastian,
Have you solved your problem? I have got the same on CRM 6.0.
Thanks and regards,
Yann
Edited by: YANN SZWEC on Feb 17, 2010 10:28 AM -
Client Proxy: XML message not well-formed unexpected symbol 'target
Hi,
I'm trying to get a client proxy to work based on several blogs (1387,1672)
The error I'm getting now is:
<SAP:ErrorHeader xmlns:SAP="http://sap.com/exchange/MessageFormat">
<SAP:Context />
<SAP:Code p1="XML message not well-formed in node (7 ,49 )unexpected symbol: 'target'" p2="" p3="" p4="">PARSING.GENERAL</SAP:Code>
<SAP:Text language="EN">Parsing error: XML message not well-formed in node (7 ,49 )unexpected symbol: 'target'</SAP:Text>
</SAP:ErrorHeader>
The proxy has been generated successfully
in SXMB_ADM R/3 role is application system and uses dest://rfc_dest
The rfc destination does not accept ?type=entry but apparently also does not need it. When I test the connection it gives a statuscode 200 (not 500)
SLDCHECK works fine.
Not sure where to look for this error?
Any ideas?
Thanks
TomHello Smitha,
I forgot to mention that the message is still in R/3, it has not arrived in XI yet, so the error is visible in SXMB_MONI in R/3.
Also it is just a dummy message, It only contains one node and that is called differently:
<?xml version="1.0" encoding="utf-8" ?>
- <ns1:IF021_HTTP_MSG xmlns:ns1="http://oce.com/xi/eu1/R3CCSEU/IF021_Ordrsp_TD_to_Ordrsp_CCS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<IF021_DT>GetOrdRsp</IF021_DT>
</ns1:IF021_HTTP_MSG>
Any mappings only take place in XI itself, and even there I have no node called target.
Regards
Tom -
XML Forms with Expiring Message Date
Hi,
I need to create a XML form with Expiring Message Date i.e the messages should not be visible in the iview after entered expiring date. Kindly let me know how can I achieve this.
Thanks & Regards,
RaviHello Ravi
This can be achieved through the Time-based Publishing service provided by SAP. To make sure the service is active for your repository, go to System Administration > System Configuration > Knowledge Management > Content Management > Repository Managers > CM Repository (if that's the kind of repository you're working in). Then select your repository and make sure that 'tbp' is in the list of Repository Services assigned. If not, assign that service and restart the portal.
Then, within KM Content, enter the Details menu of the folder within that repository for which you'd like this service activated, then go to Settings > Lifetime and click the 'Enable Time-Dependent Publishing' button. This will activate the service for that folder.
Then in your XML form, you can provide the Lifetime properties "Valid From" and/or "Valid To" to specify when a message should be active, and when it should expire. At that point, anyone who has read access to that folder would only see the messages that are within these active dates.
Hope this helps! For more information, see SAP's <a href="http://help.sap.com/saphelp_nw04/helpdata/en/e8/a9a76828b8dc469969ff450ec81ced/frameset.htm">Lifetime of Documents</a> documentation.
Cheers,
Fallon -
We are currently receiving XML messages from a business partner that goes
through a transformation/parser first to make sure the xml document was
in MISMO form (Mortgage Industry Standard Message Organization). Then the
document is stored in a clob in a table. The document is stored Without
the tags. We are storing these XML messages into a CLOB datatype for
later processing. I want to read the CLOB and then parse out the
individual fields to store into a table. What is the best way to
accomplish this in PL/SQL? Here is one sample record:
<MORTGAGEDATA>
<APPLICATION LoanPurposeType="OTHER">
<LenderCaseIdentifier>3631681</LenderCaseIdentifier>
<LendersBranchIdentifier>2966448</LendersBranchIdentifier>
</APPLICATION>
<PROPERTY PropertyUsageType="Primary">
<Address1>1335 test</Address1>
<City>las cruces</City>
<State>NM</State>
<PostalCode>88001</PostalCode>
</PROPERTY>
<SUBJECTPROPERTY>
<SubjectPropertyEstimatedValueAmount>69000</SubjectPropertyEstimatedValueAmount>
</SUBJECTPROPERTY>
<BORROWERRECONCILEDLIABILITY LiabilityType="HelocSubjectProperty">
<LiabilityUnpaidBalanceAmount>0</LiabilityUnpaidBalanceAmount>
<LiabilityMonthlyPaymentAmount>0</LiabilityMonthlyPaymentAmount>
</BORROWERRECONCILEDLIABILITY>
<BORROWERRECONCILEDLIABILITY LiabilityType="MortgageLoanSubjectProperty">
<LiabilityUnpaidBalanceAmount>0</LiabilityUnpaidBalanceAmount>
</BORROWERRECONCILEDLIABILITY>
<BORROWER>
<FirstName>scooby</FirstName>
<MiddleName/>
<LastName>doo</LastName>
<NameSuffix/>
<MothersMaidenName>velma</MothersMaidenName>
</BORROWER>
</MORTGAGEDATA>
NOTE: I have tried to use DBMS_XMLQUERY and it comes out like this using a
stored procedure called printclob: When I do this the data is put into
one field called xml_app_msg. The problem is how do I reference the
individual fields like FirstName and so on to store in another table? Can
I apply a stylesheet and if so, how?
Or do I create an object type called xml_app_msg with the fields lastname
and so on?
-- The table is raw_xml_msg_tbl and the field with the stored infomation is
xml_app_msg.
set serveroutput on size 50000
declare
queryCtx DBMS_XMLquery.ctxType;
result CLOB;
begin
queryCtx := DBMS_XMLQuery.newContext('select xml_app_msg from raw_xml_msg_tbl where app_id = :APP_ID');
-- DBMS_XMLQuery.clearBindValue(queryCtx);
DBMS_XMLQuery.setBindValue(queryCtx,'APP_ID','LT1001');
-- get the result..!
result := DBMS_XMLQuery.getXML(queryCtx);
-- Now you can use the result to put it in tables/send as messages..
printClobOut(result);
DBMS_XMLQuery.closeContext(queryCtx); -- you must close the query handle..
end;
OUTPUT:
<?xml version = '1.0'?>
<ROWSET>
<ROW num="1">
<XML_APP_MSG><MORTGAGEDATA>
<BORROWER>
<FirstName>Falls</FirstName>
<MiddleName/>
<LastName>Water</LastName>
<NameSuffix/>
<SSN>123-45-6789</SSN>
</BORROWER>
</MORTGAGEDATA>
</XML_APP_MSG>
</ROW>
</ROWSET>
nullI parse the XML doc into a domdocument and then loop through using xpath.valueof to pull the individual values from the nodes and then build a generic insert. It works quite well with a small number of columns. I'm not sure how it would work with a lot of columns. You can get code examples from Steve Muench's book "Developing Oracle XML Applications".
-
RE: Validating XML message...
Actually I stand corrected. XML Spy does seem to provide an OLE API to XML
validation ( the isValid method on the IDocument class ) although I haven't
tested it yet.
In my previous post I was thinking of another XML product I tested earlier
in the week which did not.
-----Original Message-----
From: Shaughnessy, Kevin
Sent: Friday, April 20, 2001 08:59
To: 'Rumen Georgiev'
Cc: [email protected]
Subject: RE: Validating XML message...
Rumen,
One idea that is possible is to use an OLE interface to a 3rd party XML
product. This assumes your logic which needs to validate is running on a
Windows box. But if so, it may work. Many products have type libraries which
can be run through OLEGen to create Forte classes. Then you can use TOOL to
talk OLE to that product.
For example, XML Spy 3.5 has a type library from which I created a Forte
project. Unfortunately this product didn't offer any extra features than
Forte's XMLParser ( i.e. the API didn't allow me to validate the XML ) so I
am back to using Forte's parser until I can test another product. If you
find one that does what you want let me know.
I've used OLE a lot with Forte to get functionality from other products (
VISIO, MS Office ) that Forte doesn't provide and it works well. Its a
platform dependent solution but one that may work for you.
Kevin
-----Original Message-----
From: Rumen Georgiev [mailto:[email protected]]
Sent: Friday, April 20, 2001 07:21
To: [email protected]
Cc: [email protected]
Subject: RE: Validating XML message...
Hi Kevin,
From the answers I've got it seems Forte parser is anon-validating one. So we have to look for an external
tool to validate these messages. What I am concerned
about is the integration with Forte.
Thanks for your help!
Rumen
Rumen,
From Tech Note 11811:
"ParserFactory.makeParser() will return a default,
non-validating XML parser."
My experience is that Forte's default XML parser will
not validate but will throw an exception if the XML
document is not well formed. I'm using the DOM
model and this exception happens on the
Document.importDocument( ) method.
If you want anything more than that you'll have to do
it externally.
Kevin-----Original Message-----
From: Rumen Georgiev [mailto:[email protected]]
Sent: Thursday, April 19, 2001 11:49 AM
To: [email protected]
Subject: Validating XML message...
We have to validate inbound XML messages before
processing them. The guys on the other side are
following XMLSchema recommendations to create their
messages using xsd file for validation. We plan to
use XMLParser Forte library and as far as I know it
validates against dtd file (haven't tried yet). If
this is true we have two options:
1. Find a program to convert xsd into dtd file and
use Forte XMLParser for validation.
2. Validate the message beforehand with an external
tool. That means integration between Forte and this
tool.
I would appreciate any help with either approach. Do
you know of a program doing xsd into dtd? Have you
used any existing tool on the market to validate
using XMLSchema? Or may be there is another solution
to
this?
Thank you in advance,
Rumen
=====
Rumen Georgiev
Forte Developer
EXE Technologies
(610) 872-4400 Ext.222
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/Hi,
there is some change in the XMLSPy4.3/XMLType Library 1.2 :
Validation
One common task on documents is to validate them against an assigned schema or DTD. If the XML file has no schema or DTD already assigned, use "Document.AssignSchema" or "Document.AssignDTD" to add the necessary references to the document.
Examples:
objSpy.ActiveDocument.AssignSchema "C:\mySchema.xsd", False
or
objSpy.ActiveDocument.AssignDTD "C:\myDTD.dtd", False
If you want the user to select a schema or DTD, pass True as the second parameter to these functions to display a file-dialog. These methods only put the reference into the document and do not check the existence of the specified file. If the file path is not valid, the validation will fail.
After you have assigned a valid schema or DTD reference to your file, you are able to validate it with "Document.IsValid". IsValid needs some out-parameters that must be declared as VARIANTs to be accessible from script languages like VBScript and JavaScript. -
Use of BPM for processing XML message
I have got a requirement for updating X-number and X- status into the SAP system from a non SAP system. I am getting the message which contains both these values in the form of xml and using HTTP and should be posted as 2 different IDOCs at the SAP system.
But the requirement is to post the X-number first and once it is updated X-status should be posted based on the number.
Assuming that X-number is available first and the status next in the non SAP system can we use BPM and if so how what needs to be done to make sure status doesnt update before number.Hi,
Proceed as follows:
1) Receive the X-message
2) have a transformation step....and map only the x-number into the target IDOC
3) have a synchronous send step....why a sync send....because in that you can get the confirmation for success/failure of your x-number upload....this is only if you want a confirmation...this will make sure that your x-number is updated first.....
4) now if you do not want to have a response back then...have a transformation step to map the x-status to your IDOC...then have a async send step...
5)
a)If sync send used: then you can have a condition like check the status of upload of x-number and if successful then send the x-status.
b) if failure then you can resend the x-number message.
c) if async send then you can directly send your x-status message.
Steps 3, 5(a), 5(b) can be avoided if async commn is used. If you want that your BPM runs somewhat faster then you can avoid the transformation steps....instead you can use the mappings in the respective interface detemination.
Regards,
Abhishek. -
Hell every1
how i cen get my idoc in form of XML
i am using T.code we34, we20 we19
plz let me know whole procedure, i will be thankful for u. please reply me ASAP. Its Urgent.
Thanks & Regards
Vimarsh B.Hi Vimarsh,
You must be working seriously to send your IDOC man, seen many posts of yours regarding this issue
It seems you are stuck in configuring the partner profile properly.
Please follow the steps to configure partner profile.
First you need to maintain partner function.
1. go to NACE
2. select Application type
3. Click on "Output types"
4. Select required output type entry.
5. Double click on "Partner Functions"
6. Go to change mode & click "New Entries" button
7. Make a new entry with following values:
a) Medium: EDI
b) Function: as per your requirement
8. Press enter. Name will appear automatically.
9. Back.
You need to maintain 2 partner profiles.
1. Sender
2. Receiver
Tcode: WE20
1. Configuring Sender Partner Profile
a) Under "Partner Profile", you will find different partner types.
b) Expand required partner type.
c) Click on Sender's Partner Number (Eg. TEMCLNT100)
d) go to change mode.
e) In Outbound Parameters table, click on "+" sign to add new entry.
f) In "Outbound Option" tab Enter Message Type.
g) Enter Receiver Port.
h) Output mode: Transfer IDoc Immed.
i) Enter Basic Type.
j) In "Message Control" tab make a new entry.
k) Enter Application, Message Type and Process Code (Eg. QCERT_OUT)
l) Keep checkbox unchecked.
m) Go back and Save.
1. Configuring Receiver Partner Profile
a) Under "Partner Profile", you will find different partner types.
b) Expand required partner type.
c) Click on Receiver's Partner Number.
d) go to change mode.
e) In Inbound Parameters table, click on "+" sign to add new entry.
f) Enter Message Type.
g) Enter Process Code (Eg. QCERT_IN)
h) Back and Save.
Hope this will help you.
Revert if useful.
Regards,
Jose -
Top node of XML message needs value assign to it - how to do it ?
Hi,
I have an issue where the top node of my XML message needs to have a value assigned.
i.e.
<REPORT>xxxxxxxx
<ID>xxxxx</ID>
<CUST>xxxxx</CUST>
</REPORT>
Is this possible using standard graphical mapping or will I need to resort to XSLT mapping to achieve this ?
Cheers
Colin.Hi,
At the beginning I thought that this is not well-formed XML message, did a test in XMLSpy and it looks like it a well-formed XML message.
> <REPORT>xxxxxxxx
> <ID>xxxxx</ID>
> <CUST>xxxxx</CUST>
> </REPORT>
I created XSD that describe this message, imported into IR, did some basic (one-to-one) message mapping (output and input structures are the same).
Output message:
<?xml version="1.0" encoding="UTF-8"?>
<REPORT>
dfasdf
<ID>12</ID>
<CUST>dfff</CUST>
</REPORT>
After mapping I got:
<?xml version="1.0" encoding="UTF-8"?>
<REPORT>
<ID>12</ID>
<CUST>dfff</CUST>
</REPORT>
Looks like you should rather forget the graphical mapping
Jakub -
Need to Parse XML Message from my Message Driven Bean
Hi
I am using Message Driven Beans for listening to a Queue .
I am getting a Big XML file from my Queue in form of a TextMessage .
Now my task is to read / parse the XML Message .
Please tell me what is the appropiate parsing technique i need to use (Should i use SAX or DOM )
Please share your ideas .
Thank you .Generally you want to use SAX if the file is so big that loading it all in memory (as DOM does) will create memory problems.
Read about these methods on the wiki page for [JAXP.|http://en.wikipedia.org/wiki/Java_API_for_XML_Processing] -
Hi all,
I want to find the best way to exchange xml messages with third party system (eg DI Server, B1iSN).
Thanks,
Vangelis
Edited by: Vangelis Kanellopoulos on Oct 9, 2010 5:34 PMI use XML Island on the Browser end.
Browser
<XML id="xmlDSO"></XML>
xmlDSO.async = false;
xmlDSO.load("Source.xml");
/The source could be jsp as well but it should return xml in html/text format. SHould not have any HTML tags.
Do the processing using IE XML
Then
<FORM>
<INPUT NAME=xmlFIELD>
</FORM>
In
function subForm() {
form.xmlFIELD.value = xmlDSO.xml
form.submit()
In the servlet you should be able to receive the xml in a String.
Which you can process.
I have go so far as the getting XML into DOM.
But I started getting into problem once I started using XPATH on the DOM.
XPATH only takes Node as input. I need to get the DOM so I can start passing the NODE.
If you don't need to use XPATH, you should be able to get to the stage where I am.
-Krishna -
Hello All,
How to send outbound xml messages from oracle EBS ?
Any form ? page ? tool ?Hi Bharat
Please follow below steps
Implement the BADI through SPRO
Give Enhancement Implementation name like Z_BIF_O_POERPREQ
Short Text: Enhancement Implementation of /sca/BIF_O_POERPREQ
Composite Implementation Z_BIF_O_POERPREQ
Click on create composite implementation, Maintain the name and short text for Composite Implementation
Click local object
Click green tick mark
Maintain the following fields (watch for customer namespace and CL at implementation class column) and click create button:
Badi Implementation : Z_BIF_O_POERPREQ
Implementation Class : Z_CL_BIF_O_POERPREQ
Select the dropdown under BADI Definition /sca/BIF_O_POERPREQ
Click green tick mark
Select the line and click copy Sample Class
Click local object
Then Implement all the three methods Before Conversion, After Conversion and Event Creation as it is necessary.
As i mentioned above you will find the BADI Defintion in the drop down and copy the sample class code, if you have any specific requirement enhance the code or else it is sufficient to carry the standard changes in the form of XML.
Best Regards
Vinod
Maybe you are looking for
-
Can I create a large slideshow in Aperture?
I have about 800 photos I want to make a slideshow in Aperture3.3, add audio, theme. Can this be done, or should I split it up? In the past in iPhoto, iDVD, I have had problems getting large projects to process, they seem to stall. I just recently pu
-
How to compare two column between two datasets in report Builder
Hello all, I have a developed a report which contains two data sets as shown below Now i have to match the value of proj_id and ProjectTicketId from ds_New to project_id and ProjectTicketId in ds_Previous and get the respective "Client" from ds_
-
I'm using a PC laptop. I have installed firefox 4 on my other computers and the stop/reload button was there after the install. When I installed it on this computer it never showed up. All I had were the stop reload buttons in my toolbar, taking up v
-
Macbook Pro air port or ethernet not working.
I one of the original macbook pro with the glossy screen, its not reading the Airport or ethernet port? what would be causing this? its not showing up in system preferences or anything. the only thing that shows up is firewhire and bluetooth. any sug
-
Hi, I want to connect my MacBookPro to a HD TV. I understand that I need two cables but I dont know wich ones to buy.Can anyone help me? Thanks