SAPUI - XML View - complex type information

Hi,
I have some issues to express my type information in XML views.
The JS view would look like:
new sap.m.Text({
     text: {
          path:"/number",
          type: new sap.ui.model.type.Integer({groupingEnabled: true, groupingSeparator: '.'})
My current XML view looks like this:
<Text text="{path:'/number', type:'sap.ui.model.type.Integer', constraints:{groupingEnabled: true, groupingSeparator: '.'}}" />
or
<Text text="{path:'/number', type:'sap.ui.model.type.Integer({groupingEnabled: true, groupingSeparator: '.'})'}" />
or several other ideas, e.g. escpaing of the additional '.
But nothing worked. And I could not find any documentation of how it might work.
The diagnostic tool translates JS to XML, yes, but it ignores the complicated case. :-(
I could use a formatter to group myself, but there are several cases, where I need such complicated XML views.
E.g. if I want to use multiply paths as an array.
In my index.html I added data-sap-ui-xx-bindingSyntax="complex".
Hope you can help me out.
Thanks and bests
-Ben

Hi Ben,
          This should work
<!DOCTYPE html>
<html><head>
  <meta http-equiv='X-UA-Compatible' content='IE=edge' />
  <meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>
  <title>Mobile App with XML View with JSON Data</title>
<script id='sap-ui-bootstrap' type='text/javascript'
   src='/sapui5-internal/resources/sap-ui-core.js'
   data-sap-ui-theme='sap_bluecrystal'
   data-sap-ui-libs='sap.m'
   data-sap-ui-xx-bindingSyntax='complex'></script>
  <script id="myXml" type="text/xmldata">
   <mvc:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" controllerName="myController" displayBlock="true">
   <App>
  <Page title="Hello">
  <Text text="{path:'/1/r', type:'sap.ui.model.type.Integer', formatOptions:{groupingEnabled: true , groupingSeperator : '.'}}" />
  <Button text="{/1/name}" press= "doSomething"/>
  </Page>
   </App>
   </mvc:View>
  </script>
<script>
  sap.ui.controller("myController", {
  onInit: function() {
  var model = new sap.ui.model.json.JSONModel();
  model.setData([
  {lastName: "Dente", name: "Al", r  : 1232323.221212,checked: true, linkText: "www.sap.com", href: "http://www.sap.com", rating: 4},
  {lastName: "Friese", name: "Andy", r  : 111222.221212, checked: true, linkText: "www.spiegel.de", href: "http://www.spiegel.de", rating: 2},
  {lastName: "Mann", name: "Anita",  r  : 1.221212,checked: false, linkText: "www.kicker.de", href: "http://www.kicker.de", rating: 3}
  this.getView().setModel(model);
  doSomething: function() {
  alert("Hello World!");
  sap.ui.view({ viewContent: jQuery('#myXml').html(), type:sap.ui.core.mvc.ViewType.XML }).placeAt("content")
</script>
</head>
   <body class='sapUiBody'>
   <div id='content'></div>
</body>
</html>
Thank you.
Regards,
               Pruthvi.

Similar Messages

  • Transforming XML into complex type in ADF/Java

    Hi all,
    Maybe a simple question for you all - maybe too simple for some of you - but not for me as a Java newbie. So I'd appreciate any help.
    I have used a WebService Proxy and created a new Pojo in order to create a Data Control. The WS proxy works quite good and I can get this XML response as expected.
    <ns0:kunden xmlns:ns0="http://www.oracle.com/hbv">
    <ns0:kunde>
    <ns0:Kundennummer>0000000047</ns0:Kundennummer>
    <ns0:Name>Laue</ns0:Name>
    <ns0:Vorname>Ingo</ns0:Vorname>
    <ns0:Straße>Kühnehöfe</ns0:Straße>
    <ns0:Hausnr/>
    <ns0:PLZ>22761</ns0:PLZ>
    <ns0:Ort>Hamburg</ns0:Ort>
    <ns0:Telefon>040/89091-456</ns0:Telefon>
    </ns0:kunde>
    <ns0:kunde>
    <ns0:Kundennummer>0000000048</ns0:Kundennummer>
    <ns0:Name>Brüning</ns0:Name>
    <ns0:Vorname>Arne</ns0:Vorname>
    <ns0:Straße>Kühnehöfe</ns0:Straße>
    <ns0:Hausnr/>
    <ns0:PLZ>22761</ns0:PLZ>
    <ns0:Ort>Hamburg</ns0:Ort>
    <ns0:Telefon>040/89091-220</ns0:Telefon>
    </ns0:kunde>
    </ns0:kunden>
    Now I want to transfer the XML into a complex type in Java, for instance
    ArrayList<MyKunde> retKundenliste = new ArrayList<MyKunde>();
    The type MyKunde is defined with all needed attributes and the corresponding getter/setter methods. My object getting the XML response from the WS is kundenliste of type javax.xml.soap.SOAPElement (defined by the WS proxy) . What method do I have to use to get all elements from the XML structure transformed into an array of MyKunde?
    I can imagine that this task is a standard but as I said I'm new in Java programming.
    Many thanks for your help
    Detlef

    I'm not sure but the Wizard should have created accessors for the char_list Adobe in the generated AbcXyzObj.java class. Check this class for the attributes and their getters and setters.
    Timo

  • Parsing xml for complex type using sax

    I have an xsd of below type:
    <xs:complexType name="itemInfo">
        <xs:sequence>
          <xs:element name="displayLineNumber" type="xs:string" minOccurs="0"/>
          <xs:element name="lineNumber" type="xs:integer" minOccurs="0"/>
          <xs:element name="parentLineNumber" type="xs:integer" minOccurs="0"/>
       <xs:element name="service" type="serviceInfo" minOccurs="0" maxOccurs="unbounded"/>
       </xs:sequence>
    </xs:complexType>
    <xs:complexType name="serviceInfo">
        <xs:sequence>
          <xs:element name="displayLineNumber" type="xs:string" minOccurs="0"/>
          <xs:element name="lineNumber" type="xs:integer" minOccurs="0"/>
          <xs:element name="serviceName" type="xs:string" minOccurs="0"/>
          <xs:element name="serviceDescription" type="xs:string" minOccurs="0"/>
          <xs:element name="subscriptionBand" type="subscriptionBandInfo" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="subscriptionBandInfo">
        <xs:sequence>
          <xs:element name="min" type="xs:long"/>
          <xs:element name="max" type="xs:long"/>
          <xs:element name="duration" type="xs:string" minOccurs="0"/>
          <xs:element name="price" type="xs:decimal"/>
        </xs:sequence>
      </xs:complexType>
    I have written a handler and able to handle simple type but how I can handle serviceInfo and subscriptionBandInfo as itemInfo is my root element.
    My handler class is:
    public class ProductHandler
      extends DefaultHandler
      //List to hold ProductInfo object
      private List<ProductInfo> productList = null;
      private ProductInfo product = null;
      public List<ProductInfo> getProductList()
        return productList;
      boolean bDisplayLineNumber = false;
      boolean bLineNumber = false;
      boolean bParentLineNumber = false;
      @Override
      public void startElement(String uri, String localName, String qName, Attributes attributes)
        throws SAXException
        if (qName.equalsIgnoreCase("item"))
        { //create a new ProductInfo and put it in Map
          //initialize ProductInfo object and set id attribute
          product = new ProductInfo();
          //initialize list
          if (productList == null)
            productList = new ArrayList<ProductInfo>();
        else if (qName.equalsIgnoreCase("name"))
          //set boolean values for fields, will be used in setting ProductInfo variables
          bName = true;
        else if (qName.equalsIgnoreCase("displayLineNumber"))
          bDisplayLineNumber = true;
        else if (qName.equalsIgnoreCase("lineNumber"))
          bLineNumber = true;
        else if (qName.equalsIgnoreCase("parentLineNumber"))
          bParentNumber = true;
      @Override
      public void endElement(String uri, String localName, String qName)
        throws SAXException
        if (qName.equalsIgnoreCase("item"))
          //add ProductInfo object to list
          productList.add(product);
      @Override
      public void characters(char ch[], int start, int length)
        throws SAXException
       if (bDisplayLineNumber)
          product.setDisplayLineNumber(Integer.parseInt(new String(ch, start, length)));
          bDisplayLineNumber = false;
       else if (bLineNumber)
          product.setLineNumber(Integer.parseInt(new String(ch, start, length)));
          bLineNumber = false;
        else if (bParentNumber)
          product.setParentNumber(Integer.parseInt(new String(ch, start, length)));
          bParentNumber = false;
      @Override
      public void endElement(String uri, String localName, String qName)
        throws SAXException
        if (qName.equalsIgnoreCase("item"))
          //add ProductInfo object to list
          productList.add(product);
    My ProductInfo class is:
    import com.vpc.schema.ServiceInfo;
    import java.util.ArrayList;
    import java.util.List;
    public class ProductInfo
      private String category, family, subGroup, size, productType, availability;
      private String displayLineNumber;
      private int lineNumber;
      private int parentNumber;
    private List<ServiceInfo> serviceInfo;
      public int getLineNumber()
        return lineNumber;
      public int getParentNumber()
        return parentNumber;
      public List<ServiceInfo> getServiceInfo()
        if (serviceInfo == null)
          serviceInfo = new ArrayList<ServiceInfo>();
        return serviceInfo;
      public void setServiceInfo(List<ServiceInfo> serviceInfo)
        this.serviceInfo = serviceInfo;
    I am able to do parsing for my simple type but when a complex type comes I am not able to do it. So please suggest how I can add complex type

    I suppose the posting of xsd is to show the structure of the xml...
    In any case, I can suggest a couple of things to do for the purpose.
    [1] If you still follow the same line of reasoning using some boolean like bDisplayLineNumber etc to identify the position of the parser traversing the document, you can complete the logic adding bItem (which you did not need under simplified consideration) and bService and bSubscriptionBand to identify at the parent or the grandparent in the case of the "complexType" serviceInfo and even the great-grand-parent in the case of arriving to the complexType subscriptionBandInfo...
    [1.1] With those boolean value, you determine bDisplayLineNumber etc under item directly, and then as well say bDisplayLineNumber_Service under the service etc and then bMin_SubscriptionBand etc under subscriptionBand etc. You just expand the number of those variables to trigger the setting of those fields in the object product, service in the serviceList and subscriptionBand in the subscriptionBandList etc etc.
    [1.2] All the reset of those booleans should be done in the endElement() method rather than in characters() method. That is logically more satisfactory and has a bearing in case there is a mixed content type.
    [1.3] Then when arriving at startElement of service, you make sure you initiate the serviceList, same for subscriptionBand the subscriptionList...
    [1.4] Then when arriving at endElement of service, you use setServiceInfo() setter to pass the serviceList to product and the same when arriving at endElement of serviceBand, you use setSubscriptionBand() setter to pass the subscriptionBand to service.
    ... and then basically that's is it, somewhat laborious and repetitive but the logical layout is clear. (As a side-note, you shouldn't use equalsIgnoreCase(), why should you? xml is case sensitive.)
    [2] Actually, I would suggest a much neater approach, especially when you probe many more levels of complexType. It would be even appear cleaner when you have two levels of depth already...
    [2.1] You maintain a Stack (or an implementation class of Deque, but Stack is largely sufficient here) of element name to guide the parser identifying its whereabout. By such doing, you get ride of all those bXXX's.
    This is a rewrite of the content handler using this approach and I only write the code of capturing service. Adding serviceBand is a matter of repetition of how it is done on service. And it is already clear it appears a lot neater as far as I'm concerned.
    public class ProductHandler extends DefaultHandler {
    Stack<String> tagstack=new Stack<String>();
    private List<ProductInfo> productList = null;
    private ProductInfo product = null;
    private List<ServiceInfo> serviceList=null;
    private ServiceInfo service=null;
    public List<ProductInfo> getProductList() {
      return productList;
    public List<ServiceInfo> getServiceList() {
      return serviceList;
    @Override
    public void startElement(String uri, String localName, String qName, Attributes attributes) {
      if (qName.equals("item")) {
       product = new ProductInfo();
       //initialize list
       if (productList == null) {
        productList = new ArrayList<ProductInfo>();
      } else if (qName.equals("service") && tagstack.peek().equals("item")) {
       service=new ServiceInfo();
       if (serviceList==null) {
        serviceList=new ArrayList<ServiceInfo>();
      tagstack.push(qName);
    @Override
    public void endElement(String uri, String localName, String qName) {
      if (tagstack.peek().equals("item")) {
       //add ProductInfo object to list
       productList.add(product);
      } else if (tagstack.peek().equals("service") && tagstack.search("item")==2) {
       serviceList.add(service);
       product.setServiceInfo(serviceList);
      tagstack.pop();
    @Override
    public void characters(char ch[], int start, int length) throws SAXException {
      String currentName=tagstack.peek();
      int itemPos=tagstack.search("item");
      int servicePos=tagstack.search("service");
      if (currentName.equals("name") && itemPos==2)  {
       product.setName(new String(ch, start, length));
      } else if (currentName.equals("displayLineNumber") && itemPos==2) {
       product.setDisplayLineNumber(Integer.parseInt(new String(ch, start, length)));
      } else if (currentName.equals("lineNumber") && itemPos==2) {
       product.setLineNumber(Integer.parseInt(new String(ch, start, length)));
      } else if (currentName.equals("parentLineNumber") && itemPos==2) {
       product.setParentLineNumber(Integer.parseInt(new String(ch, start, length)));
      } else if (currentName.equals("displayLineNumber") && servicePos==2 && itemPos==3) {
       service.setDisplayLineNumber(Integer.parseInt(new String(ch, start, length)));
      } else if (currentName.equals("lineNumber") && servicePos==2 && itemPos==3) {
       service.setLineNumber(Integer.parseInt(new String(ch, start, length)));
      } else if (currentName.equals("serviceName") && servicePos==2 && itemPos==3) {
       service.setServiceName(new String(ch, start, length));
      } else if (currentName.equals("serviceDescription") && servicePos==2 && itemPos==3) {
       service.setServiceDescription(new String(ch, start, length));

  • How to pass values to XML complex type of a Webservice using PL/SQL

    HI,
    I need to call a web service from PL/SQL that has an complex type element. That complex type element has 4 child elements each of integer type.
    I want to pass values for this complex type using SOAP_API.add_parameter but I can't understand how to pass the values.
    <xsd:element name="getBestFit">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element maxOccurs="1" minOccurs="1" name="circleId" type="xsd:string"/>
                        <xsd:element maxOccurs="1" minOccurs="1" name="usage" type="Q1:UsageInfoType"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
    <complexType name="UsageInfoType">
         <sequence>
              <element maxOccurs="1" minOccurs="1" name="a1" type="int"/>
              <element maxOccurs="1" minOccurs="1" name="a2" type="int"/>
              <element maxOccurs="1" minOccurs="1" name="a3" type="int"/>
              <element maxOccurs="1" minOccurs="1" name="a4" type="int"/>
         </sequence>
    </complexType>
    Please help me in getting a solution here.
    Thanks in advance.

    Have you tried doing a google search on "SOAP_API.add_parameter" to see what comes back? I see a lot of hits come back so hopefully one of those will help you. I've never used soap_api as I used utl_http to make WS calls. This required me to build the SOAP message (aka XML of a specific nature) by hand and then pass it to the WS using utl_http. How this approach is done via SOAP_API, I can't say.

  • Serializing derived complex types from XML

    Hi all,
    I am having a hard time serializing derived complex types
    from XML. I used the "Import Web Service" wizard to create proxy
    classes for the SOAP described elements.
    The XML that I am consuming comes from a .NET backed and
    include typing statements like this:
    <AssetType xsi:type="CarAssetType" />
    This element is always serialized as an instance of AssetType
    not an instance of CarAssetType.
    Does flex not support derived typing during XML
    serialization?
    Thanks for the help,
    Derek Basch

    You may need consume wsdl file or web service using the following steps to generate the corrected schemas:
     Right click to you BizTalk project
    Add->Add Generated Items..
    Consume WCF Service
    Select Metadata Exchange
    Add wsdl path
    When you see answers and helpful posts, please click Vote As HelpfulPropose As Answer, and/or Mark As Answer

  • Wrapping xml-fragment into AnyDocument looses runtime type information

    I would like to store a fragment of xml in a database. However, to stay XML compatible,
    I don't want to have <xml-fragment> tags. To avoid this, I attempt to "wrap"
    the xml-fragment inside of an AnyDocument using the following code:
    private static AnyDocument wrap(final XmlObject o) {
    final AnyDocument anyDocument = AnyDocument.Factory.newInstance();
    final AnyDocument.Any any = anyDocument.addNewAny();
    any.set(o);
    return anyDocument;
    The problem, is that somehow my runtime type is getting lost after the wrapping
    occurs.
    Here is how the data looks BEFORE wrap (o.save()):
    <?xml version="1.0" encoding="UTF-8"?>
    <xml-fragment xsi:type="loc:AddTermRequestT" xmlns:loc="http://www.overture.com/service/common/local"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:dis="http://www.overture.com/service/display">
    <loc:accountId>1123223ZZZ</loc:accountId>
    <loc:term>dog</loc:term>
    <loc:price>0.55</loc:price>
    </xml-fragment>
    Note that in the above XML the runtime type is set as: xsi:type="loc:AddTermRequestT
    Here is how the data looks after I attempt to wrap it with AnyDocument:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:any xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:dis="http://www.overture.com/service/display"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:loc="http://www.overture.com/service/common/local">
    <loc:accountId>1123223ZZZ</loc:accountId>
    <loc:term>dog</loc:term>
    <loc:price>0.55</loc:price>
    </xsd:any>
    The runtime type is gone and it's not clear how to parse the new XML.
    Am I doing something wrong? Why does the runtime type go away? Is this the correct
    way to "warp" some fragment with a valid document.
    Again, the intent here is to store something to the database that a different
    tool can understand later.
    Thanks.
    -AP_

    Use:
    xmlOptions.setSaveOuter();

  • Dynamic binding of items in sap.m.Table using XML views

    Dear SAPUI5 guru's,
    Let's start by saying I'm an ABAP developer who's exploring SAPUI5, so I'm still a rookie at the time of writing. I challenged myself by developing a simple UI5 app that shows information about my colleagues like name, a pic, address data and their skills. The app uses the sap.m library and most of the views are XML based which I prefer.
    The data is stored on an ABAP system and exposed via a gateway service. This service has 2 entities: Employee and Skill. Each employee can have 0..n skills and association/navigation between these 2 entities is set up correctly in the service. The data of this service is fetched from within the app using a sap.ui.model.odata.ODataModel model.
    The app uses the splitApp control which shows the list of employees on the left side (master view). If a user taps an employee, the corresponding details of the employee entity are shown on the right (detail view).
    Up till here everything is fine but I've been struggling with my latest requirement which is: show the skills of the selected employee in a separate XML view when the user performs an action (for the time being, I just created a button on the detail view to perform the action). After some hours I actually got it working but I doubt if my solution is the right way to go. And that's why I'm asking for your opinion here.
    Let's explain how I got things working. First of all I created a new XML view called 'Skills'. The content on this view is currently just a Table with 2 columns:
    <core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"
      controllerName="com.pyramid.Skills" xmlns:html="http://www.w3.org/1999/xhtml">
      <Page title="Skills"
           showNavButton="true"
           navButtonPress="handleNavButtonPress">
      <content>
      <Table
       id="skillsTable">
      <columns>
      <Column>
      <Label text="Name"/>
      </Column>
      <Column>
      <Label text="Rating"/>
      </Column>
      </columns>
      </Table>
      </content>
      </Page>
    </core:View>
    The button on the Detail view calls function showSkills:
    showSkills: function(evt) {
      var context = evt.getSource().getBindingContext();
      this.nav.to("Skills", context);
      var skillsController = this.nav.getView().app.getPage("Skills").getController();
      skillsController.updateTableBinding();
    Within 'this.nav.to("Skills", context);' I add the Skills view to the splitApp and set its bindingContext to the current binding context (e.g. "EmployeeSet('000001')"). Then I call function updateTableBinding in the controller of the Skills view which dynamically binds the items in the table based on the selected employee. So, when the ID of the selected employee is '000001', the path of the table's item binding should be "/EmployeeSet('000001')/Skills"
    updateTableBinding: function(){
      var oTemplate = new sap.m.ColumnListItem(
      {cells: [
              new sap.m.Text({text : "{Name}"}),
              new sap.m.Text({text : "{Rating}"})
      var oView = this.getView();
      var oTable = oView.byId("skillsTable");
      var oContext = oView.getBindingContext();
      var path = oContext.sPath + "/Skills";
      oTable.bindItems(path, oTemplate);
    Allthough it works fine, this is where I have my first doubt. Is this the correct way to bind the items? I tried to change the context that is passed to this.nav.to and wanted it to 'drill-down' one level, from Employee to Skills, but I couldn't manage to do that.
    I also tried to bind using the items aggregation of the table within the XML declaration (<Table id="skillsTable" items="{/EmployeeSet('000001')/Skills}">). This works fine if I hard-code the employee ID but off course this ID needs to be dynamic.
    Any better suggestions?
    The second doubt is about the template parameter passed to the bindItems method. This template is declared in the controller via javascript. But I'm using XML views! So why should I declare any content in javascript?? I tried to declare the template in the XML view itself by adding an items tag with a ColumnListItem that has an ID:
                    <items>
                        <ColumnListItem
                        id="defaultItem">
                        <cells>
                            <Text text="{Name}"/>
                            </cells>
                            <cells>
                            <Text text="{Rating}"/>
                            </cells>
                        </ColumnListItem>
                    </items>
    Then, in the updateTableBinding function, I fetched this control (by ID), and passed it as the template parameter to the bindItems method. In this case the table shows a few lines but they don't contain any data and their height is only like 1 mm! Does anyone know where this strange behaviour comes from or what I'm doing wrong?
    I hope I explained my doubts clearly enough. If not, let me know which additional info is required.
    Looking forward to your opinions/suggestions,
    Rudy Clement.

    Hi everybody,
    I found this post by searching for a dynamic binding for well acutally not the same situation but it's similar to it. I'm trying to do the following. I'm having a list where you can create an order. On the bottom of the page you'll find a button with which you're able to create another order. All the fields are set to the same data binding ... so the problem is if you've filled in the values for the first order and you'll press the button you'll get the same values in the second order. Is it possible to generate a dynamic binding?
    I'm going to post you a short code of what I'm meaning:
    <Input type="Text" value="{path: 'MyModel>/Order/0/Field1'}" id="field1">
         <layoutData>
                    <l:GridData span="L11 M7 S3"></l:GridData>
               </layoutData>
    </Input>
    As you can see I need to set the point of "0" to a dynamic number. Is there any possibility to reach this???
    Hope you can help
    Greetings
    Stef

  • Web Service + Complex Type + Java Studio Creator

    Hy all!!
    I am using Ubuntu 7.04 + Java Studio Creator 2 and i'm trying to use a webservice.
    This webservice uses a Complex Type and was made in PHP.
    I guarantee that this webservice is working with complex type because i've tested using a PHP client.
    I have already worked with others webservices in Java Studio Creator using simple types!
    So I went to Add Web Service, put the wsdl link, Get Web Service Information and then Test Method that uses Complex Type.
    Then I gave a input value and when I submit i got this error:
    InvocationTargetException com.sun.rave.websvc.ui.ReflectionHelper.callMethodWithParams(ReflectionHelper.java:459) com.sun.rave.websvc.ui.TestWebServiceMethodDlg$MethodTask.run(TestWebServiceMethodDlg.java:1031) java.lang.Thread.run(Thread.java:595) null sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) com.sun.rave.websvc.ui.ReflectionHelper.callMethodWithParams(ReflectionHelper.java:450) com.sun.rave.websvc.ui.TestWebServiceMethodDlg$MethodTask.run(TestWebServiceMethodDlg.java:1031) java.lang.Thread.run(Thread.java:595) Runtime exception; nested exception is:
    [failed to localize] nestedDeserializationError([failed to localize] xmlreader.unexpectedState(END, START: nome))
    com.sun.xml.rpc.client.StreamingSender._handleRuntimeExceptionInSend(StreamingSender.java:318) com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:300) webservice.Grs_PortType_Stub.buscarCompleto(Grs_PortType_Stub.java:122) webservice.grs.grsClient.buscarCompleto(grsClient.java:36) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) com.sun.rave.websvc.ui.ReflectionHelper.callMethodWithParams(ReflectionHelper.java:450) com.sun.rave.websvc.ui.TestWebServiceMethodDlg$MethodTask.run(TestWebServiceMethodDlg.java:1031) java.lang.Thread.run(Thread.java:595)
    [failed to localize] nestedDeserializationError([failed to localize] xmlreader.unexpectedState(END, START: nome))
    com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:233) com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:155) webservice.Grs_buscarCompleto_ResponseStruct2_SOAPSerializer.doDeserialize(Grs_buscarCompleto_ResponseStruct2_SOAPSerializer.java:43) com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:192) com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:155) webservice.Grs_PortType_Stub._deserialize_buscarCompleto(Grs_PortType_Stub.java:186) webservice.Grs_PortType_Stub._readFirstBodyElement(Grs_PortType_Stub.java:160) com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:215) webservice.Grs_PortType_Stub.buscarCompleto(Grs_PortType_Stub.java:122) webservice.grs.grsClient.buscarCompleto(grsClient.java:36) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) com.sun.rave.websvc.ui.ReflectionHelper.callMethodWithParams(ReflectionHelper.java:450) com.sun.rave.websvc.ui.TestWebServiceMethodDlg$MethodTask.run(TestWebServiceMethodDlg.java:1031) java.lang.Thread.run(Thread.java:595)
    Any help would be appreciated!
    Thanks a lot!
    Mario Mol

    Have you seen this?
    http://developers.sun.com/jscreator/reference/techart/2/create_consume_web_services.html
    Also have you tried the latest and coolest IDE Netbeans 6?
    It includes all the features of Creator plus lots more.
    Thanks
    K

  • Definition class name missing in XML file of type taskFlow

    Hi all,
    I am trying to invoke a bounded taskflow from a region on a jspx page.
    My jspx page has: *<af:region value="#{bindings.citySearchTF.regionModel}" id="r1" />*
    Its page def file has :
    *<taskFlow id="citySearchTF" taskFlowId="/WEB-INF/tfs/bounded/cities/city-search-tf.xml#city-search-tf"*
    xmlns="http://xmlns.oracle.com/adf/controller/binding"/>
    My taskFlow file is :
    *<?xml version="1.0" encoding="windows-1252" ?>*
    *<adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">*
    *<task-flow-definition id="city-search-tf">*
    *<default-activity>search-city.jsff</default-activity>*
    *<data-control-scope>*
    *<shared/>*
    *</data-control-scope>*
    *<view id="search-city.jsff">*
    *<page>/view/bounded/city/search-city.jsff</page>*
    *</view>*
    *<use-page-fragments/>*
    *</task-flow-definition>*
    *</adfc-config>*
    Now, while running this jspx page, I am getting the following errors:
    On Browser : ADF_FACES-30179:For more information, please see the server's error log for an entry beginning with: The UIViewRoot is null. Fatal exception during PhaseId: RESTORE_VIEW 1.
    On WLS Logs :
    oracle.jbo.PersistenceException: JBO-34000: Definition class name missing in XML file of type taskFlow
         at oracle.adf.model.binding.DCDefBase.createAndLoadFromXML(DCDefBase.java:402)
         at oracle.adf.model.binding.DCBindingContainerDef.loadExecutables(DCBindingContainerDef.java:1482)
         at oracle.adf.model.binding.DCBindingContainerDef.loadChildrenFromXML(DCBindingContainerDef.java:1278)
         at oracle.adf.model.binding.DCDefBase.loadFromXML(DCDefBase.java:325)
         at oracle.adf.model.binding.DCDefBase.createAndLoadFromXML(DCDefBase.java:409)
         at oracle.jbo.uicli.mom.JUMetaObjectManager.createFromXML(JUMetaObjectManager.java:1274)
         at oracle.jbo.mom.PersistableDefObject.createFromXML(PersistableDefObject.java:84)
         at oracle.jbo.mom.DefinitionManager.loadDefObject(DefinitionManager.java:961)
         at oracle.jbo.mom.DefinitionManager.doFindSessionDefObject(DefinitionManager.java:1037)
         at oracle.jbo.mom.DefinitionManager.findSessionDefObject(DefinitionManager.java:705)
         at oracle.adf.model.binding.DCBindingContainerDef.findSessionDefObject(DCBindingContainerDef.java:351)
         at oracle.adf.model.binding.DCBindingContainerDef.findDefObject(DCBindingContainerDef.java:316)
         at oracle.adf.model.binding.DCBindingContainerReference.createBindingContainer(DCBindingContainerReference.java:127)
         at oracle.adf.model.binding.DCBindingContainerReference.getBindingContainer(DCBindingContainerReference.java:95)
         at oracle.adf.model.BindingContext.get(BindingContext.java:1089)
         at oracle.adf.model.BindingContext.findBindingContainer(BindingContext.java:807)
         at oracle.adf.model.BindingContext.findBindingContainerByPath(BindingContext.java:1598)
         at oracle.adfinternal.controller.application.model.UpdateBindingListener.setBindingELVariable(UpdateBindingListener.java:112)
         at oracle.adfinternal.controller.application.model.UpdateBindingListener.beforePhase(UpdateBindingListener.java:61)
         at oracle.adfinternal.controller.lifecycle.ADFLifecycleImpl$PagePhaseListenerWrapper.beforePhase(ADFLifecycleImpl.java:550)
         at oracle.adfinternal.controller.lifecycle.LifecycleImpl.internalDispatchBeforeEvent(LifecycleImpl.java:100)
         at oracle.adfinternal.controller.lifecycle.LifecycleImpl.dispatchBeforePagePhaseEvent(LifecycleImpl.java:147)
         at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$PhaseInvokerImpl.dispatchBeforePagePhaseEvent(ADFPhaseListener.java:119)
         at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.beforePhase(ADFPhaseListener.java:63)
         at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.beforePhase(ADFLifecyclePhaseListener.java:44)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:319)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:204)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
         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:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:122)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         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:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         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:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    There is some issue with PageDef but I am not able to figure it out. Searched a lot on internet but didn't succeed. Thanks in advance.
    Edited by: 965225 on Dec 17, 2012 3:43 AM

    Hi all,
    I am trying to invoke a bounded taskflow from a region on a jspx page.
    My jspx page has: *<af:region value="#{bindings.citySearchTF.regionModel}" id="r1" />*
    Its page def file has :
    *<taskFlow id="citySearchTF" taskFlowId="/WEB-INF/tfs/bounded/cities/city-search-tf.xml#city-search-tf"*
    xmlns="http://xmlns.oracle.com/adf/controller/binding"/>
    My taskFlow file is :
    *<?xml version="1.0" encoding="windows-1252" ?>*
    *<adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">*
    *<task-flow-definition id="city-search-tf">*
    *<default-activity>search-city.jsff</default-activity>*
    *<data-control-scope>*
    *<shared/>*
    *</data-control-scope>*
    *<view id="search-city.jsff">*
    *<page>/view/bounded/city/search-city.jsff</page>*
    *</view>*
    *<use-page-fragments/>*
    *</task-flow-definition>*
    *</adfc-config>*
    Now, while running this jspx page, I am getting the following errors:
    On Browser : ADF_FACES-30179:For more information, please see the server's error log for an entry beginning with: The UIViewRoot is null. Fatal exception during PhaseId: RESTORE_VIEW 1.
    On WLS Logs :
    oracle.jbo.PersistenceException: JBO-34000: Definition class name missing in XML file of type taskFlow
         at oracle.adf.model.binding.DCDefBase.createAndLoadFromXML(DCDefBase.java:402)
         at oracle.adf.model.binding.DCBindingContainerDef.loadExecutables(DCBindingContainerDef.java:1482)
         at oracle.adf.model.binding.DCBindingContainerDef.loadChildrenFromXML(DCBindingContainerDef.java:1278)
         at oracle.adf.model.binding.DCDefBase.loadFromXML(DCDefBase.java:325)
         at oracle.adf.model.binding.DCDefBase.createAndLoadFromXML(DCDefBase.java:409)
         at oracle.jbo.uicli.mom.JUMetaObjectManager.createFromXML(JUMetaObjectManager.java:1274)
         at oracle.jbo.mom.PersistableDefObject.createFromXML(PersistableDefObject.java:84)
         at oracle.jbo.mom.DefinitionManager.loadDefObject(DefinitionManager.java:961)
         at oracle.jbo.mom.DefinitionManager.doFindSessionDefObject(DefinitionManager.java:1037)
         at oracle.jbo.mom.DefinitionManager.findSessionDefObject(DefinitionManager.java:705)
         at oracle.adf.model.binding.DCBindingContainerDef.findSessionDefObject(DCBindingContainerDef.java:351)
         at oracle.adf.model.binding.DCBindingContainerDef.findDefObject(DCBindingContainerDef.java:316)
         at oracle.adf.model.binding.DCBindingContainerReference.createBindingContainer(DCBindingContainerReference.java:127)
         at oracle.adf.model.binding.DCBindingContainerReference.getBindingContainer(DCBindingContainerReference.java:95)
         at oracle.adf.model.BindingContext.get(BindingContext.java:1089)
         at oracle.adf.model.BindingContext.findBindingContainer(BindingContext.java:807)
         at oracle.adf.model.BindingContext.findBindingContainerByPath(BindingContext.java:1598)
         at oracle.adfinternal.controller.application.model.UpdateBindingListener.setBindingELVariable(UpdateBindingListener.java:112)
         at oracle.adfinternal.controller.application.model.UpdateBindingListener.beforePhase(UpdateBindingListener.java:61)
         at oracle.adfinternal.controller.lifecycle.ADFLifecycleImpl$PagePhaseListenerWrapper.beforePhase(ADFLifecycleImpl.java:550)
         at oracle.adfinternal.controller.lifecycle.LifecycleImpl.internalDispatchBeforeEvent(LifecycleImpl.java:100)
         at oracle.adfinternal.controller.lifecycle.LifecycleImpl.dispatchBeforePagePhaseEvent(LifecycleImpl.java:147)
         at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$PhaseInvokerImpl.dispatchBeforePagePhaseEvent(ADFPhaseListener.java:119)
         at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.beforePhase(ADFPhaseListener.java:63)
         at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.beforePhase(ADFLifecyclePhaseListener.java:44)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:319)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:204)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
         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:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:122)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         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:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         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:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    There is some issue with PageDef but I am not able to figure it out. Searched a lot on internet but didn't succeed. Thanks in advance.
    Edited by: 965225 on Dec 17, 2012 3:43 AM

  • Restricting a choice complex type

    Hello Everyone,
    We have this XSD that allows users to register other users on our system with XML requests. These users are known as viewers and they may register a preferred payment type for them.
    <xsd:element name="viewerInfo">
              <xsd:complexType>
                   <xsd:sequence>
                        <!-- viewerPwd should be used if you wish to change the viewers password  -->
                        <xsd:element ref="viewerPwd" minOccurs="0"/>
                        <xsd:element ref="age" minOccurs="0"/>
                        <xsd:element ref="gender" minOccurs="0"/>
                        <xsd:element ref="fullname" minOccurs="0"/>
                        <xsd:element ref="address" minOccurs="0"/>
                        <xsd:element ref="city" minOccurs="0"/>
                        <xsd:element ref="zipCode" minOccurs="0"/>
                        <xsd:element ref="country" minOccurs="0"/>
                        <xsd:element ref="email" minOccurs="0"/>
                        <xsd:element ref="telephoneNumber" minOccurs="0"/>
                        <xsd:element ref="mobilePhoneNumber" minOccurs="0"/>
                        <xsd:element ref="ispServer" minOccurs="0"/>
                        <xsd:element ref="ispUsername" minOccurs="0"/>
                        <xsd:element ref="ispPassword" minOccurs="0"/>
                        <xsd:element ref="parentalControl" minOccurs="0"/>
                        <xsd:element ref="parent" minOccurs="0"/>
                        <xsd:element ref="houseId" minOccurs="0"/>
                        <xsd:element name="payPrefs" type="payMethodType" minOccurs="0"/>
                        <xsd:element name="twalletBalance" type="xsd:double" minOccurs="0"/>
                        <xsd:element name="notificationNumber" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="favouriteEmail" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="favouriteMms" type="xsd:string" minOccurs="0"/>
                        <xsd:element name="favouriteSms" type="xsd:string" minOccurs="0"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>Here is the payMethodType complex type.
    <xsd:element name="payMethod" type="payMethodType"/>
              <xsd:complexType name="payMethodType">
                   <xsd:sequence>
                        <xsd:choice>
                             <xsd:element ref="creditCard"/>
                             <xsd:element ref="prepaid"/>
                             <xsd:element ref="ca"/>
                             <xsd:element ref="phoneBilling"/>
                             <xsd:element ref="viewerPreferred"/>
                        </xsd:choice>
                   </xsd:sequence>
              </xsd:complexType> payMethodType is used for two things:
    1. Registering a viewer
    2. Making a payment request
    payPrefs at the moment allows you to have as a payPref one of the 5 following options . However payMethod is also used for payment requests and message requests. In these cases it makes sense that you can make either a cc|prepaid|ca|phone|viewerpreferred payment. However it does not make sense to register a viewer to have as their payPrefs as "viewerPreferred" .
    Is their any way that I can reuse the payMethodType for both the registering and the payment requests but put a restriction on the registering of a viewer that it can only be one of cc|prepaid|ca|phone| ???
    If their is no solution to my question, can someone recommend an alternative ?
    Thanks guys,
    Joyce

    Use complexContent with an extension
    Set the payPrefs element as
    <xsd:element name="payPrefs" type="payRefType" minOccurs="0"/> Define payRefType as
    <xsd:complexType name="payRefType">
      <xsd:choice>
       <xsd:element ref="creditCard"/>
       <xsd:element ref="prepaid"/>
       <xsd:element ref="ca"/>
       <xsd:element ref="phoneBilling"/>
    </xsd:choice>
    </xsd:complexType>Set payMethod as
    <xsd:element name="payMethod" type="payMethodType"/>
    <xsd:complexType name="payMethodType">
      <xs:complexContent>
       <xs:extension base="payRefType">
        <xsd:sequence>
         <xsd:element ref="viewerPreferred"/>
       </xsd:sequence>
      <xs:extension>
    </xs:complexContent>
    </xsd:complexType>

  • Problems populating complex type structre in bpel

    Hi All,
    I'm trying to populate with no good results a complexType variable that contains n maxOccurs="unbounded" element.
    This is the schema:
    <xsd:complexType name="logWarnParam">
    <xsd:sequence>
    <xsd:element name="Message" type="xsd:string"/>
    <xsd:element name="MessageParam" type="xsd:string" maxOccurs="unbounded"/>
    <xsd:element name="context" type="ns1:context"/>
    </xsd:sequence>
    </xsd:complexType>
    This is the bpel variable
    <variable name="logWarnParamVariable" element="ns3:logWarnParam"/>
    and these are the parts of the bpel that applies to this case:
    <while name="While1"
    condition="bpws:getVariableData('i')&lt;number(5)">
    <scope name="Log1" variableAccessSerializable="no">
    <sequence name="Sequence1">
    <assign name="assign1">
    *<bpelx:append>*
    *<bpelx:from expression="string('value1')"/>*
    *<bpelx:to variable="logWarnParamVariable"*
    query="/ns3:logWarnParam/MessageParam"/>
    *</bpelx:append>*
    <copy>
    <from expression="bpws:getVariableData('i')+1"/>
    <to variable="contador"/>
    </copy>
    </assign>
    </sequence>
    </scope>
    </while>
    Can anyone help me with the way to populate this structure?
    Thanks in advance!

    The complexType element defines a complex type. A complex type element is an XML element that contains other elements and/or attributes.
    Its a place holder to hold different types of element or same set of elements.
    In the below example you will get more information.
    *<xs:element name="employee" type="fullpersoninfo"/>*
    *<xs:complexType name="personinfo">*
    <xs:sequence>
    <xs:element name="firstname" type="xs:string"/>
    <xs:element name="lastname" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    *<xs:complexType name="fullpersoninfo">*
    <xs:complexContent>
    <xs:extension base="personinfo">
    <xs:sequence>
    <xs:element name="address" type="xs:string"/>
    <xs:element name="city" type="xs:string"/>
    <xs:element name="country" type="xs:string"/>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>
    In this example i would like to have more than one employee information. So i have created a complexType as "fullpersoninfo", Then in run time i will populate the values inside "fullpersoninfo"
    not the employee or fullpersoninfo variable, rather i will populate the firstname, lastname, address, city and country.
    The out put will be having value like the below.
    <employee>
         <firstname></firstname>
         <lastname></lastname>
         <address>Duke Street</address>
         <city>Liverpool</city>
         <country>UK</country>
    </employee>
    <employee>
         <firstname></firstname>
         <lastname></lastname>
         <address>Duke Street</address>
         <city>Liverpool</city>
         <country>UK</country>
    </employee>
    I will populate the elements inside the complex type element not it self.
    I took the example from below URL
    http://www.w3schools.com/schema/el_complextype.asp
    You should modify your assign as below.
    <bpelx:append>
    <bpelx:from expression="string('value1')"/>
    <bpelx:to variable="logWarnParamVariable"
    query="*/ns3:logWarnParamVariable/ns3:logWarnParam/ns3:MessageParam*"/>
    </bpelx:append>
    Let me know how you go !!
    Thanks,
    Vijay

  • Returning complex types with arrays (Java / EJB via WSIF)

    Hi all,
    I'm writing some WSIF bindings for existing EJBs, and I've struck a bit of a problem. Basically I've got complex types that contain arrays, and while instances of these types can be passed to the EJBs, return variables typed similarly cause the following fault:
    org.collaxa.thirdparty.apache.wsif.WSIFException: com.collaxa.cube.ws.wsif.providers.ejb.WSIFOperation_EJB@1a372e0 : Could not invoke 'concatString'; nested exception is:
         org.collaxa.thirdparty.apache.wsif.WSIFException: Class 'ejbinterfacetest.StringReturnArray' is not compatible; nested exception is:
         oracle.xml.parser.v2.XMLDOMException: cannot add a node belonging to a different document
         at com.collaxa.cube.ws.wsif.providers.ejb.WSIFOperation_EJB.executeRequestResponseOperation(WSIFOperation_EJB.java:1305)
         at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIFInvocationHandler.java:431)
         at com.collaxa.cube.ws.WSInvocationManager.invoke2(WSInvocationManager.java:416)
    The Java class StringReturnArray is a serializable JavaBean with one property, a String[] called strings. The corresponding complexType (that works when used as a method parameter type) is stringReturnArrayType:
    <complexType name="stringArrayType">
    <sequence>
    <element name="str" type="string" maxOccurs="unbounded" />
    </sequence>
    </complexType>
    <complexType name="stringReturnArrayType">
    <sequence>
    <element name="strings" type="tns:stringArrayType" />
    </sequence>
    </complexType>
    and I've type mapped in the binding with
    <format:typeMap typeName="typens:stringReturnArrayType" formatType="ejbinterfacetest.StringReturnArray" />
    Anyone know why this would be? Is there any way I can get more information out of BPEL or OC4J regarding the fault? (I've already turned the BPEL domain logging to All)
    Cheers,
    Chris.

    Any luck with this? I am running into the same error. Apparently, this is not an issue with Java binding, but when invoking remote EJBs, we run into this. I am running 10.1.3.1 and the error is:
    <fault>
    <bindingFault xmlns="http://schemas.oracle.com/bpel/extension">
    <part name="summary">
    <summary>
    com.collaxa.cube.ws.wsif.providers.ejb.WSIFOperation_EJB@e26dbf : Could not invoke 'getIdentityInfo'; nested exception is:
         org.collaxa.thirdparty.apache.wsif.WSIFException: Class 'ca.bc.gov.pssg.c3.webservices.identitymanagement.Identity' is not compatible; nested exception is:
         oracle.xml.parser.v2.XMLDOMException: cannot add a node belonging to a different document
    </summary>
    </part>
    <part name="detail">
    <detail>
    org.collaxa.thirdparty.apache.wsif.WSIFException: Class 'ca.bc.gov.pssg.c3.webservices.identitymanagement.Identity' is not compatible; nested exception is:
         oracle.xml.parser.v2.XMLDOMException: cannot add a node belonging to a different document
    </detail>
    </part>
    </bindingFault>
    </fault

  • JAX-RPC, DII and Complex Types

    I am currently in the middle of a project at University on Web Services. I am trying to create a client which uses Dynamic Interface Invocation(DII) to obtain information from a web services server. Here is where it gets very interesting. I realize with the basic types such as String, float integer etc. it works fine but as long as I want to use complex types I am having some problems. Is there anyone out there who have are currently using DII with complex types.

    Hello.
    I have develop a small web service using jwsdp 1.4 using jaxrpc (static stub)
    Sever is working fine but when I try to connect client with it. I get this message
    prepare:
    generate-client:
    edit-config:
    unedit-config:
    compile-client:
    run-client:
    [java] java.rmi.RemoteException: HTTP-Transportfehler: java.net.MalformedUR
    LException: no protocol: REPLACE_WITH_ACTUAL_URL; nested exception is:
    [java] HTTP-Transportfehler: java.net.MalformedURLException: no protoco
    l: REPLACE_WITH_ACTUAL_URL
    [java] at org.me.hi.HiSEI_Stub.sayHi(HiSEI_Stub.java:87)
    [java] at org.me.hi.HiClient.main(HiClient.java:10)
    [java] Caused by: HTTP-Transportfehler: java.net.MalformedURLException: no
    protocol: REPLACE_WITH_ACTUAL_URL
    [java] at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(HttpCl
    ientTransport.java:140)
    [java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.
    java:92)
    [java] at org.me.hi.HiSEI_Stub.sayHi(HiSEI_Stub.java:70)
    [java] ... 1 more
    BUILD SUCCESSFUL
    Total time: 3 minutes 15 seconds
    I did not get why client is unable to contact server.
    Any help in this regard would very appreciable.
    Thaks in advance

  • Polymorphism - retrieving type information from thedatabase

     

    Daniel,
    Yes I have always thought, that modeling the real world can lead to objects
    that are unnecessary or overly complex relationships that do exist in the
    real world but may not have to in a computing environment. Many times,
    business models could be greatly simplified if the modelers factored out
    interfaces from objects so that these interfaces could be applied based on
    need of behavior without having to always construct class hierarchies in a
    particular behavioral structure. Or they could benefit greatly by applying
    design patterns to enhance delegation. But the problem with both of these
    pieces of advice is that they assume the modeler is well versed and
    understands how to apply these concepts. Many application developments I
    come across are being done by a group of people that have never used an OO
    tool before. With an audience such as this, how are they supposed to get
    started?
    Usually they will look and analyze the real-world. This will give them a
    starting point in which to conduct dialog for building an object model. I
    think I do know how these advanced strategies I described above are applied,
    yet I always ask a customer to explain the real-world example of something
    before I attempt at understanding their model and make any attempts at
    advising changes. This assures that I and they have a better physical
    understanding of an interaction before we attempt to describe an abstract
    model of the same interaction.
    As far as sharing of business objects, it is quite routine for a company to
    have one group of IT application developers create a subsystem with business
    objects that must be SHARED by another group of IT application developers.
    The different subsystems have points of interconnect. These points can be
    at the architectural level or business object level. So I don't think this
    situation is as rare as you state. Further, I can see that the marketplace
    is pushing more for run-time object sharing and collaboration so that this
    will be the norm and not the exception.
    I agree on the importance of custom routing for performance. I think it is
    complex enough that I would stop short of telling people to spend time
    building such a scheme. I would hate to see an application miss delivery
    because the developers got too entangled in technical problems like custom
    routing. But I do happen to know of a Framework product that has this as
    one of its features. :)
    I agree 100% with you the complexity of Forte is the marrying of object and
    distributed technologies. I don't agree that frameworks cannot provide the
    answer. I look at a framework as more than just a technical solution. We
    use our framework to help divide the responsibilities between Business
    Analyst, GUI Architect, Back-end Architect, GUI Developers and Back-End
    developers. At many customers, some people play all of these roles. At
    some customers, a developer may play just the GUI Developer role until he
    can come up to speed on how to build simple views that are used to build
    more complex windows. In this way, a large problem can be broken down into
    a set of much smaller problems to help the architects manage work load and
    education of the team. Without a framework that supports this sort of
    approach, the architects of the application would have to delay development
    until boundaries could be put in place. This can be very time consuming and
    cause application rewrites if the boundaries were guessed wrong. In the
    Forte marketplace today, there are products to help people set up those
    architectural boundaries. It simply is more cost effective to buy one of
    these solutions then it is to have your team spend time on this and add risk
    to your project. In other words, architecture for a Forte development can
    be bought much more cheaply than it can be created.
    Mark Perreira
    Sage IT Partners.
    -----Original Message-----
    From: Daniel Nguyen [mailto:[email protected]]
    Sent: Sunday, June 21, 1998 7:35 AM
    To: Mark Perreira
    Cc: [email protected]
    Subject: Re: Polymorphism - retrieving type information from the
    database
    Mark,
    The battle question was only a little provocation : it seems that Forte
    people and yours don't have exactly the same point of view about the way
    that distribution should be made.
    The problem I see on modeling the real world is that the hypothesis
    seems to
    be wrong : the world will never be as static as the modeling in my point
    of
    view. The fact is that when you try to model real world you will add
    many
    concepts you don't really need for the application. Those concepts may
    change
    with time. In my own experience I have seen that if you don't have a
    real
    concrete objective, it is very easy to imagine many things which won't
    be
    usefull when the real aim will come. That's why I think that in a
    pragmatic
    point of view it is better (in a cost view that's right) to focus on a
    good
    modeling of the system you have to build. For instance, in an exotic
    currencies options system, you can imagine modeling for the Front a
    system
    without the product concepts, but only rules, because it is the real
    world.
    But when you come to the Back Office, you realize that all is managed
    through
    product concept. Then you come back to the Front modeling and break a
    lot
    of work. In the real world, the product concept does not exist, that's
    right.
    But it is a way to manage operations.
    We all speak about Business Objects (and rules) share and re-use. I
    imagine
    that it is only applicable on some specific domains where the concepts
    are
    already shared as Insurance, Banking or Risk management on shares. This
    is
    because we have common rules for all companies : some financial markets
    are
    organized with public rules and constraints for instance. So the
    difference
    between companies is only on the service and not really in the business
    foundations. But, in most cases, the differences between competitors are
    on their business, their know how.
    I have some difficulties to imagine companies with specific know how
    sharing
    it with competitors! So I imagine that shared business objects will be
    very poor.
    The problem may be that Business components will be provided by editors
    like
    Microsoft or may be Forte (with Express evolutions may be). But, the
    business of their clients is not in the job of those providers : they
    may
    have a wrong view of the business of their customers, because they don't
    have their know how.
    On routage capabilities of manager, I agree on the technical point of
    view.
    This should be inherited from a service definition from Forte or a
    technical
    component. But, I have seen (on financial markets) that you also need
    business
    routage for scalability and performance. This is unfortunatly not in
    Forte and
    may be not really in technical frameworks on the market. Just an example
    You have a financial market which is managed on several physical sites
    (let's
    take 2 sites). When everything is ok, you have one instance of a service
    on each
    site, first one managing some kind of instances (futures for instance)
    and the
    second one managing other kinds of instances (options for instance). But
    when the
    first site falls, you need (at run-time and if possible without stopping
    the market)
    to reconfigure the second service to manage all the instances (futures
    and options).
    So this is linked to business really. That's right, I base the
    reflection on a very
    specific (and experienced) case where the cost of the IT system is very
    low compared
    to the money exchanged on the system : you can imagine very specific
    solutions.
    The main problem I see today is that people have real difficulties to
    integrate
    object and distribution concepts and that Forte is to hard for Cobol or
    Visual
    Basic developpers. So those kinds of product should be more encapsulated
    and
    packaged on a push button way. The solution of making frameworks may be
    very
    short term solution, because of the cost and limitations about coverage
    of the
    clients specific objectives. Those problems come from Client/server
    architectures
    and needs, in my opinion, and NOT specifically from Forte or other
    competitors.
    Daniel Nguyen
    Freelance Forte Consultant
    Mark Perreira wrote:
    Daniel,
    I hope not. For SCAFFOLDS works only because of Forte and when I make
    someone a happy SCAFFOLDS customer then they are also a happy Forte
    customer. So if we sell more SCAFFOLDS, Forte sells moreForte. If there
    is a battle between us, I certainly don't understand why,because we are on
    the same team with the same goal.
    I have always found customer have a different role than you have pointed
    out. While I agree with the objectives, I have found most clients do
    actually try to model the real world. They do it because it is an easy
    starting point. They also do it because most OO books on the subject of
    modeling point people in that direction. So they do indeedplay the role of
    God with the business object model. But I have found thesesame customers
    unwilling to play the role of God with the architecture. Theyare either
    new to Forte and distributed object systems or they feelcomfortable with
    the architecture to be documented and supported beyond thetenure of a set
    of consultants that could come in and build such a system. In this case
    they buy a pre-defined and built architecture.
    I also agree that a Forte Service Object in and of itself can be
    problematic. But I depart where you say a manager can dothings like custom
    routing. This is exactly why I think Forte can be too difficult for too
    many people. Any custom routing scheme is not to be takenlightly in its
    impact of the overall performance and makeup of a running system. The
    manager pattern does not describe a run-time environment withthe checks and
    balances needed to make sure a custom router can perform. I have talked
    with you Daniel and have complete faith in your ability todevelop such a
    system. I would be very concerned in having just anyone try toimplement
    custom routing in manager objects without a run-time environment that
    simplifies and protects the participants from the mountain of technical
    problems that would follow.
    Mark Perreira
    Sage IT Partners.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Cannot assign value to a Variable of Complex Type beyond index 1

    Hello:
    I have a variable defined as a complex type as followed. I tried to assign a value to each of the two elements but it only allows me to assign to the 'element#1.
    This statement that tries to assign a value into element#2 will not work, if I assign with '[1]' for the first element it will work:
    <copy> <---- THIS WORKS
    <from expression="'John'"/>
    <to variable="My_Variable"
    part="My_Collection"
    query="/ns9:My_Collection/ns9:Collection/ns9:Collection_Item[1]/ns9:pname"/>
    </copy>
    <copy> <---- THIS DOES NOT WORK
    <from expression="'John'"/>
    <to variable="My_Variable"
    part="My_Collection"
    query="/ns9:My_Collection/ns9:Collection/ns9:Collection_Item[2]/ns9:pname"/>
    </copy>
    Is there something wrong with my definition below that allows only element#1 to be refererenced but not element#2???? Am I missing some kind of initialization that is needed to initialize both elements????
    Here are my message and Complex Type definitions:
    <variable name="My_Variable" messageType="ns8:args_out_msg"/>
    <message name="args_out_msg">
    <part name="My_Collection" element="db:My_Collection"/>
    </message>
    <element name="My_Collection">
    <complexType>
    <sequence>
    <element name="Collection" type="db:Collection_Type" db:index="2" db:type="Array" minOccurs="0" nillable="true"/>
    <element name="Ret" type="string" db:index="3" db:type="VARCHAR2" minOccurs="0" nillable="true"/>
    </sequence>
    </complexType>
    </element>
    <complexType name="Collection_Type">
    <sequence>
    <element name="Collection_Item" type="db:Collection_Type_Struct" db:type="Struct" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
    </sequence>
    </complexType>
    <complexType name="Collection_Type_Struct">
    <sequence>
    <element name="pname" db:type="VARCHAR2" minOccurs="0" nillable="true">
    <simpleType>
    <restriction base="string">
    <maxLength value="25"/>
    </restriction>
    </simpleType>
    </element>
    </sequence>
    </complexType>
    The error msg it gives me is as followed:
    [2010/09/04 00:47:59] Error in <assign> expression: <to> value is empty at line "254". The XPath expression : "" returns zero node, when applied to document shown below:less
    oracle.xml.parser.v2.XMLElement@1fa7874
    [2010/09/04 00:47:59] "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.less
    -<selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
    -<part name="summary">
    <summary>
    XPath query string returns zero node.
    According to BPEL4WS spec 1.1 section 14.3, The assign activity &lt;to&gt; part query should not return zero node.
    Please check the BPEL source at line number "254" and verify the &lt;to&gt; part xpath query.
    </summary>
    </part>
    </selectionFailure>
    Thanks
    Newbie

    Hello:
    Base on the suggestion to use 'append' instead of 'copy', I tried to define a 'singleNode' which is of type 'Collection_Type_Struct' so I can append this individual 'struct' into my array (i.e. as the 2nd. element of my array "/ns9:My_Collection/ns9:Collection/ns9:Collection_Item"), but I am getting an error in defining this variable as:
    <variable name="singleNode" element="Collection_Type_Struct"/> <--- error
    Can someone tell me how should I define "singleNode" so I can put a value in it and then append this 'singleNode' into the array:
    <variable name="singleNode" element=" how to define this????"/>
    <assign>
    <copy>
    <frem expression="'Element2Value'"/>
    <to variable="singleNode"
    part="My_Collection"
    query="/ns9:My_Collection/ns9:Collection/ns9:Collection_Item/ns9:pname"/>
    </copy>
    </assign>
    <bpelx:assign>
    <bpelx:append>
    <from variable="singleNode" query="/ns9:My_Collection/ns9:Collection/ns9:Collection_Item"/>
    <to variable="My_Variable"
    "part="My_Collection"
    query="/ns9:My_Collection/ns9:Collection"/>
    </bpelx:append>
    </bpelx:assign>
    Again here is my definition in my .xsd file:
    <element name="My_Collection">
    <complexType>
    <sequence>
    <element name="Collection" type="db:Collection_Type" db:index="2" db:type="Array" minOccurs="0" nillable="true"/>
    <element name="Ret" type="string" db:index="3" db:type="VARCHAR2" minOccurs="0" nillable="true"/>
    </sequence>
    </complexType>
    </element>
    <complexType name="Collection_Type">
    <sequence>
    <element name="Collection_Item" type="db:Collection_Type_Struct" db:type="Struct" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
    </sequence>
    </complexType>
    <complexType name="Collection_Type_Struct">
    <sequence>
    <element name="pname" db:type="VARCHAR2" minOccurs="0" nillable="true">
    <simpleType>
    <restriction base="string">
    <maxLength value="25"/>
    </restriction>
    </simpleType>
    </element>
    </sequence>
    </complexType>
    Thanks for any help!!!!

Maybe you are looking for

  • Tecra S3 - Wlan does not work after Win XP installation

    Hello everyone, I have recently purchased a Tecra S3 PTS30E-0TL059GH without operating system. I've installed WIndows XP professional. Everything works, except for the wireless lan. I can switch it on, but it doesn't seem to find the right drivers. T

  • Removing subtitles from a TV Show

    Hello, I was wondering if anyone could help me figure out how to get rid of the subtitles here? Under the little "bubble" the audio option is grayed out! (Sorry the picture is mostly grey, I'm guessing it's for copyright reasons because it wasn't whe

  • CLIENT SIDE TRACING IN SQL*NET V2

    제품 : SQL*NET 작성날짜 : 1997-10-10 Client Tracing ~~~~~~~~~~~~~~ 1) Set the environment variable TNS_ADMIN to the directory where the tnsnames.ora and listener.ora files exist. The default location is $ORACLE_HOME/network/admin. Set $TNS_ADMIN to this if

  • Insert select statement or insert in cursor

    hi all, i need a performance compare for: insert operation in cursor one by one and select statement insert, for example: 1. insert into TableA (ColumA,ColumnB) select A, B from TableB; 2. cursor my_cur is select A, B from TableB for my_rec in my_cur

  • PLease Help It is Really Urgent In time ..Login Page

    i got this error after installing the portal and trying it for the first time.. i restarted the machine and i mad sure that this name is vaild and the listner is runing.. error code 439 verify that the TNS name in the connect string entry of the DAD