JDev 11.1.1.2 - How to map fixed xml tags in "any" element of the target?
I have a target schema that has "any" element as below:
<xs:element name="USERAREA">
<xs:complexType mixed="true">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:any/>
</xs:sequence>
</xs:complexType>
</xs:element>
I want to map as below in JDev xslt. The 2 new elements are fixed and do not change. I tried to use copy-of but did not know how to do this? Any sample would help.
<USERAREA>
<ORACLE.BOOKEDFLAG>Y</ORACLE.BOOKEDFLAG>
<ORACLE.ORDERTYPE>Standard Order</ORACLE.ORDERTYPE>
</USERAREA>
Any help is appreciated.
Thanks
Shanthi
I would think if you intanciate the XMLReference and use IIDXMLElement GetChildCount / GetNthChild would do what you are looking for.
Ian
Similar Messages
-
Hi ,
How to map javax.xml.datatype.XMLGregorianCalendar to java.util.Calendar so that i can use pass String parameter in YYYY-MM-DD format to my Web service.
I generated the schema classes using Jaxb 2.1.5.
Please give suggestion
Thanks in Advance.toGregorianCalendar().getTime()
-
How do I fix my iPhone it keeps freezing on the pass code and the home button reset does not work
error 3194
I can't update my phone and I AM using the latest update of Itunes AND have restarted computer and followed everything. I'm to the point of booking an app't with the genius bar because I'm finding apples instructions and this latest update to be a complete waste of time. -
How do i fix my wifi if it connects and the bars are blue but no check sign appears next to the wifi name and does not connect to the internet???
Did you already try to reset the iPod by holding the sleep and home button for about 10sec, until the Apple logo comes back again? You will not lose data.
If this does not work, try to reset the network settings in Settings/General/Reset. After that you'll have to put in the passwords for all known networks again.
More troubleshooting can be found here:
iOS: Troubleshooting Wi-Fi networks and connections -
How to create a new tag in page properties in the sidekick of geometrrix page
how to create a new tag in page properties in the sidekick of geometrrix pagesame as basic, advanced, blue print??
Hi prachi,
Is it tag OR Tab ? Seems like you are looking for Tab. Look at [1] & overlay to custamize per your need. Or define at your page component.
[1] /libs/foundation/components/page/dialog/items/tabs/items
Thanks,
Sham -
How to pass a xml CDATA in string element when OSB calling a webservice?
How to pass a xml CDATA in string element when OSB calling a webservice?
I have a business service (biz) that route to operation of a webservice.
A example of request to this webservice legacy:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:eg="example">
<soapenv:Header/>
<soapenv:Body>
<ex:execute>
<ex:arg><![CDATA[<searchCustomerByDocumentNumber>
<documentNumber>12345678909</documentNumber>
</searchCustomerByDocumentNumber>]]></ex:arg>
</ex:execute>
</soapenv:Body>
</soapenv:Envelope>
the type of ex:arg is a string.
How to pass this CDATA structure to webservice in OSB?Steps to solve this problem:
1. Create a XML Schema. E.g.:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified">
<xs:complexType name="searchCustomerByDocumentNumber">
<xs:sequence>
<xs:element name="documentNumber" minOccurs="0">
<xs:annotation>
<xs:documentation>
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string" />
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:element name="searchCustomerByDocumentNumber" type="searchCustomerByDocumentNumber"></xs:element>
</xs:schema>
With this XSD, the XML can be generate:
<?xml version="1.0" encoding="UTF-8"?>
<searchCustomerByDocumentNumber xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="searchCustomerByDocumentNumber.xsd">
<documentNumber>documentNumber</documentNumber>
</searchCustomerByDocumentNumber>
2. Create a XQuery to create a searchCustomerByDocumentNumber ComplexType. E.g.:
(:: pragma bea:global-element-return element="searchCustomerByDocumentNumber" location="searchCustomerByDocumentNumber.xsd" ::)
declare namespace xf = "http://tempuri.org/NovoSia/CreateSearchCustomerByDocumentNumber/";
declare function xf:CreateSearchCustomerByDocumentNumber($documentNumber as xs:string)
as element(searchCustomerByDocumentNumber) {
<searchCustomerByDocumentNumber>
<documentNumber>{ $documentNumber }</documentNumber>
</searchCustomerByDocumentNumber>
declare variable $documentNumber as xs:string external;
xf:CreateSearchCustomerByDocumentNumber($documentNumber)
3. In your stage in pipeline proxy add a assign calling the XQuery created passing the document number of your payload.
Assign to a variable (e.g.: called searchCustomerByDocumentNumberRequest)
4. Create another XQuery Transformation (XQ) to create a request to the webservice legacy. E.g.:
<ex:arg>{fn-bea:serialize($searchCustomerByDocumentNumberRequest)}</ex:arg>
For more information about xquery serialize function:
41.2.6 fn-bea:serialize()
You can use the fn-bea:serialize() function if you need to represent an XML document as a string instead of as an XML element. For example, you may want to exchange an XML document through an EJB interface and the EJB method takes String as argument. The function has the following signature:
fn-bea:serialize($input as item()) as xs:string
Source: http://docs.oracle.com/cd/E14571_01/doc.1111/e15867/xquery.htm -
How to receive a xml CDATA in string element when OSB calling a webservice?
How to receive a xml CDATA in string element when OSB calling a webservice?
I have a business service (biz) that route to operation of a webservice.
A example of response to this webservice legacy:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:eg="example">
<soapenv:Header/>
<soapenv:Body>
<ex:executeResponse>
<ex:arg><![CDATA[<searchCustomerByDocumentNumberResponse>
<name>John John</name>
</searchCustomerByDocumentNumberResponse>]]></ex:arg>
</ex:executeResponse>
</soapenv:Body>
</soapenv:Envelope>
the type of ex:arg is a string.
How to receive this CDATA structure to webservice in OSB?Similiar to the answer How to pass a xml CDATA in string element when OSB calling a webservice?
Use the xquery function fn-bea:inlinedXML rather than fn-ben:serialize
Steps to solve this problem:
1. Create a XML Schema. E.g.:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified">
<xs:complexType name="searchCustomerByDocumentNumberResponse">
<xs:sequence>
<xs:element name="name" minOccurs="0">
<xs:annotation>
<xs:documentation>
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string" />
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:element name="searchCustomerByDocumentNumberResponse" type="searchCustomerByDocumentNumberResponse"></xs:element>
</xs:schema>
2. Create a XQuery to create a searchCustomerByDocumentNumber ComplexType. E.g.:
3. Create a XQuery Transformation (XQ) to get the CDATA response to the webservice legacy. E.g.:
declare namespace ns0 = "novosiaws";
declare function xf:getReponse($searchCustomerByDocumentNumberResponse as element(ns0:searchCustomerByDocumentNumberResponse))
as element(searchCustomerByDocumentNumberResponse) {
fn-bea:inlinedXML($searchCustomerByDocumentNumberResponse/ns0:arg)
For more information about xquery function:
fn-bea:inlinedXML
The fn-bea:inlinedXML() function parses textual XML and returns an instance of the XQuery 1.0 Data Model.
The function has the following signature:
fn-bea:inlinedXML($text as xs:string) as node()*
where $text is the textual XML to parse.
Examples:
fn-bea:inlinedXML(“<e>text</e>”) returns element “e”.
fn-bea:inlinedXML(“<?xml version=”1.0”><e>text</e>”) returns a document with root element “e”.
Source: http://docs.oracle.com/cd/E13162_01/odsi/docs10gr3/xquery/extensions.html -
How can i fix my disabled ipod on itunes without the password?
How can I fix my disabled ipod on itunes without the password?
See Here
http://support.apple.com/kb/HT1808
If you cannot remember the passcode, you will need to restore your device on the computer that you Usually Sync with...
Wrong Pass Code
http://support.apple.com/kb/HT1212 -
I'm in Brazil and need to talk via e-mail or chat, with the USA App Store. It happens that I made a purchase and did not get because I live in Brazil and mistakenly bought the site of the USA. How do I? Do you have any e-mail the department in charge?
I've tried, said they could not help and I should get in touch with the USA App Store. But the problem of getting in touch with the App Store USA is the only option I have on the phone, and my English is not very helpful. Therefore needed a complete address e-mail.
-
I purchased PhotoshopCS5 Sept 2010 and still use the same MAC. I invertly deleted the font section but everything else works. How can I fixed this because I use fonts all the time? I don't want to purchase another one since this cost me $699:(
Which version of mac os x are you using?
Could you clarify what you mean by "I invertly deleted the font section" -
my iphone 5 is stuck on the recovery mode and everytime i tried to restore it , it said that my phone have error 21, how can i fix it or send my phone to the appstore ?
Follow this one as well...
http://support.apple.com/kb/TS3694 -
I cannot force quit and I cannot restart. I tried the online help which directed me to uninstall, but I couldn't find library /application support. How can I fix this without having to turn off the computer?.
Not sure if this Term is Relevant towards an iPhone but, my iPhone won't Post unless if it's plugged into a Charger.
-
None of the quicktime videos from websites play anymore. This started yesterday. Before that I could play them all. Now none of them work. Has anyone had this problem? How did you fix it? Thanks in advance for the help!
Did you try
1, resetting the device
2, deleting all cookies / history items of Safari? -
How to map from XML(xsd) to Service
Hi ,
when i try to map from generated Xml to Service input i am getting below error like
Failed to load "" type.
Please verify the fully-qualified type name is valid.
Details: "".
The type must derive from System.Web.Services.Protocols.SoapHttpClientProtocol.
The type must have the attribute System.Web.Services.WebServiceBindingAttribute.
thanks in advance
ChinnaHi Ram, thanks for ur reply,
here i am sending multple fields data to <any> element typebecause of source will change every time in source data stucture type is
<root xmlns:apl='http://www.xxxx.in' xmlns:atl='http://www.xxxx.in/atl'>
<product apl:entity='Product' apl:onNew='' apl:match='database.byId(id, Product)'>
<id>id</id>
<name>name</name>
<external-id>externalId</external-id>
<parent-id>string i:parent=database.byId(i, Product)</parent-id>
<accounting-symbol>accountingSymbol</accounting-symbol>
<long-name>alternativeName</long-name>
<description>description</description>
<is-closed>isClosed</is-closed>
<accounting-code-purchase>accountingCodePurchase</accounting-code-purchase>
<accounting-code-sale>accountingCodeSale</accounting-code-sale>
</product>
<apl:reply>
<ImportAcknowledgement>
<atl:repeat select="database.updatedItems">
<product>
<id>{id}</id>
<external-id>{item.externalId}</external-id>
<success>{successful}</success>
<message>{error}</message>
</product>
</atl:repeat>
</ImportAcknowledgement>
</apl:reply>
</root>
in map i used masscopy functoid to map from Source Document root to destination Document root field.
the above total data is sent to destination. destination structre is
RootNode
TemplateId
TemplateName
Document
<Any>
after in logical ports i used to select existing ports and i deployed and in Bts admin i used SOAP adapter for sending the requset to Webservice .
here in this process iam getting the above error.
thanks
chinna -
Mapping an XML from an input element to Target
Hi ,
I have an XML coming in source Element as below :
<?xml version="1.0" encoding="UTF-8"?>
<ResponsePayload>
<RespString><?xml version="1.0" encoding="UTF-8"?>
<Devices>
<Device>1</Device>
<Name>1</Name>
</Devices></RespString>
</ResponsePayload>
and I need to map it to the target where the target structure is as below .
<?xml version="1.0" encoding="UTF-8"?>
<Devices>
<Device/>
<Name/>
</Devices>
The entire target xml is coming in a source field and that needs to be mapped.
How to perform this?Can any one suggest the methods to do this ?
Thanks
RajeshAdd the libraries and Tweak as needed.. here's the gist.
public class GetResponse extends AbstractTransformation {
public void transform(TransformationInput arg0, TransformationOutput arg1)
throws StreamTransformationException {
String inputPayload = convertInputStreamToString(arg0.getInputPayload()
.getInputStream());
String inputPayload = convertInputStreamToString(arg0.getInputPayload()
.getInputStream());
String outputPayload = "";
inputPayload = inputPayload.replaceAll("<ResponsePayload>", "");
inputPayload = inputPayload.replaceAll("</ResponsePayload>", "");
inputPayload = inputPayload.replaceAll("<RespString>", "");
inputPayload = inputPayload.replaceAll("</RespString>", "");
inputPayload = start + inputPayload + end;
outputPayload = inputPayload;
try {
arg1.getOutputPayload().getOutputStream().write(
outputPayload.getBytes("UTF-8"));
} catch (Exception exception1) {
public String convertInputStreamToString(InputStream in) {
StringBuffer sb = new StringBuffer();
try {
InputStreamReader isr = new InputStreamReader(in);
Reader reader = new BufferedReader(isr);
int ch;
while ((ch = in.read()) > -1) {
sb.append((char) ch);
reader.close();
} catch (Exception exception) {
return sb.toString();
Mind you the code would change if there's and empty node.
Similarly you would also need to remove an extra version and encoding tag which you get from source.
Edited by: AMITH GOPALAKRISHNAN on Mar 22, 2011 4:57 PM
Maybe you are looking for
-
DVD Drive works, but cannot eject, because DVD crashes into case.
Is there a chance to adjust the drive manually in the case? I don´t want to buy a new externel one.. Thanks guys!!!
-
My 24" iMac is around four years old, and running Leopard v.10.5. It froze up yesterday while playing tunes in iTunes. I had to do a hard restart (with the on/off button on the backside). And now, it will not boot. I get the "tone", then the Apple ic
-
HOW TO DEBUG EXTERNAL ABAP PROGRAM
HI ALL , I am new to Webdynpro Java. I am unabe to debug the ABAP program through web dynpro java application . I want to debug the external abap program through web dynpro java application. If it possible please let me know the required procedur
-
Why won't MacOS 10.5.4 unarchive either SIT or ZIP created on Windows XP?
I'm using WinZip 11.0 and StuffIt 8.5 but neither archive created on Windows XP Pro is recognized (unable to unarchive) when downloaded to MacOS 10.5.4. Works FINE with 10.4.11. What the... No thanks, Robert
-
I continue to get the following error. I can't find anything about it even with Google. Can anybody help me with this? The Error: A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue t