Problem mimicking ASP's GetRow function in PHP

I am new to PHP but not to scripting. I am developing a web app using PHP/MySql that will let a particular client's employees set up and order their business cards. I have a Mac running InDesign CS4 and a set of scripts that will take a text file and make the business card out of it automatically. I also have a MySQL database and a PHP-based Dreamweaver site that does everything other than make the text file I need.
For clarity, let me give you the rundown on what happens with this app. What I want to do is have the client login with generic credentials, go through an initial setup where they develop new credentials, as well as all the data to be used later in their business cards and possibly other printed materials. After they submit that info they are taken to another login page where they use their new credentials to go to the main page for them, with links for ordering business cards, updating their personal information, and looking at all their previous orders. When they choose to order more cards, they go to a page that lets them see how the data will look on their card. If they don't like the way it looks, there is a link that lets them update their info and leads them back to the order page. If they like it and want to see a PDF preview of their card, they can click a button that will drop out a text file, which should have a name with a reference in it as being temporary plus a counter that make it unique, into a hot folder on the server that the mac with InDesign picks up, formats, and outputs a PDF that is then mailed to the client. If they like the preview, they choose choose a quantity for their order and submit a form with hidden fields that not only posts an entry to the database but also generates another text file that makes the final PDF for the business card. This final PDF gets mailed back to the client as well as the CSR handling the account so they can enter a job ticket to get it printed. This final text file contains references to the order number
Of all the stuff I just mentioned, the two things I am having problems with is making the text files for the preview and the final PDFs. I have already written code that will save a file using fopen(). The problem I am having is passing user data from the database into an array so I can use it to fill the file with relevant information for the InDesign scripts. The other is passing the new order number to the final text files name, and getting a number for the temporary text file's counter. I assume that I can merely ask the database for the greatest order number and temporary number. But I have to get those things into variables that I can use to concatenate a string for the file names.
In my research I found that ASP has a great command called GetRow that will make pass a row of data into a 2d array. I also found a nice piece of code where you can get PHP to mimc the same trick. Here it is (written by a user named bastion at http://www.codewalkers.com/c/a/Database-Code/Mimic-ASPs-GetRows-functionality-in-PHP/).
<?
function GetRows($handle)
This function emulates the ASP GetRows function. It creates a 2 dimensional
array of the data set where the :
1st dimension is the row number of the data
2nd dimension are the data fields
Returns a two dimensional array if there are record or false if no records
come out of the query
if (mysql_num_rows($handle)>0){
//initialize the array
$RsArray1 = array();
//loop thru the recordset
while ($rows = mysql_fetch_array($handle))
$RsArray1[] = $rows;
} //wend
return $RsArray1;
}else{
//no records in recordset so return false
return false;
} //end if
//close the connection
mysql_close($handle);
} //end function
?>
My problem now is figuring out what he means by the variable $handle. What is this a reference to? Is it the name of the database connection? The recordset? One of the other many variables Adobe's code for a recordset has in it? If my database connection is called dbconnection, and the recordset for the user data from that connection is called rsUsers, what do I literally put into this function's parameters when I call it in my code for the page? When I call this function and return its value into a new array called $user_data_arr, how do I reference its values so I can create a string to save into the text file? Can I use this same function to call rsOrders, get the latest order number and put it into an array, and add 1 to it so I can generate the file name? Or is there a better way to do this that I don't know about?

This might help. I wrote it a couple of years ago and it workds fine for blobs you will more then likely be able to adapt it.
<?php
$db = "[your SID]" ;
$dbuser = "[user name]" ;
$dbpword = "password]" ;
$OraDB = oci_connect($dbuser,$dbpword,$db);
$ImageFileName = "/srv/www/htdocs/moon_landing_map.jpg" ;
$ImageFile = fopen($ImageFileName,"rb");
$Image = fread($ImageFile,filesize($ImageFileName));
$ImageID = 2 ;
$query = "insert into blob_test (id,description,image_data) values (:ImageID,'Test Image',EMPTY_BLOB()) returning image_data into :image_data" ;
$Stmt = oci_parse($OraDB,$query);
$Blob = oci_new_descriptor($OraDB,OCI_D_LOB);
oci_bind_by_name($Stmt, ':ImageID',$ImageID);
oci_bind_by_name($Stmt, ':image_data', $Blob, -1, OCI_B_BLOB);
oci_execute($Stmt,OCI_DEFAULT);
$Blob->save($Image);
oci_commit($OraDB);
$Blob->close() ;
oci_close($OraDB);
fclose($ImageFile);
?>and here is the code to get a blob out!
<?php
$db = "[your SID]" ;
$dbuser = "[user name]" ;
$dbpword = "[password]" ;
$OraDB = oci_connect($dbuser,$dbpword,$db);
$Image = "";
$ImageID = $_GET['id'] ;
$query = "select image_data from blob_test where id = :ImageID" ;
$Stmt = oci_parse($OraDB,$query);
oci_bind_by_name($Stmt, ':ImageID', $ImageID);
oci_execute($Stmt);
$arr = oci_fetch_array($Stmt,OCI_ASSOC);
$Image = $arr['IMAGE_DATA']->load();
$arr['IMAGE_DATA']->free() ;
oci_close($OraDB);
echo $Image ;
?>Edited by: FlyingGuy on Feb 25, 2011 11:16 AM

