Severe Problem With Message Mapping
Hi,
I have got a message mapping which results in the following XML:
<?xml version="1.0" encoding="UTF-8"?>
<ns14:expost_generation xmlns:ns14="http://mywebsite.xsd">
<timeStamp>2006-03-15T15:27:16</timeStamp>
<source name="xyz">
<generation date="abc" value="def" />
<generation date="abc" value="def" />
<generation date="abc" value="def" />
</source>
</ns14:expost_generation>
My problem is that I have to suppres the ns14 prefix. The opening tag should be: <expost_generation xmlns="http://mywebsite.xsd">
The closing tag: </expost_generation>
Does anybody know how to achieve this?
Kind regards,
Heiko
Hi Heiko,
on the level of the expost_generation-Tag the two definitions you gave are logically equivalent. Hence, no software consuming the XMLs should prefer one style.
However, when we look at the subelements there is a great difference.
In the xml you posted first all subelements (timeStamp, source,...) lie in no namespace.
On the other hand when you declare the tag expost_generation as you described afterwards (with a default namespace declaration) and then proceed as in the first example, then all the subelements will lie in this namespace, too (unless you again reset the default namespace in all these elements).
I assume that the Schema you use in the Message Mapping describes a document with only the root being namespace qualified but the service consuming the document expects a document with all tags being namespace qualified.
Greetings
Stephan
Similar Messages
-
Problem with message mapping ...
Hello,
I have problem with message mapping. I implemented SOAP-to-RFC scenario. The source message is of type http://sntcz.cz/xmlns/holidays:MT_Holiday, the target message of type urn:sap-com:document:sap:rfc:functions:Z_GET_SUPERIOR. But some error is still generated in Request Message Mapping step:
com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns1:Z_GET_SUPERIOR/USR. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:403) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:102) at .....
This is XSD definition of source message:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://sntcz.cz/xmlns/holidays" targetNamespace="http://sntcz.cz/xmlns/holidays">
<xsd:element name="MT_Holiday" type="DT_Holiday" />
<xsd:complexType name="DT_Holiday">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
030495e1742f11dd963600301875333b
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="SinceDay" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
fba049b067aa11dd8be6eee20abb2a3f
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="SinceMounth" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
fba293a067aa11dda311eee20abb2a3f
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="SinceYear" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
fba293a167aa11dd9b4eeee20abb2a3f
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="UntilDay" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
fba293a267aa11ddc352eee20abb2a3f
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="UntilMounth" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
fba293a367aa11ddc33aeee20abb2a3f
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="UntilYear" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
fba293a467aa11dda8cfeee20abb2a3f
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="UserId" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
fba293a567aa11dd9698eee20abb2a3f
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
This is XSD definition of target message:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:sap-com:document:sap:rfc:functions" targetNamespace="urn:sap-com:document:sap:rfc:functions">
<xsd:element name="Z_GET_SUPERIOR">
<xsd:complexType>
<xsd:all>
<xsd:element name="USR" type="xsd:string" minOccurs="0" />
</xsd:all>
</xsd:complexType>
</xsd:element>
</xsd:schema>
It's strange that if I use Message Mapping Test it works fine. But in pipeline not.
Do you have any idea where could be the problem?
Thank you in advance!
Best regard,
ZbynekHi,
To know the correct error Take the Inbound Payload from MONI and Test it in Mapping Test TAB. then u will come to know the exact error.
Procedure to take the Payload
goto MONI-Double click on MessageInbound Message ( CENTRAL ) --Payloads ---Double click on MainDocument ( application/xml ) -Just Right Click on the second window-View Source
then now Copy this and paste it in Mapping Test and Execute.
REgards
Seshagiri -
Upgrading from XI/PI7.0 to 7.1 having problems with message mapping
Hello,
We are in the process over the past week of testing our XI/PI functionality after upgrading our 7.0 XI/PI environment to PI7.1; in particular several maps that were accessible in 7.0 will not open or diaplay in 7.1 complaining of a missing node in the mapping structure. Currently working with SAP on a possible fix but wanted to know if anyone else has done a true migration on top of an existing XI/PI7.0 system and experiencing similar issues (note: the maps can execute in the runtime environment but we can't display the maps source within message mapping; this also does not occur for all maps and there is no clear consistant theme to those that can be displayed and those that can't).
The lattest issue just encountered related to message mapping is that in test mode of a map (that can be displayed) attempting to display the data queue for the mapped elements are blank no data being displayed giving an error noting that the source text of object message mapping: name of the map; has syntax errors, java area import line x, package ibm.com.xi.mapping does not exist/ import ibm.com.xi.mapping UDF:
Has anyone upgraded from PI7.0 to 7.1 and experienced errors with existing maps that worked ok (ans still work in our QX/PRD systems) in their 7.0 envirinment but encountereing strange errors once upgrated to 7.1?
Thanks
Dereck Purnell
NewellRubbermaidHere is the solution we received from SAP to address the issue, there were several mapping related issues we started havng from maps that worked in our 7.0 system prior to the upgrade to PI 7.1. I will try to encorporate the solutions in this response.
a) From Customer to SAP
1. We are unable to open some massage mapping, it is throwing
exception
2. Number Format functions throw exception.
But following issue is still unresolved:
3. When we display message queue, it throws exception
***) 05.02.2009 - 12:34:33 CET - Reply by SAP
The patch has been released at the Service Marketplace.
Please update the scas described in the note 1264871.
The "FormatNum" function issue has also been taken care in this patch.
Please go through the Note 1264871 for other behaviour changes after
upgrade. Let us know if you need any further help.
Regards,
B) From Customer to SAP
04.02.2009 - 00:23:44 CET - Info for SAP
We discovered another issue with mapping.
For some of the mappings, we are unable to display mapping queue. When
we execute, Interface mapping and Massage mapping, it works fine. But
display queue throws exception. Itu2019s not able to recognize libraries
used from dependent software component.
Please find document "Display Mapping Queue Issue" providing example
problem.
25.02.2009 - 07:05:28 CET - *Reply by SAP*
Thank you for your update. I wanted to check with "CopyValue"
function's index. It has to take an input integer and the problem that
found while debugging the opening of your mapping is that the input
was empty thus causing the exception.
I was going to suggest the intended use of "CopyValue" function.
When the input to "copyValue" is a constant, "copyValue" is totally
not necessary. Thus constant can be directly mapped to other function.
When the input is a node with values in context, you can treat one of
values say input[0] to used in mapping by using CopyValue[0].
But please make sure that input[0] will always produce a value.
Note 877964 will describe in detail on Copyvalue usage.
I am marking this Message as complete. Please confirm. -
Problems with message mapping in XI
Hi,
I'm having a problem with my message mapping . I get the error
"Cannot produce target element /ns0:GovTalkMessage/ns0:Body/ns1:IRenvelope. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd"
Can you please tell me how I can resolve this error?
Regards,
Aditi NaikHi,
The source structure is:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.govtalk.gov.uk/taxation/EOY/08-09/1" xmlns="http://www.govtalk.gov.uk/CM/envelope" targetNamespace="http://www.govtalk.gov.uk/CM/envelope">
<xsd:import namespace="http://www.govtalk.gov.uk/taxation/EOY/08-09/1" />
<xsd:element name="IDAuthentication">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="SenderID" type="xsd:string" minOccurs="0" form="qualified" />
<xsd:element name="Authentication" maxOccurs="unbounded" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Method" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="clear" />
<xsd:enumeration value="MD5" />
<xsd:enumeration value="W3Csigned" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Role" type="xsd:string" minOccurs="0" form="qualified" />
<xsd:element name="Value" type="xsd:string" minOccurs="0" form="qualified" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="GovTalkMessage">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="EnvelopeVersion" type="xsd:string" form="qualified" />
<xsd:element name="Header" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="MessageDetails" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Class" form="qualified">
<xsd:simpleType>
<xsd:restriction base="UnicodeNameString">
<xsd:maxLength value="32" />
<xsd:minLength value="4" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Qualifier" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="request" />
<xsd:enumeration value="acknowledgement" />
<xsd:enumeration value="response" />
<xsd:enumeration value="poll" />
<xsd:enumeration value="error" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Function" minOccurs="0" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="list" />
<xsd:enumeration value="read" />
<xsd:enumeration value="delete" />
<xsd:enumeration value="add" />
<xsd:enumeration value="submit" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="TransactionID" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0" />
<xsd:maxLength value="32" />
<xsd:pattern value="[0-9A-F]{0,32}" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="AuditID" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0" />
<xsd:maxLength value="32" />
<xsd:pattern value="[A-F0-9]{0,32}" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="CorrelationID" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0" />
<xsd:maxLength value="32" />
<xsd:pattern value="[0-9A-F]{0,32}" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="ResponseEndPoint" minOccurs="0" form="qualified">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="PollInterval" type="xsd:integer" default="2" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="Transformation" minOccurs="0" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="XML" />
<xsd:enumeration value="HTML" />
<xsd:enumeration value="text" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="GatewayTest" type="xsd:integer" minOccurs="0" form="qualified" />
<xsd:element name="GatewayTimestamp" type="xsd:dateTime" minOccurs="0" form="qualified" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="SenderDetails" minOccurs="0" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="IDAuthentication" minOccurs="0" />
<xsd:element name="X509Certificate" minOccurs="0" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:base64Binary" />
</xsd:simpleType>
</xsd:element>
<xsd:element name="EmailAddress" minOccurs="0" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="129" />
<xsd:minLength value="3" />
<xsd:pattern value="[A-Za-z0-9\.\-_]{1,64}@[A-Za-z0-9\.\-_]{1,64}" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="GovTalkDetails" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Keys" minOccurs="0" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Key" minOccurs="0" maxOccurs="unbounded" form="qualified">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:token">
<xsd:attribute name="Type" type="UnicodeNameString" use="required" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="TargetDetails" minOccurs="0" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Organisation" minOccurs="0" maxOccurs="unbounded" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1" />
<xsd:maxLength value="64" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="GatewayValidation" minOccurs="0" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Processed" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="no" />
<xsd:enumeration value="yes" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Result" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="pass" />
<xsd:enumeration value="fail" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ChannelRouting" minOccurs="0" maxOccurs="unbounded" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Channel" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="URI" type="xsd:anyURI" minOccurs="0" form="qualified" />
<xsd:element name="Name" type="xsd:string" minOccurs="0" form="qualified" />
<xsd:element name="Product" type="xsd:string" minOccurs="0" form="qualified" />
<xsd:element name="Version" type="xsd:string" minOccurs="0" form="qualified" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ID" minOccurs="0" maxOccurs="unbounded" form="qualified">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="Type" type="xsd:string" use="required" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="Timestamp" type="xsd:dateTime" minOccurs="0" form="qualified" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="GovTalkErrors" minOccurs="0" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Error" maxOccurs="unbounded" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="RaisedBy" type="xsd:string" form="qualified" />
<xsd:element name="Number" type="xsd:integer" minOccurs="0" form="qualified" />
<xsd:element name="Type" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="fatal" />
<xsd:enumeration value="recoverable" />
<xsd:enumeration value="business" />
<xsd:enumeration value="warning" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Text" type="xsd:string" minOccurs="0" maxOccurs="unbounded" form="qualified" />
<xsd:element name="Location" type="xsd:string" minOccurs="0" maxOccurs="unbounded" form="qualified" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="GatewayAdditions" minOccurs="0" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:any namespace="##local" processContents="strict" />
</xsd:sequence>
<xsd:anyAttribute namespace="##local" processContents="strict" />
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Body" minOccurs="0" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="ns1:IRenvelope" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:simpleType name="UnicodeNameString">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[\p\p_\-\(\)\{\}]*" />
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
The target structure is:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.govtalk.gov.uk/taxation/EOY/08-09/1" xmlns="http://www.govtalk.gov.uk/CM/envelope" targetNamespace="http://www.govtalk.gov.uk/CM/envelope">
<xsd:import namespace="http://www.govtalk.gov.uk/taxation/EOY/08-09/1" />
<xsd:element name="IDAuthentication">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="SenderID" type="xsd:string" minOccurs="0" form="qualified" />
<xsd:element name="Authentication" maxOccurs="unbounded" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Method" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="clear" />
<xsd:enumeration value="MD5" />
<xsd:enumeration value="W3Csigned" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Role" type="xsd:string" minOccurs="0" form="qualified" />
<xsd:element name="Value" type="xsd:string" minOccurs="0" form="qualified" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="GovTalkMessage">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="EnvelopeVersion" type="xsd:string" form="qualified" />
<xsd:element name="Header" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="MessageDetails" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Class" form="qualified">
<xsd:simpleType>
<xsd:restriction base="UnicodeNameString">
<xsd:maxLength value="32" />
<xsd:minLength value="4" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Qualifier" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="request" />
<xsd:enumeration value="acknowledgement" />
<xsd:enumeration value="response" />
<xsd:enumeration value="poll" />
<xsd:enumeration value="error" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Function" minOccurs="0" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="list" />
<xsd:enumeration value="read" />
<xsd:enumeration value="delete" />
<xsd:enumeration value="add" />
<xsd:enumeration value="submit" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="TransactionID" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0" />
<xsd:maxLength value="32" />
<xsd:pattern value="[0-9A-F]{0,32}" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="AuditID" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0" />
<xsd:maxLength value="32" />
<xsd:pattern value="[A-F0-9]{0,32}" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="CorrelationID" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0" />
<xsd:maxLength value="32" />
<xsd:pattern value="[0-9A-F]{0,32}" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="ResponseEndPoint" minOccurs="0" form="qualified">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="PollInterval" type="xsd:integer" default="2" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="Transformation" minOccurs="0" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="XML" />
<xsd:enumeration value="HTML" />
<xsd:enumeration value="text" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="GatewayTest" type="xsd:integer" minOccurs="0" form="qualified" />
<xsd:element name="GatewayTimestamp" type="xsd:dateTime" minOccurs="0" form="qualified" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="SenderDetails" minOccurs="0" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="IDAuthentication" minOccurs="0" />
<xsd:element name="X509Certificate" minOccurs="0" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:base64Binary" />
</xsd:simpleType>
</xsd:element>
<xsd:element name="EmailAddress" minOccurs="0" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="129" />
<xsd:minLength value="3" />
<xsd:pattern value="[A-Za-z0-9\.\-_]{1,64}@[A-Za-z0-9\.\-_]{1,64}" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="GovTalkDetails" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Keys" minOccurs="0" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Key" minOccurs="0" maxOccurs="unbounded" form="qualified">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:token">
<xsd:attribute name="Type" type="UnicodeNameString" use="required" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="TargetDetails" minOccurs="0" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Organisation" minOccurs="0" maxOccurs="unbounded" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1" />
<xsd:maxLength value="64" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="GatewayValidation" minOccurs="0" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Processed" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="no" />
<xsd:enumeration value="yes" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Result" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="pass" />
<xsd:enumeration value="fail" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ChannelRouting" minOccurs="0" maxOccurs="unbounded" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Channel" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="URI" type="xsd:anyURI" minOccurs="0" form="qualified" />
<xsd:element name="Name" type="xsd:string" minOccurs="0" form="qualified" />
<xsd:element name="Product" type="xsd:string" minOccurs="0" form="qualified" />
<xsd:element name="Version" type="xsd:string" minOccurs="0" form="qualified" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ID" minOccurs="0" maxOccurs="unbounded" form="qualified">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="Type" type="xsd:string" use="required" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="Timestamp" type="xsd:dateTime" minOccurs="0" form="qualified" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="GovTalkErrors" minOccurs="0" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Error" maxOccurs="unbounded" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="RaisedBy" type="xsd:string" form="qualified" />
<xsd:element name="Number" type="xsd:integer" minOccurs="0" form="qualified" />
<xsd:element name="Type" form="qualified">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="fatal" />
<xsd:enumeration value="recoverable" />
<xsd:enumeration value="business" />
<xsd:enumeration value="warning" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Text" type="xsd:string" minOccurs="0" maxOccurs="unbounded" form="qualified" />
<xsd:element name="Location" type="xsd:string" minOccurs="0" maxOccurs="unbounded" form="qualified" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="GatewayAdditions" minOccurs="0" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:any namespace="##local" processContents="strict" />
</xsd:sequence>
<xsd:anyAttribute namespace="##local" processContents="strict" />
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Body" minOccurs="0" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="ns1:IRenvelope" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:simpleType name="UnicodeNameString">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[\p\p_\-\(\)\{\}]*" />
</xsd:restriction>
</xsd:simpleType>
</xsd:schema> -
Problem with Message-Mapping: Loop over Elements possible?
Hi all,
I want do create a Message-Mapping for an IDoc-to-File Scenario. In the Source Structure there are some Elements which can appear more than once (1..unbounded). I need a mechanism which loops over these elements and search for specified values. From the Element which contains an element with this specified value the mapping should write a value in the target structure.
Here a simple example (source structure) for better understanding:
<root>
<invoice>
<number> 10 </number>
<sum> 200.00 </sum>
</invoice>
<invoice>
<number> 20 </number>
<sum> 150.00 </sum>
</invoice>
<invoice>
<number> 30 </number>
<sum> 120.00 </sum>
</invoice>
</root>
Now the duty of the Mapping should be to search in the elements <invoice> for the number 30. And then the sum of the invoice with the number 30 should be written in a field of the target structure.
I tried it out with a constant togehter with an equalsS-function and an ifWithoutElse-function, but it is working only then, if the invoice with the number 30 has the first position in the root context.
Can anybody help me? Thanks
With kind regards
ChristopherHi,
Write a UDF to sum the required values and map to target node.
See while writing the UDF select the type as queue.
number -- removecontext-UDF targetnode
sum----removecontext--/
number abd sum or the two inputs
in UDF
int nsum = 0;
for(int i;i < number.length;i++){
if number(i).equals("30") then
nsum = nsum + valueOf(sum(i));
result.addValue(nsum); // convert the nsum into string
Regsrds
Chilla -
Hello everybody,
we got a problem with multi-mapping.
Source and target message-type are the same:
<xsd:element name="MY_MESSAGE_TYPE">
_<xsd:element name="BUSTRANS">
__<xsd:element name="CHILD_1" maxOccurs="unbounded">
___<xsd:element name="SUB_CHILD_1" maxOccurs="unbounded">
____<xsd:element name="SUB_CHILD_1_NAME" type="xsd:string">
__<xsd:element name="CHILD_2" maxOccurs="unbounded">
___<xsd:element name="SUB_CHILD_2" maxOccurs="unbounded">
____<xsd:element name="SUB_CHILD_2_NAME" type="xsd:string">
The requirements are:
<xsd:element name="MY_MESSAGE_TYPE"> should be created as often as <xsd:element name="CHILD_2"..> occurs
a) so we mapped
CHILD_2 -> MY_MESSAGE_TYPE
BUSTRANS -> CopyValue -> BUSTRANS
CHILD_1 -> CopyValue -> CHILD_1
SUB_CHILD_1 -> CopyValue -> SUB_CHILD_1
SUB_CHILD_1_NAME -> CopyValue -> SUB_CHILD_1_NAME
CHILD_2 -> splitByValue(eachValue) -> CHILD_2
The problem is:
If we duplicated
a) SUB_CHILD_1
b) subtree CHILD_2 (so 2 messages will be generated)
for testing, SUB_CHILD_1 only occurs 1 time! But we need it in every target message as often as it occurs in the source message.
For your testing, here is the datatype:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://enbw.com/XI/SAPCRMB2B/javamappings_test" targetNamespace="http://mynamespace.com/XI/SAPCRMB2B/javamappings_test">
<xsd:complexType name="MultipleBookingOrderRequest">
<xsd:sequence>
<xsd:element name="BUSTRANS">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="CHILD_1" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="SUB_CHILD_1" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="SUB_CHILD_1_NAME" type="xsd:string">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="CHILD_2" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="SUB_CHILD_2" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="SUB_CHILD_2_NAME" type="xsd:string">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Regards
DominicMario,
<i>multimapping (split IDOC into several IDocs) is possible with IDocs. We did it!</i>
Did you use IDOC packaging for this?
AFAIK,when you use multimapping that involves different adapters including one J2EE adapter and a IDOC adapter in the inbound side, multi mapping does not work.
Regards,
Bhavesh -
Problem in message mapping index.
HI All,
I am doing idoc to file scenario.
I have a problem in message mapping.
Issue is,
pallet1
palletheader(here i used counter to increment the value)
palletline(here i used INDEX to increment the value)
pallet linenumber1(it should be 1)
pallet linenumber2(it should be 2)
so on )
so on
pallet2
palletheader
palletline
pallet linenumber1(here again it should be 1)
pallet linenumber2(here again it should be 2)
so on )
so on
In INDEX we have option called reset index in that we have two radio buttons
one is "reset index to intial value with each new context"
and next one is "donot reset index to intiak value"
if i use the first radio button which is working fine in only one pallet and more pallet lines but not more than one pallet.
If i use the second radio buttton which is working fine in more than one pallet but not satisfying the more pallet lines in one pallet.
Can you please help me on the issuemy requirement is like this.
IF DELVRY05/IDOC/E1EDL20/E1EDL24/POSNR equals to /DELVRY05/IDOC/E1EDL20/E1EDL37/E1EDL44/EXIDV
then map to 'pallet line' .
I tried to keep posnr context as E1EDL20 and also IDOC level.
And at the same way to EXIDV too.
pallet(1 to unbounded)
pallet header(1 to 1)
pallet lines(1 to 1)
in sub level pallet line(1 to unbounded) (here i applied the index logic)
The out put should be pallet line 1,2,3,----- so on
In the second pallet the pallet lines should be again 1,2,3,4-------so on .
But when i try to apply thsi logic,
I am getting only one pallet line instead of two.
second is not comming .
please help on this i am facing this problem for the long time back.
if i solve then i can complete my scenario. -
Hi!
I am having a problem with reverse mapping. Here's what I do (copying the
generated files to a correct directory omitted):
% rd-schemagen -properties jdo.properties -file schema.xml
% rd-reversemappingtool -properties jdo.properties -package testi
schema.xml
% javac -d build/classes src/testi/*.java
% rd-importtool -properties jdo.properties src/testi/testi.mapping
Here's a part of the output:
<clip>
2958 INFO [main] jdbc.Schema - Found existing table "Kirja" for schema
"null".
3002 INFO [main] jdbc.Schema - Found existing table "Kustantaja" for
schema "n
ull".
3047 INFO [main] jdbc.SQL - [C: 5948361; T: 15336018]close
3125 INFO [main] jdbc.SQL - [C: 2478770; T: 15336018]open:
jdbc:mysql://localh
ost/kirjakauppa (root)
3129 INFO [main] jdbc.Schema - Found existing table "Kirjailija" for
schema "n
ull".
3140 INFO [main] jdbc.SQL - [C: 2478770; T: 15336018]close
3187 INFO [main] jdbc.SQL - [C: 7529545; T: 15336018]open:
jdbc:mysql://localh
ost/kirjakauppa (root)
3193 INFO [main] jdbc.Schema - Found existing table "Kirjoittaja" for
schema "
null".
3225 INFO [main] jdbc.SQL - [C: 7529545; T: 15336018]close
Exception in thread "main" javax.jdo.JDOFatalInternalException:
java.lang.Illega
lArgumentException: You are attempting to link to a primary key column in
table "Kirja" in a foreign key that is already linked to primary key
columns in table "Kirjailija".
NestedThrowables:
java.lang.IllegalArgumentException: You are attempting to link to a primary
key column in table "Kirja" in a foreign key that is already linked to
primary key c
olumns in table "Kirjailija".
at
com.solarmetric.rd.kodo.impl.jdbc.meta.Mappings.createClassMapping(Ma
ppings.java:160)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMapping(M
appingRepository.java:279)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMetaData(
MappingRepository.java:147)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMapping(M
appingRepository.java:158)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.getMapping(I
mportTool.java:126)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.importMappin
gs(ImportTool.java:57)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.run(ImportTo
ol.java:408)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.main(ImportT
ool.java:385)
NestedThrowablesStackTrace:
java.lang.IllegalArgumentException: You are attempting to link to a primary
key column in table "Kirja" in a foreign key that is already linked to
primary key c
olumns in table "Kirjailija".
at
com.solarmetric.rd.kodo.impl.jdbc.schema.ForeignKey.join(ForeignKey.j
ava:238)
at
com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGenerator.generateFore
ignKeys(SchemaGenerator.java:625)
at
com.solarmetric.rd.kodo.impl.jdbc.schema.DynamicSchemaFactory.findTab
le(DynamicSchemaFactory.java:111)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.map.BaseClassMapping.fromMappi
ngInfo(BaseClassMapping.java:113)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.Mappings.createClassMapping(Ma
ppings.java:144)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMapping(M
appingRepository.java:279)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMetaData(
MappingRepository.java:147)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMapping(M
appingRepository.java:158)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.getMapping(I
mportTool.java:126)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.importMappin
gs(ImportTool.java:57)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.run(ImportTo
ol.java:408)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.main(ImportT
ool.java:385)
</clip>
Here's what MySQLCC gives for creation statement of the tables:
<clip>
# Host: localhost
# Database: kirjakauppa
# Table: 'Asiakas'
# CREATE TABLE `Asiakas` (
`Asiakas_id` int(11) NOT NULL auto_increment,
`Nimi1` varchar(50) default NULL,
`Nimi2` varchar(50) default NULL,
`KatuOsoite` varchar(50) default NULL,
`Postiosoite` varchar(50) default NULL,
`Email` varchar(50) default NULL,
`Puhelin` varchar(50) default NULL,
`Fax` varchar(50) default NULL,
`Salasana` varchar(50) default NULL,
`ExtranetTunnus` varchar(50) default NULL,
PRIMARY KEY (`Asiakas_id`),
KEY `Asiakas_id` (`Asiakas_id`)
) TYPE=InnoDB;
# Host: localhost
# Database: kirjakauppa
# Table: 'Kirja'
# CREATE TABLE `Kirja` (
`Kirja_id` int(11) NOT NULL auto_increment,
`Kustantaja_id` int(11) default NULL,
`Nimi` varchar(60) default NULL,
`Nimi2` varchar(60) default NULL,
`ISBN` varchar(50) default NULL,
`Kieli` varchar(50) default NULL,
`Kansi_URL` varchar(50) default NULL,
`Sisalto_URL` varchar(50) default NULL,
`Tukkuhinta` decimal(10,2) default NULL,
`Kuluttajahinta` decimal(10,2) default NULL,
`Varastokpl` int(11) default NULL,
PRIMARY KEY (`Kirja_id`),
KEY `Kirja_id` (`Kirja_id`),
KEY `Kustantaja_id` (`Kustantaja_id`),
FOREIGN KEY (`Kustantaja_id`) REFERENCES `kirjakauppa.Kustantaja`
(`Kustantaja_id`)
) TYPE=InnoDB;
# Host: localhost
# Database: kirjakauppa
# Table: 'Kirjailija'
# CREATE TABLE `Kirjailija` (
`Kirjailija_id` int(11) NOT NULL auto_increment,
`Sukunimi` varchar(50) default NULL,
`Etunimi` varchar(50) default NULL,
`Maa` varchar(50) default NULL,
`Kirjailija_URL` varchar(50) default NULL,
PRIMARY KEY (`Kirjailija_id`),
KEY `Kirjailija_id` (`Kirjailija_id`)
) TYPE=InnoDB;
# Host: localhost
# Database: kirjakauppa
# Table: 'Kirjoittaja'
# CREATE TABLE `Kirjoittaja` (
`Kirjoittaja_id` int(11) NOT NULL auto_increment,
`Kirjailija_id` int(11) NOT NULL default '0',
`Kirja_id` int(11) NOT NULL default '0',
PRIMARY KEY (`Kirjoittaja_id`),
KEY `Kirjailija_id` (`Kirjailija_id`),
KEY `Kirja_id` (`Kirja_id`),
FOREIGN KEY (`Kirjailija_id`) REFERENCES `kirjakauppa.Kirjailija`
(`Kirjailija_id`),
FOREIGN KEY (`Kirja_id`) REFERENCES `kirjakauppa.Kirja` (`Kirja_id`)
) TYPE=InnoDB;
# Host: localhost
# Database: kirjakauppa
# Table: 'Koodi'
# CREATE TABLE `Koodi` (
`Koodi_id` int(11) NOT NULL auto_increment,
`Koodi` varchar(50) default NULL,
`Tyyppi` varchar(50) default NULL,
`Arvo` varchar(50) default NULL,
PRIMARY KEY (`Koodi_id`)
) TYPE=InnoDB;
# Host: localhost
# Database: kirjakauppa
# Table: 'Kustantaja'
# CREATE TABLE `Kustantaja` (
`Kustantaja_id` int(11) NOT NULL auto_increment,
`Nimi` varchar(80) default NULL,
`Maa` varchar(50) default NULL,
`Kustantaja_URL` varchar(50) default NULL,
`KirjaLkm` int(11) default NULL,
PRIMARY KEY (`Kustantaja_id`),
KEY `Kustantaja_id` (`Kustantaja_id`)
) TYPE=InnoDB;
# Host: localhost
# Database: kirjakauppa
# Table: 'Luokittelu'
# CREATE TABLE `Luokittelu` (
`Luokittelu_id` int(11) NOT NULL auto_increment,
`Luokka_id` int(11) NOT NULL default '0',
`Kirja_id` int(11) NOT NULL default '0',
PRIMARY KEY (`Luokittelu_id`),
KEY `Luokka_id` (`Luokka_id`),
KEY `Kirja_id` (`Kirja_id`),
FOREIGN KEY (`Luokka_id`) REFERENCES `kirjakauppa.Luokka` (`Luokka_id`),
FOREIGN KEY (`Kirja_id`) REFERENCES `kirjakauppa.Kirja` (`Kirja_id`)
) TYPE=InnoDB;
# Host: localhost
# Database: kirjakauppa
# Table: 'Luokka'
# CREATE TABLE `Luokka` (
`Luokka_id` int(11) NOT NULL auto_increment,
`Luokka` varchar(50) default NULL,
PRIMARY KEY (`Luokka_id`),
KEY `Luokka_id` (`Luokka_id`)
) TYPE=InnoDB;
# Host: localhost
# Database: kirjakauppa
# Table: 'Myyja'
# CREATE TABLE `Myyja` (
`Myyja_id` int(11) NOT NULL auto_increment,
`Myyja` varchar(50) default NULL,
`Myyja_URL` varchar(50) default NULL,
PRIMARY KEY (`Myyja_id`),
KEY `Myyja_id` (`Myyja_id`)
) TYPE=InnoDB;
# Host: localhost
# Database: kirjakauppa
# Table: 'Tilaus'
# CREATE TABLE `Tilaus` (
`Tilaus_id` int(11) NOT NULL auto_increment,
`Asiakas_id` int(11) NOT NULL default '0',
`Myyja_id` int(11) default NULL,
`TilausPvm` timestamp(14) NOT NULL,
`EnsimmToimitusPvm` timestamp(14) NOT NULL,
`ViimToimitusPvm` timestamp(14) NOT NULL,
`Tila` int(11) NOT NULL default '0',
`Mk` decimal(10,2) default NULL,
PRIMARY KEY (`Tilaus_id`),
KEY `Asiakas_id` (`Asiakas_id`),
KEY `Myyja_id` (`Myyja_id`),
KEY `Tilaus_id` (`Tilaus_id`),
FOREIGN KEY (`Asiakas_id`) REFERENCES `kirjakauppa.Asiakas`
(`Asiakas_id`),
FOREIGN KEY (`Myyja_id`) REFERENCES `kirjakauppa.Myyja` (`Myyja_id`)
) TYPE=InnoDB;
# Host: localhost
# Database: kirjakauppa
# Table: 'Tilausrivi'
# CREATE TABLE `Tilausrivi` (
`TilausRivi_id` int(11) NOT NULL auto_increment,
`Tilaus_id` int(11) NOT NULL default '0',
`Kirja_id` int(11) NOT NULL default '0',
`TilausLkm` int(11) default NULL,
`Ahinta` decimal(10,2) default NULL,
`Alepros` float default NULL,
`Mk` decimal(10,2) default NULL,
`ToimitettuLkm` int(11) default NULL,
`ToimitusPvm` timestamp(14) NOT NULL,
`ViimToimitusPvm` timestamp(14) NOT NULL,
`Tila` int(11) NOT NULL default '0',
PRIMARY KEY (`TilausRivi_id`),
KEY `Tilaus_id` (`Tilaus_id`),
KEY `Kirja_id` (`Kirja_id`),
FOREIGN KEY (`Tilaus_id`) REFERENCES `kirjakauppa.Tilaus` (`Tilaus_id`),
FOREIGN KEY (`Kirja_id`) REFERENCES `kirjakauppa.Kirja` (`Kirja_id`)
) TYPE=InnoDB;
</clip>
I can find the original creation script if it is necessary.
My guess was that I need to define the foreign keys myself into the
generated schema.xml This is stated in the manual. However, this did not
help, although it changed the stack trace a little (it complains about
different classes than before):
<clip>
Exception in thread "main" javax.jdo.JDOFatalInternalException:
java.lang.IllegalArgumentException: You are attempting to link to a primary
key column in table "Myyja" in a foreign key that is already linked to
primary key columns in table "Asiakas".
NestedThrowables:
java.lang.IllegalArgumentException: You are attempting to link to a primary
key column in table "Myyja" in a foreign key that is already linked to
primary key columns in table "Asiakas".
at
com.solarmetric.rd.kodo.impl.jdbc.meta.Mappings.createFieldMapping(Mappings.java:208)
</clip>
I don't think I fully understand the error message, what exactly is wrong
here? How can I fix it?
Here's a sample of the changes I made to schema.xml:
- added the name - attribute to schema (it was missing)
<schema name="kirjakauppa">
- added the foreign key elements according to the table creation statements
given above
<fk name="Kustantaja_id" to-table="Kustantaja" column="Kustantaja_id"/>
etc...
-AnttiOn Mon, 16 Jun 2003 17:55:35 -0500, Abe White <[email protected]>
wrote:
It seems the last three options are being ignored - I still get a
mapping
file with schema names in front of tables (e.g. kirjakauppa.Asiakas, not
Asiakas),That, unfortunately, is impossible to turn off. The -useSchemaName
option controls whether the schema name is included as part of the
generated class name; it doesn't affect the mapping data that is
generated. What problems does including the schema name in the mapping
data cause?
rd-importtool -properties jdo.properties gensrc/testi/testi.mapping0 INFO [main] kodo.MetaData - Parsing metadata resource
"file:/home/akaranta/work/kurssit/jdo/Harjoituskoodi/kirjakauppa/gensrc/testi/testi.mapping".
Exception in thread "main"
com.solarmetric.rd.kodo.meta.JDOMetaDataNotFoundException: No JDO metadata
was found for type "class testi.Asiakas".
FailedObject:class testi.Asiakas
at
com.solarmetric.rd.kodo.meta.JDOMetaDataRepositoryImpl.getMetaData(JDOMetaDataRepositoryImpl.java:126)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMetaData(MappingRepository.java:184)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:197)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.getMapping(ImportTool.java:128)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.importMappings(ImportTool.java:60)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.run(ImportTool.java:400)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.main(ImportTool.java:377)
This exception goes away if I edit the schema name out of the mapping
file from all classes.
separate classes are being generated for join tables with
primary keysDo these join tables have an extra primary key column? TheYes, they do. Ok, now I know where the problem is.
-primaryKeyOnJoin flag tells Kodo to ignore a join table with a primary
key on the join columns. But Kodo can't handle join tables with extra
column(s) just for a primary key identifier. This isn't a limitation of
the reverse mapping tool, it's a limitation of Kodo. Kodo wouldn't know
what to insert in those extra primary key column(s) when adding membersWhy not? If it can handle single numeric pk columns when making the
generated classes use data store identity, it has to generate something to
those columns. I can't see why this is different.
That is simply out of curiosity - the next thing fixed my problem:
to the join table. Of course, if the primary key is an auto-increment or
something where Kodo can ignore it for inserts, you can just remove the
<column> elements and the <pk> element from your .schema file and the
reverse mapping tool will map it as a join table appropriately.It is auto-increment, so I did this and it worked. Thanks.
, and application id is used for all classes.Are your primary keys on single, numeric columns? Kodo uses Java longsYes (int in MySQL), so that should not be a problem. They are also auto-
incremented. This seems to be the only real problem remaining with this
schema.
-Antti -
Severe problems with System Preferences after updating to OS 10.8
After updating my MacBook Pro (2Ghz Intel Core i7) from MacOS 10.6.8 to 10.8 I have severe problems with accesing System Preferences.
For each of the topics (XXX) listed below, I get the following message, when selectiong the topic:
"To use the XXX preference pane, System preferences needs to quit and reopen"/OK/Cancel
After quiting and reopening the same message appears again...
Topics (XXX):
Desktop & Screen saver
Security & Privacy
Notification
iCloud
Mail, Contacs & Calendars
Date & Time
Software Update
Dictation & Speech
Startup Disk
After updating to Mac OS 10.8.1 the problem persist.... Any suggestions or fixes?
Best Regards
Carsten1. Open Disk Utility and repair permissions
2. Open Finder, press Option key, select Go > Library, open Preferences folder and delete com.apple.systempreferences.plist
3. Go to System Preferences > Users and Groups, create an user and check if the issue appears
4. Backup the data and press Command and R keys in boot. Open Disk Utility, select the drive, erase it and install Mountain Lion. When Mountain Lion asks for the backup, only move your user files -
Funny problem with the mapping
Dear All,
I am facing with a funny problem with the mapping.
I am working on a scenario in which Invoice IDOC created in R/3 will be posted to XI and then in XI, mapping are done to create an XML file out of that IDOC.
In the Idoc, there is a segment E1EDKA1 which is getting created multiple times for different partners alongwith their details. The fields in E1EDKA1 segment are: PARVW,PARTN LIFNR etc.
In the output I just want LIFNR number where PARVW = RE or RS.
I have done the required mapping and when I am testing the mapping its giving me the required results correctly but when I make this scenario live then in real-time, the output XML file has no value for LIFNR.
Can anybody guide me out why is it happening tht during mapping testing its giving the correct result but at real time the mapping is returing no value.
Warm Regards,
N.JainHi Nishant,
Are you sure the test data which you are using while testing the mapping in IR and the one which comes when you test real time is the same?
The data which comes real time. Copy the source payload and then test in mapping. See if you get the right data which you expect. If you do then theres some problem.
Now also go to the same message and in trace you can find out the GUID of the mapping program which is used.
Go to RWB - Last button..not sure what the name is .. something similar to Cache.. Find your mapping program and see if the GUID Matches. If the GUID matches then it is okay.
Also try to do the following..
Reactive the MM/IM.
Go to ID. Make some dummy change in Interface determination and then activate it.
Check the cache notification to make sure if the cache is updated.
If the above doesnt help you let us know.
Regards,
Sumit -
Hello,
We got a problem with user-mapping to a SAP system.
We create a SAp system, and an alias to this system.
We add a user mapping for the administrator (user, not group). Check for connector is OK.
Now, we make the same user-mapping for a group.
if the user also belongs to the group "administrator" this mapping works, otherwise this fail with a message <b>"com.sapportals.portal.ivs.cg.SystemNotFoundException: Got null system object for alias R3HR".
</b>After checking, there is no user-mapping for the "administrator" group, nor for the roles that belong to that group, nor for the user.
So, it seem that the alias is only visible for an admin.
does any one got an idea ? we are on SP14, Linux.
regards
Guillaume PATRYHI Guillaume,
The user mapping is available for both Admin as well as end users.
Open your system from System Administration>System Configuration>System Landscape.
In the property editor,in dropdown for property category,
select the logon method as UID?password and User Mapping type to admin/user.
Then you can create a Group,map the system alias for this group and add users to this group.
Also,in the property editor for the system,from dropdown for display,select permissions , and add the group to asssigned permissions as READ ONLY and select the checkbox for ENDUSER.
Hope,this resolves your problem.
Regards,
Siddhartha -
I've been having several problems with email.
1. I sent email on Dec 10 and the people didn't receive them until Dec 16.
2. I often get two, three or even four copies of the same email in my Thunderbird client.
3. My Moto X (2nd gen) phone sometimes says it can't connect to email.
What's the problem?Thanks for reaching out to us JoAnn108. We'll do everything possible to address this for you.
Could you tell me how long this has been an issue? I noticed you mentnioned Thunderbird; do you experience the same problems when working with your emails directly from the Verizon webmail portal? Also, are there any error messages you notice when the issue occurs? If we can get some answers to these questions it'll help determine our troubleshooting path.
Thanks,
^FCN -
Several Problems with the GeForce3 Ti200
I am having several problems with my GeForce3 Ti200 card. First, anytime I click on the MSI Clock or MSI Information tabs in the Display Properties Window, it gives me the following error message:
"Run a DLL as an App has encountered a problem and needs to close. We are sorry for the inconvenience."
Once I close that message, the tabs disappear until I reopen the Display Properties window again. I have updated the drivers to the most recent version and still the same problem.
Next....When the additional nVidia drivers load...ie NVidea WDM A/V Crossbar...etc... All load fine except the one titled nVidia WDM Video Capture (universal). Once again, I have downloaded the most recent drivers and none would help. Here is my system information:
798 Mhz AMD Athlon
512 MG memory
Windows XP Version 2002 SP1
Creative SP Live
NEC Multisunc 95
TDK CDRW Generic DVD
Hard Drive WD 60Gig
Any help would be great!!I have finally succeeded in making my video capture work.
However, not without a few more headaches. My "Double Image - Half Height" capture was my own stupidity.... I had the captures set for 30 fps -- setting them to 29.97 fixed that.
BUT I found this out when I had the latest nVidia display drivers (53.03) paired with the latest nVidia WDM drivers (2.20). The glorious full-height, single-frame screen capture had a bright white strip across the video approximately 1/3 of the total height.
You have to understand that I've been Googling this problem for several days... The one thing I think I've found out is that _Nobody_, including MSI, nVidia (especially nVidia!), or anywhere else, has really solved the problems people are having with these WDM drivers.
So here are the reasons I found out there for a White Bar across the picture:
(1) Improper installation of drivers - this supposedly causes a problem with 720 X 480 captures only. I had the bar on 640 X 480 captures as well.
(2) nVidia has gotten into bed with Bill Gate$(Micro$oft), Jack Valenti(Hollywood) and others to "protect digital rights". Newer versions of the WDM drivers (since which version? Does anyone know?) PUT the white bar across the video on purpose if the video you are capturing is copyrighted. The thing is, I was capturing an 8mm home video!
So, you decide, reason 1 or reason 2... I decided to try for #2.
I uninstalled WDM 2.20, ran the DriverCleaner2, and installed WDM 1.08 drivers. Guess what? No white bar. Now I can capture with Wincoder, VirtualDub, or Director's Cut 6.5. This is with nVidia Display Drivers 53.03 and WDM drivers 1.08 installed. I'm now thinking of the folks at nVidia the same way I think of Bill G and Jack V; they are all a bunch of rich, greedy scumbags. It is OK with them if they sacrifice your home videos in the name of their wealth. -
Several problems with X-Fi titanium
#several problems with X-Fi titanium? hello there,
i already read a bit through the forums in hope to find a solution for my problems... but i didnt find any and english isnt my mother tongue so sometimes i didnt really understand...
to my problems:
i got my 2nd X-Fi titanium a few days ago (first one stoped working after 6 month usage)... i kinda hoped my previous problems would have been gone with the old card, but unfortenately they are still there...
first: the card does recognize when i plug in my headset into my front pannel and the the sound gets redirected to them... good so far... but when i pull off my headset and i want the sound to go back to my speakers... nothing happens... the card doesnt realize, that the headset is pulled off... i always have to open the software and turn off the "mute speaker automaticl" (no idea how its called in english..., hope you understand)...
the 2nd problem - and this is the worst one - is that from time to time the soundcard makes weird noise... like a scratching or crackling... its really horrible and the only way to get rid of that is sign off the computer and sign on again... this problem occurs without a warning... when i play a game (like WoW or FFXI online), or while im listening to music, sometimes even when i just work with office...
i already sent a mail to CL and of course the regular answer: deinstall drivers/software, install the newest ones... i did that but nothing changed...
is there any way to fix these problems? im a bit frustrated, since i spent a lot of money to get a decent/well quality...
some informations about my PC:
windows vista home premium, service pack
intel core 2 duo @ 2.66GhZ
2GB Ram
Nvidia Geforce 8800 GT
MSI P7N SLI Platinum
hope you can help... ty in advance
fen?'Re: several problems with X-Fi titanium? Sorry to hear you're still having problems.
One more thing to check is that the correct drivers are installed. If you check in the device manager, make sure the Creative drivers are installed and not the Microsoft ones.
Also check in your BIOS that the front panel audio is set to HDAudio.
Make sure the on board audio is disabled as well.
-- If that isn't the case
I see that you've un-installed/re-installed the drivers... I hate to say, but...try again and make sure you have completely uninstalled the drivers before rebooting and reinstalling the latest 2.7.0007 drivers. Try a free uninstaller software called Revo uninstaller. It runs the softwares uninstaller then it searches the registry and HD for remnants.
Message Edited by rc9ball on 08-5-2009 04:04 AMMessage Edited by rc9ball on 08-5-2009 04:0 AM -
Since I upgrade my iphone 3gs to ios 5.1, I have several problems with network and wi-fi, any solution? (No jailbreak)
Most of the time the iphone cannot reach any network and when it can, there is no data transfer, I can only make calls and sms.Skizofrenias wrote:
Since I upgrade my iphone 3gs to ios 5.1, I have several problems with network and wi-fi, any solution? (No jailbreak)
Most of the time the iphone cannot reach any network and when it can, there is no data transfer, I can only make calls and sms.
iOS: Troubleshooting Wi-Fi networks and connections
iOS: Wi-Fi or Bluetooth settings grayed out or dim
Maybe you are looking for
-
External HD not working after updating to os x maverick 10.9.2
I have a late 2010 macbook pro just updated to os x mavrick this week. My toshiba external hardrive was working fine with os x moutain lion. the hard drive is showing up under disk utility and is working fine on a frineds macbook he also is running M
-
How do I save a document in Pages (iCloud, iPad)
How do I save a document in Pages (iCloud, iPad)
-
Discuss the componet of Oracle "Oracle Spatial "
Hi,Everyone! I'm studing the spatial index with the oracle spatial,cause the oracle have two index methods: R-tree and Quadtree.The index I have completed! Now,I have some problem whit performance test.I didn't kown how complete the performance test(
-
Customer Specific Condition tables
Hi, I followed OSS 514952 for Condition Table download but still not getting any success. Some Findings which if some one has faced earlier and solved the problem then please help : 1. I checked table /SAPCND/T681 field GESTA, the value is "not" 5 an
-
Why can´t I sign 3 or E? my iPad show no reaction
It doesn´t matter what app or other stuff I´m in the 3 and e does not work at any place.