Default Namespace Support

Hi,
I am NOT using the XPath helper package. I am using xslprocessor.selectNodes() to get a nodelist.
My xml document contains a default namespace, and I cannot change it.
Is there a work around to the fact that default namespaces is not supported? I'm getting "Namespace prefix 'x' is used but not declared" on the following pl/sql line:
guests := xslprocessor.selectNodes(xmldom.makeNode(xmldoc), '/xml/rs:data/z:row');
I'm willing to jump through a few hoops, if necessary.
Thanks for any insight!
Regina

Correction. Please use the following test case.
1. Create an application and a project in JDeveloepr 11g.
2. Add an XML document. catalog.xml, from the New Gallery.
What doesn't generate an error.
3. Copy the following XML documen to catalog.xml.
<?xml version="1.0" encoding="UTF-8"?>
<catalog xmlns:journal="http://www.xdk11g.com/xpath">
<journal:journal journal:date="November-December 2008">
<journal:article journal:section="ORACLE DEVELOPER">
<title>Instant ODP.NET Deployment</title>
<author>Mark A. Williams</author>
</journal:article>
</journal:journal>
<journal date="March-April 2008">
<article section="TECHNOLOGY">
<title>Oracle Database 11g Redux</title>
<author>Tom Kyte</author>
</article>
</journal>
</catalog>
4. Select Search>XPath Search.
5. Add a namespace mapping with Add button.
Prefix: journal
URI: http://www.xdk11g.com/xpath
6. Specify an XPath expression in Expression field.
/catalog/journal:journal
7. Click on OK. The jounal:journal node gets selected.
What generates an error (the bug).
8. Copy the following XML document to catalog.xml.
<?xml version="1.0" encoding="UTF-8"?>
<catalog xmlns="http://www.xdk11g.com/xpath/defaultNamespace">
<journal date="November-December 2008">
<article section="ORACLE DEVELOPER">
<title>Instant ODP.NET Deployment</title>
<author>Mark A. Williams</author>
</article>
</journal>
<journal date="March-April 2008">
<article section="TECHNOLOGY">
<title>Oracle Database 11g Redux</title>
<author>Tom Kyte</author>
</article>
</journal>
</catalog>
9. Add a namespace mapping with Add button for the default namespace. Specify prefix as empty.
Prefix:
URI: http://www.xdk11g.com/xpath/defaultNamespace
10. Specify an XPath expression in Expression field.
/catalog/journal
11. Click on OK. The journal node does not get selected.