Similar Messages

  • Equivalent to EVAL function in PHP?

    Based on what option the user selects from my select list, my APEX report of type SQL query should be rendered.
    This works fine for situations like:
    SELECT * FROM table_name WHERE field_name = :P101_item_name
    But here I face the problem:
    In case the user selects option one, I want to fetch all rows, where field_name = NULL, if she selects the second option all rows with field_name <> NULL should be fetched. If she selects the third option, all options should be retrieved.
    I e.g. tried to create the static List of Values and assigned to the options the values "NULL", "NOT NULL"..
    yet
    SELECT * FROM table_name WHERE field_name is :P101_item_name
    does not work..
    How can I solve this? Is there any function similar to the eval function of php? Thanks a lot.

    In PL/SQL land the equivalent is EXECUTE IMMEDIATE - essentially allowing you to execute dynamic SQL.
    In APEX, you have various other options available to you. For instance, we can create PL/SQL anonymous blocks that return SQL or indeed functions that take arguments and return a SQL string. APEX will then handle the process of taking this string, EXECUTE IMMEDIATE'ing it, and returning your desired report.
    See here for a good discussion.
    Re: Passing a Table Name as a variable to a Page Process
    Also search for 'dynamic SQL', 'dynamic table names', 'dynamic LOVs' on the forum as this comes up regularly related to LOV filters.

  • Problem with dynamic LOV and function

    Hello all!
    I'm having a problem with a dynamic lov in APEX 3.0.1.00.08. Hope you can help me!
    I have Report and Form application. On the Form page i have a Page Item (Popup Key LOV (Displays description, returns key value)).
    When i submit the sql code in the 'List of vaules defention' box. I get the following message;
    1 error has occurred
    LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.
    When i excecute the code below in TOAD or in the SQL Workshop it returns the values i want to see. But somehow APEX doesn't like the sql....
    SELECT REC_OMSCHRIJVING d, REC_DNS_ID r FROM
    TABLE(CAST(return_dns_lov_fn(:P2_DNS_ID) AS dns_table_type)) order by 1
    returns_dns_lov_fn is a function, code is below;
    CREATE OR REPLACE FUNCTION DRSSYS.return_dns_lov_fn (p2_dns_id number)
    RETURN dns_table_type
    AS
    v_data dns_table_type := dns_table_type ();
    BEGIN
    IF p2_dns_id = 2
    THEN
    FOR c IN (SELECT dns_id dns, omschrijving oms
    FROM d_status dst
    WHERE dst.dns_id IN (8, 10))
    LOOP
    v_data.EXTEND;
    v_data (v_data.COUNT) := dns_rectype (c.dns, c.oms);
    END LOOP;
    RETURN v_data;
    END IF;
    END;
    and the types;
    CREATE OR REPLACE TYPE DRSSYS.dns_rectype AS OBJECT (rec_dns_id NUMBER, rec_omschrijving VARCHAR2(255));
    CREATE OR REPLACE TYPE DRSSYS.dns_table_type AS TABLE OF dns_rectype;
    I tried some things i found on this forum, but they didn't work as well;
    SELECT REC_OMSCHRIJVING display_value, REC_DNS_ID result_display FROM
    TABLE(CAST(return_dns_lov_fn(:P2_DNS_ID) AS dns_table_type)) order by 1
    SELECT REC_OMSCHRIJVING display_value d, REC_DNS_ID result_display r FROM
    TABLE(CAST(return_dns_lov_fn(:P2_DNS_ID) AS dns_table_type)) order by 1
    SELECT a.REC_OMSCHRIJVING display_value, a.REC_DNS_ID result_display FROM
    TABLE(CAST(return_dns_lov_fn(:P2_DNS_ID) AS dns_table_type)) a order by 1
    Edited by: rajan.arkenbout on 8-mei-2009 14:41
    Edited by: rajan.arkenbout on 8-mei-2009 14:51

    I just had the same problem when I used a function in a where clause.
    I have a function that checks if the current user has acces or not (returning varchar 'Y' or 'N').
    In where clause I have this:
    where myFunction(:user, somePK) = 'Y'
    It seems that when APEX checked if my query was valid, my function triggered and exception.
    As Varad pointed out, check for exception that could be triggered by a null 'p2_dns_id'
    Hope that helped you out.
    Max

  • Problem with tpcall and tpgetrply functions

    Hi,
    I have a problem with tpcall() and tpgetrply() functions.
    In this example (invoke tpcall()):
    FBFR32 *buf;
    FLDLEN32 buflen;
    buf = a_buffer.getBuffer(); /* getBuffer() returns FBFR32* */
    buflen = a_buffer.getLongitud();
    /* at this point: buf == a_buffer.getBuffer() */
    if (tpcall(a_contenedor.getServname(),
    (char*)a_contenedor.getBufferPeticion()->getBuffer(),
    a_contenedor.getBufferPeticion()->getLongitud(),
    (char**)&buf,
    (long*)&buflen,
    0) == -1)
    if (tperrno != TPESVCFAIL)
    LANZAR_EXCEPCION(CADENA_WHAT_SB,
    "Error en funcion Execute(), llamada tpcall()",
    tpstrerror(tperrno))
    /* at this point: buf != a_buffer.getBuffer() */
    tpcall() function change the memory address of buf. What is the problem? Is wrong my code? Is a problem with tuxedo version?
    My tuxedo version is:
    tmadmin -vINFO: BEA Tuxedo, Version 8.0, 32-bit, Patch Level 306
    INFO: Serial #: 650522264137-773290431251, Expiration NONE, Maxusers 150
    INFO: Licensed to: Telefonica Moviles Espa?a, S.A.
    INFO: 56-bit Encryption Package
    Thanks,
    ANTONIO.

    There's nothing wrong with your code or tuxedo. tpcall (and tpgetrply) can change the address of the return buffer if it needs to allocate more memory to hold the data. This is the reason why you pass a pointer to the buffer as the output buffer parameter to tpcall and tpreturn. Everything is working as expected.

  • Calling Oracle Function in PHP

    Hi,
    I'm calling a oracle function in php, the function has 1 IN parameter and 1 OUT parameter. The OUT parameter is BOOLEAN type.How to bind php variable for BOOLEAN type?
    Thanks.
    srinath.

    I think you're going to have to use it as a string and use string comparison.
    ~Jer

  • Browse for Folder function for PHP?

    can anyone recommend a good plug-in to implement the Windows
    "browse for folder"
    function in php? I am looking for something like the menu you
    get when you want
    to select a folder in theDreamweaver "Find and replace"
    function.
    Clancy

    Look on Gary White's site -
    http://www.apptools.com - for
    his tutorial on
    how to create a dynamic sitemap in PHP. With modifications,
    that's exactly
    what you need.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Clancy" <[email protected]> wrote in message
    news:[email protected]...
    > "SnakEyez02" <[email protected]> wrote:
    >
    >>My suggestion would be to head over to
    www.hotscripts.com and take a look
    >>at
    >>the File Management section of the PHP scripts.
    >>
    >> Any file script will open a window to browse for
    files, but there are
    >> scripts
    >>which make the process as easy as possible on the end
    user and can do what
    >>you
    >>need to do with the file.
    >>
    >> If you provide more detail about what you need the
    script to do someone
    >> can
    >>probably recommend a good script to accomplish the
    job.
    >
    > Thank you.
    >
    > I have been working on several similar programs to
    manipulate data files,
    > and
    > have got them working pretty well. The one serious
    shortcoming is in the
    > procedure for specifying which file to read. In the
    current version the
    > initial
    > menu has a simple text entry box for the user to enter
    the name of the
    > data file
    > to load. What I want to do is to extend the
    functionality of this, so
    > that the
    > user can browse the directory to find a particular file
    to load.
    >
    > I want to replace the current Text box with something
    that looks like a
    > Select
    > box, but when you click the arrow at the right you get
    the directory tree,
    > with
    > each directory preceded by a + or - symbol which you can
    click to show or
    > hide
    > the subdirectories and the files in the directory. The
    window would have
    > to
    > have vertical and probably horizontal scroll bars, so
    that you could find
    > a
    > particular file you wanted, then click it to highlight
    it, and finally
    > close the
    > window and load the file.
    >
    > So what I want is basically a Select box, but with
    functionality somewhere
    > between Dreamweaver's 'Files' menu, and Disc Explorers
    'Folders' menu.
    > For this
    > application I only want to be able to select a
    particular file to load,
    > but in
    > the future it might also be nice to have the ability to
    drag and drop
    > files, as
    > in Windows Disc Explorer.
    >
    >
    > Clancy

  • Problem with active noise cancellation function : ...

    My nokia 6720 have problem with active noise cancellation function. It seem not working because it also have noise when this function is active. So, I try to disable this function and found that the noise is reduce (but still not clear). How do I correct this problem?
    Thanks.
    P.S. Firmware version is 012.008

    "I must must achive a segnificant attenuation of the noise in a closed volume using some NI devices ..."
    At first glance I would say "probably can be done using an FPGA as a target" since the FPGA can close a very fast loop.
    But to do that with a microphone input on a PC running Windows...
    I suspect that would be an exercise in futility.
    Anyone out there been able to turn around a microphone input fast enough to something like this?
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Problems using the reset password function on mac osx server.

    Hey ,
    Having problems with the reset password functions on the OSX server. When I try to do through the command line it asks for the old password of the user. So how do I fix the problem? Do I have to log in onto the ldap server as the admin and reset from there or is there an easy fix to make the reset password function work. When I try the reset password function the server is not taking the input when I click on change password. So any helpful suggestions are welcome. Verson OSX lion 10.7.5
    Thanks in Advance,

    Excuse me for misunderstanding your post.  You explicitly stated in your post
    ashdatla wrote:
    through the command line
    and wrote that it asks for the old password.  Server.app is not accessed through the command line, and it does not ask for the old password of the user.
    You might like to try Workgroup Manager instead.

  • Stripslashes function in PHP? Doesn't seem to work...

    I've been trying to get the stripslashes() function in a PHP script to work but I'm not having any luck.  It seems like a very straightforward function but I'm still ending up with slashes in my comment/text area data.  Can anyone help?  I have some PHP books but they barely touch on the functionality.  (I'm new to PHP).  Thanks!  (BTW...  I removed the various attempts at calling the stripslashes() function).  The field I'm trying to remove the slashes from is the 'comment' variable.
    Here is my short php script:
    <?php // Script 1.0 - contactlist.php
    if (isset($_POST['submit']) && !empty($_POST['submit'])) // Test if submit button named submit was clicked and not empty
              if (!empty($_POST['first']) && !empty($_POST['last'])  && !empty($_POST['email']) && !empty($_POST['phone']) && !empty($_POST['comment'])) {
                        $body = "First Name: {$_POST['first']}\nLast Name: {$_POST['last']}\nEmail Address: {$_POST['email']}\nContact Phone Number: {$_POST['phone']}\nContact Preference: {$_POST['contactvia']}\n\nBest Time To Contact: {$_POST['timepref']}\n\nComments:\n {$_POST['comment']}";
                        $body = wordwrap($body, 70);
                        mail('[email protected]', 'NEW Customer Inquiry Submission',$body, "From: {$_POST['email']}");
                        header('Location: index.html');  //Redirect to new url if form submitted
    ?>

    I agree with you about the host not being able to install (or at least don't want to install/upgrade) their servers to php5.4...  Unfortunately, I can't change that...  but by shutting them off took care of all the quotes (single & double) and any other characters which would basically function like an addslashes() command.  I'll paste the script below...  It's still pretty much the same as when you helped me out with the script...  Just minor adjustments:::  If you can show me (even though I fixed the problem) how I would integrate the stripslashes() function to the comment field it would be helpful to know for future reference.
    <?php // Script 1.0 - contactlist.php
    if (isset($_POST['submit']) && !empty($_POST['submit'])) // Test if submit button named submit was clicked and not empty
              if (!empty($_POST['first']) && !empty($_POST['last'])  && !empty($_POST['email']) && !empty($_POST['phone']) && !empty($_POST['comment'])) {
    $comment=stripslashes($_POST[comment]);
                        $body = "First Name: {$_POST['first']}\nLast Name: {$_POST['last']}\nEmail Address: {$_POST['email']}\nContact Phone Number: {$_POST['phone']}\nContact Preference: {$_POST['contactvia']}\n\nBest Time To Contact: {$_POST['timepref']}\n\nComments:\n {$_POST['comment']}";
                        $body = wordwrap($body, 70);
                        mail([email protected]', 'NEW Customer Inquiry Submission',$body, "From: {$_POST['email']}");
                        header('Location: index.html');  //Redirect to new url if form submitted
    ?>

  • Problem in creation of partner function creation.

    Hi all,
        During customer Master upload using LSMW direct method, Iam getting this problem.
    while creating Sales view using XD01, three partner function VE (Sales Representative), SH (Ship-to party), ZI (Front Office) are getting displayed in the last tab of sales view creation.
    Because of some customizing,value for SH is getting populated automatically. But the values for VE & SH are not getting populated from the flat file.
    But the values are present in the respective field (KTONR) and able to see in the display convert data.
    If I enter the manual value during runtime in LSMW, it accepts the value. Since it involves huge amount of data, manual entry for records is not possible.
    Kindly provide the solution.
    Regards
    Narasingam.B

    This problem can be solved by proper customizing.
    Regards
    Narasingam

  • Problem with instantiation in static function

    I have a problem with instatiation of objects in a static function. When I do something like this,
    public static void test1() {
    String s = new String();
    everything works fine, but when I try to do the same with a internally defined class, I get the error "non-static variable this cannot be referenced from a static context".
    My code looks roughly like this:
    public static void test2() {
    Edge e = new Edge();
    class Edge {
    public int y_top;
    public double x_int;
    public int delta_y;
    public double delta_x;
    The compiler complains with the mentioned error message over the creation of a new Edge object and I don't have the slightest clue why... :| When I put the class Edge into an external file, it works.
    Can anyone help me out there?

    Your class Edge is a member of the instance of the current class. You don't have an implicit instance of the current class (the "this" reference) in a static context, therefore you get the error.
    You need to either declare Edge as static, move it outside your class, or create an explicit instance of the outer class which you use to create instances of Edge ("Edge e = new YourMainClass().new Edge()")

  • Where do I send a long list of problems I have with non-functionality with the Lion OSX and new Safari for Lion.

    In the past two weeks I have been documenting my Lion problems.
    First, Arrows gone from finder windows; makes it difficult in comparing long lists of files in folder, or compare documents when reviewing line by line. This is obviously a change by people who do not compare long lists in windows comparing files between versions of projects ... the click to next screen is NOT equal to arrows.
    Second, Finder Redreaw - doesn't. Move files to a fold, if there are a lot of files, they image of the files being moved remains in finder (see attached screen capture) until Finder is restarted and if COPY function is running. last files in Copy queue are not copied.
    Screen capture 5 minutes after moving files to a folder - the selected file images are still in Finder after the move was completed.
    Third, it is SLOW, particularly going to an "Attach file" in email, drawing the content of a folder to select an attachment is long enough for me to go to the kitchen, get a drink and come back. Just like the old days of OS7.
    Fourth, shifting/recentering screen away from where I am working. Several programs, browsers, Adobe Photoshop/inDesign, and dear old Pages re center my screen - not to the center, but if I choose 30 of 70 images in a folder, it will shift … somewhere else in the folder instead of where I just clicked. If I am working on a document in inDesign or PhotoShop it will do the same - the cursor and screen drift elsewhere to find something it has been amused by. Sometimes it is a word, or a file, but often it is off the pastboard and on the etherial pasteboard on which the pages sit. Or if I'm zoomed in on an image, it moves to somewhere else.
    I use a mouse and keyboard, both Apple wireless. I do not use a trackpad, but have a tablet/stylus I am afraid to put into the mix until this crap is stopped.
    Fifth, SAVE AS… is gone. You must unlock, duplicate and edit the duplicate … and must rename it in Finder, or use EXPORT to save as the same format under a new name. SAVE AS… worked. Not broke, why fix it?
    Personal Comment: The problems seem to be the triumph of coked up software engineers ooohing and aaahing over "Wouldn't it be cool if..."   Cool, if they were Microsoft, and required everyone change how they have worked on Macs for the past (almost) three decades. Triumph of brainstorming over functionality.
    Sixth, I can't use Cocoa Booklet, but that really started in OSX 10.6 "Snow Leopard". Most of my X11/Cocoa programs stopped worked about that time. Apple is no longer supporting "open source"?
    But Wait! There's More...
    Seventh, Tonight, trying to download a 1.7 gig archive onto a disk where 280 Gigs were supposedly free, it would not download because, according to the wonderful new Safari and the wonderful new Lion, there is not enough disk space to download a 1.7 gig file in a mere 280 Gigs of free space.
    I might be able to move Snow Leopard onto the iMac, but my deciding factor was that Apple, in its wisdom, decided to make iBook Author unable to run under Snow Leopard. So moving to Snow Leopard means I have lost the ONLY benefit I get from the new computer and the new system.
    This really stinks.

    bigbookjoe wrote:
    In the past two weeks I have been documenting my Lion problems.
    First, Arrows gone from finder windows; makes it difficult in comparing long lists of files in folder, or compare documents when reviewing line by line. This is obviously a change by people who do not compare long lists in windows comparing files between versions of projects ... the click to next screen is NOT equal to arrows.
    Second, Finder Redreaw - doesn't. Move files to a fold, if there are a lot of files, they image of the files being moved remains in finder (see attached screen capture) until Finder is restarted and if COPY function is running. last files in Copy queue are not copied.
    Screen capture 5 minutes after moving files to a folder - the selected file images are still in Finder after the move was completed.
    Third, it is SLOW, particularly going to an "Attach file" in email, drawing the content of a folder to select an attachment is long enough for me to go to the kitchen, get a drink and come back. Just like the old days of OS7.
    Fourth, shifting/recentering screen away from where I am working. Several programs, browsers, Adobe Photoshop/inDesign, and dear old Pages re center my screen - not to the center, but if I choose 30 of 70 images in a folder, it will shift … somewhere else in the folder instead of where I just clicked. If I am working on a document in inDesign or PhotoShop it will do the same - the cursor and screen drift elsewhere to find something it has been amused by. Sometimes it is a word, or a file, but often it is off the pastboard and on the etherial pasteboard on which the pages sit. Or if I'm zoomed in on an image, it moves to somewhere else.
    I use a mouse and keyboard, both Apple wireless. I do not use a trackpad, but have a tablet/stylus I am afraid to put into the mix until this crap is stopped.
    Fifth, SAVE AS… is gone. You must unlock, duplicate and edit the duplicate … and must rename it in Finder, or use EXPORT to save as the same format under a new name. SAVE AS… worked. Not broke, why fix it?
    Personal Comment: The problems seem to be the triumph of coked up software engineers ooohing and aaahing over "Wouldn't it be cool if..."   Cool, if they were Microsoft, and required everyone change how they have worked on Macs for the past (almost) three decades. Triumph of brainstorming over functionality.
    Sixth, I can't use Cocoa Booklet, but that really started in OSX 10.6 "Snow Leopard". Most of my X11/Cocoa programs stopped worked about that time. Apple is no longer supporting "open source"?
    But Wait! There's More...
    Seventh, Tonight, trying to download a 1.7 gig archive onto a disk where 280 Gigs were supposedly free, it would not download because, according to the wonderful new Safari and the wonderful new Lion, there is not enough disk space to download a 1.7 gig file in a mere 280 Gigs of free space.
    I might be able to move Snow Leopard onto the iMac, but my deciding factor was that Apple, in its wisdom, decided to make iBook Author unable to run under Snow Leopard. So moving to Snow Leopard means I have lost the ONLY benefit I get from the new computer and the new system.
    This really stinks.
    http://www.apple.com/feedback/macosx.html

  • Urgent: Problems in Generic Extraction by Function Module

    Hi BW Gurus,
    I am new to SDN and also new to generic extraction using function module. My requirement is to extract long text(142 char) from CRM to BW as the text is not stored in database table I used function module read_text with in another ZXXX function module copy of (RSAX_BIW_GET_DATA_SIMPLE). In my extract structure I used GUID(char,32), Langu, long text(142 char) and 2 placeholders. Text can be extracted by passing STXH table fields(Tdname, Tdid, Tdobject, Tdspars) to read_text as parameters and i also need to use CRMD_ORDERADM_H field GUID(32 char) to compare 1st 32 chars of tdname(70 char) with Guid to select Guids and loop thru this Guids and for each Guid i need to append lines of text to e_t_data but as i donot know ABAP i unable to write the code for this. Through my friends help i wrote code when i check in RSA3 it is displaying the text but when i replicate into BW and load into data target in monitor the status is red with records initially but afterwards it will be red status again with 0 from 0 records for initial load again.when i check on job logs the errors i have are:
    The background job has created a job log file of 2Gb size and it is currently on a infinite loop writing entries into the SAP System Log that it cannot write to the Job log file due to “Error 22 for write/read access to a file” this is because of the datasource i have created. Please find my Function module and if anyone would please correct FM and send me that will be really great.I appreciate it in advance.
    MY Function Module is:
    FUNCTION Z_CRMORDERH_STR_TXT.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SRSC_S_IF_SIMPLE-REQUNR
    *"     VALUE(I_DSOURCE) TYPE  SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
    *"     VALUE(I_MAXSIZE) TYPE  SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
    *"     VALUE(I_INITFLAG) TYPE  SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
    *"     VALUE(I_READ_ONLY) TYPE  SRSC_S_IF_SIMPLE-READONLY OPTIONAL
    *"     VALUE(I_REMOTE_CALL) TYPE  SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
    *"  TABLES
    *"      I_T_SELECT TYPE  SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
    *"      E_T_DATA STRUCTURE  YCRM_TEXT_STR OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    ***"  EXCEPTIONS     NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
      Tables: CRMD_ORDERADM_H, STXH.
    Auxiliary Selection criteria structure
    data: l_s_select type srsc_s_select.
    Maximum number of lines for DB table
      Statics: s_s_if type srsc_s_if_simple,
    counter
             s_counter_datapakid like sy-tabix,
    Cursor
             s_cursor type cursor.
    data: i_crmtext type standard table of TLINE .
      types: begin of xsreph ,
              GUID type CRMD_ORDERADM_H-guid,
            end of xsreph.
       data: i_guid type standard table of xsreph.
      data: I_TEXT type STXH-TDNAME.
      data: xempl like  YCRM_TEXT_STR occurs 0 with header line.
      data: t_tab like dd03l-tabname.
    Select ranges
      ranges: l_r_guid for CRMD_ORDERADM_H-guid.
             l_r_connid  for sflight-connid.
    Initialization mode (first call by SAPI) or data transfer mode
    (following calls) ?
      if i_initflag = sbiwa_c_flag_on.
    Initialization: check input parameters
                    buffer input parameters
                    prepare data selection
    Check DataSource validity
        case i_dsource.
          when 'yCRM_TEXT'.  " for S_SREPH1
          when others.
            if 1 = 2. message e009(r3). endif.
    this is a typical log call. Please write every error message like this
            log_write 'E'                  "message type
                      'R3'                 "message class
                      '009'                "message number
                    i_dsource   "message variable 1
                      ' '.                 "message variable 2
            raise error_passed_to_mess_handler.
        endcase.
       append lines of i_t_select to s_s_if-t_select.
    Fill parameter buffer for data extraction calls
        s_s_if-requnr    = i_requnr.
        s_s_if-dsource = i_dsource.
        s_s_if-maxsize   = i_maxsize.
    Fill field list table for an optimized select statement
    (in case that there is no 1:1 relation between InfoSource fields
    and database table fields this may be far from beeing trivial)
       append lines of i_t_fields to s_s_if-t_fields.
    we will do our selection based on what is in the p table for the
    infoobject
      else.                 "Initialization mode or data extraction ?
    Data transfer: First Call      OPEN CURSOR + FETCH
                   Following Calls FETCH only
    First data package -> OPEN CURSOR
        if s_counter_datapakid = 0.
    Fill range tables BW will only pass down simple selection criteria
    of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
        LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'GUID'.
            MOVE-CORRESPONDING L_S_SELECT TO L_R_GUID.
            APPEND L_R_GUID.
          ENDLOOP.
          case i_dsource.
            when 'YCRM_TEXT'.  " for S_SREPH1
              t_tab = 'CRMD_ORDERADM_H'.
          endcase.
          select GUID
          from (t_tab)
          into table i_guid where   PROCESS_TYPE = 'ZACI'  and ( OBJECT_ID < '0000000042').
         select tdname from stxh into i_text where tdobject = 'TEXT'.
         if sy-subrc ne 0.
           message e009(r3).
    this is a typical log call. Please write every error message like this
           log_write 'E'                  "message type
                     'R3'                 "message class
                     '009'                "message number
                     i_dsource   "message variable 1
                     'No master data found'.           "message variable 2
           raise error_passed_to_mess_handler.
         endif.
    Determine number of database records to be read per FETCH statement
    from input parameter I_MAXSIZE. If there is a one to one relation
    between DataSource table lines and database entries, this is trivial.
    In other cases, it may be impossible and some estimated value has to
    be determined.
         open cursor with hold s_cursor for
         select (s_s_if-t_fields) from CRMD_ORDERADM_H
                                  where GUID in L_R_GUID .
                                   ENDIF.
    Fetch records into interface table.
      named E_T_'Name of extract structure'.
       fetch next cursor s_cursor
                  appending corresponding fields
                  of table e_t_data
                  package size s_s_if-maxsize.
        IF SY-SUBRC <> 0.
         CLOSE CURSOR S_CURSOR.
         RAISE NO_MORE_DATA.
       ENDIF.
    as we are doing this only once can use the select statement.
    ***data: crmtext like tline occurs 0 with header line.
    **data: i_crmtext type standard table of TLINE.
    **data: i_guid type standard table of xsreph.
    data: l_guid type THEAD-TDNAME.
    data: st_guid type xsreph.
    data: st_crmtext type TLINE.
    data: lan type THEAD-TDSPRAS.
    lan = 'E'.
    loop at i_guid into st_guid.
    l_guid = st_guid-guid.
    CALL FUNCTION 'READ_TEXT'
       EXPORTING
       CLIENT                        = SY-MANDT
         ID                            = 'A002'
         LANGUAGE                      = lan
         NAME                          = l_guid
         OBJECT                        = 'CRM_ORDERH'
       ARCHIVE_HANDLE                = 0
       LOCAL_CAT                     = ' '
    IMPORTING
       HEADER                        =
       TABLES
         LINES                         = i_crmtext.
    EXCEPTIONS
       ID                            = 1
       LANGUAGE                      = 2
       NAME                          = 3
       NOT_FOUND                     = 4
       OBJECT                        = 5
       REFERENCE_CHECK               = 6
       WRONG_ACCESS_TO_ARCHIVE       = 7
       OTHERS                        = 8
    e_t_data-guid = l_guid.
    loop at i_crmtext into st_crmtext.
    move lan to e_t_data-langu.
    move st_crmtext-tdline to e_t_data-description.
    append e_t_data.
    endif.
    endloop.
    clear: st_guid,l_guid.
    refresh: i_crmtext.
    endloop.
    S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
    endif.
    ENDFUNCTION.
    please Gurus as I donot know ABAP i appreciate if anyone would write a FM based on requirement and send me that will be really great this is my request. I gurantee of award points for good answers.
    Regards
    Kishore

    Hi,
    The statement <b>RAISE NO_MORE_DATA</b> should be active (uncommented) in your code. Otherwise, the infinte loop occurs.
    See also, the Siggi's blog:
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    BTW, was it your thread here:
    Re: Urgent: problems in extracting Long Text
    Best regards,
    Eugene

  • Problem while calling an RFC Function Module in Background

    Hello,
    I have created a RFC function module for reading data from an external DB system. The FM calls an external RFC program (coded in C++ using RFC SDK), which delivers the required data. This external program is maintainged as an TCP RFC Connection in SM59.
    Further I have created a report, that calls the RFC function module to get the data from the external RFC programm.
    My problem is, when I call the report in foreground, everything works OK, the RFC connection works and data can be read from the external program.
    However, when I schedule the report to run in background as a job, the report is stating in the protocoll that there was a problem calling the defined RFC connection (although the connection is working properly at that time).
    More funny is, this particular problem with running in background occurs only in the productive system, in test and development system the report works correctly also while running as a job in background.
    Can you suggest the solution to this problem? Could it be something with authorisations or server settings?
    I will be on holiday for the next 6 weeks, so take your time to answer .
    Regards,
    Dusan.
    Edited by: Julius Bussche on Jan 22, 2009 7:19 PM
    Please read the forum rules about u r g e n t ...

    This is an external RFC server program, not a remote enabled ABAP RFC function module as the others seem to be assuming, right?
    Is it possible that your DEV and QAS systems only have one application server, but the PROD has many and dedicated one(s) for processing low priority background jobs?
    It might be that the target server of your TCP connection is not this BTC instance, and your RFC server is returning the data "locally" - so, into nirvana...
    Just guessing, but might be worth checking.
    Cheers,
    Julius

  • Problem in creating a java proxy for PHP web service

    This is a problem in generating a java proxy for a PHP webservice.
    I have a PHP service running on Wamp Server and also a PHP client which is able to call the service.
    The WSDL for the PHP web service is also generated .
    I am trying to create a java proxy using the jdev (10.1.3.0.3) from the wsdl file.
    The wsdl generated by the php program is
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:si="http://soapinterop.org/xsd" xmlns:tns="urn:hellowsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:hellowsdl">
    <types>
    <xsd:schema targetNamespace="urn:hellowsdl">
      <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
      <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
      </xsd:schema>
      </types>
    <message name="helloRequest">
      <part name="name" type="xsd:string" />
      </message>
    <message name="helloResponse">
      <part name="return" type="xsd:string" />
      </message>
    <portType name="hellowsdlPortType">
    <operation name="hello">
      <documentation>Says hello to the caller</documentation>
      <input message="tns:helloRequest" />
      <output message="tns:helloResponse" />
      </operation>
      </portType>
    <binding name="hellowsdlBinding" type="tns:hellowsdlPortType">
      <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
    <operation name="hello">
      <soap:operation soapAction="urn:hellowsdl#hello" style="rpc" />
    <input>
      <soap:body use="encoded" namespace="urn:hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </input>
    <output>
      <soap:body use="encoded" namespace="urn:hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </output>
      </operation>
      </binding>
    <service name="hellowsdl">
    <port name="hellowsdlPort" binding="tns:hellowsdlBinding">
      <soap:address location="http://localhost/mywork/myphp.php" />
      </port>
      </service>
      </definitions>After making following changes to the wsdl program, I tried to generate java proxy.
    <definitions name="hellowsdl"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:si="http://soapinterop.org/xsd" xmlns:tns="http://localhost/mywork/hellowsdl.wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://localhost/mywork/myphpwsdl.wsdll">
    <types>
    <xsd:schema targetNamespace="http://localhost/mywork/hellowsdl.wsdl">
      <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
      <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
      </xsd:schema>
      </types>
    <message name="helloRequest">
      <part name="name" type="xsd:string" />
      </message>
    <message name="helloResponse">
      <part name="return" type="xsd:string" />
      </message>
    <portType name="hellowsdlPortType">
    <operation name="hello">
      <documentation>Says hello to the caller</documentation>
      <input message="tns:helloRequest" />
      <output message="tns:helloResponse" />
      </operation>
      </portType>
    <binding name="hellowsdlBinding" type="tns:hellowsdlPortType">
      <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
    <operation name="hello">
      <soap:operation soapAction="" style="rpc" />
    <input>
      <soap:body use="encoded" namespace="http://localhost/mywork/hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </input>
    <output>
      <soap:body use="encoded" namespace="http://localhost/mywork/hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </output>
      </operation>
      </binding>
    <service name="hellowsdl">
    <port name="hellowsdlPort" binding="tns:hellowsdlBinding">
      <soap:address location="http://localhost/mywork/myphp.php" />
      </port>
      </service>
      </definitions>This is how the java stub file looks like:
    public class HellowsdlBinding_Stub
        extends oracle.j2ee.ws.client.StubBase
        implements demo.mypackage.HellowsdlPortType {
         *  public constructor
        public HellowsdlBinding_Stub(HandlerChain handlerChain) {
            super(handlerChain);
            _setProperty(ENDPOINT_ADDRESS_PROPERTY, "http://localhost/mywork/hellowsdl.php");
            setSoapVersion(SOAPVersion.SOAP_11);
            setServiceName( new QName("http://localhost/mywork/hellowsdl","hellowsdl"));
            setPortName( new QName("http://localhost/mywork/hellowsdl","hellowsdlPort"));
         *  implementation of hello
        public java.lang.String hello(java.lang.String name)
            throws java.rmi.RemoteException {
            StreamingSenderState _state = null;
            try {
                _state = _start(_handlerChain);
                if (_getProperty(ClientConstants.DIME_ENCODE_MESSAGES_WITH_ATTACHMENTS) != null) {
                    _state.getMessageContext().getMessage().setProperty("DimeEncode",_getProperty(ClientConstants.DIME_ENCODE_MESSAGES_WITH_ATTACHMENTS));
                InternalSOAPMessage _request = _state.getRequest();
                _request.setOperationCode(hello_OPCODE);
                _state.getMessageContext().setProperty("oracle.j2ee.ws.mgmt.interceptor.operation-qname",new QName("","hello"));
                demo.mypackage.runtime.HellowsdlBinding_hello_ReqS _myHellowsdlBinding_hello_ReqS = new demo.mypackage.runtime.HellowsdlBinding_hello_ReqS();
            _myHellowsdlBinding_hello_ReqS.setName(name);
            SOAPBlockInfo _bodyBlock = new SOAPBlockInfo(ns1_hello_hello_QNAME);
            _bodyBlock.setValue(_myHellowsdlBinding_hello_ReqS);
            _bodyBlock.setSerializer(myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer);
            _request.setBody(_bodyBlock);
            _state.getMessageContext().setProperty("http.soap.action", "http://localhost/mywork/hellowsdl");
            _send((String) _getProperty(ENDPOINT_ADDRESS_PROPERTY), _state);
            demo.mypackage.runtime.HellowsdlBinding_hello_RespS _myHellowsdlBinding_hello_RespS = null;
            Object _responseObj = _state.getResponse().getBody().getValue();
            if (_responseObj instanceof SOAPDeserializationState) {
                _myHellowsdlBinding_hello_RespS =
                    (demo.mypackage.runtime.HellowsdlBinding_hello_RespS)((SOAPDeserializationState)_responseObj).getInstance();
            } else {
                _myHellowsdlBinding_hello_RespS =
                    (demo.mypackage.runtime.HellowsdlBinding_hello_RespS)_responseObj;
            return _myHellowsdlBinding_hello_RespS.get_return();
        } catch (RemoteException e) {
            // let this one through unchanged
            throw e;
        } catch (JAXRPCException e) {
            throw new RemoteException(e.getMessage(), e);
        } catch (Exception e) {
            if (e instanceof RuntimeException) {
                throw (RuntimeException)e;
            } else {
                throw new RemoteException(e.getMessage(), e);
    *  this method deserializes the request/response structure in the body
    protected void _readFirstBodyElement(XMLReader bodyReader, SOAPDeserializationContext deserializationContext, StreamingSenderState  state) throws Exception {
        int opcode = state.getRequest().getOperationCode();
        switch (opcode) {
            case hello_OPCODE:
                _deserialize_hello(bodyReader, deserializationContext, state);
                break;
            default:
                throw new SenderException("sender.response.unrecognizedOperation", Integer.toString(opcode));
    * This method deserializes the body of the hello operation.
    private void _deserialize_hello(XMLReader bodyReader, SOAPDeserializationContext deserializationContext, StreamingSenderState state) throws Exception {
        try {
            Object myHellowsdlBinding_hello_RespSObj =
                myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer.deserialize(ns1_hello_helloResponse_QNAME,
                    bodyReader, deserializationContext);
            SOAPBlockInfo bodyBlock = new SOAPBlockInfo(ns1_hello_helloResponse_QNAME);
            bodyBlock.setValue(myHellowsdlBinding_hello_RespSObj);
            state.getResponse().setBody(bodyBlock);
        } catch (DeserializationException e) {
            if (e.getSoapFaultSubCodeType() == JAXRPCExceptionBase.FAULT_CODE_NONE && e.getSoapFaultCodeType() != JAXRPCExceptionBase.FAULT_CODE_DATA_ENCODING_UNKNOWN) {
                e.setSoapFaultSubCodeType(JAXRPCExceptionBase.FAULT_CODE_BAD_ARGUMENTS);
            throw e;
    public String _getEncodingStyle() {
        return SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding();
    public void _setEncodingStyle(String encodingStyle) {
        throw new UnsupportedOperationException("cannot set encoding style");
    public ClientTransport getClientTransport() {
        return super._getTransport();
    * This method returns an array containing (prefix, nsURI) pairs.
    protected String[] _getNamespaceDeclarations() {
        return myNamespace_declarations;
    * This method returns an array containing the names of the headers we understand.
    public QName[] _getUnderstoodHeaders() {
        return understoodHeaderNames;
    * This method handles the case of an empty SOAP body.
    protected void _handleEmptyBody(XMLReader reader, SOAPDeserializationContext deserializationContext, StreamingSenderState state) throws Exception {
    public void _initialize(InternalTypeMappingRegistry registry) throws Exception {
        super._initialize(registry);
        myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer = (CombinedSerializer)registry.getSerializer(SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding(), demo.mypackage.runtime.HellowsdlBinding_hello_ReqS.class, ns1_hello_TYPE_QNAME);
        myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer = (CombinedSerializer)registry.getSerializer(SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding(), demo.mypackage.runtime.HellowsdlBinding_hello_RespS.class, ns1_helloResponse_TYPE_QNAME);
    private static final QName _portName = new QName("http://localhost/mywork/hellowsdl", "hellowsdlPort");
    private static final int hello_OPCODE = 0;
    private static final QName ns1_hello_hello_QNAME = new QName("http://localhost/mywork/hellowsdl", "hello");
    private static final QName ns1_hello_TYPE_QNAME = new QName("http://localhost/mywork/hellowsdl", "hello");
    private CombinedSerializer myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer;
    private static final QName ns1_hello_helloResponse_QNAME = new QName("http://localhost/mywork/hellowsdl", "helloResponse");
    private static final QName ns1_helloResponse_TYPE_QNAME = new QName("http://localhost/mywork/hellowsdl", "helloResponse");
    private CombinedSerializer myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer;
    private static final String[] myNamespace_declarations =
                                        new String[] {
                                            "ns0", "http://localhost/mywork/hellowsdl"
    private static final QName[] understoodHeaderNames = new QName[] {  };
    }The errors that are produced are-
    java.rmi.RemoteException: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 404 Not Found; nested exception is:
         HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 404 Not Found
    Kindly help to resolve this.
    Thanks.

    This is a problem in generating a java proxy for a PHP webservice.
    I have a PHP service running on Wamp Server and also a PHP client which is able to call the service.
    The WSDL for the PHP web service is also generated .
    I am trying to create a java proxy using the jdev (10.1.3.0.3) from the wsdl file.
    The wsdl generated by the php program is
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:si="http://soapinterop.org/xsd" xmlns:tns="urn:hellowsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:hellowsdl">
    <types>
    <xsd:schema targetNamespace="urn:hellowsdl">
      <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
      <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
      </xsd:schema>
      </types>
    <message name="helloRequest">
      <part name="name" type="xsd:string" />
      </message>
    <message name="helloResponse">
      <part name="return" type="xsd:string" />
      </message>
    <portType name="hellowsdlPortType">
    <operation name="hello">
      <documentation>Says hello to the caller</documentation>
      <input message="tns:helloRequest" />
      <output message="tns:helloResponse" />
      </operation>
      </portType>
    <binding name="hellowsdlBinding" type="tns:hellowsdlPortType">
      <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
    <operation name="hello">
      <soap:operation soapAction="urn:hellowsdl#hello" style="rpc" />
    <input>
      <soap:body use="encoded" namespace="urn:hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </input>
    <output>
      <soap:body use="encoded" namespace="urn:hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </output>
      </operation>
      </binding>
    <service name="hellowsdl">
    <port name="hellowsdlPort" binding="tns:hellowsdlBinding">
      <soap:address location="http://localhost/mywork/myphp.php" />
      </port>
      </service>
      </definitions>After making following changes to the wsdl program, I tried to generate java proxy.
    <definitions name="hellowsdl"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:si="http://soapinterop.org/xsd" xmlns:tns="http://localhost/mywork/hellowsdl.wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://localhost/mywork/myphpwsdl.wsdll">
    <types>
    <xsd:schema targetNamespace="http://localhost/mywork/hellowsdl.wsdl">
      <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
      <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
      </xsd:schema>
      </types>
    <message name="helloRequest">
      <part name="name" type="xsd:string" />
      </message>
    <message name="helloResponse">
      <part name="return" type="xsd:string" />
      </message>
    <portType name="hellowsdlPortType">
    <operation name="hello">
      <documentation>Says hello to the caller</documentation>
      <input message="tns:helloRequest" />
      <output message="tns:helloResponse" />
      </operation>
      </portType>
    <binding name="hellowsdlBinding" type="tns:hellowsdlPortType">
      <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
    <operation name="hello">
      <soap:operation soapAction="" style="rpc" />
    <input>
      <soap:body use="encoded" namespace="http://localhost/mywork/hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </input>
    <output>
      <soap:body use="encoded" namespace="http://localhost/mywork/hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </output>
      </operation>
      </binding>
    <service name="hellowsdl">
    <port name="hellowsdlPort" binding="tns:hellowsdlBinding">
      <soap:address location="http://localhost/mywork/myphp.php" />
      </port>
      </service>
      </definitions>This is how the java stub file looks like:
    public class HellowsdlBinding_Stub
        extends oracle.j2ee.ws.client.StubBase
        implements demo.mypackage.HellowsdlPortType {
         *  public constructor
        public HellowsdlBinding_Stub(HandlerChain handlerChain) {
            super(handlerChain);
            _setProperty(ENDPOINT_ADDRESS_PROPERTY, "http://localhost/mywork/hellowsdl.php");
            setSoapVersion(SOAPVersion.SOAP_11);
            setServiceName( new QName("http://localhost/mywork/hellowsdl","hellowsdl"));
            setPortName( new QName("http://localhost/mywork/hellowsdl","hellowsdlPort"));
         *  implementation of hello
        public java.lang.String hello(java.lang.String name)
            throws java.rmi.RemoteException {
            StreamingSenderState _state = null;
            try {
                _state = _start(_handlerChain);
                if (_getProperty(ClientConstants.DIME_ENCODE_MESSAGES_WITH_ATTACHMENTS) != null) {
                    _state.getMessageContext().getMessage().setProperty("DimeEncode",_getProperty(ClientConstants.DIME_ENCODE_MESSAGES_WITH_ATTACHMENTS));
                InternalSOAPMessage _request = _state.getRequest();
                _request.setOperationCode(hello_OPCODE);
                _state.getMessageContext().setProperty("oracle.j2ee.ws.mgmt.interceptor.operation-qname",new QName("","hello"));
                demo.mypackage.runtime.HellowsdlBinding_hello_ReqS _myHellowsdlBinding_hello_ReqS = new demo.mypackage.runtime.HellowsdlBinding_hello_ReqS();
            _myHellowsdlBinding_hello_ReqS.setName(name);
            SOAPBlockInfo _bodyBlock = new SOAPBlockInfo(ns1_hello_hello_QNAME);
            _bodyBlock.setValue(_myHellowsdlBinding_hello_ReqS);
            _bodyBlock.setSerializer(myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer);
            _request.setBody(_bodyBlock);
            _state.getMessageContext().setProperty("http.soap.action", "http://localhost/mywork/hellowsdl");
            _send((String) _getProperty(ENDPOINT_ADDRESS_PROPERTY), _state);
            demo.mypackage.runtime.HellowsdlBinding_hello_RespS _myHellowsdlBinding_hello_RespS = null;
            Object _responseObj = _state.getResponse().getBody().getValue();
            if (_responseObj instanceof SOAPDeserializationState) {
                _myHellowsdlBinding_hello_RespS =
                    (demo.mypackage.runtime.HellowsdlBinding_hello_RespS)((SOAPDeserializationState)_responseObj).getInstance();
            } else {
                _myHellowsdlBinding_hello_RespS =
                    (demo.mypackage.runtime.HellowsdlBinding_hello_RespS)_responseObj;
            return _myHellowsdlBinding_hello_RespS.get_return();
        } catch (RemoteException e) {
            // let this one through unchanged
            throw e;
        } catch (JAXRPCException e) {
            throw new RemoteException(e.getMessage(), e);
        } catch (Exception e) {
            if (e instanceof RuntimeException) {
                throw (RuntimeException)e;
            } else {
                throw new RemoteException(e.getMessage(), e);
    *  this method deserializes the request/response structure in the body
    protected void _readFirstBodyElement(XMLReader bodyReader, SOAPDeserializationContext deserializationContext, StreamingSenderState  state) throws Exception {
        int opcode = state.getRequest().getOperationCode();
        switch (opcode) {
            case hello_OPCODE:
                _deserialize_hello(bodyReader, deserializationContext, state);
                break;
            default:
                throw new SenderException("sender.response.unrecognizedOperation", Integer.toString(opcode));
    * This method deserializes the body of the hello operation.
    private void _deserialize_hello(XMLReader bodyReader, SOAPDeserializationContext deserializationContext, StreamingSenderState state) throws Exception {
        try {
            Object myHellowsdlBinding_hello_RespSObj =
                myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer.deserialize(ns1_hello_helloResponse_QNAME,
                    bodyReader, deserializationContext);
            SOAPBlockInfo bodyBlock = new SOAPBlockInfo(ns1_hello_helloResponse_QNAME);
            bodyBlock.setValue(myHellowsdlBinding_hello_RespSObj);
            state.getResponse().setBody(bodyBlock);
        } catch (DeserializationException e) {
            if (e.getSoapFaultSubCodeType() == JAXRPCExceptionBase.FAULT_CODE_NONE && e.getSoapFaultCodeType() != JAXRPCExceptionBase.FAULT_CODE_DATA_ENCODING_UNKNOWN) {
                e.setSoapFaultSubCodeType(JAXRPCExceptionBase.FAULT_CODE_BAD_ARGUMENTS);
            throw e;
    public String _getEncodingStyle() {
        return SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding();
    public void _setEncodingStyle(String encodingStyle) {
        throw new UnsupportedOperationException("cannot set encoding style");
    public ClientTransport getClientTransport() {
        return super._getTransport();
    * This method returns an array containing (prefix, nsURI) pairs.
    protected String[] _getNamespaceDeclarations() {
        return myNamespace_declarations;
    * This method returns an array containing the names of the headers we understand.
    public QName[] _getUnderstoodHeaders() {
        return understoodHeaderNames;
    * This method handles the case of an empty SOAP body.
    protected void _handleEmptyBody(XMLReader reader, SOAPDeserializationContext deserializationContext, StreamingSenderState state) throws Exception {
    public void _initialize(InternalTypeMappingRegistry registry) throws Exception {
        super._initialize(registry);
        myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer = (CombinedSerializer)registry.getSerializer(SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding(), demo.mypackage.runtime.HellowsdlBinding_hello_ReqS.class, ns1_hello_TYPE_QNAME);
        myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer = (CombinedSerializer)registry.getSerializer(SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding(), demo.mypackage.runtime.HellowsdlBinding_hello_RespS.class, ns1_helloResponse_TYPE_QNAME);
    private static final QName _portName = new QName("http://localhost/mywork/hellowsdl", "hellowsdlPort");
    private static final int hello_OPCODE = 0;
    private static final QName ns1_hello_hello_QNAME = new QName("http://localhost/mywork/hellowsdl", "hello");
    private static final QName ns1_hello_TYPE_QNAME = new QName("http://localhost/mywork/hellowsdl", "hello");
    private CombinedSerializer myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer;
    private static final QName ns1_hello_helloResponse_QNAME = new QName("http://localhost/mywork/hellowsdl", "helloResponse");
    private static final QName ns1_helloResponse_TYPE_QNAME = new QName("http://localhost/mywork/hellowsdl", "helloResponse");
    private CombinedSerializer myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer;
    private static final String[] myNamespace_declarations =
                                        new String[] {
                                            "ns0", "http://localhost/mywork/hellowsdl"
    private static final QName[] understoodHeaderNames = new QName[] {  };
    }The errors that are produced are-
    java.rmi.RemoteException: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 404 Not Found; nested exception is:
         HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 404 Not Found
    Kindly help to resolve this.
    Thanks.

Maybe you are looking for

  • Wacom tablet brush features lagging and non-responsive

    I am a photographer and rely heavily on my Wacom tablet to edit my images in Photoshop. The latest CS6 update and CC update disables any tool that uses the brush feature. If I work with a tool for example the quick selection tool, before I can use an

  • Normal File to IDOC

    Hi Gurus ...         here i am working  on a  normal file to IDOC  scenario. i am working on PI 7.0. here i am facing a problem ....  i created a message  type for the coming file. i created the message  type  and  message  interface  even .... later

  • Help with form submissions

    Im pretty new to Dreamweaver and also form making as well and I am trying to put together something for my work. We are presently using Outlook eforms to handle internal paperwork, including the one I am trying to get to the web. Which is a Employee/

  • Steps for performing Flat file to XML

    hey, does any one have steps for performing flat file (.csv) to XML conversion. how is the mapping in the design performed. kalyan.

  • Could not activate cellulare data network??? what is the solution please.

    everytime i try to log to the internet through the internet service provider on the phone, i get this message   (could not activate cellulare data network) I was loginig before via wifi meanwhile i do not have wifi and i am forced to use the service