Reference to child element

How can we reference to an element which is added dynamically on runtime?
Example code:
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx" applicationComplete="init(event)">
<fx:Script>
<![CDATA[
    import mx.events.FlexEvent; 
    protected function init(event:FlexEvent):void {
        trace(button1.label); 
        var newbtn:Button = new Button();
        newbtn.label = "New Button";
        newbtn.id = "button3";
        newbtn.name = "button3"; 
        mygroup.addElement(newbtn); 
        trace(this["button3"].label);
]]>
</fx:Script>
<s:HGroup id="mygroup">
    <s:Button id="button1" label="Button 1" />
    <s:Button id="button2" label="Button 2" />
</s:HGroup>
</s:WindowedApplication>
When I try to run above code, it dispatch error
Error #1069: Property button3 not found on project1 and there is no default value.
So, how can I call to the newly added button?
Thank you.

Yue_Hong wrote:
Tried. Not working.
It wouldn't . "button3" is a child of the group.
Try myGroup.getChildByName("button3");

Similar Messages

  • Unable to process SOAP Header child element 'wsse:Security' with 'mustUnder

    Hello everyone.
    In have created project in Jdeveloper. In this one i have one external reference for Siebel Service.
    At composite, for external reference service(Siebel Service) i have added a security policy i.e. *"oracle_wss_username_token_client_policy"*.
    [Right click on SiebelService->configure WS policies->under security tab i have selected above policy]
    So apart from this i have added property for the policy
    <property name="oracle.webservices.auth.username" type="xs:string"
    many="false" override="may">SADMIN</property>
    <property name="oracle.webservices.auth.password" type="xs:string"
    many="false" override="may">SADMIN</property>
    But its returning following error,
    Unable to process SOAP Header child element 'wsse:Security' with 'mustUnderstand="1"'(SBL-EAI-08000)
    This really pushed back me in development.
    Really i am in need of help. Help me out of this issue.
    Thanks in advance,
    Shridhar

    Unable to process SOAP Header child element 'wsse:Security' with 'mustUnderstand="1"'(SBL-EAI-08000)The problem is at Siebel side. It is not able to understand the security mechanism being used at SOA side. There are two options -
    1. Use the custom policy and assertion at SOA side (please refer to metalink note - 1419373.1)
    2. Write your own custom message handler class and use it at Siebel side to negotiate security gap
    Regards,
    Anuj

  • How get all child elements from XML

    Hi
    I have one xml i tried to parse that xml using dom parser and i need to get some child elements using java
    <Group>
    <NAME>ABC</NAME>
    <Age>24</AgeC>
    ---------some data here......
    <Group1>
    <group1Category>
    <NAME>ABCTest</NAME>
    <age>27</Age>
    ----Some data here
    <group1subcategory>
    <subcategory>
    <NAME>ABCDEF</NAME>
    <age>28</Age>
    my intention was
    get group name (here ABC) i need all other name value from group1category ,group1 subcategory but pblm that
    my xml contains any number of Group nodes...but only i want name contains ABC
    i wriiten code like this
    DocumentBuilderFactory factory = DocumentBuilderFactory
    .newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document document = builder.parse(xmlFile);
    NodeList nodeList = document.getElementsByTagName("*");
    for (int i = 0; i < nodeList.getLength(); i++)
    Element element = (Element) nodeList.item(i);
    what is next step i need to do..please help

    964749 wrote:
    Sorry for inconvenience caused..i only asked if any ideas i not ask any body to spent time for me...
    This is simple code developed using xpath..i not know how i proceed further
    public class Demo {
    public static void main(String[] args) {
    DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
    try {
    DocumentBuilder builder = domFactory.newDocumentBuilder();
    Document dDoc = builder.parse("hello.xml");
    XPath xpath = XPathFactory.newInstance().newXPath();
    javax.xml.xpath.XPathExpression expr = xpath.compile("//Group/NAME");
    Object Name= expr.evaluate(dDoc, XPathConstants.STRING);
    System.out.println(Name);
    } catch (Exception e) {
    e.printStackTrace();
    i need get group name (here ABC) i need all other name value from group1category ,group1 subcategory but pblm that
    ..how i done in XPATH and also do manipulation of remining result...
    i also try with DOM like
    NodeList nodeList = document.getElementsByTagName("GROUP");
    for (int i = 0; i < nodeList.getLength(); i++)
    Element element = (Element) nodeList.item(i);
    if (element.getNodeName().matches("ECUC-MODULE-DEF"))
    String str=((Element) nodeList.item(i)).getElementsByTagName("NAME").item(0).getFirstChild().getNodeValue();
    if(str.equalsIgnoreCase("abc")){
    NodeList children = element.getChildNodes();
    for (int k = 0; k < children.getLength(); k++) {
    Node child = children.item(k);
    System.out.println("children"+children.getLength());
    if (child.getNodeType() != Node.TEXT_NODE) {
    if(child.getNodeName().equalsIgnoreCase("Group1"))
    how iterate for particular ABC name to group1 and subcategoryFew things
    1. Use code tags to format code
    2. Explain the problem statement clearly. Take time to formulate your question. Explain what you expect from your code and what you are getting along with any exceptions that are being thrown

  • How can we get the reference of XML element on frame as soon as frame is created in Document?

    Hi,
    When ever we copy any text/table cells from any frame, and paste it directly on page, A new Frame is created and the pasted text is placed inside that frame.
    Now to capture this frame creation, We have two possible solutions:
    1) Attach Observer on Document 'kDocBoss' on IID_IHIERARCHY_DOCUMENT and it will notify on frame creation in update function.
    2) Notification event on new story creation.
    Now, I need to perform some changes in the newly created table, for example:
    a)  Need to delete XML tags from newly created frame
    b)  Need to perform action on table cells if any in the created frame.
    But the problem is, when the event comes, I can access basic properties of frame like it's name, type etc, but it does not give me the
    XML element on frame or tables in frame until the event is com pleat.
    I know it's quite a specif requirement, but I guess many of you might have faced these kind of challenges, while processing the event.
    Does any one has any idea how I can get the reference of XML element on frame as soon as it is created?

    Hi Kapoor,
    please give also others a chance, and excuse that I get up late on vacation ;-)
    Anyway, I'd keep the story creation responder to recognize the copy, then combine it with an observer on the backing xml story to catch the associated XML element which is created there. Something like below:
    UIDRef xmlStoryRef = Utils<IXMLUtils>()->GetBackingStore(doc);
    InterfacePtr<ISubject> subject ( xmlStoryRef,IID_ISUBJECT );
    subject->AttachObserver(observer,IID_IIDXMLELEMENT,observer->GetAttachIID());

  • No reference found in element, incorrect attachment reference

    Hi All,
    I am getting this error. While invoking a webservice.
    That web service require me to send using SOAP with Attachments .
    the element is declared like this in wsdl
    <xsd:element name="doc" nillable="true" type="xsd:base64Binary"/>
    I am using
    <from expression="bpws:getVariableData('ReadPriceFeed_Read_InputVariable','AmazonEnvelope')"/>
    <to variable="InvokeAmazon_postDocument_InputVariable" part="doc" query="/ns3:doc"/>
    this command to assin data.
    but getting No reference found in element, incorrect attachment reference error.
    Please help me.
    Thanks,
    Varun
    [2006/09/14 19:10:33] "{http://schemas.oracle.com/bpel/extension}remoteFault" has been thrown. less
    <remoteFault>
    <part name="code" >
    <code>Server</code>
    </part>
    <part name="summary" >
    <summary>when invoking endpointAddress 'http://merchant-api-qa.amazon.com:80/gateway/merchant-interface-mime', No reference found in element, incorrect attachment reference</summary>
    </part>
    <part name="detail" >
    <detail>AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server faultSubcode: faultString: No reference found in element, incorrect attachment reference faultActor: faultNode: faultDetail: {WASP_ExceptionNs}ExceptionTypeName:WASP_DeserializationException {WASP_ExceptionNs}ExceptionMessage:No reference found in element, incorrect attachment reference {WASP_ExceptionNs}ExceptionStackTrace: thrown in 'bool WASP_MessageAttachmentResolver::resolve(WASP_XMLTokenizer *, WASP_String *, WASP_String *&amp;, WASP_String *&amp;, WASP_String *&amp;, WASP_String *&amp;, WASP_DeserializationContext *, WASP_ExceptionEnv *)' at serialization/helpers/MessageAttachmentHelpers.cpp:119 caught in 'void WASP_DeserializationContextImpl::deserialize(void *, void (*)(void *, void *), WASP_XMLTokenizer *, WASP_String *, WASP_String *, WASP_String *, WASP_String *, bool, WASP_ExceptionEnv *)' at serialization/DeserializationContextImpl.cpp:573 rethrown in 'void WASP_DeserializationContextImpl::deserialize(void *, void (*)(void *, void *), WASP_XMLTokenizer *, WASP_String *, WASP_String *, WASP_String *, WASP_String *, bool, WASP_ExceptionEnv *)' at serialization/DeserializationContextImpl.cpp:573 caught in 'void MIME::_WASP_MerchantInterfaceInstanceMethods::postDocument(MIME::MerchantInterfaceImpl *, WASP_MessageAttachmentManager *, WASP_DeserializationContext *, WASP_SerializationContext *)' at /opt/brazil-pkg-cache/packages/MerchantGatewayServer/MerchantGatewayServer-1.1.14.8/X86_LINUX_GCC2_GLIBC22/src/waspcServer/merchantInterfaceMIMEImpl.cpp:1161 thrown in 'static void MIME::_WASP_MerchantInterfaceInstanceMethods::_WASP_postDocumentCallback(WASP_CallContext *, void *, WASP_Exception *, WASP_ExceptionEnv *)' at /opt/brazil-pkg-cache/packages/MerchantGatewayServer/MerchantGatewayServer-1.1.14.8/X86_LINUX_GCC2_GLIBC22/src/waspcServer/merchantInterfaceMIMEImpl.cpp:1179 caught in 'void WASP_CallContext::callResponseCallbacks(WASP_Exception *)' at runtime/CallContext.cpp:184 </detail>
    </part>
    </remoteFault>

    Hello,
    have you found any solution for this problem?
    Ich have the very same problem and i can't resolve it the last 3 days an i'am hopeless.
    Many thx.

  • Org.xml.sax.SAXException:SimpleDeserializer encountered a child element..

    Hi All,
    I created a following program using "GetReportDefintion" method provided by BI Publisher Web Services
    package bip_webservices;
    import com.oracle.xmlns.oxp.service.PublicReportService.ItemData;
    import com.oracle.xmlns.oxp.service.PublicReportService.ReportRequest;
    import com.oracle.xmlns.oxp.service.PublicReportService.ReportResponse;
    import com.oracle.xmlns.oxp.service.PublicReportService.ParamNameValue;
    import com.oracle.xmlns.oxp.service.PublicReportService.ReportDefinition;
    import com.oracle.xmlns.oxp.service.PublicReportService.ScheduleRequest;
    import com.oracle.xmlns.oxp.service.PublicReportService.DeliveryRequest;
    import com.oracle.xmlns.oxp.service.PublicReportService.EMailDeliveryOption;
    import  java.io.FileOutputStream;
    import  java.io.OutputStream;
    import java.net.MalformedURLException;
    import java.rmi.RemoteException;
    import  java.util.Calendar;
    import javax.xml.rpc.ServiceException;
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import org.apache.axis.encoding.XMLType;
    import org.apache.axis.encoding.ser.BeanDeserializerFactory;
    import org.apache.axis.encoding.ser.BeanSerializerFactory;
    import  javax.xml.namespace.QName;
    import  javax.xml.rpc.ParameterMode;
    import  java.net.URL;
    public class BIP_GetReportDefinition {
        public static void main(String[] args) throws ServiceException, MalformedURLException, RemoteException{
         try{
            final String bipEndpoint = "http://localhost:9704/xmlpserver/services/PublicReportService?wsdl";
            final String bipNamespace = "http://xmlns.oracle.com/oxp/service/PublicReportService";
            final String xdofile = "/MyReports/SummaryCustomerReport/SummaryCustomerReport.xdo";
            Service service = new Service();
            Call call = (Call) service.createCall();
            call.setTargetEndpointAddress(new URL(bipEndpoint));
           System.out.println("BEGIN TESTING getReportDefinition");
            // register the ReportDefinition class
            QName reportDef = new QName(bipNamespace, "ReportDefinition");
            call.registerTypeMapping(ReportDefinition.class, reportDef,
                            BeanSerializerFactory.class, BeanDeserializerFactory.class);
            // register the ParamNameValue class
            QName nmvals = new QName(bipNamespace, "ParamNameValue");
            call.registerTypeMapping(ParamNameValue.class, nmvals, BeanSerializerFactory.class, BeanDeserializerFactory.class);
            call.setOperationName(new QName(bipNamespace, "getReportDefinition"));
            call.addParameter("reportAbsolutePath", XMLType.XSD_STRING, ParameterMode.IN);
            call.addParameter("userID", XMLType.XSD_STRING, ParameterMode.IN);
            call.addParameter("password", XMLType.XSD_STRING, ParameterMode.IN);
            call.setReturnClass(ReportDefinition.class);
            // issue the request
            ReportDefinition reportDefn = (ReportDefinition) call.invoke(
                new Object[] { xdofile, "Administrator", "Administrator"});
            System.out.println("Report Definition Returns with \n Default Output Format = " + reportDefn.getDefaultOutputFormat());
            ParamNameValue params [] = reportDefn.getReportParameterNameValues();
            if (params != null) {
                for (int i = 0; i < params.length; i++) {
                    System.out.print("Parameter " + params.getName() + ":");
    if (params[i].getValues() != null) {
    for (int j = 0; j < params[i].getValues().length; j++)
    System.out.print(" " + params[i].getValues()[j]);
    } else
    System.out.print(" null");
    System.out.println(" - multiple values? " + params[i].isMultiValuesAllowed());
    System.out.println("END TESTING getReportDefinition");
    }catch(Exception e){
    e.printStackTrace();
    I am getting following exception message. Anyone has any ideas what could be the mistake ?
    SEVERE: Exception:
    org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
            at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:145)
            at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
            at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
            at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
            at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
            at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
            at org.apache.axis.client.Call.invoke(Call.java:2467)
            at org.apache.axis.client.Call.invoke(Call.java:2366)
            at org.apache.axis.client.Call.invoke(Call.java:1812)
            at bip_webservices.BIP_GetReportDefinition.main(BIP_GetReportDefinition.java:67)
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
    faultActor:
    faultNode:
    faultDetail:
            {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
            at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:145)
            at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
            at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
            at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
            at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
            at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
            at org.apache.axis.client.Call.invoke(Call.java:2467)
            at org.apache.axis.client.Call.invoke(Call.java:2366)
            at org.apache.axis.client.Call.invoke(Call.java:1812)
            at bip_webservices.BIP_GetReportDefinition.main(BIP_GetReportDefinition.java:67)
            {http://xml.apache.org/axis/}hostname:mildh0228
    org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
            at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
            at org.apache.axis.client.Call.invoke(Call.java:2470)
            at org.apache.axis.client.Call.invoke(Call.java:2366)
            at org.apache.axis.client.Call.invoke(Call.java:1812)
            at bip_webservices.BIP_GetReportDefinition.main(BIP_GetReportDefinition.java:67)
    Caused by: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
            at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:145)
            at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
            at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
            at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
            at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
            at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
            at org.apache.axis.client.Call.invoke(Call.java:2467)
            ... 3 moreThanks for giving this problem a look.
    -Sookie

    Hi Sookie,
    I found the problem is with couple of child parameters are not registered the deserializer. There're couple of additional classes needs to be registerd.
    // register the TemplateLabelValue class
    QName templateval = new QName(bipNamespace, "TemplateFormatLabelValue");
    Class cls = TemplateFormatLabelValue.class;
    call.registerTypeMapping(cls, templateval, BeanSerializerFactory.class, BeanDeserializerFactory.class);
    // register the TemplateLabelValues class
    QName templatevals = new QName(bipNamespace, "TemplateFormatsLabelValues");
    cls = TemplateFormatsLabelValues.class;
    call.registerTypeMapping(cls, templatevals, BeanSerializerFactory.class, BeanDeserializerFactory.class);
    Could you please give it a try?
    Thanks.
    Yang

  • In Business Rule child elements of Unbounded element are not visible.

    Hi All,
    Jdev version 11.1.1.7.0
    I am facing one issue in Business Rule...
    Scenario: I am creating Approval Service (BPEL) with Human Work flow and Bunises Rule.
    I am assingning participant in HW by using Rule based(Connecting HW and BR).
    Problem here is:
    Shema has "unbounded" element.
    <element name="ExpenseItem" maxOccurs="unbounded">
         <complexType>
          <sequence>
           <element name="ItemID" type="string"/>
           <element name="ItemName" type="string"/>
           <element name="ItemPrpjectID" type="string"/>
           <element name="ItemStatus" type="string"/>
          </sequence>
         </complexType>
        </element>
    Whenever I create Busines rules to configure rules.
    While configuring rules child elements of  ExpenseItem are not visible. But those are neccesary to configure rules.
    If you can help to me resolve would help.
    Is it a bedault behaviour of BR? If so how can i acheive this?
    Thanks,
    Santosh

    Solution found:
    Click on RuleSet which you have created.
    Expand Rule inside it.
    Enable Advanced mode and Tree mode and click OK.
    Select Root as Task and click on insert pattren and create pattren which is based on unbounded element (here its meant as fact)
    Once you create pattren , will be able access elements under unbounded element for Business rule configuration.

  • Unable to set Labelfield for child element  in List

    Hi All,
    Below is code I am trying to execute
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" verticalGap="0" xmlns:local="*" height="500" creationComplete="init()" >
    <mx:Script>
    <![CDATA[
    private var arr:Array = [{ firstName: "Alex", children:{lastName: "Abc"}}] 
    private function init():void{list.dataProvider=arr;
    ]]>
    </mx:Script>
    <mx:List variableRowHeight="true" wordWrap="
    true" id="list" labelField="
    chidren.lastName" /></mx:Application>
    I basically want to access the children.lastName on my List. Please let me know how exactly can I do it.

A: Unable to set Labelfield for child element  in List

labelFunction is the best way to do this. The attached code also shows how to do it with an itemRenderer, though that would not be as efficient.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
  xmlns:mx="http://www.adobe.com/2006/mxml"
  layout="horizontal"
  creationComplete="init()" >
  <mx:Script>
    <![CDATA[
      private var arr:Array = [{ firstName: "Alex", children:{lastName: "Abc"}}]
      private function init():void{
        list1.dataProvider=arr;
        list2.dataProvider=arr;
      private function createLabels(item:Object):String{
        return item.children.lastName;
    ]]>
  </mx:Script>
  <mx:List variableRowHeight="true"
    wordWrap="true" id="list1">
    <mx:itemRenderer>
      <mx:Component>
        <mx:Label text="{data.children.lastName}"/>
      </mx:Component>
    </mx:itemRenderer>
  </mx:List>
  <mx:List variableRowHeight="true"
    wordWrap="true" id="list2"
    labelFunction="createLabels"/>
</mx:Application>
If this post answers your question or helps, please mark it as such. Thanks!
http://www.stardustsystems.com
Adobe Flex Development and Support Services

labelFunction is the best way to do this. The attached code also shows how to do it with an itemRenderer, though that would not be as efficient.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
  xmlns:mx="http://www.adobe.com/2006/mxml"
  layout="horizontal"
  creationComplete="init()" >
  <mx:Script>
    <![CDATA[
      private var arr:Array = [{ firstName: "Alex", children:{lastName: "Abc"}}]
      private function init():void{
        list1.dataProvider=arr;
        list2.dataProvider=arr;
      private function createLabels(item:Object):String{
        return item.children.lastName;
    ]]>
  </mx:Script>
  <mx:List variableRowHeight="true"
    wordWrap="true" id="list1">
    <mx:itemRenderer>
      <mx:Component>
        <mx:Label text="{data.children.lastName}"/>
      </mx:Component>
    </mx:itemRenderer>
  </mx:List>
  <mx:List variableRowHeight="true"
    wordWrap="true" id="list2"
    labelFunction="createLabels"/>
</mx:Application>
If this post answers your question or helps, please mark it as such. Thanks!
http://www.stardustsystems.com
Adobe Flex Development and Support Services

  • Removing xmlns in child element

    Hi,
    I am getting xmlns="" in child , i want to remove the xmlns="" from the child element.
    Ex: Generated XML File-
    <GENERATEFILES xmlns="http://getit.com/generatedFile" >
    <GENERATE xmlns="">
    </GENERATE >
    </GENERATEFILES >
    in the code i have added Namespace to display 'xmlns' in' GENERATEFILES ' element,
    Element root = new Element("GENERATEFILES ");
    Namespace IP_NAMESPACE = Namespace.getNamespace("", "http://getit.com/generatedFile");//added xmlns for GENERATEFILES .
    root.setNamespace(IP_NAMESPACE);
    Element child = new Element("GENERATE ");

    EJP wrote:
    The XML means the same thing with and without the internal namespace declarations.I don't believe that's true. If I'm not mistaken, the GENERATEFILES element is in the "http://getit.com/generatedFile" namespace. And since this namespace is declared to be the default namespace, then the GENERATE element would inherit that namespace unless some other declaration was provided. In the example posted there is another declaration provided on the GENERATE element, namely one which declares that the element is in no namespace.
    If the OP gets his wish of not having that declaration present, that would result in the GENERATE element also being in the "http://getit.com/generatedFile" namespace, which can (as I believe you meant to say) be arranged by creating the GENERATE element in that namespace.
    However the real question for the OP is "What namespace should the GENERATE element be in?" Attempting to control the namespace declarations without understanding them is a bad idea.

  • Child element of target node in message mapping getting suppressed

    Hello All,
                      I am having  mapping where i am trying  to generate the target node based on some condition of the source structure ,this is working fine ,I am able to generate the target node once the condition gets satisfied ,but the problem is one of the  child elements of the same node is not getting populated,its getting suppressed,i have some condition for the same
    I checked  the  queues its showing value as
    SUPPRESS
    Value
    Value ( in grey )
    But still element is not getting generated..
    I have added a condition used at the node function and apart from other condition of element..
    If some body have the solution for the same,please help me out
    Thanks in advance
    Rajesh

    Hi Rajesh,
    The Error is mostly cause of that the node and your child are in same context.
    You got to remember that the parent node creates the context, and then the child element puts the value in it.
    Try putting your child element to a higher context then mapwithdefault for your supress and then removecontext.
    This Issue, you got to work it out with the node functions,
    I had the same kind of issue in my mapping, it was rectified with the help of node functions as mapwithdefault, removecontext.
    Further unless one sees the mapping of your issue it is a bit difficult to imagine it and answer it.
    For more clarifications please give the full hierarchy, and the condition. As of now try with the node functions.
    Thanks
    Ashmi

  • Error parsing envelope: Header child element must be namespace qualified

    Hey all,
    I'm creating a BPEL process that invokes a web service. The web service has an authenticate method that returns a session ID that I attempt to invoke. However, the process fails when trying to parse the response when invoking that operation. I checked the server logs and it's reporting the following: javax.xml.soap.SOAPException: Error parsing envelope: most likely due to an invalid SOAP message.: Header child element 'ID' must be namespace qualified!
    So I invoked the authenticate operation using SOAP UI, since it doesn't parse the response but merely displays it, and here's what was returned (slightly modified):
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
       <soapenv:Header>
          <ID>xxx</ID>
       </soapenv:Header>
       <soapenv:Body>
          <ns1:SessionID xmlns:ns1="http://some-namespace">
             <ns1:ID>xxx</ns1:ID>
          </ns1:SessionID>
       </soapenv:Body>
    </soapenv:Envelope>
    Indeed the ID tag in the header doesn't have a namespace prefix. Looking at the SOAP 1.1 spec it says, “A header entry is identified by its fully qualified element name, which consists of the namespace URI and the local name. All immediate child elements of the SOAP Header element MUST be namespace-qualified.”
    I was told that the code for the web service is frozen and cannot be changed. Are there any ways around this problem? Is it possible for the BPEL process to not parse the SOAP header?
    Thanks,
    Bill

    All,
    I think I might use a HeaderHandler to either strip the offending element from the header all together or modify it so that it's namespace qualified. The problem is, I can't find much documentation on it. The only thing I can find is this: Manipulating XML Data in BPEL section 3.19. It says to implement the HeaderHandler interface but doesn't give the fully qualified name of the interface. I'm guessing it's referring to com.collaxa.cube.ws.HeaderHandler. The invoke method that is defined in the interface is a little different than the one in the documentation. Mine has a signature of public void invoke(CXPartnerLink partnerLink, String operationName, Map payload, List list, Map map2)...what do these parameters represent and what key/value types do the maps have? It also says to register the handler in the bpel.xml deployment descriptor file but I can't find one - is it auto-generated? If so, where is it. If not, how do I generate it? I appreciate any information.
    Thanks,
    Bill

  • Header child element 'WSCorIDSOAPHeader' must be namespace qualified!

    I have two machines. The first machine have an OSB managed server and admin server. The second machine have a SOA managed server, admin server and enterprise manager.
    A service call in OSB is redirect do SOA Server (BPEL process).
    After the route the follow message error show in SOA Server log.
    INFO: FabricProviderServlet.stateChanged SOA Platform is running and accepting requests
    javax.xml.soap.SOAPException: Error parsing envelope: most likely due to an invalid SOAP message.: Header child element 'WSCorIDSOAPHeader' must be namespace qualified!
         at oracle.j2ee.ws.saaj.soap.AbstractSOAPImplementation.createEnvelope(AbstractSOAPImplementation.java:137)
         at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:95)
         at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:64)
         at oracle.j2ee.ws.saaj.soap.MessageImpl.getSOAPBody(MessageImpl.java:1572)
         at oracle.j2ee.ws.common.soap.SoapUtils.getSOAPBodyFirstChildQName(SoapUtils.java:249)
         at oracle.j2ee.ws.server.mgmt.runtime.model.WebServiceOperationModelHelper.getOperationModelFromInputMessage(WebServiceOperationModelHelper.java:139)
         at oracle.j2ee.ws.server.provider.ProviderPort.getOperationModelFromInputMessage(ProviderPort.java:986)
         at oracle.j2ee.ws.server.mgmt.runtime.SuperServerInterceptorPipeline.handleRequest(SuperServerInterceptorPipeline.java:132)
         at oracle.j2ee.ws.server.provider.management.AbstractProviderInterceptorPipeline.executeRequestInterceptorChain(AbstractProviderInterceptorPipeline.java:563)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.executeInterceptorRequestChain(ProviderProcessor.java:921)
         at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:231)
         at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:193)
         at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:459)
         at oracle.integration.platform.blocks.soap.FabricProviderServlet.doPost(FabricProviderServlet.java:507)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused By: javax.xml.soap.SOAPException: Header child element 'WSCorIDSOAPHeader' must be namespace qualified!
         at oracle.j2ee.ws.saaj.soap.HeaderImpl.createChildElement(HeaderImpl.java:213)
         at oracle.j2ee.ws.saaj.soap.ElementImpl.createAndAppendChildElement(ElementImpl.java:827)
         at oracle.j2ee.ws.saaj.soap.StaxHandler.startElement(StaxHandler.java:222)
         at oracle.j2ee.ws.saaj.soap.StaxHandler.staxParse(StaxHandler.java:82)
         at oracle.j2ee.ws.saaj.soap.StaxHandler.staxParse(StaxHandler.java:70)
         at oracle.j2ee.ws.saaj.soap.AbstractSOAPImplementation.getStaXParsedEnvelope(AbstractSOAPImplementation.java:204)
         at oracle.j2ee.ws.saaj.soap.AbstractSOAPImplementation.createEnvelope(AbstractSOAPImplementation.java:58)
         at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:95)
         at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:64)
         at oracle.j2ee.ws.saaj.soap.MessageImpl.getSOAPBody(MessageImpl.java:1572)
         at oracle.j2ee.ws.common.soap.SoapUtils.getSOAPBodyFirstChildQName(SoapUtils.java:249)
         at oracle.j2ee.ws.server.mgmt.runtime.model.WebServiceOperationModelHelper.getOperationModelFromInputMessage(WebServiceOperationModelHelper.java:139)
         at oracle.j2ee.ws.server.provider.ProviderPort.getOperationModelFromInputMessage(ProviderPort.java:986)
         at oracle.j2ee.ws.server.mgmt.runtime.SuperServerInterceptorPipeline.handleRequest(SuperServerInterceptorPipeline.java:132)
         at oracle.j2ee.ws.server.provider.management.AbstractProviderInterceptorPipeline.executeRequestInterceptorChain(AbstractProviderInterceptorPipeline.java:563)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.executeInterceptorRequestChain(ProviderProcessor.java:921)
         at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:231)
         at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:193)
         at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:459)
         at oracle.integration.platform.blocks.soap.FabricProviderServlet.doPost(FabricProviderServlet.java:507)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    >
    What is WSCorIDSOAPHeader ???

    Remove Introscope agend configuration temporarily from yours managed servers and try call the service.
    This is the cause of your problem.
    Contact your Introscope Administration and task about the problem of Introscope + OSB + BPEL (SOA Server).
    Workaround:
    Remove Introscope agend configuration temporarily from yours managed servers and try call the service.

  • XML element,if not including any attributes and/or child elements then

    XML element in SQLX,if not including any attributes and/or child elements then the tag should not appear, how to achive this?
    ex:Consider for <enumeration> tag where it is having some value.
    <attribute>
    <name>Ethernet Access</name>
    <enumeration>
    <StringValue>Bandwidth</StringValue>
    </enumeration>
    </attribute>
    When <enumeration> tag is not have any Value in this, then output should be as follows.
    <attribute>
    <name>Ethernet Access</name>
    </attribute>
    But what i am getting is
    <attribute>
    <name>Ethernet Access</name>
    </enumeration>
    </attribute>
    Please suggest me the solution for this.
    I tried , but when xmlelement() is not having data it will display empty tag ie </enumeration>, If xmlforest() are null it wont show tag, But i have to use xmlelement only. how can that be achived using xmlelement .

    Use a SQL case - when - else end construct to only execute the xmlelement if data is present. The SQL/XML standard is very clear, xmlElement will generate an empty element if no data is present. xmlforest will not.

  • SimpleDeserializer encountered a child element..webservice error

    when I invoke a webservice using Oracle stored procedure,I'm getting the fault response below :
    HTTP response status code: 500
    HTTP response reason phrase: Internal Server Error
    <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server.userException</faultcode><faultstring>org.xml.sax.SAXException: SimpleDeserializer encountered a child element,
    which is NOT expected, in something it was trying to deserialize.</faultstring><detail><ns1:hostname
    xmlns:ns1="http://xml.apache.org/axis/">suznt266.qintra.com</ns1:hostname></detail></soapenv:Fault>
    </soapenv:Body></soapenv:Envelope>
    Any ideas about the cause and resolution?..
    Thanks in advance!!!!
    Regards,
    Bhagat

    If you posted the whole WSDL file, it would be more helpful.
    I suppose your WSDL uses rpc/encoding. Both operations in your WSDL expects only one parameter of xsd:float. Well your client code passed an array float(new Object[] {new Float(3)}).
    This should have caused the exception.

  • Order By Clause For Retrieving Child Elements

    Hi All,
    I got a toplink question regarding adding an order by clause for retrieving the child elements in a 1 to many mapping.
    I have an Order with a collection of Order Events. ( one to many mapping). The OrderEvent model is the super class of all events and it is abstract. The mapping for the order event descriptors has a class hierarchy mapping which uses a table for its super class (i.e OrderEvent abstract class) and different tables for its sub class elements (e.g ShippingEvent, LifeCycleEvent etc which are concrete classes).
    If I add an order by clause to order the event by a spuerClassProperty in the super class descriptor, it gets ignored and the ordering is done by the alphabetic order of the indicator field values.
    I also noticed that if there is more than one sub class instance for a specific class indicator value, the ordering by is observed.
    I got around it with a Comparator, but just want to know if it could be possible to achieve this with toplink.
    Regards.

    Does the Order By appear on the SQL that get issued? TopLink only does ordering on the database, and not in memory. This means that subclass queries will be ordered per type, on not as one big list.
    A Comparator is a good solution.

  • Maybe you are looking for

    • How can I use ms components in a computer without the setup of ms?

      I writed a program with the use of the ms components in computer which set up the ms, but now when i generate the exe , and i want to use it in a computer without the ms , how could i do ?? thanks !

    • How to determine worklfow container element  for BUS2031?

      Hai, I am new to W/F. I would like to know how to detemine workflow container element  for Customer Quotation generated(BUS2031)- [event] created.ie based on what? Example :&Jquotation&,&JtransactionCode& etc..... any screen shot docu for binding/imp

    • Paper Size definition

      Post Author: JULIO.FAZENDEIRO CA Forum: Older Products Hi, I'm designing a report in CR 8,5 to work in a Epson TM-U210 In CR i've got to define paper height size, but i don't know the final height. If I put the size height like an A4 the sales receip

    • How I can return an ipad to his owner?

      I found a locked ipad with icloud, but i don't know how to contact his owner. How I can return an ipad to his owner?

    • How do i import 480x360 ipad video into fce?

      I'm trying to import video from my ipad into fce. Is there a way to set up my sequence with 480x360 parameters? I'd rather not have to render it when bringing it in. Thanks, Bob