Telnettin' Java-Style

Hello!
Ok, here's a question, perhaps a dooozee for U ... ;-)
I'd like to telnet a server, in the terminal, that's easy, enter
"telnet my.server.org 1400" and you're in, type user and pass and rummage around. However, you are INTO the telnet session, entering commands. I'd like to use something like this:
strCommand = new String("telnet 192.175.2.25 145");
     try
          Scanner scan = new Scanner(Runtime.getRuntime().exec(strCommand).getInputStream());
               while(scan.hasNextLine())
                         System.out.println(scan.nextLine());
     catch(RuntimeException e)
               System.out.println("Runtime exception" + e.getMessage());
     catch(Exception e)
               System.out.println("Runtime (other) exception " + e.getMessage());
That's all very nice if there's only one command to give and the reveiver (the telnet server in this case) does the rest, but in this case, more commands are to follow...
Any hints?
Tnx!
Thor
BTW, I dev on Linux, if it's important to know...
Edited by: T01dev on 24-jan-2009 16:40 : wrong title

Thanks 4 the help, people, the stake holder has (for now) pulled the plug on this one - it seems to be a "global crisis" thing with them...
Eh, so what, big tnx!
On to the next project!
Thor

Similar Messages

  • Java style and coding conventions

    Hello All,
    Most of my programming experience is in Java, and as such, I try to conform to the style and coding conventions that are used in all of the Sun tutorials, and to my understanding, the specification. I'm enrolled in my final semester of a bachelor's of computer science and engineering, and one of my courses is "Software Engineering". Our course assignment is to make a website, written in PHP. I don't really care for PHP, so I volunteered for the Code Quality Assurance team, thinking, I'm fairly consistent when it comes to adhering to the Java conventions, it should be reasonable to determine similar conventions for this project, and give my classmates pointers on how to improve the readability and layout of their source listings.
    The problem is, my professor, absolutely, whole-heartedly hates Java. He despises everything about it. For example, I sent him a source listing that I felt was well written, readable, and adequately documented. Some of the things that I was "doing wrong" were:
    1. Naming Conventions
    All of the Classes were first-letter capitalized, subsequent first-letter of each word capitalized. FormLayoutManager was one particular example. All instance or primitive identifiers were first-letter lowercase, subsequent first-letter capitalized, so an instance of FormLayoutManager could be formLayoutManager, or menuLayoutManager, etc. All constants were all capitals, with underscores separating each word. MAXIMUM_POWER. All methods were first-letter lowercase, subsequent first-letter capitalized, showLoginComponents().
    My Professor insists that the convention I (and most of the Java community as far as I can see) is terribly unreadable, and that all instances variables and method names be first-letter capitalized. I tried explaining that this sacrifices the ability to easily distinguish between a class type or interface, and an instance, and was ignored.
    2. Declaration and Initialization
    Also, supposedly declaring a local identifier and initializing it in the same line is some sort of abomination of everything sacred in programming. So I found myself constantly doing things like
    public String info() {
      StringBuilder info;
      info = new StringBuilder(512);
      // append a bunch of information to info
      return info.toString();
    }3. 80 Character line widths
    He wants me to break any statement that is over 80 characters in width into multiple lines. I know a long statement wrapping around in your editor is a irritating, but 80 characters, seriously, who doesn't have an editor that can't handle more than 80 characters on a line?
    4. this and argument names
    In most of my constructors that accept arguments, I would usually do something like
    public Student(String name, int age) {
       this.name = name;
       this.age = age;
    }Which he thinks is horribly confusing, and should be
    public Student(String n, int a) {
      name = n;
      age = a;
    }5. singular collections / arrays identifiers
    I had something like:
    String[] keywords= new String[] { "new", "delete", "save", "quit" };
    for (int i = 0; i < keywords.length; i++) {
       System.out.println(keywords);
    And he insisted that "keywords" be renamed "keyword", as in, the i-th keyword, which I think is kind of stupid because the array is an array of keywords, and having a singular identifier makes that less obvious.
    It's driving me crazy. It's driving everyone else in the class crazy because they're all mostly used to Java style conventions as well. I've tried pleading my case and I can't even get him to acknowledge the benefits of the "alternative" styles that I've used in my programs up to this point.
    Have any of you had to deal with either professors or bosses who have this type of attitude, whether it be towards Java or any other language? This guy has been involved with computer science for a while. I think he's used to Pascal (which I know nearly nothing about).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    You will find people who will disagree about this stuff all the time. I had a similar course and we read "Code Complete" which offers some style suggestions. Fortunately, my professor was intelligent enough to allow a discussion of these styles and I had a chance to argue against the "bracket every if statement" idea and other little things I didn't agree with. It was insightful conversation, rather than a "I'm the professor, you're a student, so listen to me".
    Here's the important part: It doesn't matter what the standard is, only that there is one.
    Unless I misunderstand, he allowed you to take on the responsibility of QA, so it is ultimately your decision. If the project suffers because of poor quality of code, it will be on your head. If, on the other hand, you give in to him and use a style that makes no sense and the project suffers because of poor code, it will still be on your head.
    So he really has no position in this because he is not a stakeholder in this decision. Tell him that this is your responsibility and you need to make the choices that are right for your group, not right for him. If he's teaching you anything that can reasonably be called software engineering, he should understand that. Otherwise he's just teaching out of a book called "Software Engineering" and doesn't know anything (or so it seems from this small window you've given us).
    caveat: If he's reviewing the code and he's particularly snarky about his "styles", you might want to consider giving in to his demands for the sake of your grade. Sad reality.

  • Converting a Java style date into useful format

    If I am calling a web service that returns a Java style date as a numeric value, such as 1177651563767 (milliseconds since 1 Jan 1970), how can I display this as a human readable date (hh:mm:ss dd-mm-yyyy? I have looked at the <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/40/a228173435437394f54c56de571ca4/frameset.htm">SAP help pages on date functions</a> and the
    <a href="https://wiki.sdn.sap.com/wiki/display/VC/DateandTime+Formats">wiki page on date and time formats</a>, but neither seems to help.
    My Java date is a numeric.
    Thanks

    Hi Michael,
    you can call the webservice with another webservice or an RFC and then use Java or ABAP to convert the value into the right format. My opinion is as you mentioned that there is no way with VC. Maybe you can use a time function (DADD as it is described <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/40/a228173435437394f54c56de571ca4/frameset.htm">here</a> and sum up to 01/01/1970 your [value in seconds]/60 this should work, but I never tested it.      
    Maybe this works, but this isn't a good solution anyway.
    Best Regards,
    Marcel

  • Java style in a document

    this may be the wrong place to ask so just tell me to move on if it is.
    but how would i go about writing java in word 2007 to say how could a change the formatting style
    to be more helpful like making tab 3 spaces long and not capitulating my words,
    if thats hard to understand i basicly want my word to do the useful things like in BlueJ. all the auto formatting things.

    Lostone wrote:
    this may be the wrong place to ask so just tell me to move on if it is.
    but how would i go about writing java in word 2007 to say how could a change the formatting style
    to be more helpful like making tab 3 spaces long and not capitulating my words,
    if thats hard to understand i basicly want my word to do the useful things like in BlueJ. all the auto formatting things.MS Word is not an appropriate editor for Java source files. TextPad, et al., offer syntax highlighting and formatting help for Java source files if you're looking for a simple editor. For more advanced IDE capabilities, NetBeans and Eclipse seem to be the most popular. But MS Word is right out.
    ~

  • Java-style buttons in Oracle Forms 6i

    Hey there,
    Does anyone know how to create buttons with curved edges in Oracle Forms 6i? Something like those Swing components in Java?
    Thanks
    Al

    Alex,
    for Forms on the web you can use PJCs. The Forms 10g demos (http://download.oracle.com/otn/other/general/forms10gdemos9_0_4_2.zip) and the Forms 9i demos have a sample Java class for this. The same solution should work in 6i as well.
    Frank

  • String "&nbsp" crap in 'Java' style code post

    <mx:Image xmlns:mx="http://www.adobe.com/2006/mxml" initialize="init()">
         <mx:Script>
              <![CDATA[
                   public function init():void {
                        this.addEventListener(Event.COMPLETE, loaded);
                   private function loaded(e:Event):void {
                        this.width = this.contentWidth;
                        this.height = this.contentHeight;
              ]]>
         </mx:Script>
    </mx:Image>
    Let's see if this bug repeats itself... there should be &nbsp strings in the above pasted text instead of spaces (now, watch it work correctly this time..).  Doing an EDIT of the post replaced them with spaces when I originally posted.  So to insert readable 'Java' syntax code, I guess we have to post and then update the post to remove the Jive droppings that this crap forum inserted. (pathetic, Jive...pathetic)

    Kath-H wrote:
    I'm sure they haven't really thought about it. I've thought for a long time that users here are not typical Jive users. At all. Adobe didn't think this through when picking new forum software.
    They didn't think anything through.
    Jive was selected for its pretty face and has totally failed to provide the forum experience needed for a user-to-user support service.
    Dual log-in was decided upon because it seemed like a good idea, but wasn't.
    I could go on, but would rather not become another Ansury or Jhabrix.

  • Output in java style

    Hi Dear,
    i am new to this forum and ebs ,i have a question that can i use
    System.out.println("message to be displayed")to display a message(in CO).

    Hi,
    System.out.println("message to be displayed")The above will print the vaue when u will run the page locally from Jdeveloper But it wont print any value when u will move the same to the server. You need to replace above line with the below one to get the value printed in the Log.
    pageContext.writeDiagnostics(this,"message to be displayed"+num,2);Regards,
    Gyan

  • Java Style Guidelines?

    Where can I find an article that talks about coding conventions.
    e.g.
    if (statement) {
    if (statement)
    }

    I'm a little fuzzy on breaking up this line
    System.out.println(uniformResourceLocator.get (Integer.parseInt(s.substring(4))));
    Something like this maybe?
    System.out.println(uniformResourceLocator.get
    (Integer.parseInt(s.substring(4))));
    Or this?
    System.out.println(uniformResourceLocator.get
    (Integer.parseInt(s.substring(4))));

  • Old Mainframe Programmer has java question....

    I've looked at other formum suggestions however, I'm still having problems. What should I try specifically? I notice trying to use
    classpath in autoexec.bat file under win98 doesn't work. Therefore, I
    set classpath in my manifest file. Is this practical?
    1.
    javac CdCorp.java
    (compiles no errors)
    2.
    Execution of manifest file
    c:\jpgm\src\classes>jar cfm comp.jar comp.mf classes \jpgm\htm\.htm \jpgm\images\*.jpg
    note: all class files and jar file are stored under classes directory.
    3.
    c:\jpgm\src\classes>Appletviewer index.htm
    started applet not initialized
    NoClassDefFoundError: CdCorp (wrong name: src/classes/CdCorp)
    Environment:
    Content of manifest file: comp.mf
    Manifest Version: 1.0
    Main-Class: CdCorp
    Name: src/classes
    Class-Path: c:\jpgm\src\classes\comp.jar
    Structure of java Program: CdCorp.java
    package src.classes;
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    import java.net.*;
    import java.util.*;
    public class CdCorp extends Applet implements Runnable
    //instance variable
    boolean stopFlag;
    Image img[] = new Image[MAXIMAGES];
    int i=0;
    int choice = 0;
    int tracked;
    int state;
    int curX=250, curY=340;
    int mouseX = 0;
    int mouseY = 0;
    int pos = 0;
    int sw1=0;
    MediaTracker tracker;
    static final int MAXIMAGES = 20;
    static final int MAXITEMS = 20;
    String msg= " Providing Information Technology Solutions " +
    String msgm = "";
    String name[] = new String[MAXIMAGES];
    String url[] = new String[MAXITEMS];
    String target[] = new String[MAXITEMS];
    String urlPrefix, urlSuffix;
    Start of Html logic index.htm
    <html>
    <applet codebase="classes" code="CdCorp" archive="comp.jar" width=800 height=600>
    <param name="img" value="cdmenbk+cdmenbk2+cdlogo+cdlogo1+cdhp1+cdhouston+cdcitynight+
    cdmencmpny+cdmenservice+cdmenexpert+cdmenjpost+cdmenmisc">
    <param name="urlPrefix" value="http://comp-data.home.att.net">
    <param name="urlList" value="cdindex+cdoffice+cdcontacts+cdleaders+cdteam+cdcorpsummary+
    cdjobposting+cdinf-main+cdspp+cdnm-main+cdsai+careers+cdnews+cdhelp+cdpart+
    cdcorpov">
    <param name="targetList" value=""_self+self+self+self+self+self+self+self+self+_self+
    self+self+self+self+self+self">
    <param name="urlSuffix" value=".htm">
    </applet>

    The manifest classpath refers to other resources that your code needs, not to your classes themselves.
    http://java.sun.com/j2se/1.4.2/docs/guide/jar/jar.html
    It doesn't make sense to have a classpath in a jar file that starts with c:\ anyway.
    I think your problem is that you're not referring to the full package name to the class file in your HTML applet tag. You need "src.classes.CdCorp", I believe. Also I thnk that CODEBASE and ARCHIVE attributes were mutually exclusive, though I could be wrong.
    The package name "src.classes" is terrible. "src" is traditionally the name of a directory holding source code. "classes" is traditionally the name of a directory holding compiled classes. Any project would involve both, so they add no info and only confuse people to use in a package.
    Package names should identify your company and the meaning or purpose or name of the project that created the code.
    Please read "The Elements of Java Style" for more info.
    http://www.amazon.com/exec/obidos/tg/detail/-/0521777682

  • Handling Java Exception via WSIF

    Hi all,
    On BPEL, I want to catch exception thrown by Java method exposed via WSIF so that I can propagate the error message to BPEL client, but it seems that instead of getting my exception, BPEL keeps getting remoteException, is it possible at all ?
    Below is my Java class:
    public class InvalidParameterException extends Exception
      public InvalidParameterException(String string)
        super(string);
    public final class CommonUtil
       public static String formatMSISDN(String rawMSISDN) throws InvalidParameterException
          throw new InvalidParameterException("test");
          return "test2";
    }And below is part the WSDL:
      <message name="RawMSISDNMessage">
        <part name="rawMSISDN" type="xsd:string"/>
      </message>
      <message name="FormattedMSISDNMessage">
        <part name="formattedMSISDN" type="xsd:string"/>
      </message>
      <message name="InvalidParameterException">
        <part name="message" type="xsd:string"/>
      </message>
      <portType name="CommonUtilityPT">
        <operation name="formatMSISDN">
          <input name="FormatMSISDNRequest" message="tns:RawMSISDNMessage"/>
          <output name="FormatMSISDNResponse" message="tns:FormattedMSISDNMessage"/>
          <fault name="FormatMSISDNFault" message="tns:InvalidParameterException"/>
        </operation>
      </portType>
      <binding name="JavaBinding" type="tns:CommonUtilityPT">
        <java:binding/>
        <format:typeMapping encoding="Java" style="Java">
          <format:typeMap typeName="xsd:string" formatType="java.lang.String"/>
        </format:typeMapping>
        <operation name="formatMSISDN">
          <java:operation methodName="formatMSISDN" methodType="static"
                          parameterOrder="rawMSISDN" returnPart="formattedMSISDN"/>
          <input name="FormatMSISDNRequest"/>
          <output name="FormatMSISDNResponse"/>
          <fault name="FormatMSISDNFault"/>
        </operation>
      </binding>
      <service name="CommonUtility">
        <port name="JavaPort" binding="tns:JavaBinding">
          <java:address className="com.visitek.xlpoc.CommonUtil"/>
        </port>
      </service>
    ...Any help would be greatly appreciated.
    Best Regards,
    James
    Edited by: user543925 on May 25, 2010 5:06 AM

    Hi,
    After restarting SOA Suite, it seems that the expected fault is returned (InvalidParameterException). But this time another exception is thrown which indicates as if fault handler for InvalidParameterException was not specified, while I've done so in BPEL:
      <faultHandlers>
        <catch faultName="ns3:InvalidParameterException">
          <sequence name="Sequence">
            <assign name="AssignOutput">
              <copy>
                <from expression="ora:getFaultName()"/>
                <to variable="outputVariable" part="payload"
                    query="/client:processResponse/client:message"/>
              </copy>
            </assign>
            <reply name="ReplyOutput" variable="outputVariable"
                   partnerLink="allowexistofferbpel_client"
                   portType="client:AllowExistOfferBPEL" operation="process"/>
            <terminate name="ExitBPEL"/>
          </sequence>
        </catch>
      </faultHandlers>
    ...And below is the exception stacktrace:
    com.visitek.xlpoc.InvalidParameterException: The length of parameter 'rawMSISDN' should be between 9 and 15
         at com.visitek.xlpoc.CommonUtil.formatMSISDN(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at oracle.integration.wsif.providers.java.WSIFOperation_Java.executeRequestResponseOperation(WSIFOperation_Java.java:1048)
    <May 27, 2010 5:52:12 PM WIT> <Error> <oracle.soa.bpel.engine.ws> <BEA-000000> <<WSInvocationManager::invoke> got RuntimeException
    oracle.fabric.common.FabricException: oracle.fabric.common.BusinessFaultException
         at oracle.integration.platform.blocks.wsif.WsifReference.request(WsifReference.java:705)
         at oracle.integration.platform.blocks.mesh.SynchronousMessageHandler.doRequest(SynchronousMessageHandler.java:139)
    Caused By: oracle.fabric.common.BusinessFaultException
         at oracle.integration.platform.blocks.wsif.WsifReference.request(WsifReference.java:657)
         at oracle.integration.platform.blocks.mesh.SynchronousMessageHandler.doRequest(SynchronousMessageHandler.java:139)
    <May 27, 2010 5:52:12 PM WIT> <Error> <oracle.soa.bpel.engine> <BEA-000000> <<CubeEngine::handleWorkItem> This exception occurred because the fault thrown in the BPEL flow was not handled by any fault handlers and reached the top-level scope. Root cause : com.oracle.bpel.client.BPELFault: faultName: {InvalidParameterException}
    parts: {{
    exception=<exception xmlns="http://visitek.co.id/xlpoc/">
       <tns:faultstring xmlns:tns="http://visitek.co.id/xlpoc/">The length of parameter 'rawMSISDN' should be between 9 and 15</tns:faultstring>
       <tns:detail xmlns:tns="http://visitek.co.id/xlpoc/">com.visitek.xlpoc.InvalidParameterException: The length of parameter 'rawMSISDN' should be between 9 and 15</tns:detail>
    </exception>
    >
    Not fatal connection error ... not retrying.
    <May 27, 2010 5:52:13 PM WIT> <Error> <oracle.webservices.service> <OWS-04115> <An error occurred for port: FabricProvider: javax.xml.rpc.soap.SOAPFaultException.>
    ...And this is the response message:
    <messages>
    <input>
    <InvokeFormatMSISDN_formatMSISDN_InputVariable>
    <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="rawMSISDN">
    <rawMSISDN>test</rawMSISDN>
    </part>
    </InvokeFormatMSISDN_formatMSISDN_InputVariable>
    </input>
    <fault>
    <bpelFault>
    <faultType>
    <message>0</message>
    </faultType>
    <InvalidParameterException xmlns="">
    <part name="exception">
    <exception xmlns="http://visitek.co.id/xlpoc/">
    <tns:faultstring xmlns:tns="http://visitek.co.id/xlpoc/">The length of parameter 'rawMSISDN' should be between 9 and 15</tns:faultstring>
    <tns:detail xmlns:tns="http://visitek.co.id/xlpoc/">com.visitek.xlpoc.InvalidParameterException: The length of parameter 'rawMSISDN' should be between 9 and 15</tns:detail>
    </exception>
    </part>
    </InvalidParameterException>
    </bpelFault>
    </fault>
    <faultType>
    <message>0</message>
    </faultType>
    </messages>
    ...The attribute xmlns in InvalidParameterException is empty, this could be the problem, but I don't why.
    Any help would be greatly appreciated.
    Regards,
    James

  • Error while using Java bindings in BPEL (WSIF)

    Hi,
    I have a requirement to invoke a java method from BPEL process using WSIF and get the response back from it.
    MY java method accepts an input parameter which is object of anothe class.
    When I tried to invoke the java class from BPEL, I am getting the following error:
    [email protected] : Could not invoke 'getFullName'; nested exception is: org.collaxa.thirdparty.apache.wsif.WSIFException: Class 'com.services.test.Employee' is not compatible; nested exception is: java.lang.NullPointerException
    Please find below the java class that I created:
    package com.services.test;
    import com.services.test.Employee;
    import com.services.test.EmployeeFullRecord;
    public class EmployeeRecord {
    public EmployeeRecord() {
    public static void main(String[] args) {
    EmployeeRecord employeeRecord = new EmployeeRecord();
    public EmployeeFullRecord getFullName(Employee emp) {
    String fullName = emp.getFname() + emp.getLname();
    EmployeeFullRecord emp1 = new EmployeeFullRecord();
    emp1.setFullName(fullName);
    return emp1;
    The following is the wsdl that I created with JAva bindings:
    <types>
    <schema attributeFormDefault="qualified"
    elementFormDefault="qualified"
    targetNamespace="urn:EmployeeRecord"
    xmlns="http://www.w3.org/2001/XMLSchema">
    <complexType name="Employee">
    <sequence>
    <element name="fname" type="xsd:string" />
    <element name="lname" type="xsd:string" />
    </sequence>
    </complexType>
    <complexType name="EmployeeFullRecord">
    <sequence>
    <element name="fullName" type="xsd:string" />
    </sequence>
    </complexType>
    </schema>
    </types>
    <message name="EmployeeRequestMessage">
    <part name="emp" type="tns:Employee"/>
    </message>
    <message name="EmployeeResponseMessage">
    <part name="emp1" type="tns:EmployeeFullRecord" />
    </message>
    <portType name="Employee">
    <operation name="getFullName">
    <input message="tns:EmployeeRequestMessage" />
    <output message="tns:EmployeeResponseMessage" />
    </operation>
    </portType>
    <binding name="JavaBinding" type="tns:Employee">
    <java:binding/>
    <format:typeMapping encoding="Java" style="Java">
    <format:typeMap typeName="tns:Employee" formatType="com.services.test.Employee"/>
    <format:typeMap typeName="tns:EmployeeFullRecord" formatType="com.services.test.EmployeeFullRecord"/>
    <format:typeMap typeName="xsd:string" formatType="java.lang.String" />
    </format:typeMapping>
    <operation name="getFullName">
    <java:operation methodName="getFullName" />
    <input/>
    <output/>
    </operation>
    </binding>
    <service name="Employee">
    <port name="JavaPort" binding="tns:JavaBinding">
    <java:address className="com.services.test.EmployeeRecord"/>
    </port>
    </service>
    Please let me know if I have missed out something.
    THanks in advance!!!

    Hi,
    I have created another such service as above and placed the class files in <oraclehome>/bpel/system/classes and invoked the java code from bPEL.
    Now i am getting the following error:
    com.collaxa.cube.ws.wsif.providers.java.WSIFOperation_Java@98065 : Could not invoke 'createIdentity'; nested exception is: org.collaxa.thirdparty.apache.wsif.WSIFException: Class 'com.testx.wam.services.gen.identity.CreateRequest' is not compatible; nested exception is: javax.xml.bind.UnmarshalException: unexpected element (*uri:"",* local:"createRequest"). Expected elements are <{http://services.test.com/shared/xmlschema/user/1}CreateResponse>
    My question is why am I getting URL as empty when I am actually passing the URL to the service. I have highlighted the uri which is showing as empty above.
    Please help me solve this issue.
    Thanks in advance!!!

  • Process LDAP filters like (&(cn=a)|((sn=b)(uid=c))) to form java expression

    I need to process LDAP filters in my code of the form
    (&(cn=a)|((sn=b)(uid=c))) to process into a java style expression check like :
    ((cn=a) && ((sn=b) || (uid=c))) I am looking for an efficient algorithm or code to convert LDAP operands into java expression checks.
    I already have these attribute values(a,b,c) in my application, and I need to check if the condition specified in LDAP filters is satisfied by the attributes (cn, sn, uid).

    abhijitonkar wrote:
    I need to process LDAP filters in my code of the form
    (&(cn=a)|((sn=b)(uid=c))) to process into a java style expression check like :
    ((cn=a) && ((sn=b) || (uid=c))) I am looking for an efficient algorithm or code to convert LDAP operands into java expression checks.
    I already have these attribute values(a,b,c) in my application, and I need to check if the condition specified in LDAP filters is satisfied by the attributes (cn, sn, uid).Is it just a matter of converting the prefix notation of the LDAP filter to infix notation and then using something like beanshell to eval the transofrmed filter?

  • Has anybody noticed how much RAM Java uses?

    Hi Everyone,
    I have been playing around a little with Java programs, and far out the RAM in my computer gets strained!!! I don't know how many times a Java application has completely locked down my 667MHz, 320Mb computer. My brothers 1.2GHz, 256Mb runs Java a little better, but really to play "hard ball" Java style you would need a 2.4GHz Pentium 4 with between 512 and 1024MB of RAM.
    Obviously Sun Microsystems have looked to the future with Java. They have played their cards very well by creating a programming language that is a little hard for current computer hardware to run.
    In ten years time when we are talking about computer hardware, we will have hard drives with terabytes of space sitting on our home PC, don't worry about clock speeds, there won't be any, the Quantum computer has already taken care of that (for all those novice Quantum Guru's out there - information exchange takes place in no time, that is not faster than the speed of light... the messages simply takes place in no Time.). Technology moves so fast that it is hard to keep pace, unless of course you are addicted to Reading!!
    At the moment we obviously do not have the hardware to run massive Java applications. So instead we have garbage collection. How effective is garbage collection, and what can be done to improve it?
    I have read a little about garbage collection, but it sounds quite haphazard, possibly unreliable. Obviously object orientated code takes up a lot of memory, by learning garbage collection techniques I hope to improve my coding. If anybody who reads this thread can contribute anything of personal experience related to garbage collection, it will be greatly appreciated. Code is always good, but I am also looking for peoples ideas about improving garbage collection, even if those ideas are not viable in the current version of the JDK.
    Thanks for your comments and I hope that you enjoyed reading this thread.
    David

    Hi,
    if it was meant as a joke, I enjoyed it - but if your opinion is really that of java, you have posted, I would suggest to read some of the documentations provided by Sun and you will find out, how java uses memory and you will also find out, that garbage collection is not the point, you have to worry about, because it is automatically done by the JVM. Also javac has parameters, where you can manipulate the memory usage of the JVM. So, please start reading in the case this was not just a joke :)
    greetings Marsian

  • Optimise RAM usage of Java with Swing

    Hello!
    I have written a little Java SWING Programm. It works great on my P4 3,2 GHz with 512 MB RAM.
    Now I start it on an machine with Celeron 800 MHz with 256 MB RAM. After that I see a big Problem! My applikation consums between 30 and 32 MB RAM! How can I optimise this?! Are there tools to help me at this problem? Can you give me any tips?
    Thanks for help
    Rainer

    one of Swing's problems that people often cite is its memory usage
    jschell pointed out that even native windows wordpad takes ~12MB these days so 30MB isn't that much to worry about
    you can use the recently released HAT (Heap Analysis Tool) from sun to look at where the objects on the heap are
    alternatively HPJMeter (downloadable from hewlett packards website) can analyize the files generated by the -Xrunhprof JVM argument
    I think just a HelloWorldSwing.java style program probably consumes around ~20MB - just because of things that Swing loads in order to run
    asjf

  • Executing a Java application from JAVA

    Hello all,
    I have a problem spawning a Java IRC client from another Java application. The client only manages to execute itself properly [join a specific channel] once the original parent application has been closed. Any ideas?
    The code is as follows:
    public void run(){
         String[] cmd = {"java", "IRC"};
         try {
               Process p = Runtime.getRuntime().exec(cmd);
              p.waitFor();
         } catch (Exception exc){
              print ("Could not run the IRC session file" + exc);
      }

    Well, if you ask me, it's not very good Java style to try to access the command line to run ANOTHER Java application.
    My suggestion is simply call the IRC program's methods to get it started. Don't bother with Runtime.exec.

Maybe you are looking for

  • Not able to see hierarchial org structure by clicking on Expand this branch

    Dear experts, I am currently using the Online data extraction via sap for Nakisa Integration with SAP Landscape. I have completed the configuration of Nakisa with the help of configuration guide and administrator guide - After completing administrato

  • I cannot copy files from Macbook to Iomega hard drive

    I wanted to use my Iomega hard drive on my macbook for the first time but I cannot copy any files. Can anybody provide me with the steps I have to do to configure the Iomega (formerly used on a PC) for the Macbook? Thanks

  • Terms and Conditions in PDF PO with RTF Template

    Hi Gurus, We have a custom RTF template for the PDF PO. I want to add the Terms and Conditions into this RTF template that should start after the last page of each PO I looked into the Oracle standard template also but it is in XSL-FO format. I tried

  • What does a green screen with graph mean?

    Hello, Just had a strange inciden happen to my computer. I was away from it for a about half an hour, left my scrivener writing program open. Returned to it, the screen saver was going, when I hit the up arrow button to get out of my screen saver, su

  • How do I edit 1080/50p from my TM700

    I have a Panasonic TM700 and am not sure if Premiere Pro CS5 can edit my footage and if it can, what preset should I use. (my computer handles the raw footage perfectly, I just don't know how to edit it)