Similar Messages

  • Default namespace & interface in Sender Soap Adapter XI vs. PI 7.1

    In XI there is an option to set the default namespace and interface for sender SOAP adapters. Where or how is this to be handled in PI 7.1

    Hello,
    Where or how is this to be handled in PI 7.1?
    This is handled by your sender agreement whenever you post to the URL http(s)://host:port/XISOAPAdapter/MessageServlet?channel=p:s:c
    Hope this helps,
    Mark

  • Can you validate an XMLElement that uses the default namespace?

    We have a partner that we communicate with via XML over HTTP and the schema that they gave us for their request/response does not specify a namespace. I am able to import the schema and create variables from its elements to send the request and get a response back but when I try to validate the response I am getting an error.
    We are using SOA Suite 11g and the bpelx:validate action to try to validate the variable but it consistently gives back the following error message.
    java.lang.IllegalArgumentException: null schema location for ns=null [Cause=null schema location for ns=null]
    I am pretty sure this is because there is no namespace specified in the response data. Is there anyway that I can validate this XML against the schema without a namespace? This is an existing interface that we are converting so we don't have the flexibility to ask the partner to change their interface. I am able to validate the same XML data in XML Spy against the schema and have been able to recreate this problem with a different small xsd with the default namespace.
    I think I can write a java utility to perform the validation and call it using the embedded java action but I am hoping there is a way to do it within the tool.

    Hi,
    For Crystal Design related queries, close this thread and start the thread in the [SAP Crystal Reports Design forums|http://forums.sdn.sap.com/forum.jspa?forumID=300&start=0]
    - Bhushan

  • Default namespace in the SOAP sender adapter

    Hi All!
    Sorry for the following really easy question but what is the default interface name and default namespace in the SOAP sender Adapater? The name of the interface to where the adapter should forward the received SAOP message?
    it means that for every soap message a new communication channel should be created. Or only one channel is enough?
    And in the receiving case only one is enough or for every web services a new receiving communication channel need to be created?
    Thank you for your answer.

    Hi,
    q) what is the default interface name and default namespace in the SOAP sender Adapater?
    Ans) Soap Sender does not have any default namespace and interface.  That can be set at Sender Agreement. 
    q) The name of the interface to where the adapter should forward the received SAOP message?
    Ans : That message is forwarded to Adapter Engine and then to integration Engine. That takes interface in sender agrement and Namespace.
    it means that for every soap message a new communication channel should be created. Or only one channel is enough?
    Ans:  For sender, 1 communication channel is enough. For Receiver, if you have 10 different systeems, then  you need to create those many receiver communication channels .
    And in the receiving case only one is enough or for every web services a new receiving communication channel need to be created?
    Ans : Same as above
    Note  Soap message is not criteria for creating channels....  Please note that .. soap communication channels creates soap messagae.
    -Subbu

  • Problem with default namespaces

    Hello,
    I'm using version 2.3.10 of Berkeley XML.
    All my XML documents have a default namespace declared in the root element, like this:
    <rootElement xmlns="http://www....something.../something">
    but I get errors when I query the documents - and the only way of avoiding the errors seems to be by manually removing the default namespace attribute.
    I tried setting the XmlQueryContext.setNamespace("", myUri) - but it doesn't work. I saw this mentioned in another post - and you said it was scheduled to work that way in the next release.
    Can you tell me when the next release will be, and what I can do right now to get around this problem. I need to keep the xmlns attribute in the root element since I have other applications which need to access the documents before I put them into the database and they make use of it.
    Kind Regards
    Swami Kevala

    Hi Swami,
    You have two options:
    1) Bind a prefix to your namespace URI, and use that prefix in your queries:
    XmlQueryContext.setNamespace("pre", myUri);
    XmlManager.query("/pre:rootElement", qc);
    2) Bind the default element namespace inside the query:
    XmlManager.query("declare default element namespace \"" + myUri + "\"; /rootElement", qc);
    John

  • How to suppress n0: default Namespace prefix in Transformations

    Hi,
    I use Simple Transformations for serialization of deep structured data.
    In the XML File the whole tree needs to use a special namespace. Therefore i use the attribute xmlns="ABC.de" without a namespace prefix in my root element. During serialization SAP generates a default namespace prefix like 'n0:'.
    Is it possible to suppress the generated namespace prefix?
    Thank you very much for reply
    René
    Edited by: René Libbert on Feb 14, 2012 8:09 AM

    Maybe somebody is interested.
    It seems to be a problem on old 640. On a NW 702 the result is as expected. NW 700 was not tested.
    Workaround for the 640 is to use as result a STRING field not an XSTRING.
    Greetings René

  • Replacing default namespace in OSB message flow

    I'm in the process of setting up a simple OSB proxy and could use some help figuring out how to change a default namespace in the response from the business service.
    The proxy and business service use different namespaces which we'll call "http://foo.com/namespace/proxy" and "http://foo.com/namespace/business". In my routing request message flow, the contents of $body look like this and I'm able to use a Rename action with XQuery expression "./sof:*" to change "http://foo.com/namespace/proxy" to "http://foo.com/namespace/business":
    <sof:Execute xmlns:sof="http://foo.com/namespace/proxy">
    <sof:adminName>MyAdaptor</sof:adminName>
    <sof:request>
    [escaped payload omitted]
    </sof:request>
    </sof:Execute>
    This works fine, but in the response message flow, I need to revert the namespace and am having difficulty because the response uses a default namespace instead of using a prefix:
    <ExecuteResponse xmlns="http://foo.com/namespace/business">
    <ExecuteResult>
    [escaped payload omitted]
    </ExecuteResult>
    </ExecuteResponse>
    If I define a prefix P2L in the expression editor to correspond to "http://foo.com/namespace/business", I'm able to reference the ExecuteResponse element as "./P2L:ExecuteResponse", but then I get stuck.
    If I try use a Rename action to change the namespace for "./P2L:*", only the ExecuteResponse element is renamed to <sof:ExecutResponse xmlns:sof="http://foo.com/namespace/proxy">. Upstream in the calling application, there's an XML stream reader exception because (I assume) ExecuteResult is not found and parsed.
    I also tried using a Replace action against "./P2L:ExecuteResponse/@xmlns" to replace its contents with "http://foo.com/namespace/proxy". I also tried "./P2L:ExecuteResponse/@P2L:xmlns". Neither worked.
    Can anyone tell me what I'm doing wrong, or suggest a different approach? Assume that changing the calling application or business service is not an option.
    Thanks!

    >
    If I define a prefix P2L in the expression editor to correspond to "http://foo.com/namespace/business", I'm able to reference the ExecuteResponse element as "./P2L:ExecuteResponse", but then I get stuck.
    If I try use a Rename action to change the namespace for "./P2L:*", only the ExecuteResponse element is renamed to <sof:ExecutResponse xmlns:sof="http://foo.com/namespace/proxy">. Upstream in the calling application, there's an XML stream reader exception because (I assume) ExecuteResult is not found and parsed.
    >
    You pattern "./P2L:\*" matches just one element so it's ok that the payload's namespace wasn't touched. If you want to rename namespace for all elements try "//P2L:*". However, I'm not sure whether this is what you want. Try do describe what you do, what you want and what you get instead.
    >
    I also tried using a Replace action against "./P2L:ExecuteResponse/@xmlns" to replace its contents with "http://foo.com/namespace/proxy". I also tried "./P2L:ExecuteResponse/@P2L:xmlns". Neither worked.
    >
    I think it's not a good approach to replace content of xmlns as this attribute is not a common xml attribute.

  • 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)

  • How to parse XML document with default namespace with JDOM XPath

    Hi All,
    I am having difficulty parsing using Saxon and TagSoup parser on a namespace html document. The relevant content of this document are as follows:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    </head>
    <body>
        <div id="container">
            <div id="content">
                <table class="sresults">
                    <tr>
                        <td>
                            <a href="http://www.abc.com/areas" title="Hollywood, CA">hollywood</a>
                        </td>
                        <td>
                            <a href="http://www.abc.com/areas" title="San Jose, CA">san jose</a>
                        </td>
                        <td>
                            <a href="http://www.abc.com/areas" title="San Francisco, CA">san francisco</a>
                        </td>
                        <td>
                            <a href="http://www.abc.com/areas" title="San Diego, CA">San diego</a>
                        </td>
                  </tr>
    </body>
    </html>
    Below is the relevant code snippets illustrates how I have attempted to retrieve the contents (value of  <a>):
                 import java.util.*;
                 import org.jdom.*;
                 import org.jdom.xpath.*;
                 import org.saxpath.*;
                 import org.ccil.cowan.tagsoup.Parser;
    ( 1 )       frInHtml = new FileReader("C:\\Tmp\\ABC.html");
    ( 2 )       brInHtml = new BufferedReader(frInHtml);
    ( 3 ) //    SAXBuilder saxBuilder = new SAXBuilder("org.apache.xerces.parsers.SAXParser");
    ( 4 )       SAXBuilder saxBuilder = new SAXBuilder("org.ccil.cowan.tagsoup.Parser");
    ( 5 )       org.jdom.Document jdomDocument = saxbuilder.build(brInHtml);
    ( 6 )       XPath xpath =  XPath.newInstance("/ns:html/ns:body/ns:div[@id='container']/ns:div[@id='content']/ns:table[@class='sresults']/ns:tr/ns:td/ns:a");
    ( 7 )       xpath.addNamespace("ns", "http://www.w3.org/1999/xhtml");
    ( 8 )       java.util.List list = (java.util.List) (xpath.selectNodes(jdomDocument));
    ( 9 )       Iterator iterator = list.iterator();
    ( 10 )     while (iterator.hasNext())
    ( 11 )     {
    ( 12 )            Object object = iterator.next();
    ( 13 ) //         if (object instanceof Element)
    ( 14 ) //               System.out.println(((Element)object).getTextNormalize());
    ( 15 )             if (object instanceof Content)
    ( 16 )                   System.out.println(((Content)object).getValue());
    ….This program would work on the same document without the default namespace, hence, it would not be necessary to include “ns” prefix along in the XPath statements (line 6-7) either. Moreover, I was using “org.apache.xerces.parsers.SAXParser” to have successfully retrieve content of <a> from the same document without default namespace in the past.
    I would like to achieve the following objectives if possible:
    ( i ) Exclude DTD and namespace in order to simplifying the parsing process. How this could be done?
    ( ii ) If this is not possible, how to include it in XPath statements (line 6-7) so that the value of <a> is picked up correctly?
    ( iii ) Would changing from “org.apache.xerces.parsers.SAXParser” to “org.ccil.cowan.tagsoup.Parser” make any difference as far as using XPath is concerned?
    ( iv ) Failing to exlude DTD, how to change the lookup of a PUBLIC DTD to a local SYSTEM one and include a local DTD for reference?
    I am running JDK 1.6.0_06, Netbeans 6.1, JDOM 1.1, Saxon6-5-5, Tagsoup 1.2 on Windows XP platform.
    Any assistance would be appreciated.
    Thanks in advance,
    Jack

    Here's an example of using a custom EntityResolver with the standard DocumentBuilder provided by the JDK. The code may or may not be similar for the parsers that you're using.
    import java.io.IOException;
    import java.io.StringReader;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.xml.sax.EntityResolver;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    public class ParseExamples
        private final static String COMMON_XML
            = "<music>"
            +     "<artist name=\"Anderson, Laurie\">"
            +         "<album>Big Science</album>"
            +         "<album>Strange Angels</album>"
            +     "</artist>"
            +     "<artist name=\"Fine Young Cannibals\">"
            +         "<album>The Raw & The Cooked</album>"
            +     "</artist>"
            + "</music>";
        private final static String COMMON_DTD
            = "<!ELEMENT music (artist*)>"
            + "<!ELEMENT artist (album+)>"
            + "<!ELEMENT album (#PCDATA)>"
            + "<!ATTLIST artist name CDATA #REQUIRED>";
        public static void main(String[] argv)
        throws Exception
            // this version uses just a SYSTEM identifier - note that it gets turned
            // into a file: URL
            String xml = "<!DOCTYPE music SYSTEM \"bar\">"
                       + COMMON_XML;
            // this version uses both PUBLIC and SYSTEM identifiers; the SYSTEM ID
            // gets munged, the PUBLIC ID doesn't
    //        String xml = "<!DOCTYPE music PUBLIC \"foo\" \"bar\">"
    //                   + COMMON_XML;
            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            dbf.setValidating(true);
            DocumentBuilder db = dbf.newDocumentBuilder();
            db.setEntityResolver(new EntityResolver()
                public InputSource resolveEntity(String publicId, String systemId)
                    throws SAXException, IOException
                    System.out.println("publicId = " + publicId);
                    System.out.println("systemId = " + systemId);
                    return new InputSource(new StringReader(COMMON_DTD));
            Document dom = db.parse(new InputSource(new StringReader(xml)));
            System.out.println("root element name = " + dom.getDocumentElement().getNodeName());
    }

  • Change the default namespace in soap message generated by webservice proxy

    I have a requirement where the default namespace generated by the webservice proxy has to be changed. For example, below is a soap request message generated by the proxy:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ns0="http://siebel.com/asi/"
    xmlns:ns1="http://www.siebel.com/xml/getAllSecurityValuesResponse/PS"
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <env:Header>
    <wsse:Security
    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    env:mustUnderstand="1"
    xmlns:xmlns="http://schemas.xmlsoap.org/soap/envelope/">
    <wsse:UsernameToken
    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <wsse:Username>kaoliver</wsse:Username>
    <wsse:Password
    Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">db2</wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    </env:Header>
    <env:Body>
    <ns0:SearchSecurityServicegetAllSecurityValues_1>
    <Login>kaoliver</Login>
    </ns0:SearchSecurityServicegetAllSecurityValues_1>
    </env:Body>
    </env:Envelope>
    In the above message, I want to change the oasis namespace to a different namespace. Where are the default namespaces defined in the proxy classes generated by Jdev so that I can change them?
    Thanks in advance,
    Warm Regards,
    Shashi Anand B

    >
    If I define a prefix P2L in the expression editor to correspond to "http://foo.com/namespace/business", I'm able to reference the ExecuteResponse element as "./P2L:ExecuteResponse", but then I get stuck.
    If I try use a Rename action to change the namespace for "./P2L:*", only the ExecuteResponse element is renamed to <sof:ExecutResponse xmlns:sof="http://foo.com/namespace/proxy">. Upstream in the calling application, there's an XML stream reader exception because (I assume) ExecuteResult is not found and parsed.
    >
    You pattern "./P2L:\*" matches just one element so it's ok that the payload's namespace wasn't touched. If you want to rename namespace for all elements try "//P2L:*". However, I'm not sure whether this is what you want. Try do describe what you do, what you want and what you get instead.
    >
    I also tried using a Replace action against "./P2L:ExecuteResponse/@xmlns" to replace its contents with "http://foo.com/namespace/proxy". I also tried "./P2L:ExecuteResponse/@P2L:xmlns". Neither worked.
    >
    I think it's not a good approach to replace content of xmlns as this attribute is not a common xml attribute.

  • SELECT returns no result when there is a default namespace definition inXML

    Hi,
    I have a problem that my select doesn't return any result when there is a default namespace definition in my XML file.
    I'm using oracle 11g release 1
    XML file stored as a binary XML:
    <SIMS xmlns="http://sims.ics.muni.cz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://sims.ics.muni.cz jh_sims_matricni_vystupy_or.xsd">
    <Vystup Datum="2006-07-18" Typ="2" Nazev="Poslední etapy" PocetStudentu="1" PocetStudii="2">
    <Student RodneCislo="8001011001">
    <Jmeno>Petr</Jmeno>
    </Student>
    </Vystup>
    </SIMS>
    This select return no result:
    SELECT student.jmeno FROM jh_sims_bin_no_schema s, XMLTable('/SIMS/Vystup/Student' PASSING s.OBJECT_VALUE COLUMNS jmeno VARCHAR2(10) PATH 'Jmeno') student
    When I remove default namespace definition (xmlns="http://sims.ics.muni.cz") everything works fine and the same SELECT returns "Petr". Also when the file is stored in object relational storage everything works fine!
    <SIMS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://sims.ics.muni.cz jh_sims_matricni_vystupy_or.xsd">
    <Vystup Datum="2006-07-18" Typ="2" Nazev="Poslední etapy" PocetStudentu="1" PocetStudii="2">
    <Student RodneCislo="8001011001">
    <Jmeno>Petr</Jmeno>
    </Student>
    </Vystup>
    </SIMS>
    Thanks for any help!
    Jan Hruby

    Hi Jan,
    You need to specify the default namespace of the document in the XMLNamespaces clause :
    SELECT student.jmeno
    FROM jh_sims_bin_no_schema s,
         XMLTable(
          XMLNamespaces(default 'http://sims.ics.muni.cz'),
          '/SIMS/Vystup/Student'
          PASSING s.OBJECT_VALUE
          COLUMNS jmeno VARCHAR2(10) PATH 'Jmeno'
         ) student
    ;

  • Format using default namespace prefix.

    Is there any way to format XML using default namespace prefix in an expression?
    My expression is as follows:
    oraext:get-content-as-string(bpws:getVariableData('JmsMdx_InputVariable','body'))

    This seems wrong to me. I've filed Bug 2400119 to get this looked into by development.
    I'd expect any document with an appropriate qualified name to be found by your XPath expression, irrespective of whether syntactically one of the documents happened to use the default namespace syntax.

  • "...Prefix when a default namespace..." error inside javascript

    I get this exception:
    The function $ must be used with a prefix when a default namespace is not specified
    in this piece of jsp code
    <html:checkbox property="copyAddress" value="true"
                           onclick="if (this.checked) { $('postal').hide()} else { $('postal').show(); }"/>Also, I get this error locally but not in the server. I use tomcat 5.5, jsp-api 2.0 and servlet-api 2.4.
    What's wrong? Please help me
    Edited by: poroto20 on Jan 13, 2010 6:56 AM

    I would move this method over to its own function and pass the arg in full.
    Also if this is JQuery then it sould read, if this is Struts then there are better ways of doing this.
    if (this.checked) { $('#postal').hide()} else { $('#postal').show(); }"
    {code}
    When you create the method wrap it up in a try catch (Javascript try catch) and see what outputs. You can also use Firefox/Firebug to get better debugging information regarding JS errors.
    Also you should read as follows, otherwise you will get a JS error
    {code}
    if (this.checked)  $('postal').hide(); else  $('postal').show();
    {code}
    Note the ";" after the hide();
    Edited by: Gizard on 13-Jan-2010 15:22                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Adding default namespace after inlinedXML() in OSB

    Hi All,
    Please suggest me for the following.
    We are sending one data in xml format from proxy service.
    Following is the message we are getting in OSB to send
    <Notification>
    <Type>Data</Type>
    <Channel>webservice</Channel>
    <Security>NONSSL</Security>
    <Message>
    <type>Transfer</type>
    <msg><![CDATA[<Transfer></Transfer>]]></msg>
    </Message>
    <Destination>XXXXXX</Destination>
    <Priority>HIGH</Priority>
    </Notification>>
    Ideally what we are sending in our CDATA there should not be any change.
    but when we are printing out body variable after inlinedxml() function.
    its adding default namespace in Transfer tag.
    <Body xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.xmlsoap.org/soap/envelope/">
    <Transfer xmlns="">
    </Transfer>
    </Body>>
    why OSB is putting xmlns="" in Transfer tag.
    Regards,
    ABHISHEK
    Edited by: abhishek on Sep 11, 2012 12:52 AM
    Edited by: abhishek on Sep 11, 2012 1:04 AM

    Hi ,
    Thanks for reply and suggestion. now I got why its adding the namespace.
    Now i got the problem. when we are not adding any namespace OSB environment is adding the default namespace.
    My use case is :
    when the body variable is
    <Transfer xmlns=''></Transfer>
    My outbound of proxy is following
    <?xml version="1.0" encoding="UTF-8"?>
    <Transfer xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"></Transfer>
    I need my outbound variable is like
    <?xml version="1.0" encoding="UTF-8"?>
    <Transfer></Transfer>
    Then I tried to send the body variable (providing default namespace) <Transfer xmlns='' xmlns:soap-env=''></Transfer>
    but still getting the
    <Transfer xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"></Transfer> as outbound variable
    Is there any way to remove this namespace from outbound variable.
    Thanks,
    Abhishek
    Edited by: abhishek on Sep 12, 2012 1:38 AM
    Edited by: abhishek on Sep 12, 2012 1:41 AM

  • Assign default namespace to XML fragment using XQuery

    Hi everybody!
    I need to add a default namespace declaration to a XML fragment using XQuery. I wrote following statement to assign fragment to $body:
    <soap-env:Body>{
    fn-bea:inlinedXML($content/text())}
    </soap-env:Body>
    The problem is "$content/text()" has no namespace declaration so I need to assign a default namespace (xmlns="") to it in order to apply some XQuery transformations to its content.
    I know this can be easily done with a XSLT but I would like use XQuery instead.
    Could anyone tell me how I could perform this task?
    Thank you in advance,
    Daniel.

    Re: xquery function - send namespace as binding variable and define it in a tag

Maybe you are looking for