Xquery Mapper

Hi,
I am done with the Xquery Mapper and have got an .xq file as an output.
This .xq file takes an .xml as an input converts as defined in the Xquery tool. I have gone ahead and loaded this .xq file in the Aqualogic, which has provided with the functionality of loading xquery files.
Now, how do i use this .xq file; any samples with BEA for using the .xq file with Aqualogic ?
Can anyone suggest as how do I pass parameters and get the output and how do I get this output, which is an input to another Business Service.
Thanks in advance,
shankar

I think you're getting the right files. I get the same set when doing this. When opening the XQuery Transform dialog I see all the available source types.
On this screen, does anything happen when you select XML, Simple, or Non-XML radio buttons?
Note, I'm using it from a WLI 9.2 install, but it should be the same mapper.
Also, you might get faster response on the ALSB or WLI newsgroups since people there will be more familiar with it.
ALSB: http://forums.bea.com/bea/category.jspa?categoryID=600000003
WLI: http://forums.bea.com/bea/forum.jspa?forumID=2048
-Chris

Similar Messages

  • AquaLogic Service Bus and XQuery Mapper

    Hi all,
    I'm new about using AquaLogic Service Bus and XQuery Mapper. I'm using alsb250_wls920.
    To understand better the details I've developed two very simple EJBs stateless related to a generic CarRental scenario.
    The idea is the following:
    - EJB1 exposes a method for retrieving available cars from company A
    - EJB2 exposes a method for retrieving available cars from company B
    The method signature is the same:
    public CarVO[] getAvailableCars(Category category, Double price)
    the only difference is about the CarVO definition where one exposes more attributes than the second one (and also the package is different).
    The goal is designing a new proxy service called getAvailableCars that calls the two above services and returns a set including all available cars from both companies.
    The returned CarVO is the sum of all attributes from two above CarVOs plus a string company attribute.
    So in AquaLogic I've defined:
    - a JAR resource for importing my CarRental.jar
    - two BusinessService resources related to the two above getAvailableCars services (from company A & B), called getAVISAvailableCars & getHertzAvailableCars;
    - I've exported the two WSDLs from the two above BusinessService resources directly from AquaLogic console;
    - I've written manually the WSDL 'getAvailableCars' that I use in the next proxy service definition
    - a getAvailableCars_1 proxy service resource
    Before completing the proxy service definition, I've decided to use XQuery Mapper for defining my trasformations.
    But I got some errors when I try to import the WSDLs.
    For importing simply I've created a wsdl folder inside my project and copied into it the 3 WSDLs definitions.
    Because there are errors in 2 of these WSDLs (getHertzAvailableCars.wsdl, getAvisAvailableCars.wsdl) when I create a XQuery Transformation, I'm not able to select any source schema.
    But getHertzAvailableCars.wsdl, getAvisAvailableCars.wsdl have been generated directly from AquaLogic console and I don't understand why XQuery Mapper complains about them.
    If needed I can post also the CarRental.zip eclipse prj (that contains the above two EJBs) and CarRentalAqualogicPrj.jar AquaLogic prj (passphrase is aqualogic).
    I thank you in advance for any suggestion.
    Regards
    Patrizio

    Could you send me the WSDLS?
    My email address [email protected]

  • XQuery Mapper for OSB 11g

    All,
    We have a task of transforming lot of XML payload formats as part of the OSB proxy service to business service calling. I am looking at this link for XQuery Mapper
    http://download.oracle.com/docs/html/E15866_01/mapper.htm#i1385064
    I have downloaded the Oracle Enterprise pack for Eclipse but still don't see XQuery Transformation option.
    The documentation in this link talks about GUI based intuitive mapping mechanism b/w different SOAP or XML or WSDL formats.
    Let me know your thoughts on the same.
    Thanks,

    Hi Sushant,
    Regarding your last post..
    As per as I know you can have two option..
    1>either you import your wsdl/schemas into OSB Console and then use XQuert mapper over there,you will get the Xquery file.
    2>Other wise you can install other XML processor tool(like Altova XML Spy ..etc.) and generate your required XQuery file and then import into your OSB project(@OSB Console).
    But one thing I can assure you that what ever you can do in Workshop IDE,you can do same thing in OSB Console as well.
    Thanks,
    Deba

  • Xquery mapper plugin for eclipse

    Is there any Xquery mapper plugin for eclipse? I dont have OSB OPEE installation in my system.
    With out OSB installation, can i plugin Xquery mapper for developing Xquery tranformation file.

    Amik wrote:
    Thanks Vlad...But I am not able to get the installer from this link.
    can you please share me the exact link..Thanks in advance.You don't "get" the installer... You install from inside eclipse as an eclipse plugin... Just follow the instructions... http://wiki.eclipse.org/XQDT/Installation

  • Xquery mapper for a recursive schema

    Hi,
    Has anyone tried to map a recursive XML-schema in wlw 8.1.5 using the xquery mapper? I don't now how to do it, I haven't succeded in finding any information about this.
    Regards,
    Fredrik

    Hi Sushant,
    Regarding your last post..
    As per as I know you can have two option..
    1>either you import your wsdl/schemas into OSB Console and then use XQuert mapper over there,you will get the Xquery file.
    2>Other wise you can install other XML processor tool(like Altova XML Spy ..etc.) and generate your required XQuery file and then import into your OSB project(@OSB Console).
    But one thing I can assure you that what ever you can do in Workshop IDE,you can do same thing in OSB Console as well.
    Thanks,
    Deba

  • XQuery Mapper - leave out tags with empty values, how to?

    Hi everybody,
    I am using the XQueryMapper to map 2 XML schemas and get an output for a Webservice but I am unable to get rid off the tag elements that are empty (i.e. there is no content within the tag).
    For example:
    If my output is:
    <customer>
    <first_name>John</first_name>
    <last_name></last_name>
    <title></title>
    <company>1BRN</company>
    <customer>
    What I would like to obtain is:
    <customer>
    <first_name>John</first_name>
    <company>1BRN</company>
    <customer>
    What do you have to do to avoid that? If I do NOT use XQuery then that happens as a default behaviour.
    Unfortunately I have to use it.
    Cheers,
    Manuel Silva

    I found the solution to the problem. To avoid getting tags with no content the way to do it is defining properly your schema. Just adding minOccurs="0" if the element is optional, when it returns with no content, it does not come up in the output.
    <xs:element name="order_type" minOccurs="0" maxOccurs="1" type="xs:string"/>
    XQuery builds different constructs behind the scenes depending how your elements are defined.
    Cheers,
    Manuel
    Message was edited by manuel.silva at Aug 27, 2004 1:58 AM

  • Supposed to be simple: XQuery issue mapping array of objects (duplicate)

    I've been having an issue having a web service return a repeating set of elements.
    The xsd seems correctly formatted with the right structure and maxOccurs set to
    ounbounded etc.
    This is the actual service:
    public RecArea[] getAllRecAreas()
    throws Exception
    RecArea[] recAreas = recAreasControl.getRecAreas();
    return recAreas;
    The RecArea class has public variables as required:
    public class RecArea {    
    public BigDecimal recareaid;
    public String recareaname;
    When I use the XQuery mapper and connect at the RecArea level and recareaname
    level, this is generated:
    declare namespace ns0 = "http://www.openuri.org/"
    declare namespace ns1 = "http://<deleted>/<deleted>/"
    <ns1:RecAreas>
    for $RecArea in $input/ns0:getAllRecAreasResult/ns0:RecArea
    return
    <ns1:RecArea>
    <ns1:RecAreaName>{ data($RecArea/ns0:recareaname) }</ns1:RecAreaName>
    </ns1:RecArea>
    </ns1:RecAreas>
    I have of course verifed in the debugger that recAreas is populated by the function
    call and has data. The response from the service is:
    <arc:RecAreas xmlns:arc="http://<deleted>/<deleted>/"></arc:RecAreas>
    In other words, it's not enumerating the recAreas.
    I also tried tying just the recareaname attribute. This creates an XQuery like
    this:
    <ns1:RecAreas>
    <ns1:RecArea>
    <ns1:RecAreaName>{ data($input/ns0:getAllRecAreasResult/ns0:RecArea[1]/ns0:recareaname)
    }</ns1:RecAreaName>
    </ns1:RecArea>
    </ns1:RecAreas>
    This looks like it wants to only return the one element.
    The result is:
    <arc:RecAreas xmlns:arc="http://<deleted>/<deleted>/">
    <arc:RecArea>
    <arc:RecAreaName></arc:RecAreaName>
    </arc:RecArea>
    </arc:RecAreas>
    My sense is that regardless of the schema, the XQueries being generated above
    are just not doing what is expected.
    I have verified that the default query works. I.E. with no schema mapping the
    results appear.
    This should be simple. What am I missing?
    Also, I would love to have some WebService examples going from database to xml
    with schemas that have repeating elements.
    Thank you kindly,
    - Thomas

    Found a bug in Workshop causing the problem:
    It generated: $input/ns0:getAllRecAreasResult/ns0:RecArea
    but should have generated
    $input/ns0:RecArea
    After scrutinizing $input it was clear that the extra token was superflouous.
    "Thomas Charuhas" <[email protected]> wrote:
    >
    I've been having an issue having a web service return a repeating set
    of elements.
    The xsd seems correctly formatted with the right structure and maxOccurs
    set to
    ounbounded etc.
    This is the actual service:
    public RecArea[] getAllRecAreas()
    throws Exception
    RecArea[] recAreas = recAreasControl.getRecAreas();
    return recAreas;
    The RecArea class has public variables as required:
    public class RecArea {    
    public BigDecimal recareaid;
    public String recareaname;
    When I use the XQuery mapper and connect at the RecArea level and recareaname
    level, this is generated:
    declare namespace ns0 = "http://www.openuri.org/"
    declare namespace ns1 = "http://<deleted>/<deleted>/"
    <ns1:RecAreas>
    for $RecArea in $input/ns0:getAllRecAreasResult/ns0:RecArea
    return
    <ns1:RecArea>
    <ns1:RecAreaName>{ data($RecArea/ns0:recareaname) }</ns1:RecAreaName>
    </ns1:RecArea>
    </ns1:RecAreas>
    I have of course verifed in the debugger that recAreas is populated by
    the function
    call and has data. The response from the service is:
    <arc:RecAreas xmlns:arc="http://<deleted>/<deleted>/"></arc:RecAreas>
    In other words, it's not enumerating the recAreas.
    I also tried tying just the recareaname attribute. This creates an XQuery
    like
    this:
    <ns1:RecAreas>
    <ns1:RecArea>
    <ns1:RecAreaName>{ data($input/ns0:getAllRecAreasResult/ns0:RecArea[1]/ns0:recareaname)
    }</ns1:RecAreaName>
    </ns1:RecArea>
    </ns1:RecAreas>
    This looks like it wants to only return the one element.
    The result is:
    <arc:RecAreas xmlns:arc="http://<deleted>/<deleted>/">
    <arc:RecArea>
    <arc:RecAreaName></arc:RecAreaName>
    </arc:RecArea>
    </arc:RecAreas>
    My sense is that regardless of the schema, the XQueries being generated
    above
    are just not doing what is expected.
    I have verified that the default query works. I.E. with no schema mapping
    the
    results appear.
    This should be simple. What am I missing?
    Also, I would love to have some WebService examples going from database
    to xml
    with schemas that have repeating elements.
    Thank you kindly,
    - Thomas

  • Supposed to be simple: XQuery issue mapping array of objects

    I've been having an issue having a web service return a repeating set of elements.
    The xsd seems correctly formatted with the right structure and maxOccurs set to
    ounbounded etc.
    This is the actual service:
    public RecArea[] getAllRecAreas()
    throws Exception
    RecArea[] recAreas = recAreasControl.getRecAreas();
    return recAreas;
    The RecArea class has public variables as required:
    public class RecArea {    
    public BigDecimal recareaid;
    public String recareaname;
    When I use the XQuery mapper and connect at the RecArea level and recareaname
    level, this is generated:
    declare namespace ns0 = "http://www.openuri.org/"
    declare namespace ns1 = "http://<deleted>/<deleted>/"
    <ns1:RecAreas>
    for $RecArea in $input/ns0:getAllRecAreasResult/ns0:RecArea
    return
    <ns1:RecArea>
    <ns1:RecAreaName>{ data($RecArea/ns0:recareaname) }</ns1:RecAreaName>
    </ns1:RecArea>
    </ns1:RecAreas>
    I have of course verifed in the debugger that recAreas is populated by the function
    call and has data. The response from the service is:
    <arc:RecAreas xmlns:arc="http://<deleted>/<deleted>/"></arc:RecAreas>
    In other words, it's not enumerating the recAreas.
    I also tried tying just the recareaname attribute. This creates an XQuery like
    this:
    <ns1:RecAreas>
    <ns1:RecArea>
    <ns1:RecAreaName>{ data($input/ns0:getAllRecAreasResult/ns0:RecArea[1]/ns0:recareaname)
    }</ns1:RecAreaName>
    </ns1:RecArea>
    </ns1:RecAreas>
    This looks like it wants to only return the one element.
    The result is:
    <arc:RecAreas xmlns:arc="http://<deleted>/<deleted>/">
    <arc:RecArea>
    <arc:RecAreaName></arc:RecAreaName>
    </arc:RecArea>
    </arc:RecAreas>
    My sense is that regardless of the schema, the XQueries being generated above
    are just not doing what is expected.
    I have verified that the default query works. I.E. with no schema mapping the
    results appear.
    This should be simple. What am I missing?
    Also, I would love to have some WebService examples going from database to xml
    with schemas that have repeating elements.
    Thank you kindly,
    - Thomas

    Hi Thomas,
    Have you tried running autotype [2] on your actual service? What does
    the types.xml file look like, could you post it?
    You might take a look at this tutorial [1]
    Sorry for the late reply,
    Bruce
    [1]
    http://e-docs.bea.com/workshop/docs81/doc/en/integration/dttutorial/tutWLIDataTransIntro.html
    [2]
    http://edocs.bea.com/wls/docs81/webserv/anttasks.html#1080062
    Thomas Charuhas wrote:
    >
    I've been having an issue having a web service return a repeating set of elements.
    The xsd seems correctly formatted with the right structure and maxOccurs set to
    ounbounded etc.
    This is the actual service:
    public RecArea[] getAllRecAreas()
    throws Exception
    RecArea[] recAreas = recAreasControl.getRecAreas();
    return recAreas;
    The RecArea class has public variables as required:
    public class RecArea {
    public BigDecimal recareaid;
    public String recareaname;
    When I use the XQuery mapper and connect at the RecArea level and recareaname
    level, this is generated:
    declare namespace ns0 = "http://www.openuri.org/"
    declare namespace ns1 = "http://<deleted>/<deleted>/"
    <ns1:RecAreas>
    for $RecArea in $input/ns0:getAllRecAreasResult/ns0:RecArea
    return
    <ns1:RecArea>
    <ns1:RecAreaName>{ data($RecArea/ns0:recareaname) }</ns1:RecAreaName>
    </ns1:RecArea>
    </ns1:RecAreas>
    I have of course verifed in the debugger that recAreas is populated by the function
    call and has data. The response from the service is:
    <arc:RecAreas xmlns:arc="http://<deleted>/<deleted>/"></arc:RecAreas>
    In other words, it's not enumerating the recAreas.
    I also tried tying just the recareaname attribute. This creates an XQuery like
    this:
    <ns1:RecAreas>
    <ns1:RecArea>
    <ns1:RecAreaName>{ data($input/ns0:getAllRecAreasResult/ns0:RecArea[1]/ns0:recareaname)
    }</ns1:RecAreaName>
    </ns1:RecArea>
    </ns1:RecAreas>
    This looks like it wants to only return the one element.
    The result is:
    <arc:RecAreas xmlns:arc="http://<deleted>/<deleted>/">
    <arc:RecArea>
    <arc:RecAreaName></arc:RecAreaName>
    </arc:RecArea>
    </arc:RecAreas>
    My sense is that regardless of the schema, the XQueries being generated above
    are just not doing what is expected.
    I have verified that the default query works. I.E. with no schema mapping the
    results appear.
    This should be simple. What am I missing?
    Also, I would love to have some WebService examples going from database to xml
    with schemas that have repeating elements.
    Thank you kindly,
    - Thomas

  • Output XML with a default namespace using XQuery

    I'm having a problem with namespaces in an XQuery within ALSB.
    We receive XML from a file which doesn't have any namespace and have to transform it into a different structure, giving it a default namespace such as below:
    Input XML
    <inputRoot>
         <inputAccountName>Joe Bloggs</inputAccountName>
         <inputAccountNumber>10938393</inputAccountNumber>
    </inputRoot>
    Desired output XML
    <outputRoot xmlns="http://www.example.org/outputSchema">
         <outputAccounts>
              <outputAccountName>Joe Bloggs</outputAccountName>
              <outputAccountNumber>10938393</outputAccountNumber>
         </outputAccounts>
    </outputRoot>
    When I attempt to do this using XQuery mapper tool, I end up with a namespace prefix on the outputRoot. The XQuery and result follows:
    XQuery
    declare namespace xf = "http://tempuri.org/XQueryProject/scratchTransformations/test/";
    declare namespace ns0 = "http://www.example.org/outputSchema";
    declare function xf:test($inputRoot1 as element(inputRoot))
    as element(ns0:outputRoot) {
    <ns0:outputRoot>
    <outputAccounts>
    <outputAccountName>{ data($inputRoot1/inputAccountName) }</outputAccountName>
    <outputAccountNumber>{ data($inputRoot1/inputAccountNumber) }</outputAccountNumber>
    </outputAccounts>
    </ns0:outputRoot>
    declare variable $inputRoot1 as element(inputRoot) external;
    xf:test($inputRoot1)
    Result
    <ns0:outputRoot xmlns:ns0="http://www.example.org/outputSchema">
         <outputAccounts>
              <outputAccountName>inputAccountName_1</outputAccountName>
              <outputAccountNumber>inputAccountNumber_1</outputAccountNumber>
         </outputAccounts>
    </ns0:outputRoot>
    How can I write the XQuery in such a way thay the namespace prefix isn't output? I've tried many different methods with no success. I can't declare a default element namespace because my input element doesn't have a namespace
    Thanks in advance

    I spoke too soon, it didn't work quite as perfectly as I'd thought :-) It turns out our client can't handle the xml with the namespace prefix but we've worked out the solution to return XML in the format we originally needed.
    Example below:
    XQuery
    declare namespace xf = "http://tempuri.org/XQueryProject/scratchTransformations/test/";
    declare default element namespace "http://www.example.org/outputSchema";
    declare namespace ns1 = ""
    declare function xf:test($inputRoot1 as element(ns1:inputRoot))
    as element(outputRoot) {
    <outputRoot>
    <outputAccounts>
    <outputAccountName>{ data($inputRoot1/inputAccountName) }</outputAccountName>
    <outputAccountNumber>{ data($inputRoot1/inputAccountNumber) }</outputAccountNumber>
    </outputAccounts>
    </outputRoot>
    declare variable $inputRoot1 as element(inputRoot) external;
    xf:test($inputRoot1)

  • Xquery vs XSLT

    Hi!
    I am new in ALSb 2.6 And I have a a question: wich language for do the transformations is better? Xquery or XSLT?

    For xsl development you could also use the xsl mapper from jdeveloper, but then you will be using 2 ide's for a small part of of development.
    Both the xquery mapper from workshop studio and the xsl mapper from jdeveloper are really easy to use.
    In xquery you can easily add more functions in your xquery, you can put more functionality in it if you ask me

  • Schema Mapping in Data Service Integrator

    Hi,
    I'm just examining some schema mapping programs like BizTalk, Altova and IBM Rational Data Architect, and now found Oracle Data Service Integrator which might be a similiar tool. Actually I found out about Data Service Integrator via BeQ AquaLogic, which probably had been some schema mapping tool before Oracle acquired it and now offers it as Data Service Integrator.
    My question is, whether Oracle Data Service Integrator is really applicable for schema mapping/matching, such as creating mappings between xml, csv/flat files or database schemas. I already downloaded it and tried it out, but had troubles creating a map. According to a tutorial you create a physical data service if you wanna do something like mapping, but after I did this there was only a "map" with a source schema. There was no way to add a target schema and map it with the source schema.
    So can I create mappings in Data Service Integrator or are there other products which would be more convenient (Oracle Warehourse Builder for instance)? If so, does anyone know whether there is a good tutorial how to map simple schemas such as xml files in Oracle Data Service Integrator?
    Thank you in advance.

    After you create your physical data services, create a logical data service using your target schema as the 'return type'. Then add functions and use the xquery mapper to map your physical data services (csv, database, xml, web service etc) to your target schema. You can also use logical data services as the input to a logical data service.

  • Routing question

    Hi,
    I've made a proxy Service in aqualogic, that contacts another webservice, with a different WSDL than the proxy.
    How do i define the messageflow for this?
    I need to map the proxy requestxml to the business service xmlschema, for which I have build an XQuery for. Thats not the problem. Its the messageflow, the exact syntax in the modeling.
    PSRequest1->XQuery->BSRequest->BSRespons->XQuery->PSRespons
    How would i build this in the messageflow editor?

    The xml transformations can be done in XQuery mapper tool.
    I contacted my route node the following way, after receiving the message through my proxyservice.
    I did this by changing the body of the incoming xml message to the format of my business service.
    Then i reverted it back.
    So the messageflow is the following.
    Incoming message through PIPELINE.
    Make a stage in inbound and outbound flow in the pipeline.
    In the stage alter the body of the incoming XML to the format of the Business service.
    Do the reverse in the outgoing stage.
    The xml Body of the incoming/outgoing message has a default variable named "body"

  • Transformations in OSB

    hi,
    i am new to OSB. i want to do transformation in OSB like we do in Jdeveloper. can anyone provide me the links for that?
    thanks

    OSB supports XSLT transformations, so if you are familiar with them just stick to JDeveloper.
    Otherwise you should use XQuery Mapper with OEPE (Eclipse), but that would be quite a learning curve, XQuery is not self evident...
    http://download.oracle.com/docs/cd/E14981-01/wli/docs1031/dtguide/dtguideMapper.html

  • Usage of .xq files???

    Can anyone suggest me as whether BEA has some documents on usage of .xq for dynamic transformation in aqualogic.
    Can someone suggest if BEA has some docs or examples on this?
    Does BEA has any support which can handle questions... anybody aware of any links ...
    Thanks,

    Service Bus supports the W3C Working Draft "XQuery 1.0 and XPath 2.0 Functions and Operators" dated 23 July 2004
    http://www.w3.org/TR/2004/WD-xpath-functions-20040723/
    You can find samples in the doc and you can use the Xquery mapper to generate your XQueries.

  • How to call business service from xquery transformation in OSB ??

    Hi All,
    How to call business service from xquery transformation in OSB ??
    I need to assign the response variable of Business Service to a target element in XQuery Transformation Mapper file.
    It's urgent.
    Regards,
    Jyoti Nayak

    Transformation is to mapping the source and target of 2 different schemas.
    In your case you should have a XQuery transformation between, your Business Service output schema and the target schema.
    Thanks,
    Vijay

Maybe you are looking for