Java package for pixel interpolation..

who has a java package for pixel interpolation?. we need it for our recognition system.. thanks!!

Try JAi Java Advanced Imaging. You have a plethora of usefull classes in this APi.
Hope you can find this helpfull to you.
http://java.sun.com/products/java-media/jai/
Regards
Nas.

Similar Messages

  • Generating Java wrappers for PL/SQL Packages in JDeveloper 3.1

    I have not been successful in using JD3.1 to generate java classes for use in calling PL/SQL packages from a Java Servlet I am developing. I have followed the directions under the 'Generating Java Code for Oracle Objects and PL/SQL Packages' help topic: I display the package in the database browser window, right click on the package, select 'Generate Java', and click 'OK' on the pop-up JPublisher window that appears. The wizard clocks out for a few moments, then the JPublisher window disappears, but the java class is not added to JDeveloper's Navigation pane for the Project and Package I specified in the wizard.
    Any idea where the generated class is going to?

    should be, but isn't... JDeveloper3.1
    (build 681) default install... Is it in
    a custom package I didn't install? Or
    am I just a dumb nut?Hmm.. I thought it was in there.. JPub is a java based tool. You can invoke it as such.
    1st, use setvars.bat from your jdeveloper/bin directory.
    2nd, run java oracle.jpub.java.Main (pass it the same arguments as you would the jpub.exe)
    Here's the output from my machine here:
    D:\JDeveloper31\bin>setvars D:\JDeveloper31
    Setting JDeveloper 1.2 runtime environment to "D:\JDeveloper31"
    Setting JDK version 1.2 in "D:\JDeveloper31\java1.2"
    D:\JDeveloper31\bin>java oracle.jpub.java.Main
    JPub: Java Object Type Publisher, version 8.1.6.0.0 Production
    (and the rest of the help)
    Take Care,
    Rob
    null

  • How to create an installation setup package for a java project?

    hi,
    i have a small project written in java. i used eclipse ide. i am trying to create an installation setup package for my application. can some one help me?
    thanks.

    hi daven,
    iam not using the websphere application developer.
    iam using eclipse release 3.2
    is there a solution?

  • "error while evaluating Java script for the package"

    Okay, this is a new one on me! Anyone ever get this message? I don't know what is going on with my iMac, all I know is that about a month ago my iTunes was working fine, and when I just went to use it, it tells me "you can not use the application iTunes with this version of Mac OS X. So I thought maybe something was wrong with my iTunes and downloaded it again and i got the "error while evaluating Java script for the package" when I tried to reinstall iTunes. Another issue I am having is with updates. I haven't received an update for a long time and when I manually check, it tells me there are none.

    Okay, this is a new one on me! Anyone ever get this message? I don't know what is going on with my iMac, all I know is that about a month ago my iTunes was working fine, and when I just went to use it, it tells me "you can not use the application iTunes with this version of Mac OS X. So I thought maybe something was wrong with my iTunes and downloaded it again and i got the "error while evaluating Java script for the package" when I tried to reinstall iTunes. Another issue I am having is with updates. I haven't received an update for a long time and when I manually check, it tells me there are none.

  • JSC2 Support for Traditional Java Package Names

    We have been looking for some encouraging words in the JSC2 documentation concerning the use of traditional java package organization for our creator projects but have been unable to find any. JSC2 appears to use a new project directory structure for its own purposes. However, there is no mention of package naming improvements in response to past requests from JSC1 users. We still very much want to organize our project content in the familiar java "com.company.ourproject.ourfeature" style. Is it the intention of the Creator developers to provide improvement in support for custom package names in JSC2 that is beyond what was possible in JSC1? Any insightful comments would be greatly appreciated.

    Hi,
    Please go through the following thread which discusses about the package structure:
    http://swforum.sun.com/jive/thread.jspa?threadID=53439&tstart=0
    Hope this heps
    Cheers
    Giri :-)
    Creator Team

  • HELP Java library for interpolation

    Hi, we need for a text recognition project a java library for improving the pixel resolution. Now we get a low pixel resolution from our device and the results of the text recognition software are not so good. Our idea is to interpolate the recognized pixel. How know a suitable Java library.

    rene1000 wrote:
    Hi, we need for a text recognition project a java library for improving the pixel resolution. Now we get a low pixel resolution from our device and the results of the text recognition software are not so good. This is not possible in any language or any platform anywhere in the universe.
    Our idea is to interpolate the recognized pixel. How know a suitable Java library.I'm confused, now it sounds to me like you just want to scale the image so it's larger?
    Please try to clearly describe what you need to do.

  • Java Math Package for Vectors & Matrices

    Is there a Java package that has vector and matrix operations (addition, multiplication, transpose, etc.)? I have searched the Developer Forums and see lots of postings from people implementing their own. And I also see references to javax.vecmath, but that appears to be for 3 elements only. But I couldn't find anything that implements the basic vector/matrix operations.
    Thanks very much for any suggestions.

    Use the search, there are several packages out there that will emulatie math function found in java.math.

  • AffineTransform - Is there a way to glean units of measurement for pixels?

    Assuming I get a pointer to a java.awt.geom.AffineTransform from:
    java.awt.geom.AffineTransform CurTransform = ((java.awt.Graphics2D)this.getMainFrame().getGraphics()).getDeviceConfiguration().getDefaultTransform();
    Assuming I've gotten the right AffineTransform... How do I get, or can I get, the scaling factor between horizontal pixels and vertical pixels for the current screen (or whatever device). In other words I want to place components... buttons, textboxes, etc. in a dialog box so that they are "square". i.e. 10 units in x look on the screen equal to 10 units in y.
    Once I know what the "square pixel scale factor" is I can then worry about making the units relative to whatever font size.
    This question is usually posed as "How do I get dialog units?". I haven't done that because of the "legacy problems" associated with what most people think dialog units come from. It is true that way back when dialog units were derived from a textmetrics ONLY, but unless I'm mistaken, Charles Petzold, was describing something that could only be gotten that way at that time (circa 1990).... The width of the fixed system font by the height of the fixed system font ended up being as close to a unit that was 8 units high looked like 8 units wide in the screen. The object of the exercise is to most importantly get units of measurement that translate to pixels and look "square" on the screen. Secondarily, but not unimportant, is to be a unit that has some relevance to the current font size. It's been a long time dialog units in windows maybe a 2:1 ratio. I made my own cDialogUnits so long ago I can't remember what the "standard windows" dialog unit is. In windows I can very easily get the screen dpi x and y, I think it's a devicecontext but Java's "devicecontext" only gives one dimension of the dpi?
    Also this query is mute if I was "painting" on a device. The units are for pixels NOT points and are (mostly) for placing controls on the screen. I am aware of and have used the various addPreferredGap and setAutoCreateContainerGaps available in a GroupLayout... Great gizmos but, still dialog units would be very handy for setting the prefered width of a textbox/label with too much text. (Note: dialog units are NOT for calculating the height of text... )
    I did search the sun forums for an answer first... It might be here I just didn't find it. It seems to be a question either avoided like the plague or considered a dumb question in Java.

    This might be OK?
    BE AWARE!! This is NOT a painting gizmo. It is used in conjunction with the Layout gizmos. It drives me crazy that the Layout gizmos have "default" gaps and spacers of some kind and yet ALL the tutorials immediately and unabashedly trash any "device independence" by mixing in pixel measurements... Not to mention I don't like the size of the gaps and spacing provided with the Layout gizmos anyway.
    Does anyone know if this will fail? I am aware of the caveats provided... "Information about the device is only as good as has been provided." However if there is bad information in the device info I doubt using these units will do anything much different that the end user experiences with the errant device anyway.
    AGAIN... This is NOT a painting gizmo. It's a helper when Laying out controls usually in conjunction with a Layout and only for spaces and gaps.
    public class DialogUnits
        private double m_x;
        private double m_y;
        public DialogUnits( java.awt.Graphics2D g2 )
            java.awt.GraphicsConfiguration gc = g2.getDeviceConfiguration();
            java.awt.geom.AffineTransform at = gc.getDefaultTransform();
            at.concatenate( gc.getNormalizingTransform() );
            double fs = g2.getFont().getSize2D();
            m_x = at.getScaleX() * fs;
            m_y = at.getScaleY() * fs;
        public int CalcX( double units )
            return (int)Math.round( ( units * m_x ) / 8.0 );
        public int CalcY( double units )
            return (int)Math.round( ( units * m_y ) / 8.0 );
        public int ContainerGapX()
            return this.CalcX( 8.0 );
        public int ContainerGapY()
            return this.CalcY( 8.0 );
        public int FontSize2dX( int crude_columns )
            return (int)Math.round( crude_columns * m_x );
        public int FontSize2dY( int crude_rows )
            return (int)Math.round( crude_line_height * m_y );
        public int X( int units )
            return this.CalcX( units );
        public int Y( int units )
            return this.CalcY( units );
        } // end of class DialogUnits

  • Import Java package in JSP

    I hope this is an appropriate forum for this query.
    I want to be able to access a user-created Java package in JSP.
    I have this code:
    <%@page import="TPClass.*" %>
    <%
    xxx = TPClass
    session.setAttribute("response",xxx.GetTPResponse());
    %>
    The error display points to TPClass in the import statement with the message "TPClass not found".
    TPClass files are in the same location as the other project files.
    I have creatyed and compiled the TPClass package.
    Is there more I need to do?
    Brenton

    I think you are very new to java....
    anyway
    <%@page import="class name with full qualified package name"%>
    like
    <%@page import="com.x1.x2.TPClass"%>
    <%
    TPClass cls =new TPClass();
    //then do whatever you want...
    %>
    hope u understand now.....

  • JAVA PACKAGES and JSP

    i Have two problems one is i am designing a website which consists of a form. I am trying to write the Connectiviy and all other insert statements in seperate java packages and include them in JSP files.
    i Have two java packages one is DBUtil(having two java files both dealing with connectovity) and another one is StudentUtIl which has java files that open the connections with database connection and insert data into DB., I am having a big Problem here. How can i call the function in the other java package in the files in this java package. i have openDB()and Close() in the other Db and i want to call these functions in JAVA classes in the other package. How to include a package. Both these packages are in the same File system mounted on a Local directory

    Thank you for the reply. I am giving the code i have given the full class name . and now it is giving the following error :
    Cannot reference a non-static method connectDB() in a static context.
    I am also giving the code. Please do help me on this. i am a beginner in java.
    import java.sql.*;
    import java.util.*;
    import DButil.*;
    public class StudentManager {
    /** Creates a new instance of StudentManager */
    public StudentManager() {
    Connection conn = null;
    Statement cs = null;
    public Vector getStudent(){
    try{
    dbutil.connectDB();
    String Query = "Select St_Record, St_L_Name, St_F_Name, St_Major, St_Email_Address, St_SSN, Date, St_Company, St_Designation";
    cs = conn.createStatement();
    java.sql.ResultSet rs = cs.executeQuery(Query);
    Vector Studentvector = new Vector();
    while(rs.next()){
    Studentinfo Student = new Studentinfo();
    Student.setSt_Record(rs.getInt("St_Record"));
    Student.setSt_L_Name(rs.getString("St_L_Name"));
    Student.setSt_F_Name(rs.getString("St_F_Name"));
    Student.setSt_Major(rs.getString("St_Major"));
    Student.setSt_Email_Address(rs.getString("St_Email_Address"));
    Student.setSt_Company(rs.getString("St_Company"));
    Student.setSt_Designation(rs.getString("St_Designation"));
    Student.setDate(rs.getInt("Date"));
    Studentvector.add(Student);
    if( cs != null)
    cs.close();
    if( conn != null && !conn.isClosed())
    conn.close();
    return Studentvector;
    }catch(Exception ignore){
    return null;
    }finally {
    dbutil.closeDB();
    import java.sql.*;
    import java.util.*;
    public class dbutil {
    /** Creates a new instance of dbutil */
    public dbutil() {
    Connection conn;
    public void connectDB(){
    conn = ConnectionManager.getConnection();
    public void closeDB(){
    try{
    if(conn != null && !conn.isClosed())
    conn.close();
    }catch(Exception excep){
    The main error is occuring at the following lines connectDB() and closeDB() in the class student manager. The class dbutil is in an another package.with an another file called connectionManager which establishes the connection with DB. The dbutil has the openconnection and close connection methods. I have not yet written the insert statements in StudentManager. PLease do Help me

  • Possible to run 2 different Business Packages for ECC 5.0 and 6.0 ?

    Hi there,
    anybody knows a solution, to support a Busienss Package for ECC5.0 and 6.0 on one NW7.0 Portal?
    We build a concernportal as mainportal with different companies in one portal. These companies have their own SAP-Systems.
    It´s a complex systemlandscape:
    Company ABC have a SAP HR System with ECC5.0 with one client 401.
    Company XYZ have a SAP HR System with ECC6.0 with TWO clients 020 and 050.
    These both companies wants to get the Business Package for ECC5.0 and ECC6.0
    Our solution is to implement the Federated Portal Network, thats works very fine. (Okay, Sessionproblem with ECC5.0)
    For company ABC we installed a Javastack on host to install the WebDynpros directly to targetsystem ECC5.0
    For company XYZ we have a problem with FPN, because the two clients in the targetsystem.
    We installed a Javastack with portal on this machine, import BP for ECC6.0, customize portal and ABAP and pick the roles vis FPN from mainportal. But only for ONE client (020).
    Now we can´t connect these Jco´s to the other client, because the users, tehre are in client 050 are not in 020 for logon to the portal. The portal supports only one client as UME on a doublestack-installation.
    On Mainportal we don´t install any business packages, because there are only for one Targetrelease.
    SAP Help have a solution for mapping the Jco´s, but don´t help us:
    http://help.sap.com/saphelp_nw70/helpdata/DE/af/84a34098022a54e10000000a1550b0/content.htm
    Does anyone have same problems?
    Must we install a Javaonly-system, to connect the other Client for company XYZ (050) ?
    Best regards
    Christian

    There are two approaches (that I'm aware of):
    - install external authentication (such as an LDAP which can be populated from the R/3 backends)
    - install an additional Java instance
    I would go for both of them because
    - it will make things easier if you implement other functionality that is in the portal (non-ESS)
    - it will avoid patching one portal and to keep the SPs of both backend systems in sync with the portal
    Markus

  • Java package class access

    Hi All,
    I have two packages in a webapplication. com.mycompany.myapp and com.mycompany.myapp.classbank.
    I set up the application so I have a package for re-usable classes(myapp.classbank) and the other for the backing beans for my pages and the session bean and application bean etc(myapp).
    I can get access to any objects methods from the classes in myapp but I cannot get access to the methods in say the sessionbean from the classbank classes.
    Code completion shows access to the sessionbeans methods but I always get a null pointer exception when the app is run / debugged.
    Any insight would be most helpful.
    Regards
    Jim

    Thanks All,
    I can access any of the sessionbeans variables through the public getters and setters from any other class in the same package. If I try to access any of the same member variables from any class in the second package I get the null pointer... I can see each time the line of code that throws the exception. Its always the first line of code to try to access a getter or setter in the session bean from the second package.
    An example error (Tomcat 5.5.17 NetBeans 5.5) from today below :
    Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
    at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:150)
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
    ... 29 more
    Caused by: java.lang.NullPointerException
    at com.mycompany.imageshop.classbank.ShoppingBasket.setNumberOfPictures(ShoppingBasket.java:498)
    at com.mycompany.imageshop.viewBasket.incSmallQuantityButton_action(viewBasket.java:1094)
    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:585)
    at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
    ... 30 more
    Oct 15, 2007 11:36:24 AM org.apache.catalina.core.ApplicationContext log
    SEVERE: #{viewBasket.incSmallQuantityButton_action}: javax.faces.el.EvaluationException: java.lang.NullPointerException
    javax.faces.FacesException: #{viewBasket.incSmallQuantityButton_action}: javax.faces.el.EvaluationException: java.lang.NullPointerException

  • Java Mapping for JDBC Interface

    Hi,
    please help on java mapping for my jdbc interface.
    my java code for jdbc is:
    Created on May 7, 2008
    TODO To change the template for this generated file go to
    Window - Preferences - Java - Code Style - Code Templates
    package XiMappingDB2.com.xi.test;
    @author miracle
    TODO To change the template for this generated type comment go to
    Window - Preferences - Java - Code Style - Code Templates
    Created on May 2, 2008
    To change the template for this generated file go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    package com.xi.test;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.Statement;
    import java.util.HashMap;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.api.MappingTrace;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import com.sap.aii.mapping.api.StreamTransformationException;
    @author kotla
    To change the template for this generated type comment go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    public class NameMerge implements StreamTransformation  {
         private Map param = null;   
         private MappingTrace trace = null;
         public void setParameter(Map param){       
         this.param = param;
         if (param == null) { 
         this.param = new HashMap();
         public void execute(InputStream input, OutputStream output)      
         throws StreamTransformationException {
         AbstractTrace trace = null;     
         String RESULT = new String();
         trace =      
         (AbstractTrace) param.get(             
         StreamTransformationConstants.MAPPING_TRACE);
         try {          
        //Create DOM parser
        DocumentBuilderFactory factory =   
        DocumentBuilderFactory.newInstance();     
        DocumentBuilder builder = factory.newDocumentBuilder();
         //Parse input to create document tree
         Document doc = builder.parse(input);
                    trace.addInfo(doc.toString());
          //          Map the elements          
        Node root = doc.getFirstChild(); // gets the root element
         NodeList children = root.getChildNodes();
          for (int item = 0; item < children.getLength(); item++) {
          if (children.item(item) instanceof Element) {
          root = (Element) children.item(item);
          NodeList ch = root.getChildNodes();
          RESULT = RESULT.concat(ch.item(0).getNodeValue() + " ");
          trace.addInfo(RESULT); }
          catch (Exception e) {           
               trace.addDebugMessage(e.getMessage());      
       //Return the output document
       String document_exit = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns0:Person2 xmlns:ns0=\"urn:xxxxx.com:test:mapping:lookups\"><RESULT>" 
       + RESULT               
       + "</RESULT></ns0:Person2>";
         insertDB(RESULT);
       try
            output.write(document_exit.getBytes());
             catch (IOException e1) {
            trace.addDebugMessage(e1.getMessage());
    public void insertDB(String DETAILS){
        Statement stmt = null;
        Connection conn = null;
        try {
          conn = getConnection();
          conn.setAutoCommit(false);
          stmt = conn.createStatement();
          stmt.execute("insert into KUMAR(DETAILS) values ('"DETAILS"')");
          //System.out.println ('"DETAILS"');
          conn.commit();
          stmt.close();   
          conn.close();
        } catch (Exception e) {
          System.err.println("Error: " + e.getMessage());
          e.printStackTrace();
      public Connection getConnection() throws Exception {
        String driver = "com.ibm.db2.jcc.DB2Driver";
        String url = "jdbc:db2://172.17.4.24:50000/SAMPLE";
        String username = "miracle";
        String password = "sairam";
        Class.forName(driver);
        Connection conn = DriverManager.getConnection(url, username, password);
        return conn;
    but we are getting the following error:Linkage error occurred when loading class JavaDatabaseApp/XiMappingDB2/com/xi/test/NameMerge (http://FILE2JDBC_US, 7d7b3141-f4d1-11dc-b25e-d5d5c0a80198, -1)
    Start of test
    LinkageError at JavaMapping.load(): Could not load class: JavaDatabaseApp/XiMappingDB2/com/xi/test/NameMerge
    java.lang.NoClassDefFoundError: JavaDatabaseApp/XiMappingDB2/com/xi/test/NameMerge (wrong name: XiMappingDB2/com/xi/test/NameMerge) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.lang.ClassLoader.defineClass(ClassLoader.java:448) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingLoader.findClass(RepMappingLoader.java:175) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at com.sap.aii.ibrep.server.mapping.ibrun.RepJavaMapping.load(RepJavaMapping.java:136) at com.sap.aii.ibrep.server.mapping.ibrun.RepJavaMapping.execute(RepJavaMapping.java:50) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80) at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127) at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.transform(MapServiceRemoteObjectImpl0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170).
    please solve this issue.

    Uday,
    May be you have uploaded class file into external definitions.
    You need to Zip the class file into .jar  and then upload into external definitions of integration repository
    Regards,
    Kiran Bobbala

  • How to find classes in a java package

    i am writing a java IDE. i want to extract all class names from a java package eg. java.lang (through coding). how can i do that.
    Thanks in advance

    File file = new File("path to your jar file");
    JarFile jf = new JarFile(file);
    Enumeration e = jf.entries();
    ZipEntry ze = null;
    while(e.hasMoreElements()){
    ze = (ZipEntry) e.nextElement();
    ze.toString(); // gives you the file name
    you have to understand java.util.jar java.util.zip packages for working with jar/zip files.
    Hope this helps

  • Java client for OSB service

    Hi All,
    We have to talk to OSB11g proxy service which is created as Any Soap service (url: http://myosb.firmname.com:7001/osb-ws)
    I have java client applications which need to consume this proxy service built on top of OSB by providing the necessary inputs.
    Typically we get wsdl url's and then we use Jdeveloper to create web service client proxies to generate client side web service artifacts and call the web service.
    But I am confused here as to how can I get a handle to the OSB service from a java client. The OSB developers on the project tell me they don't have and cannot provide a WSDL based URL.
    What are the general practices for consuming OSB proxy service from java client apps. Google search result did not yield much help.
    Please let me know your thoughts.
    Regards,

    Hi Anuj,
    Thanks for reply. As u guys mentioned that about the URL I have rechecked the URL and realized the port number which I was using that was Admin Server Port while environment contains two servers Admin and Managed both. I have change the Port Number from Admin to Managed now its hitting the Service but now another problem I start facing that I need to pass a big XML as input request to that OSB Proxy Service. I have two different code where I am attaching the input request in two different ways but none of them is passing that request to URL and in both cases I am getting default response from URL.
    Here is the Code, Code1 through Core Java:
    ===============================================================================================
    package retriggerpsftorder;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.net.URL;
    import java.net.URLConnection;
    import java.net.URLEncoder;
    public class MyTest {
    public MyTest() {
    System.out.println("Constructor executing");
    System.out.println("JAVA Version : " + System.getProperty("JAVA.VERSION"));
    public static void main(String arga[]) {
    try {
    // Construct data
    String data = URLEncoder.encode("key1", "UTF-8") + "=" + URLEncoder.encode("<migrateOrder>\n" +
    " <migrateOrderId>51c797d61dd211b2818a</migrateOrderId>\n" +
    " <createCustomer>false</createCustomer>\n" +
    " <createBillingAccount>false</createBillingAccount>\n" +
    " <Customer>\n" +
    " <ID>\n" +
    " </PIN>\n" +
    "     </customerAccountNumber\"></customerAccountNumber\">\n" +
    " </externalIdentifier>\n" +
    " </ID>\n" +
    " <creditClass>W</creditClass>\n" +
    " </Customer>\n" +
    " <Account>\n" +
    " <name>Gurwinder Singh</name>\n" +
    " <ID>\n" +
    " <PIN>1987</PIN>\n" +
    "     <billingAccountNumber>695909361</billingAccountNumber>\n" +
    " </ID>\n" +
    " </Account>\n" +
    " <CustomerOrder>\n" +
    " <customerOrderPartyReference>\n" +
    " <MSISDN>61425265789</MSISDN>\n" +
    " </customerOrderPartyReference>\n" +
    " <orderSource>\n" +
    " <templateName>AUP1057_AU10357_24_DATA_0113</templateName>\n" +
    " </orderSource>\n" +
    " <typeCode>Connect</typeCode>\n" +
    " <futureSubmitDate>2011-02-28</futureSubmitDate>\n" +
    " <cancelOpenOrdersIndicator>false</cancelOpenOrdersIndicator>\n" +
    " <lineItem actionCode=\"Add\" priorityRanking=\"1\">\n" +
    " <product ID=\"AUX221\" type=\"SAMID\" attributeCount=\"19\">\n" +
    " <attribute>\n" +
    " <name>Accept Code</name>\n" +
    " <value>Accept 5</value>\n" +
    " </attribute>\n" +
    " </product>\n" +
    " </lineItem>\n" +
    " <lineItem actionCode=\"Add\" priorityRanking=\"2\">\n" +
    " <product ID=\"OFF0018\" type=\"SAMID\" attributeCount=\"1\">\n" +
    " <attribute>\n" +
    " <name>Period Override</name>\n" +
    " <value>24</value>\n" +
    " </attribute>\n" +
    " </product>\n" +
    " </lineItem>\n" +
    " <lineItem actionCode=\"Allocate\" priorityRanking=\"3\">\n" +
    " <equipment ID=\"012645002053476\" type=\"Handset\" />\n" +
    " </lineItem>\n" +
    " <lineItem actionCode=\"Allocate\" priorityRanking=\"4\">\n" +
    " <resource ID=\"89610300000905636996\" type=\"SIM\" />\n" +
    " </lineItem>\n" +
    " <externalOrderReference>\n" +
    " <serviceID>75055433</serviceID>\n" +
    " <customerID>921092224696621123154029260421</customerID>\n" +
    " <serviceStartDate>2009-02-10</serviceStartDate>\n" +
    " <serviceRatePlan>X3Cap $29 24m($29min-35cFF)</serviceRatePlan>\n" +
    " <agreementNumber>VHU0029215</agreementNumber>\n" +
    " <accountNumber>3382437469</accountNumber>\n" +
    " <migrationType>Loyalty Handset Upgrade Acq</migrationType>\n" +
    " <receiveMarketingInfoOverrideIndicator>false</receiveMarketingInfoOverrideIndicator>\n" +
    " </externalOrderReference>\n" +
    " <orderSalesReference>\n" +
    " <dealerReferenceID>D3641</dealerReferenceID>\n" +
    " <trailingCommissionRatePlan>MUPR9</trailingCommissionRatePlan>\n" +
    " <trailingCommisionDealerReference>D3734</trailingCommisionDealerReference>\n" +
    " </orderSalesReference>\n" +
    " </CustomerOrder>\n" +
    " <ContactManagementActivity>\n" +
    " <activityCategory>Proof of Purchase - Mig from 3</activityCategory>\n" +
    " <activityType>Migration from 3</activityType>\n" +
    " <activityDescription>Proof of Purchase Information</activityDescription>\n" +
    " <activityComment>MSISDN: 0425265789354610026170561</activityComment>\n" +
    " </ContactManagementActivity>\n" +
    "</migrateOrder>\n", "UTF-8");
    //data += "&" + URLEncoder.encode("key2", "UTF-8") + "=" + URLEncoder.encode("value2", "UTF-8");
    System.out.println("Data going for Request : "+data);
    // Send data
    URL url = new URL("http://172.22.161.101:8017/app/mig3/migrate/MigrateOrder");
    URLConnection conn = url.openConnection();
    conn.setDoOutput(true);
    OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
    wr.write(data);
    wr.flush();
    // Get the response
    BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
    int i=0;
    while ((line = rd.readLine()) != null) {
    System.out.println("Values of Line : "+ i + " : "+ line);// Process line...
    i++;
    wr.close();
    rd.close();
    } catch (Exception e) {
    =========================================
    Code 1 Response
    Values of Line : 0 : <?xml version="1.0" encoding="UTF-8"?>
    Values of Line : 1 : <migrateOrderReply><statusCode>Failed</statusCode><errorReturn><errorCode>CORE_SYS_GENERIC</errorCode><errorMessage>Unexpected System exception</errorMessage></errorReturn></migrateOrderReply>
    Process exited with exit code 0.
    Note: The above response message is the default response message, even if u not pass any input parameter then also the above message will come.
    ==========================================================================================================
    Code 2 : Using Servlet
    package retriggerpsftorder;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.Servlet;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.http.client.HttpClient;
    import org.apache.commons.httpclient.HttpConnection;
    import org.apache.commons.httpclient.HttpState;
    import org.apache.commons.httpclient.NameValuePair;
    import org.apache.commons.httpclient.URI;
    import org.apache.commons.httpclient.methods.PostMethod;
    import org.apache.commons.httpclient.methods.RequestEntity;
    import org.apache.http.client.HttpClient;
    public class GIFTProcess extends HttpServlet implements Servlet {
    private static final String CONTENT_TYPE =
    "text/html; charset=windows-1252";
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    public void doGet(HttpServletRequest req,
    HttpServletResponse resp) throws ServletException,
    IOException {
    resp.setContentType(CONTENT_TYPE);
    PrintWriter out = resp.getWriter();
    try {
    NameValuePair nvpRtn =
    new NameValuePair("body", "<migrateOrder>\n" +
    " <migrateOrderId>51c797d61dd211b2818a</migrateOrderId>\n" +
    " <createCustomer>false</createCustomer>\n" +
    " <createBillingAccount>false</createBillingAccount>\n" +
    " <Customer>\n" + " <ID>\n" +
    " </PIN>\n" +
    "     </customerAccountNumber\"></customerAccountNumber\">\n" +
    " </externalIdentifier>\n" +
    " </ID>\n" +
    " <creditClass>W</creditClass>\n" +
    " </Customer>\n" + " <Account>\n" +
    " <name>Gurwinder Singh</name>\n" +
    " <ID>\n" + " <PIN>1987</PIN>\n" +
    "     <billingAccountNumber>695909361</billingAccountNumber>\n" +
    " </ID>\n" + " </Account>\n" +
    " <CustomerOrder>\n" +
    " <customerOrderPartyReference>\n" +
    " <MSISDN>61425265789</MSISDN>\n" +
    " </customerOrderPartyReference>\n" +
    " <orderSource>\n" +
    " <templateName>AUP1057_AU10357_24_DATA_0113</templateName>\n" +
    " </orderSource>\n" +
    " <typeCode>Connect</typeCode>\n" +
    " <futureSubmitDate>2011-02-28</futureSubmitDate>\n" +
    " <cancelOpenOrdersIndicator>false</cancelOpenOrdersIndicator>\n" +
    " <lineItem actionCode=\"Add\" priorityRanking=\"1\">\n" +
    " <product ID=\"AUX221\" type=\"SAMID\" attributeCount=\"19\">\n" +
    " <attribute>\n" +
    " <name>Accept Code</name>\n" +
    " <value>Accept 5</value>\n" +
    " </attribute>\n" +
    " </product>\n" + " </lineItem>\n" +
    " <lineItem actionCode=\"Add\" priorityRanking=\"2\">\n" +
    " <product ID=\"OFF0018\" type=\"SAMID\" attributeCount=\"1\">\n" +
    " <attribute>\n" +
    " <name>Period Override</name>\n" +
    " <value>24</value>\n" +
    " </attribute>\n" +
    " </product>\n" + " </lineItem>\n" +
    " <lineItem actionCode=\"Allocate\" priorityRanking=\"3\">\n" +
    " <equipment ID=\"012645002053476\" type=\"Handset\" />\n" +
    " </lineItem>\n" +
    " <lineItem actionCode=\"Allocate\" priorityRanking=\"4\">\n" +
    " <resource ID=\"89610300000905636996\" type=\"SIM\" />\n" +
    " </lineItem>\n" +
    " <externalOrderReference>\n" +
    " <serviceID>75055433</serviceID>\n" +
    " <customerID>921092224696621123154029260421</customerID>\n" +
    " <serviceStartDate>2009-02-10</serviceStartDate>\n" +
    " <serviceRatePlan>X3Cap $29 24m($29min-35cFF)</serviceRatePlan>\n" +
    " <agreementNumber>VHU0029215</agreementNumber>\n" +
    " <accountNumber>3382437469</accountNumber>\n" +
    " <migrationType>Loyalty Handset Upgrade Acq</migrationType>\n" +
    " <receiveMarketingInfoOverrideIndicator>false</receiveMarketingInfoOverrideIndicator>\n" +
    " </externalOrderReference>\n" +
    " <orderSalesReference>\n" +
    " <dealerReferenceID>D3641</dealerReferenceID>\n" +
    " <trailingCommissionRatePlan>MUPR9</trailingCommissionRatePlan>\n" +
    " <trailingCommisionDealerReference>D3734</trailingCommisionDealerReference>\n" +
    " </orderSalesReference>\n" +
    " </CustomerOrder>\n" +
    " <ContactManagementActivity>\n" +
    " <activityCategory>Proof of Purchase - Mig from 3</activityCategory>\n" +
    " <activityType>Migration from 3</activityType>\n" +
    " <activityDescription>Proof of Purchase Information</activityDescription>\n" +
    " <activityComment>MSISDN: 0425265789354610026170561</activityComment>\n" +
    " </ContactManagementActivity>\n" +
    "</migrateOrder>\n");
    NameValuePair[] nvpout = { nvpRtn };
    HttpConnection httpConn = new HttpConnection("172.22.161.101", 8017);
    System.out.println("httpConn : " + httpConn.getHost() + " getPost: " + httpConn.getPort());
    httpConn.open();
    System.out.println("Is Connection Open? --> " + httpConn.isOpen());
    PostMethod postMethod = new PostMethod();
    postMethod.setPath("http://172.22.161.101:8017/app/mig3/migrate/MigrateOrder");
    System.out.println("postMethod.getPath() : " + postMethod.getPath());
    //postMethod.setQueryString("http://172.22.161.101:8017/app/mig3/migrate/MigrateOrder");
    //System.out.println("getQueryString : " + postMethod.getQueryString());
    //System.out.println("postMethod.getParams() : " + postMethod.getParams());
    postMethod.setRequestBody(nvpout);
    System.out.println("validate--> " + postMethod.validate());
    postMethod.execute(new HttpState(), httpConn);
    System.out.println("isRequestSent --> " + postMethod.isRequestSent());
    System.out.println("statusLine--> " + postMethod.getStatusLine());
    String serviceResponse = postMethod.getResponseBodyAsString();
    System.out.println("Response from Call : " + serviceResponse);
    } catch (Exception e) {
    out.println("Error Occured during the process.");
    e.printStackTrace();
    ==========================================================================================
    Code 2 Response -----
    C:\Oracle\Middleware\SOASuite101351\jdk\bin\javaw.exe -jar C:\jdevstudio10135\j2ee\home\admin.jar ormi://10.161.1.169:23891 oc4jadmin **** -updateConfig
    11/03/02 15:30:19 WARNING: Shared-library oracle.expression-evaluator:10.1.3.1 is closing, but is imported by adf.oracle.domain:10.1.3.1, adf.generic.domain:10.1.3.1.
    2/03/2011 15:30:19 com.oracle.corba.ee.impl.orb.ORBServerExtensionProviderImpl preInitApplicationServer
    WARNING: ORB ignoring configuration changes. Restart OC4J to apply new ORB configuration.
    Ready message received from Oc4jNotifier.
    Embedded OC4J startup time: 7765 ms.
    Target URL -- http://10.161.1.169:8988/JAVAProject-RetriggerPSFTOrder-context-root/giftprocess
    ERROR: Unable to connect to JQS service: connection refused
    11/03/02 15:30:22 httpConn : 172.22.161.101 getPost: 8017
    11/03/02 15:30:22 Is Connection Open? --> true
    11/03/02 15:30:22 postMethod.getPath() : http://172.22.161.101:8017/app/mig3/migrate/MigrateOrder
    11/03/02 15:30:22 validate--> true
    11/03/02 15:30:22 isRequestSent --> true
    11/03/02 15:30:22 statusLine--> HTTP/1.1 200 OK
    2/03/2011 15:30:22 org.apache.commons.httpclient.HttpConnection releaseConnection
    WARNING: HttpConnectionManager is null. Connection cannot be released.
    11/03/02 15:30:22 Response from Call : <?xml version="1.0" encoding="UTF-8"?>
    <migrateOrderReply><statusCode>Failed</statusCode><errorReturn><errorCode>CORE_SYS_GENERIC</errorCode><errorMessage>Unexpected System exception</errorMessage></errorReturn></migrateOrderReply>
    ==================================================================================
    If u find any thing wrong then please let me know.
    Any reply is highly appreciated.
    Thanks Manish

Maybe you are looking for

  • In Firefox v4.0.1, custom toolbars disappear from the toolbar menu when I open a "New Window".

    1. I created a new toolbar in Customize... / Add New Toolbar. It's on the list of toolbars and opens up '''most times''' I start Firefox, but not ''always''. I have tested it and it is completely random. 2. Same type of problem as 1., but '''''everyt

  • Disk Utility - secure erase process does not complete

    Help, please! It is taking "for ever" for Disk Utility* to securely** erase (a) the 37.25 GB hard drive in my G4 Powerbook (while booted from a startup disk), and (b) an external 55.9 GB firewire hard drive (connected to a 17" G4 iMac). After more th

  • Best practice for handling data for a large number of indicators

    I'm looking for suggestions or recommendations for how to best handle a UI with a "large" number of indicators. By large I mean enough to make the block diagram quite large and ugly after the data processing for each indicator is added. The data must

  • Read/write XML via OO4O

    We have some ASP code (Active Server Pages) that uses OO4O to select/insert data in an Oracle 8i rel. 2 database (The OO4O objects are from the same release 8.1.6). Now we would like to enhance it to read and store some XML documents directly (the XM

  • CEKKO and CEBAN for PO or PR release strategy??

    hi all Can any body explain me about the below details in PO and PR release startegy.?? In release streatgy, sytem check CEKKO and CEBAN for PO or PR release . while define characterstic, in Additional Data....there is table and field name..??? Than