Java data types are tightly coupled or loosely coupled ?

java data types are tightly coupled or loosely coupled ?

Is this another interview question? If so, the answer you should have given is, "You, sir, have been smoking too much crack."

Similar Messages

  • External SOAP client Accessing Webservice using built in Java Data type

    We have built a webservice and deployed it on WLS. We accessed this from a swing
    client it works fine.The webservice methods uses non-built in JAVA data types
    as parameters.These are Value Objects and the JAVA Serializer and Deserializer
    classes are generated using Ant task itself.The client coding uses Value objects
    given by the Client_jar (generated using <Clientgen> ant task) to pass to the
    webservice. We dont want to go by this way.Is there anyway were in we can pass
    parameters to the method which expects non-built in java datatypes?
    Why i am asking this is, i want to know how an external client (.Net client )
    will be able to exceute my webservice (i.e., passing the required Object which
    the method is expecting)?

    Hi Anish,
    Well first off, your web service doesn't send or receive "objects". It only sends
    and recieves XML, which is in turn converted to/from Java objects at invocation
    time. Second, a .NET (or Perl, or Python, or C++) client will be able to call
    your web service, because the wsdl.exe tool (for .NET) will generate "programming
    language specific" objects from the <types><schema> elements, in the WSDL of your
    web service :-) The wsdl.exe tool will create C# objects from the WSDL, that will
    convert XML to/from C# when your web service is called. That's the beauty of XML
    schema - it's a "universal typing system", so it's not tied to a particular programming
    language. The only issue is whether or not the web services platform vendor's
    XML Schema/WSDL processor, can successfully process the WSDL. Some vendors have
    more complete implementations of the WSDL and XML Schema specs than others, so
    expect varying success here. The one in WLS 7.0 is pretty good, so you shouldn't
    have too many problems consuming WSDL generated by .NET tools (or any other tool
    for that matter).
    Regards,
    Mike Wooten
    "Anish" <[email protected]> wrote:
    >
    We have built a webservice and deployed it on WLS. We accessed this from
    a swing
    client it works fine.The webservice methods uses non-built in JAVA data
    types
    as parameters.These are Value Objects and the JAVA Serializer and Deserializer
    classes are generated using Ant task itself.The client coding uses Value
    objects
    given by the Client_jar (generated using <Clientgen> ant task) to pass
    to the
    webservice. We dont want to go by this way.Is there anyway were in we
    can pass
    parameters to the method which expects non-built in java datatypes?
    Why i am asking this is, i want to know how an external client (.Net
    client )
    will be able to exceute my webservice (i.e., passing the required Object
    which
    the method is expecting)?

  • Tightly coupled and Loosely coupled scenarios

    Hi Experts,
    Could you please provide a example for Tightly coupled and Loosely coupled scenarios from SAP Platform?
    How to do the below scenarios from SAP platform?
    1. Tightly coupled (Non-SOA):
    Business Services : I have to create RPC encoded style webservices.
    Business Process : I have to call other platform RPC encoded style webservices (More than 2 webservices).
    2. Loosley coupled (SOA):
    Business Service : I have to create Document literal style webserivces
    Business Process : I have to call other platform Document literal style webservices ( More than 2 webservices)
    Please provide the input to do the above scenarios from SAP platform and please inform me which tool/component I have to use do the scenarios.
    Thanks & Regards
    Sara

    Hi Sara,
    Can you please elaborate your question in detail .
    1) Web Services are always examples of loosely couples architecture, either its document style or RPC style and whether you are creating WS or consuming WS.
    Tightly coupled architectures were those whose business logic layer and presentation layer were tightly coupled and reusability or scalability was a problem
    If you have user interfaces involved in your business process, then you should go for CAF( Composite Application Framework) to define a business process using VC, WebDynPro or Adobe Forms as UI.
    If it doesn't involve any user interaction, then you can go for ccBPM of Netweaver-PI to automate the process.
    Regards,
    Piyush

  • Data types are incompatable

    Why I got a 'Data types are incompatable' message when savings a new itme class (build it through item calss wizard).
    Thanks,
    Syvia
    Sorry, I have to be 'null null' -- since I couldn't log myself into this page.

    hi,
    check your column's data type in the database first,then accordingly create the item class in dicoverer.
    Dhinesh

  • Conversion of Packed Decimal Numbers to Java Data Types

    Hi all,
    I'm working with a mainframe file which contains datas in Packed Decimal Numbers.My requirement is to convert these datas to Java datatypes and also to convert the Java datatypes to Packed Decimal Numbers before storing them in the mainframe.
    Can anyone help me out with any code for converting Java data types to/from other data formats such as: EBCDIC, IBM370 COMP (binary numbers up to 9 digits), and COMP-16 (packed decimal numbers)?
    I would hugely appreciate any response to my query.
    Thanking you all,
    Kaushik.

    Rather than go that route, I'd instead look into providing a "service" on your mainframe to:
    1) provide a textual representation of the numbers (from native to text)
    2) read text, converting to native numeric storage
    And use that service to retrieve that information by your Java app (1)Similarly, instead of trying to write natively-formatted numbers from your Java app, I'd write it as text and make that same "service" read the text (2)
    This is the kind of thing XML is for.

  • Java Data Types?

    Hi,
    shall we say
    The data types in Java 1.5 can be divided into 4 categories. They are:
    i.     Primitive Data Types
    ii.     Abstract Data Types
    iii.     Arrays
    iv.     Enumerated Data Types
    ...............?

    Raijinsetsu wrote:
    I have to agree with jverd...
    Abstract is not a data type. Abstract declares a specific type of class which cannot be instantiated. Enumerations are just specialized objects. Arrays are also specialized objects.One could choose to consider arrays, enums, and abstract classes as separate categories.
    >
    If you wanted, the full list would be:
    Object (reference is another term you could apply to objects)
    int
    long
    short
    byte
    charEven if you include the primitives you forgot, this list is just as arbitrary as the original one, and does not correspond to the JLS.
    In particular, Object is not a type. There are primitives, references, and the null type.
    Edited by: jverd on May 6, 2009 7:56 AM

  • New user for java (Data type conversion)

    Hi all, I'm the newer from JAVA, just start to learn it few weeks before, there have some problem about me.
    I want to konw how to change the data type ??For example, if I have a string call year and store the char "1", how can I change that field to int type ?
    Thanks very much

    You should have a link to, or download, the API docs. You can see them on line at:
    http://java.sun.com/j2se/1.3/docs/api/index.html
    Look up the class Integer. It has a static method, parseInt() which takes a String argument and returns an int.. Since it is static, you can do the following:
    int value = Integer.parseInt(your_string);
    Then, to make it robust, you can put try/catch around it and catch NumberFormatException if you need to do error checking.

  • Target Site Column Data Type are Undefined Status

    Hi,
    When I created the mapping,there was a error about data type. Data types of columns were not changed, and datatypes status are undefined.
    I take this error as below;
    com.sunopsis.tools.core.exception.SnpsSimpleMessageException: The source datatype is null for the column: <ColumnName>, and the technology: Hyperion Planinng
    ODI 10.1.3.5
    SQL Server 2005
    Hyperion Planning 11
    How can I changed the datatypes? Is there a problem with hyperion planning site? How can assign the data types?
    thanks.

    First of all the error you posted
    "The source datatype is null for the column: <ColumnName>, and the technology: Hyperion Planinng"
    Which points to Hyperion planning....
    Anyway, if as you say it is file to SQL Server, check the DataStore for the reversed SQL server table, check the columns have a Type assigned to them
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Using java date type

    Hi,
    Is possible to use one data type defined in java in one forms.? How do yo define this type in forms. We need insert data in one vector java(defined in java).
    Thank all

    for example:
    javax.jcr.Session session = resourceResolver.adaptTo(Session.class);
    String parentPath = "/content/blah"; // or whatever your parent path is
    String nodetype = "nt:unstructured"; // or whatever other node type you require
    Calendar calendar = Calendar.getInstance(); // or whatever date
    Node node = session.getNode(parentPath).addNode("nodename", nodetype);
    node.setProperty("myproperty", calendar);
    session.save();

  • Java data type - byte

    Hi;
    I've a question here, hopefully some one can help me to clear my doubt.
    private byte[] buf = new byte[1024];
    as the declaration done above, does that mean the buf can hold until 1024 bytes data? as i know, byte data type only able to hold +2 power of 8 till -2 power of 7.
    YY.

    private byte[] buf = new byte[1024];
    as the declaration done above, does that mean the buf can hold until
    1024 bytes data? Yep, you've just defined an array of 1024 bytes, all neatly lined up next
    to eachother, the first byte can be retrieved or altered by indexing it like
    this: 'buf[0]', the next one as 'buf[1]' and the last one as 'buf[1023]'.
    as i know, byte data type only able to hold +2 power of 8 till -2 power of 7.Erm, almost; a byte can store any integral number in the range -128 to 127
    inclusive, i.e. -2**7 to 2**7-1.
    kind regards,
    Jos

  • WS returns an invalid java data type

    Hello guys, I started using BPM Studio 2 weeks ago, and I am stuck at this point:
    I get these message:
    Error workspace-1381754584564
    Activity '/TramitaciónPedido#Default-1.0/GlobalCreation[RealiarPedido]' task '' could not execute successfully.
    Detail:Method: '', Exception: 'El método 'CIL_beginBeginIn' de la clase 'OracleBPM_Lab2.TramitaciónPedido.Default_1_0.Instance' no se ha podido ejecutar correctamente.'
    Caused by: The method 'CIL_beginBeginIn' from class 'OracleBPM_Lab2.TramitaciónPedido.Default_1_0.Instance' could not be successfully executed.
    Caused by: Attempt to set empty javaType to return(hassetter hasgetter public,0) :: fuego.type.FuegoClass$LazyRef@190ce52. It must be null or a valid java type.
    fuego.papi.exception.ActivityFailedException: La tarea '' de la actividad '/TramitaciónPedido#Default-1.0/GlobalCreation[RealiarPedido]' no se ha podido ejecutar correctamente.
    Detalle:Método: '', Excepción: 'El método 'CIL_beginBeginIn' de la clase 'OracleBPM_Lab2.TramitaciónPedido.Default_1_0.Instance' no se ha podido ejecutar correctamente.'
    This is the code that calls the ws:
    // Inicilaiza parámetros fijos del expediente
    expediente.idInstancia = this.id.local
    expediente.intentosContactoCandidato = parametrosExpediente.maxIntentosContacto
    expediente.operador = null
    expediente.documentalista = null
    expediente.tarificador = null
    expediente.unidadOrganizativa = UnidadesOrganizativas.spain
    logMessage "Guzman: expediente.idInstancia "+expediente.idInstancia
    logMessage "Guzman: expediente.intentosContactoCandidato: " +expediente.intentosContactoCandidato
    logMessage "Guzman: expediente.unidadOrganizativa: "+expediente.unidadOrganizativa
    respuestaCRM as SCOR.WEBSERVICES.CRM.FrontalWsdl.RespuestaCRM
    filtro as SCOR.WEBSERVICES.CRM.FrontalWsdl.Filtro
    filtro.clave = ClaveFiltro.EXPEDIENTE
    filtro.valor = "00020353"
    usuarioCRM as SCOR.WEBSERVICES.CRM.FrontalWsdl.Usuario = SCOR.WEBSERVICES.CRM.Usuario()
    logMessage "Guzman: filtro.clave= "+filtro.clave
    logMessage "Guzman: filtro.valor= "+filtro.valor
        usuarioCRM.unidadOrganizativa = "ES"
        usuarioCRM.usuario = "usuarioBPM"
        usuarioCRM.clave = "P@ssword"
        usuarioCRM.dominio = "adminesp"
    consultaExpediente FrontalService
        using arg0 = usuarioCRM,
              arg1 = filtro
        returning respuestaCRM = @return
    logMessage "Guzman: usuarioCRM.unidadOrganizativa: "+usuarioCRM.unidadOrganizativa
    logMessage "Guzman: usuarioCRM.usuario: " +usuarioCRM.usuario
    logMessage "Guzman: usuarioCRM.calve: "+usuarioCRM.clave
    logMessage "Guzman: usuarioCRM.dominio: "+usuarioCRM.dominio
    I know wich is the problem but I don´t know how to solve it, I will apreciate any help, thanks in advance.

    SQL Developer may not recognise the date formats in your EXCEL so you need to tell it what it is. Check and note the value of the date column in the EXCEL file, then use the date format in the Map Source Data to Existing Table section in SQL Developer during the Import Data dialog.
    For example. if the data in EXCEL is 22-JUN-09. Select the column in the above mentioned section and enter DD-MON-RR (or DD-MON-YY) in the Date Format before klicking Next to Verify. This should work perfectly.

  • Data types are not appropriate for Relationnal operation, strange error ?

    Hi,
    we try to connect send (thanks jdbc:odbc) a query contening a WHERE statment with date (a BETWEEN). Unfornately we received an error message (see title). We know that the field is in DateTime format (like mm/dd/yyyy hh:mm:ss aa).
    Is anybody able to find an issue to perform this relationnal operation ?
    Thanks

    Oooops I forgot,
    This is my Query
    String PatQuery="SELECT HelpDeskCases.\"Case-ID+\", HelpDeskCases.\"Assignee-Login-Name\", HelpDeskCases.\"Create-Time\", HelpDeskCases.\"Resolved-Time\" FROM HelpDeskCases WHERE HelpDeskCases.\"Create-Time\" >=" + ddeb + " AND HelpDeskCases.\"Resolved-Time\" <=" + dfin ;
    Regards

  • Unsigned data types in Java

    I know this is beating an old dead horse, but I find it frustrating that Java does not support unsigned types. I frequently work with binary file formats that store data in unsigned types. In Java there is no easy way to work with these files. For example, if the file has unsigned longs it is a problem. Also, if the file has unsigned ints, a very common occurrence, I have to "upcast" those numbers into longs. This is expensive from a time and space point of view since data files from satellites can be hundreds of megabytes or gigabytes in size and I have to double them in size just to capture the final bit. It is also inefficient to process these files because now I am using longs (64-bits) on systems that are usually optimized for 32-bits which means processing code takes a big performance hit.
    Also, there is simple confusion. For example, if I provide data from a file to a user and they see "long" where they know they data is an int they start asking questions and I have to start explaining why it is a long instead of an int. Scientists don't like data to be "translated" for integrity reasons so I have make these long explanations how upconverting to a long is not really a translation, etc. It just creates a lot of confusion and problems.
    Also, look at from a developer point of view. The developer has a spec in front of him listing the data types and is now reading the corresponding java class where the data gets loaded--all the data types are different because of the upconverting--it creates confusion.
    Is there any hope of having unsigned types or we all condemned to a lifetime of upconverting?

    JohnChamberlain wrote:
    I thought it was obvious that you need to upconvert unsigned values because otherwise the number will be wrong if the sign bit is set.No. A 32-bit scalar with the high bit set is still correct (bit-for-bit). You only get problems if you perform arithmetic, right-shift or widening-conversion on it, or make a decimal String representation.
    For example, lets say the file has an unsigned int (uint32) value of 0xF1234567 which in decimal is 4,045,620,583. This is a positive number. If you load this value into a Java int value it will be interpreted as the negative number -249,346,713.For a given value of "interpreted"; Integer.toHexString(0xF1234567) produces the expected result.
    Further example: if you load a file containing uint32 values into Java ints and then average all the values you might come out with a negative number. Obviously this is impossible because the file contains only positive numbers so the average of those numbers cannot be negative.Obviously if you need to do this on a number of large 32-bit scalars you need the sum scalar to be 64-bit which means you can mask your way out of any issues when you perform the widening conversion.
       int[] x = { 0xF1234567, 0xF1234565, 0xF1234557 };
       long sum = 0L;
       for(int i=0;i<x.length;++i) { sum += 0xffffffffL & x; }
    int average = (int)(sum/x.length); // average is now "correct" (bit-for-bit)
    Maybe it wasn't clear that I need to not only load the values but use them.You did fail to mention that.
    The files I load get passed on to other applications where the values get used and obviously that includes doing calculations on them so the values have to be correct. I cannot load a bunch of UInt32s into Java ints and say "pretend they are positive numbers".I get the impression you are not really interested in finding solution.
    It can be releasing to have a whinge but don't let it distract you from thinking outside the box.
    I think part of the problem here is that Java programmers do not have to work with binary files or binary protocols so they do not appreciate that doing this has serious problems in Java.I have done binary protocols. Not having unsigned scalars was never a problem.
    For example, take unsigned longs. If you are working with a binary source that has these you have no alternative except to use the BigInteger package and convert every value into an object, an incredibly painful and CPU-intensive operation if you dealing with files with gigabytes of data.You might want to consider alternatives, like
    unsigned right-shifting ('>>>') the incoming values for 64-bit scalar fields where dividing by 2 would be acceptable,
    etc.

  • How do I return a java.sql.Timestamp data type in a Web service?

    I'm new to workshop and java. I'm creating a mini application to simulate a real work Web Service (development environment is on an intranet). I was able to completely simulate the Web Services minus all date values.
    I'm using a standard weblogic workshop database controls that are feeding the various WebServices and their methods (Web services was generated from DB control). I get a java type not support error when I attempt to return a java.sql.Timestamp. I temporarily got around the problem by omitting all dates from the sql.
    However, we are at the point where we need the complete record.
    My two questions
    1) What java data type do I convert the java.sql.Timestamp to
    2) Where and how do I do it in workshop.
    Thanks in advance
    Derrick
    Source view from workshop looks something like this.
    public interface MyData extends DatabaseControl, com.bea.control.ControlExtension
    static public class dbOverallRec
    public String key;
    public String field1;
    public int field2;
    public java.sql.Timestamp create_date
    public dbOverallRec () {};
    *@jc:sq; rowset-name="OverallRowSet" statement::
    *select key, field1, field2 ,create_date from overall where key={KEY}::
    dbOverallRec getOverallByKey(String Key);
    * I had to omit the create_date to get it to work

    You should try changing java.sql.Timestamp to java.util.Calendar.
    java.util.Calendar maps to the dateTime type in XML Schema, and TIMESTAMP as a JDBC type.
    Regards,
    Mike Wooten

  • Tightly and Loosely coupled scenarios

    Hi Experts,
    Could you please provide a example for Tightly coupled and Loosely coupled scenarios from SAP Platform?
    How to do the below scenarios from SAP platform?
    1. Tightly coupled (Non-SOA):
        Business Services : I have to create RPC encoded style webservices.
        Business Process : I have to call other platform RPC encoded style webservices (More than 2 webservices).
    2. Loosley coupled (SOA):
        Business Service : I have to create Document literal style webserivces
        Business Process : I have to call other platform Document literal style webservices ( More than 2 webservices)
    Please provide the input to do the above scenarios from SAP platform and please inform me which tool/component I have to use do the scenarios.
    Thanks & Regards
    Sara

    Hi Sara,
    Can you please elaborate your question in detail .
    1) Web Services are always examples of loosely couples architecture, either its document style or RPC style and whether you are creating WS or consuming WS.
    Tightly coupled architectures were those whose business logic layer and presentation layer were tightly coupled and reusability or scalability was a problem
    If you have user interfaces involved in your business process, then you should go for CAF( Composite Application Framework) to define a business process using VC, WebDynPro or Adobe Forms as UI.
    If it doesn't involve any user interaction, then you can go for ccBPM of Netweaver-PI to automate the process.
    Regards,
    Piyush

Maybe you are looking for

  • Can I delete extensions that do not load or am I looking for trouble

    After running EtreCheck I noticed that many extensions do not load.  So my question is: Can I delete extensions that do not load or am I looking for trouble? Here is the EtreCheck report: Problem description: slow with Yosemite EtreCheck version: 2.1

  • Not-so-simple programming task

    Hie! I am currently working on GPS device on iPAQ pocket PC. Can anyone give me example of source code for my reference. I just need the details on how to get the data from the PCMCIA port,which the GPS receiver attached) & how to calculate, process

  • Re-install additional language support

    Hi all, I use monolingual to remove some languages to free up disk space. What if in the future i need one of those removed languages, is there any way to re-install instead of erase and install OS X? Thanks.

  • {Solved} Windows 8.1 Doesn't show users when windows loads, only shows options for accessibility and shutdown/restart

    I just recently come into a problem on a dell all-in-one, where the computer has been updated to windows 8.1 and doesn't show users, only a blue screen with the power options and accessibility options and here is how I fixed it. Note: you will lose y

  • Default Button Handling

    i want to know about Default Button Handling. Default Button means "Auto Focused Submit Button when i click page and press enter key ". i want to know how can i set some submit button to Default Submit Button. Message was edited by: Redsky21 Message