[SOLVED] XSD simpleType trying to assign incompatible types

Hi all!
I have a big XSD schema with complex and simple types defined. One of the simple types looks like this (string with min and max length defined):
     <xsd:simpleType name="MySimpleType">
          <xsd:restriction base="xsd:string">
               <xsd:minLength value="1" />
               <xsd:maxLength value="36" />
          </xsd:restriction>
     </xsd:simpleType>I assign (copy operation) a string variable to an element of this type. When I compile i get the trying to assign incompatible types warning. I know it's just a warning but I'd like to solve it. I thought I can create a variable of the same type, but I can't (if I try to define message type only the complex type from XSD are displayed).
Is there a way to get rid of this warning?
Thanks

instead of using a variable assignment use the expression builder to construct the 'bpws:getVariableData() equivalent of the variable assignment. The warning will no longer exist.

Similar Messages

  • ORABPEL-10041 Trying to assign incompatible types

    Hi,
    I'm developing a BPEL process which takes an input xml file and inserts data into AP interface tables. I used a file adapter to read the input file and used applications adapter to import ap interface tables.
    I use the assign activity to assign the number value from my xml file to the invoice_id column in the ap_invoices_interface column. I get the following warning. Can anyone please tell me how do I fix this. I have BPEL 10.1.2.2 installed.
    Warning(29):
    [Error ORABPEL-10041]: Trying to assign incompatible types
    [Description]: in line 29 of "C:\OraBPELPM_1\integration\jdev\jdev\mywork\Workspace1\BPELProcess_TestInsert\BPELProcess_TestInsert.bpel", <from> value type "{http://www.w3.org/2001/XMLSchema}string" is not compatible with <to> value type "{http://www.w3.org/2001/XMLSchema}long".
    [Potential fix]: Please make sure that the return value of from-spec query is compatible with the to-spec query.
    Thanks

    This is just a warning so it does not mean that your process will fail, e.g. string to decimal may work for the string holds a number, but will fail if it has a string.
    So if you know the data you can safely ignore, otherwise you will have to do some transofrmation within an assign.
    cheers
    James

  • XSD SimpleType Mapping to Default Database Type

    I found the following tables in the Oracle XML DB Developer's Guide (11gR1), Chapter 6:
    Table 6-6 Mapping XML Schema String Data Types to SQL
    Table 6-7 Mapping XML Schema Binary Data Types (hexBinary/base64Binary) to SQL
    Table 6-8 Default Mapping of Numeric XML Schema Primitive Types to SQL
    Table 6-9 Mapping XML Schema Date and Time Data Types to SQL
    Table 6-10 Default Mapping of Other XML Schema Primitive and Derived Data Types to SQL
    As well as:
    "By default, XML schema registration maps xsd:dateTime and xsd:time to SQL data type TIMESTAMP and all the other data types to SQL data type DATE."
    My question is:
    What are the names of the tables in Oracle that house these mappings? I'm assuming that they exist in the XDB schema. I'm hoping they are tables from which I can look up the mappings from PL/SQL or Java code.
    Thanks much!

    As a follow-up, I did find that XSDSimpleType.getBasicType() does return an integer value that seems to point to an Oracle datatype. For example, string and normalizedString both return 1, which I assume, from the tables I cited, would map to 'VARCHAR2(4000)'.
    So as an alternative, where can I find the table or function that maps the integer values returned by getBasicType to the Oracle datatypes mentioned in tables 6-6 through 6-10?
    Thanks in advance!

  • Assign information types to books and pages

    Hi,
    I'm using Robohelp 7 HTML and am trying to Assign information types to books and pages. The information types are defined however I have no way of assigning them to the topics/books. All my categories are marked as "inclusive"
    The Adobe Hep file says that:
    Click View > Pods > Topic List. The Topics List appears.
    From the Topics list, select the topic.
    Click Properties .
    Click the Information Types Tab. .......
    There is no such Tab.
    What am I doing wrong? Can someone please help

    Hi there
    You aren't doing anything wrong. What you have done is stumble across a feature of HTML Help that was never properly and fully implemented. I had a play with Information Types back in 2000 and concluded that they weren't worth the effort.
    For one thing, they are far from intuitive for end users. An end user has to know they exist, then right-click the TOC and choose to sort the TOC by the Information Type (or types) that are available.
    If you choose to continue with Information Types, I believe the process you follow is to create the types. Sounds like you have gotten that far. Then in the TOC you right-click the Books and Pages and examine the properties. On the ensuing dialog you click the Advanced tab and enable the Use Information Types option. Then you assign the types by clicking the Add... button near the bottom.
    As Information types are only used with the TOC, it comes as no surprise there is nothing in Topic Properties to deal with them. Additionally, they only apply to CHM format and are totally moot if your output is WebHelp or FlashHelp.
    My best advice would be to suggest to Adobe that incorrect information exists in the help. I'll be doing that with the comment you posted in the help topic. I just opened RoboHelp X5 and even as far back as X5 there is no Information Types tab in the Topic Properties.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • Incompatible types in assignment

    Hello everyone,
    I'm quite new to objective-c programming. So far, i pretty much solved everything either on my own with the documentation, and with some googling. One problem i haven't solved was how to detect a swipe on a uiscrollview, but i thought i found another way to do it.
    However, when i'm trying to get the contentoffset.x of my scrollview (named dayScrollView) and store it in a CGFloat, i get a compiler error ' incompatible types in assignment'. I have been able to access it just fine, however now it's giving me trouble.
    I declared the float in the header file (CGFloat *deceleratingTouch), and then tried to store it in the implementation file (deceleratingTouch=dayScrollView.contentOffset.x;). What is possible that went wrong? as i said, i'm quite new, so i sometimes make the stupidest mistakes.

    Ok, it was solved. Apparently, CGFloat doesn't need the asterisk if you declare it in the header file. That's what i said about stupid mistakes

  • Error while trying to assign an output type to medium external send in smar

    Hi,
    My requirement is to send a smartform through e-mail as PDF attachment.I have made the changes in the print program of the smart form.When I try to assign the output type to the medium external send in vt02n transaction,it is being saved but it is showing the status as 'not processed'.When I check the processing log it is showing 'Please maintain a output device in your user master data'.But I am able to send the mail and open the attachment.When I try to assign the same o/p type to medium special function,this is being successfully processed .Why am I getting error when I try to assign theo/p type to external send?
    Regards,
    Hema

    Check the logic in the entity adapter ENT_Prov_Permitted_Resources.
    This adapter is causing problems when you are trying to assign the resource.

  • The system could not find a javax.ws.rs.ext.MessageBodyWriter or a DataSourceProvider class for the com.rest.assignment.EmpBean type and application/json mediaType.  Ensure that a javax.ws.rs.ext.MessageBodyWriter exists in the JAX-RS application for the

    Hi,
    Im trying to create a Rest WS with a @GET method that will return me an Emp object. I need the output as a JSON string.
    I have created a dynamic web project and added javax RS jars:
    When im trying to run this, i'm getting the below mentioned error:
    FlushResultHa E org.apache.wink.server.internal.handlers.FlushResultHandler handleResponse The system could not find a javax.ws.rs.ext.MessageBodyWriter or a DataSourceProvider class for the com.rest.assignment.EmpBean type and application/json mediaType.  Ensure that a javax.ws.rs.ext.MessageBodyWriter exists in the JAX-RS application for the type and media type specified.
    RequestProces I org.apache.wink.server.internal.RequestProcessor logException The following error occurred during the invocation of the handlers chain: WebApplicationException (500 - Internal Server Error)
    Please help as im stuck with this from long.
    Thanks in advance.
    Below is the code for my service class:
    package com.rest.assignment;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.util.Enumeration;
    import java.util.HashSet;
    import java.util.Properties;
    import java.util.Set;
    import javax.ws.rs.GET;
    import javax.ws.rs.Path;
    import javax.ws.rs.Produces;
    import javax.ws.rs.core.Application;
    import javax.ws.rs.core.MediaType;
    import javax.ws.rs.core.Response;
    @Path("/restService")
    public class RestService extends Application {   
        @GET
        @Path("/getEmpDetails")
        @Produces(MediaType.APPLICATION_JSON)
        public Response getStringResponse()
            EmpBean empBean = new EmpBean();
            String filePath = "C:/Program Files/IBM/workspace/HelloWorld/src/com/rest/resources/EmpData.properties";
            Properties properties = new Properties();
            try {
                properties.load(new FileInputStream(filePath));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
             Enumeration e = properties.propertyNames();
             String result="";
            String[] empDetailsArr;
            while (e.hasMoreElements()) {
              String key = (String) e.nextElement();
              String empDetails = properties.getProperty(key);
              empDetailsArr=empDetails.split(",");    
              empBean.setFirstName(empDetailsArr[0]);
              empBean.setLastName(empDetailsArr[1]);
              empBean.setEmpId(empDetailsArr[2]);
              empBean.setDesignation(empDetailsArr[3]);
              empBean.setSkillSet(empDetailsArr[4]);
              result = empDetailsArr[1];
            //return empBean;
            return Response.ok(empBean).type(MediaType.APPLICATION_JSON_TYPE).build();
        @Override
        public Set<Class<?>> getClasses() {
            Set<Class<?>> classes = new HashSet<Class<?>>();
            classes.add(RestService.class);
            classes.add(EmpBean.class);
            return classes;
    and my empBean goes like this:
    package com.rest.assignment;
    public class EmpBean {
        private String firstName;
        private String lastName;
        private String empId;
        private String designation;
        private String skillSet;
        public String getFirstName() {
            return firstName;
        public void setFirstName(String firstName) {
            this.firstName = firstName;
        public String getLastName() {
            return lastName;
        public void setLastName(String lastName) {
            this.lastName = lastName;
        public String getEmpId() {
            return empId;
        public void setEmpId(String empId) {
            this.empId = empId;
        public String getDesignation() {
            return designation;
        public void setDesignation(String designation) {
            this.designation = designation;
        public String getSkillSet() {
            return skillSet;
        public void setSkillSet(String skillSet) {
            this.skillSet = skillSet;
    Web.xml goes like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <display-name>restWS</display-name>
    <welcome-file-list>
      <welcome-file>index.html</welcome-file>
      <welcome-file>index.htm</welcome-file>
      <welcome-file>index.jsp</welcome-file>
      <welcome-file>default.html</welcome-file>
      <welcome-file>default.htm</welcome-file>
      <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>
    <servlet>
      <servlet-name>REST</servlet-name>
      <servlet-class>com.ibm.websphere.jaxrs.server.IBMRestServlet</servlet-class>
      <init-param>
       <param-name>javax.ws.rs.Application</param-name>
       <param-value>com.rest.assignment.RestService</param-value>
      </init-param>
      <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
      <servlet-name>REST</servlet-name>
      <url-pattern>/rest/*</url-pattern>
    </servlet-mapping>
    </web-app>
    When i try to return a string from my get method, it gives me a proper response. i get this exception when im trying to return a JSON response.

    Hi,
    Im trying to create a Rest WS with a @GET method that will return me an Emp object. I need the output as a JSON string.
    I have created a dynamic web project and added javax RS jars:
    When im trying to run this, i'm getting the below mentioned error:
    FlushResultHa E org.apache.wink.server.internal.handlers.FlushResultHandler handleResponse The system could not find a javax.ws.rs.ext.MessageBodyWriter or a DataSourceProvider class for the com.rest.assignment.EmpBean type and application/json mediaType.  Ensure that a javax.ws.rs.ext.MessageBodyWriter exists in the JAX-RS application for the type and media type specified.
    RequestProces I org.apache.wink.server.internal.RequestProcessor logException The following error occurred during the invocation of the handlers chain: WebApplicationException (500 - Internal Server Error)
    Please help as im stuck with this from long.
    Thanks in advance.
    Below is the code for my service class:
    package com.rest.assignment;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.util.Enumeration;
    import java.util.HashSet;
    import java.util.Properties;
    import java.util.Set;
    import javax.ws.rs.GET;
    import javax.ws.rs.Path;
    import javax.ws.rs.Produces;
    import javax.ws.rs.core.Application;
    import javax.ws.rs.core.MediaType;
    import javax.ws.rs.core.Response;
    @Path("/restService")
    public class RestService extends Application {   
        @GET
        @Path("/getEmpDetails")
        @Produces(MediaType.APPLICATION_JSON)
        public Response getStringResponse()
            EmpBean empBean = new EmpBean();
            String filePath = "C:/Program Files/IBM/workspace/HelloWorld/src/com/rest/resources/EmpData.properties";
            Properties properties = new Properties();
            try {
                properties.load(new FileInputStream(filePath));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
             Enumeration e = properties.propertyNames();
             String result="";
            String[] empDetailsArr;
            while (e.hasMoreElements()) {
              String key = (String) e.nextElement();
              String empDetails = properties.getProperty(key);
              empDetailsArr=empDetails.split(",");    
              empBean.setFirstName(empDetailsArr[0]);
              empBean.setLastName(empDetailsArr[1]);
              empBean.setEmpId(empDetailsArr[2]);
              empBean.setDesignation(empDetailsArr[3]);
              empBean.setSkillSet(empDetailsArr[4]);
              result = empDetailsArr[1];
            //return empBean;
            return Response.ok(empBean).type(MediaType.APPLICATION_JSON_TYPE).build();
        @Override
        public Set<Class<?>> getClasses() {
            Set<Class<?>> classes = new HashSet<Class<?>>();
            classes.add(RestService.class);
            classes.add(EmpBean.class);
            return classes;
    and my empBean goes like this:
    package com.rest.assignment;
    public class EmpBean {
        private String firstName;
        private String lastName;
        private String empId;
        private String designation;
        private String skillSet;
        public String getFirstName() {
            return firstName;
        public void setFirstName(String firstName) {
            this.firstName = firstName;
        public String getLastName() {
            return lastName;
        public void setLastName(String lastName) {
            this.lastName = lastName;
        public String getEmpId() {
            return empId;
        public void setEmpId(String empId) {
            this.empId = empId;
        public String getDesignation() {
            return designation;
        public void setDesignation(String designation) {
            this.designation = designation;
        public String getSkillSet() {
            return skillSet;
        public void setSkillSet(String skillSet) {
            this.skillSet = skillSet;
    Web.xml goes like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <display-name>restWS</display-name>
    <welcome-file-list>
      <welcome-file>index.html</welcome-file>
      <welcome-file>index.htm</welcome-file>
      <welcome-file>index.jsp</welcome-file>
      <welcome-file>default.html</welcome-file>
      <welcome-file>default.htm</welcome-file>
      <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>
    <servlet>
      <servlet-name>REST</servlet-name>
      <servlet-class>com.ibm.websphere.jaxrs.server.IBMRestServlet</servlet-class>
      <init-param>
       <param-name>javax.ws.rs.Application</param-name>
       <param-value>com.rest.assignment.RestService</param-value>
      </init-param>
      <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
      <servlet-name>REST</servlet-name>
      <url-pattern>/rest/*</url-pattern>
    </servlet-mapping>
    </web-app>
    When i try to return a string from my get method, it gives me a proper response. i get this exception when im trying to return a JSON response.

  • Incompatible types - found java.lang.String but expected int

    This is an extremely small simple program but i keep getting an "incompatible types - found java.lang.String but expected int" error and dont understand why. Im still pretty new to Java so it might just be something stupid im over looking...
    import java.io.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    public class Lab
    public static void main(String []args)
    int input = JOptionPane.showInputDialog("Input Decimal ");
    String bin = Integer.toBinaryString(input);
    String hex = Integer.toHexString(input);
    System.out.println("Decimal= " + input + '\n' + "Binary= " + bin + '\n' + "Hexadecimal " + hex);
    }

    You should always post the full, exact error message.
    Your error message probably says that the error occurred on something like line #10, the JOptionPane line. The error is telling you that the compiler found a String value, but an int value was expected.
    If you go to the API docs for JOptionPane, it will tell you what value type is returned for showInputDialog(). The value type is String. But you are trying to assign that value to an int. You can't do that.
    You will need to assign the showInputDialog() value to a String variable. Then use Integer.parseInt(the_string) to convert to an int value.

  • Problem while changing data for STO Assign Delivery type and checking rule

    Hi All,
    In Set up STO..... executing Assign delivery type and checking rule.
    I am trying to add values to Rule for Adoption of ATP Results in Purchasing(REVFE),Delivery Type for Stock Transfers Within a Company Code(LFART1) and another two more fields..After entering the data When i clik Save button... it shows "Data was Saved".But its not showing when i went back and come
    I have checked in debugg mode and table T161V table ..waht ever i entered its not saved in Database table.
    We have checked in another system its working fine..
    Can anyone please help me  on this?

    Solved by posting in OSS.
    The below include has to be uncommented.
    While doing upgrade this include  L0ME6F00 has commented INCLUDE L0ME6F99 has uncommented
         view related include-files   (never change, please)        *
    *{   REPLACE        CB2K900006                                        2
      INCLUDE L0ME6F00.      " subprograms

  • Incompatible types required boolean found string

    I am trying to set a value for a variable called Location when ever the value for the location is "AFRICA"
    I need to reset it to be "55555".
    What I am getting is that 'Incompatible types required boolean found string' under the if statemant. Can anyone shade some light on this?
    String Location = filename.substring(12,17);
    String AP = "AFRICA";
    System.out.println(Location);
    if (Location = AP)
    System.out.println(Location);
    Location = "55555";
    thanks

    rp0428 wrote:
    The IF condition needs to be a BOOLEAN. The '=' is used to do an assignment. The boolean would be '=='.
    But to compare strings why aren't you using
    if (Location.equalsIgnoreCase(AP) {
    To stress this a little more:
    <tt>==</tt> applied between References will compare the Adresses they point to. This means this will only be true if both References point to the identical Object. @Test
    testStringEquality(){
       String s1 = "my Test"
       String s2 = "Test"
      Assert.assertTrue("This strings are equal",s1.equals("my "+s2));
      Assert.assertFalse("This strings are not identical",s1 == ("my "+s2));
    }So use <tt>==</tt> only for primitive number types (those starting with a lower case letter).
    bye
    TPD

  • Getting an error message when trying to do mov type 521

    Hello All,
    When we are trying to do Movement type 521 for a material and plant we are getting the error message and not allowing to do the movement.
    Please help us to solve this issue.
    Thanks in advance
    Kalyani

    Check your material master for a x-plant or plant specific material status.
    This status is probably customized to prevent movements.
    Obtain the person who has entered the status from material master change history and talk to them about what you are trying to do and if the status needs to be removed or you need to choose an alternative solution for your movement.

  • How to assign output type and trigger printing in ABAP

    hi all,
    i have create invoice by using BAPI_BILLINGDOC_CREATEMULTIPLE and create header/item text with CREATE_TEXT.
    please advise how to assign the output type and trigger immediate printing after this.
    thanks.

    Hi Reetha ,
    This is a functional setting  , and should be done by some functional guy. The setting can be done by NACE.
    Just follow the path : NACE - > Select V3 for Billing - > Press Output type Button Just above - > Assign Output Type and
    then Assign Output program and form in PROCESSING ROUTINE comes into left. Set this output type for immediate print.
    Whenever You create a billing document by BAPI with this document type , the print out will be fired immediately.
    Hope it will solve your problem.
    Thanks.

  • Incompatible types in simple odbc statements

    this is my simple code
    import java.sql.*;
    public class QueryApp {
         public static void main(String a[]){
              try{
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   Connection con;
                   con=DriverManager.getConnection("jdbc:odbc:MyDataSource","nik","123456");
                   Statement stat=con.createStatement();
                   stat.executeQuery("Select * from Publishers");
              catch(Exception e){
                   System.out.println("Error:"+e);
    }after this when i compile i get these errors
    QueryApp.java:15: incompatible types
    found   : java.sql.Connection
    required: Connection
                con=DriverManager.getConnection("jdbc:odbc:MyDataSource","nik","123456");
                                                           ^
    QueryApp.java:16: cannot find symbol
    symbol  : method createStatement()
    location: class Connection
                Statement stat=con.createStatement();
                                              ^
    2 errorsCan some body help me on this error as searching on net wasn't fruitfull?

    1) You probably created a Connection class your compiler tries to use instead of java.sql.Connection. I advise to rename your class, or at least use the fully qualified classname for declaring con.
    2) The Connection class you created does not have such a method.

  • Assign condition type ZSMN in CO-PA

    Hi,
    While releasing invoice to account I got following error.
    Assign condition type ZSMN in CO-PA.
    Message no KE391.
    How do i change config to solve this error?
    thanks,
    Vrajesh

    You assign ZSMN to a CO-PA value field.  This is done in IMG activity KE4I.
    (IMG -> Controlling -> Profitability Analysis -> Flows of Actual Values -> Transfer of BIlling Documents -> Assign Value Fields)

  • Incompatible type  -  use of String datatype?

    I tried to compile the program but it seems to show "synax errors".
    What I complied the program below:
    import java.util.Scanner;
    public class String
       public static void main(String[] args)
          // declare constants and variables
          String tutorName;
          String stdtName;
          // read input data
          Scanner scn = new Scanner(System.in);
          System.out.print("Enter tutor's name : ");
          tutorName = scn.next();
          System.out.print("Enter student's name : ");
          stdtName = scn.next();
          // display output
          System.out.println ("Tutor's Name : " + tutorName);
          System.out.println ("Tutor's Name : " + stdtName);
    }The error message says:
    ----jGRASP exec: javac -g D:\String.java
    String.java:20: incompatible types
    found : java.lang.String
    required: String
    tutorName = scn.next();
                                    ^
    String.java:22: incompatible types
    found: java.lang.String
    required: String
    stdtName = scn.next();
                                  ^
    2 errors
    ----jGRASP wedge2: exit code for process is 1.
    ----jGRASP: operation complete.Edited by: soulhealer88 on May 28, 2008 8:11 AM

    BIJ001 wrote:
    java.lang.String tutorName;
    That would quickly become painful. It's much easier to rename your own class to be different from String.
    Big tip: and don't forget to delete your String.class, because if you don't it will continue to trip you up.

Maybe you are looking for