Send xML packet to TCP/IP socket in SOA 11g

Send xML packet to TCP/IP socket in SOA 11g
Hi,
I have a requirement like
I need to pass xml data to TCP/IP socket in the form of packets in SOA11g.
How we can do this.Please advise me.step by step procedure helps more.

Hi,
There is a JCA Adapter for Sockets available... Have a look at this doc...
http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/adptr_sock.htm#BABEBEJH
Cheers,
Vlad

Similar Messages

  • Org.xml.sax.SAXParseException during deploying project in SOA 11G

    Hello,
    I was migrating a project from SOA 10G to SOA 11G (11.1.1.3). I had to make a few changes in the project such as:
    1) Put concrete wsdl's
    2) Put "<bpelx:exec import="oracle.soa.common.util.Base64Decoder"/>" in the bpel file
    3) Change the database adapters to have "toplink" as the persistence provider as when I migrated the file , it changed it to Eclipse
    4) Fill in the port and location in the reference portion of the composite.xml
    At the end of all these changes , my project compiled properly , but when I tried to deploy it , I am getting this error:
    [09:57:27 AM] Error deploying archive sca_MIA_ModuleInvToGP_rev1.0.jar to partition "default" on server soa_server1 [sv-soafm-dev1.infinera.com:8001]
    [09:57:27 AM] HTTP error code returned [500]
    [09:57:27 AM] Error message from server:
    Error during deployment: org.xml.sax.SAXParseException: <Line 26, Column 68>: XML-20221: (Fatal Error) Invalid char in text.: <Line 26, Column 68>: XML-20221: (Fatal Error) Invalid char in text..
    [09:57:27 AM] Check server log for more details.
    I am unable to know where this particular error is coming from , and do not know how to resolve this. Does any one have any idea on what could be the possible reason for this?
    Seems to be a problem with some XML file , but I dont know which file to check.
    Any help is welcome.
    Thanks
    Manan Sanghvi

    In the session.xml schema it is a choice between driver-class/url and datasource, so you need to remove the driver-class tag as you are using a datasource.
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <datasource>jdbc/AlfaDS</datasource>
    replalce with,
    <datasource>jdbc/AlfaDS</datasource>

  • How to send XML packet from external socket server to OSB

    Hi folks,
    How do I use external Socket Server(tcp) to send payload to OSB ?
    I have configured the socket protocol in my OSB. I am also able to send and receive responses by testing my proxy services from OSB itself.
    But now, we want to use some external socket (tcp)server to be able to fire some xml file and then receive response on OSB.
    Please help
    salil

    You need to use a socket client application to send a message to a socket where your proxy is listening. For receiving a message at a socket, configure business service at OSB.
    Regards,
    Anuj

  • Send XML over Sockets

    I am beginning and I need to send XML formatted data from Swing Client to Server for parsing/processing/and response.
    There are no web server available to use. I think its best to use socket connection, but how do I send xml data over socket, and how do I receive it from server and parse it?
    I have read and cannot find a similar example.

    Xerces has DOMSerializer which can be used to serialize a Document object to a string. Once it's a string it's trivial to transmit over a socket connection. On the other side, to parse it, you'll have to create a StringReader for the received string and then an InputSource from the StringReader. You'll then be able to pass the InputSource to the DocumentBuilder.parse( ) method to generate a Document on the receiving side.
    Hope that helps,
    - Jesse

  • Which load testing tool is appropriate for sending message to a tcp socket

    Hi,
    I am new to the testing world. I have developed a messaging application, where the client sends his requests on to the server program which opens a socket and listens for messages. Then all mesaging goes on. I want to load test my application. I have tested it with Apache's JMeter, besides that are there any other load testing tools.
    The clients need to send messages on a tcp socket. I really need this, please help me.
    Thanks,

    Dude,
    Write one!
    I test any servers I've written by hammering them by writing a multi-threaded test program to simulate client activity, namely an initial login and then whatever other activity the client would usually perform. Maybe in your case this would involve the sending of messages, the checking/reading of new messages and logging out.
    I usually get my timing statistics by simply capturing a start time and an end time (the difference being the m/s taken). ie: using java.util.Date.
    Run the test program from a single host to iron out any initial problems, but then be sure to run it from as many different hosts as you can get your mitts on!

  • Detect "end of file" while send n numbers files over a socket?

    Hi!
    I�m trying to find a way to detect "end of file" while send n numbers files over a socket.
    What i'm looking for is how to detect on the client side when the file i�m sending is downloaded.
    Here is the example i�m working on.
    Client side.
    import java.io.*;
    import java.net.*;
    public class fileTransfer {
        private InputStream fromServer;
        public fileTransfer(String fileName) throws FileNotFoundException, IOException {
            Socket socket = new Socket("localhost", 2006);
            fromServer = socket.getInputStream();
            for(int i=0; i<10; i++)
                receive(new File(i+fileName));
        private void receive(File uploadedFile) throws FileNotFoundException, IOException {
            uploadedFile.createNewFile();
            FileOutputStream toFile = new FileOutputStream(uploadedFile);
            byte[] buffer = new byte[4096];
            int bytesRead = 0;
            while ((bytesRead = fromServer.read(buffer)) != -1) {
                toFile.write(buffer, 0, bytesRead);
        public static void main(String[] args) {
            try {
                new fileTransfer("testa.jpg");
            } catch (Exception ex) {ex.printStackTrace();}
    }Server side.
    import java.io.*;
    import java.net.*;
    public class fileTransferSend {
        Socket serv = null;
        OutputStream toClient;
        public fileTransferSend(String fileName) throws FileNotFoundException, IOException {
            StartServer();       
            for(int i =0; i<10; i++)
                send(new File(fileName));
        public void StartServer() throws IOException {
            ServerSocket ssocket = new ServerSocket(2006);
            System.out.println("Waiting for incomming");
            serv = ssocket.accept();
            System.out.println("incomming");
            toClient = serv.getOutputStream();
        private void send(File f) throws FileNotFoundException, IOException {
            if(f.exists() && f.canRead()) {
                FileInputStream fromFile = new FileInputStream(f);
                try {
                    byte[] buffer = new byte[4096]; // 4K
                    int bytesRead = 0;
                    System.out.println("sending: "+f.getName());
                    while ((bytesRead = fromFile.read(buffer)) != -1) {
                        toClient.flush();
                        toClient.write(buffer, 0, bytesRead);
                finally {
                    //toClient.close();
                    fromFile.close();
            } else {
                System.out.println("no files");
        public static void main(String[] args) {
            try {
                new fileTransferSend("test.jpg");
            }catch(Exception e) {e.printStackTrace();}
    I know that the client never reads -1 becuase i doesn�t close the stream.
    Is there anyway to tell the client that the file is downloaded?

    A common (and easy) TCP/IP protocol is to send length, followed by data.
    Because TCP/IP is a stream-oriented protocol, a receiver can never absolutely determine where the first packet ends and the second packet begins. So it is common to send the length of the packet, followed by the packet itself.
    In your case, you could send length of file, followed by file data. It should be fairly easy to obtain file length and send that as a 32-bit (or 64-bit value). Here is an idea (not code) for the receiver:
    receive (4) // where 4 = number bytes to receive
    unsigned length = convert 4 bytes to unsigned integer
    while (length != 0)
    n = receive ( length ) // where n = number bytes actually received, and length = number bytes desired
    Or, you can use the concept of an "Escape" character in the stream. Arbitrarily choose an ESCAPE character of 0x1B (although it could be any 8-bit value). When the receiver detects an ESCAPE char, the next character can be either control or data. So for end of file you might send 0x1B 0x00. If the byte to be sent is 0x1B, then send 0x1B 0x1B. The receiver would look something like this:
    b = read one byte from stream
    if (b == 0x1B)
    b = read one byte from stream
    if (b == 0x00) then end of file
    else place b in buffer
    else
    place b in buffer
    Later.

  • How to send a packet through a specific Inferface ?

    Hello!
    I have 3 interfaces in my pc : LAN / WLAN / 3G
    On LAN I have a global IP.
    On WLAN and 3G I'm behind NAT.
    I'm coding a program (client+srv) >
    I watch a video streaming on LAN then I switch to WLAN or 3G and I want it to happen seamless. So basecly seamless vertical handover is my goal.
    Because I'm behind a NAT (3G,WLAN) First I have to send a packet to the server (connection initialization). When the server sends the stream to me it actually sends it to the NAT and the NAT will fwd it to me.
    The NAT send the packets back to me only if>
    1. the server sends from the same port which it received the request form the NAT
    2. It have to send to the same NAT (ip+port) address where the request came from
    3. NAT will send then the packet back to my PC to the same port where I sent my request from.
    Here comes my big problem!
    I have a socket bound to a IP1 and port (e.g. WLAN) if I want to send a packet to an destination IPx for which the route table has the LAN interface as default gateway (IP2), then it will send my packet trough the LAN (IP2) but the source IP will be IP1 in the packet.
    Basecly I have a WLAN package on my LAN.
    This is bad for me in 2 ways.
    1. there won't be a NAT binding for my WLAN
    2. the packet won't even make it to the server because the very first router will throw it away since it's source IP is not a LAN IP
    SO,
    is there a way in Java, to send a packet thorugh a specific interface???
    Thx for the kind help!
    r0hamkuka

    I used NetworkInterface.getNetworkInterfaces() to get all avaliable interfaces. After that I used this: interfaceSocket = new DatagramSocket(6000, interfaceIp); for all my interfaces with different interfaceIp of course
    The I tried to send a packet to 153.66.200.155 for example (LAN address) through my WLAN interface (ip for example: 192.168.1.101) using WLAN's interfaceSocket.send()
    But the packet goes out on my LAN interface (ip 153.66.200.166) while the src ip is still 192.168.1.101 in the packet. That is why I sad WLAN packet on LAN interface.
    I guess the reason is still the routing table. Because routing table tells which IF to use for a destination IP. Of course for dest 153.66.x.x routing table contains 153.66.200.166 as the gateway and not 192.168.1.101. So Win uses this the LAN IF to send the packet.

  • TCP/IP Sockets

    TCP/IP Sockets
    I need to write a server/client program which will implement a weather server.
    A text file in the same directory as the server will be updated daily(manually) and the server will send this information to clients on request.
    The client need only collect the weather report then exit.
    To start with have the server handle one request, then when this works correctly, change it to stay running and serve any number of requests as they come in. The server will have a loop that calls accept(), then spawns a new Thread to handle each request.

    Here's one suggestion:
    1. Create a Client class.
    2. Create a Server class.
    3. Create a SpawnedServer class.
    4. Create an Application or whatever that uses the Client class.
    1. The Client class has as a data member a Socket that connects to the server and gets the info.
    2. The Server class has a ServerSocket and also has a while true loop that does the following:
    Socket sock = servSock.accept()
    new SpawnedServer(sock).start()
    3. The SpawnedServer class has a Socket data member that gets initialized in its constructor that is
    called when it is created above. The SpawnedServer class extends Thread and does most of its work
    in the run method.
    4. Start the server.
    5. Run application programs as desired.
    Think of all of the things that you would want a Client to do:
    For example, open a connection, receive a message, close a connection, output the reply...
    Think of all of the things that you would want a SpawnedServer to do:
    receive a message, process a message, respond to a message...
    Implement a small portion. Test it. When it works, implement another and test it. Do this until completed.
    I hope this advice helps some. I am relatively new to the programming game, but have found that it is very helpful
    to implement piece by piece when a program is somewhat complex.
    Good luck.

  • Send multiple strings over TCP - Like messenger service

    Hello all Java Coders,
    I'm new with TCP programming.
    I'm beggining to learn about TCP and sockets connections in Java. In order to achieve this, I was coding a mini-program so I can learn a little bit about this.
    I'm trying to make a simple TCP program.
    The server sends a string to a client...
    I already searched for a couple of hours in google and so on, about what I'm doing wrong.
    [The server code (Just click)|http://pastebin.com/m39fd1273]
    [The client code (Just click)|http://pastebin.com/m57471803]
    I hope that someone can help me with this and, if you have patience, please tell me the reasons my code doesn't work.
    Many thanks,
    Freiheitpt
    P.S.: I think that the problem is on the server side...

    Sorry jverd.
    I was just trying to put things organized.
    Well, I can't get the String to be sent to the client.
    No error occurs.
    Server:
           try {
                srvr = new ServerSocket(1234);
                System.out.println("Connecting...");
                skt = srvr.accept();
                System.out.println("Connected!\nPreparing data exchange...");
                stream = skt.getOutputStream();
                out = new PrintWriter(stream, true);
                System.out.println("Done!\nReady to Send!");
            } catch (IOException ex) {
                System.out.println("Ups, didn't work!");
                System.exit(1);
            while(!data.equalsIgnoreCase("end")) {
                System.out.print("String to send: ");
                data = input.nextLine();
                System.out.print("Sending string: '" + data + "'\n");
                out.print(data);
            }Client:
            try {
                skt = new Socket("localhost", 1234);
                System.out.println("Connecting...");
                if (skt.isConnected()) {
                    System.out.println("Connected!\nPreparing data exchange...");
                    stream = skt.getInputStream();
                    inputStream = new InputStreamReader(stream);
                    in = new BufferedReader(inputStream);
                    System.out.println("Done!\nReady to Receive!");
                } else {
                    System.out.println("Server not available!\nExiting...");
                    skt.close();
                    System.exit(1);
            } catch (IOException ex) {
                System.out.println("Ups, didn't work!");
                System.exit(1);
            while (!data.equalsIgnoreCase("end")) {
                while(!in.ready()) {}
                data = in.readLine();
                System.out.println("Received String: '" + data + "'");
            }

  • Need to send 32 packet within 15ms through UDP

    Hi all,
            I need to send 32 packet within 15ms through UDP in labview 2012. Each packet carries 2560 bytes. If it can able to send all packet within 7 or 8 ms, then it should wait upto 15ms and again it should repeat the same.
    Please, anyone help me.
    My code is as below.
    Thanks,
    Attachments:
    DAC_labview.zip ‏49 KB

    I wouldn't go that far, Shane.
    I think that there is some confusion/misunderstand around this topic.
    YES, you can use LV to send data using UDP and TCP to other systems.
    NO, UDP by itself does not ensure lossless data transfer. So UDP can lose packets. That is something which LV cannot influence by any means. TCP is a lossless protocol which should be used if you require the security.
    NO, neither TCP nor UDP are deterministic. So even if the packages you are sending are sent within a time x ms, there is no one garantee of any means that this happens EVERY time. Sometime packages might take a multiple of this time.
    NO, transfer times are not influenced by the sending PC at a primary level. It all depends on your network; if the network sucks, using UDP packages are lost. If using TCP, packages are resent, so it also depends on sender and receiver alike.
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Sending more than one data to Socket

    Hi Guys
    How can i send more than one data to socket. What i have to do is
    in server side
    1) Want to send file data to socket
    2) and the name of the file to socket
    in client
    1) read the file data from socket
    2) read the file name from the socket
    3) and save the file.
    how can i do this, I know how to send only file data, but i am finding dificuilt to send both.
    please some one help me with sample code.
    Thanks in advance
    Shan

    Thanks for the reply
    the problem i am facing is send the file name and data together . I have modified a code to send the file data, giving the static file name at the client side. Could you please help me to modify the code to send both file name and data from server. I am pasting my code. Sorry to ask like this but i am struggling a lot in this issue. When you are free please help me.
    (Also i don't have any Duke dollers to assign for this post)
    import java.io.*;
    import java.net.*;
    class Server
    public static void main(String args[]) throws Exception
         try{
         String clientSentence;
         ServerSocket welcomeSocket = new ServerSocket(80);
         while(true)
              Socket connectionSocket = welcomeSocket.accept();
              BufferedReader inFromClient = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream()));
              BufferedOutputStream outToClient = new BufferedOutputStream(connectionSocket.getOutputStream());
              System.out.println(inFromClient.readLine());
              int data;
              int totalSizeTransferred = 0;
              int totalSizeRead;
              int PACKET_SIZE = 20480;
              byte[] packet = new byte[PACKET_SIZE];
              System.out.println("reading file...");
              FileInputStream fis = new FileInputStream("36meg.pdf");
              while ((totalSizeRead = fis.read(packet, 0, packet.length)) >= 0)
                   outToClient.write(packet, 0, totalSizeRead);
                   totalSizeTransferred = totalSizeTransferred + totalSizeRead;
                   System.out.println(totalSizeTransferred);
         System.out.println("done reading file...");
         outToClient.close();
         fis.close();
         }catch(Exception ex){}
    import java.io.*;
    import java.net.*;
    class Client
         public static void main(String args[]) throws Exception
              String sentence;
              BufferedReader inFromUser = new BufferedReader(new InputStreamReader(System.in));
              Socket clientSocket = new Socket("194.129.252.65", 80);
              DataOutputStream outToServer = new DataOutputStream(clientSocket.getOutputStream());
              BufferedInputStream inFromServer = new BufferedInputStream(clientSocket.getInputStream());
              sentence = inFromUser.readLine();
              outToServer.writeBytes(sentence + '\n');
              FileOutputStream fos = new FileOutputStream("hello.jpg");
              int totalDataRead;
              int totalSizeWritten = 0;
              int DATA_SIZE = 20480;
              byte[] inData = new byte[DATA_SIZE];
              System.out.println("Begin");
         while ((totalDataRead = inFromServer.read(inData, 0, inData.length)) >= 0)
              fos.write(inData, 0, totalDataRead);
              totalSizeWritten = totalSizeWritten + totalDataRead;
              System.out.println(totalSizeWritten);
              System.out.println("Done");
              fos.close();
              clientSocket.close();

  • Sending IP-Packets without higher protocol

    Hello.
    Can I somehow send IP-Packets without using a higher protocol like TCP etc ?
    Can i do that with Java ?

    And you don't think the firewall will block your "something without ports" as well? If you really need access across the firewall, as your friendly network admins to open a port for you or allow you to use a proxy.

  • Why is the AEBS bottlenecking my ReadyNAS devices leading to bad packets and TCP Retransmits?

    Bad Packets Unrecovered TCP Retransmits TCP Retransmits w ReadyNAS NV NV+ and Airport Extreme Base Station 5th Generation
    I got an Airport Extreme Base Station (AEBS), 5th generation this past November to bring my entire network up to gigE standards and extend my wireless range a bit. I have really liked the AEBS 5th Gen overall since I got it 3 months ago. It was easy to setup and update and things have been noticeably faster. I can also easily take my netbook, laptop, and iPad out to my shop some 80 feet away from my AEBS and still surf rather well wirelessly too. I couldn't do this even with my previous D-Link wireless-n setup.
    In December I picked up an old ReadyNAS NV+ to go along with my old ReadyNAS NV. When I finally started to setup the new network for my business in February, I noticed in the logs that I was getting a large numbers of bad packets, TCP retransmits, and unrecovered TCP retransmits. Previously, I had never had errors of any sort with any older network setups using linksys, dlink and netgear routers during the last 6 years.
    Eventually cables, switches, and routers can go bad which results in the errors I have been getting so I went through the "Troubleshoot My Performance Problem/Check for Network Errors" section of the link below to try and figure out what was causing my problem.
    (http://www.readynas.com/?p=310#Troubleshoot)
    My Initial Setup:
    Airport Extreme Base Station (AEBS):
    - 1 incoming Cat5e from Motorola Surfboard 6120, 
    - 2 Cat5e connections to my wifes work network with her business computer and VOIP phone.
    - 1 Cat 5e interconnecting the AEBS to my wired network on the HP Procurve Switch.
    The AEBS manages addresses via DHCP on my wired network for all of my devices on the HP Procurve 14008G Switch:
    - 1 to NV
    - 1 NV+
    - 1 MacMini 2010
    - 1 MacMini 2005
    - 1 networked Epson R-3000 printer
    1. Simple things first. Since I have always made all my own Cat 5e cable I figured I'd better get some better(?) cabling strait away. I went ordered new Cat 6 and Cat 6a cables to connect the NV, NV+, and my main Mac to the switch and connect the switch to the AEBS. The errors kept coming.
    2. Then I separately connected each NAS unit directly to my computer by setting up the static IP on my computer first. Once I reconnected each ReadyNAS with the computer directly they defaulted to a static IP.  Neither NAS had errors.
    (http://sphardy.com/web/readynas/how-to-direct-connect-to-your-readynas/)
    3. Errors were coming from either a bad Procurve 1400 switch or a bad AEBS. I hooked everything directly to my Airport Extreme and got lots of errors.
    4. I decided to check the switch also. I altered each ReadyNAS's default static IP to one of my choosing individually. Then I hooked both ReadyNAS units to my HP Procurve 1400 switch. I hooked the switch directly to my computer and got no errors from either NAS. I continue to get no errors the next day.
    5. When I first ran my tests I had Jumbo Frames turned Off. Currently, Jumbo Frames are On and there are still no errors and seems to be no slowness either.
    Conclusion:
    The Airport Extreme is the bottleneck causing the errors in my network.
    Perhaps there is something I can alter which will rid me of the errors, but this type of error makes the AE seem to be pretty shoddy. A newer state-of-the-art router should not be bottlenecking my rather archaic slow network devices. Apparently, the 4th Gen AEBS's couldn't do Jumbo Frames, but this current model is supposed to, but I see no setting for changing the MTU.
    Questions:
    What could be causing the bottleneck?
    Do I have a bad router?
    How could I analyze this problem?
    Has anyone else had similar issues and if so how were they resolved?
    Current Setup:
    All of my computers and NAS devices are hooked to my Procurve Switch each with its own Static IP.
    The switch is working flawlessly with no Errors.
    The network printer is now wireless and  connected via the AEBS.
    I am using wireless-n to connect to internet via the AEBS on my main machine.
    I am sharing the internet connection with the other Mac Mini on the switch and any other machine I plug into the switch (not ideal).
    Problem is:
    I am not a systems administrator and don't really want to tinker with setting up Static IP's for the machines I hook and unhook to the switch.
    I want the AEBS to manage addresses via DHCP so everything accessing my router will mindlessly be able to access all things on my network.
    Can the AEBS be made to not produce errors or do I just have a lemon.

    Hi Bob,
    That's the strange thing. When I had both GHz channels working on one SSID, once in a while my iMAC would pick the 5 GHz channel (44 seems the best for me). I always use channel 1 for 2.4 GHz because I get the fastest speeds with it.
    When the iMac would pick 5 GHz, the slowdown was very obvious. As I explained in my (long) first post, I immediately felt the difference. Now the $50K question - since the 5 GHz channel at that point was stronger than the 2.4 GHz one, why wasn't the speed faster? Why was it so slow compared to 2.4 GHz? That's what rattling my brain. If the 5 GHz signal's strong enough to get picked by my iMac, then why isn't there a commensurate speed increase? There must be something else going on here besides signal strength. If the 5 GHz spec says that I must have full strength to get 5 GHz speeds, then that makes sense. But I think it doesn't, that's why I believe I have a configuration problem somewhere, or a faulty AEBS.
    I might add that my firmware's up-to-date in the AEBS and AX, and Airport Utility too.
    I think heading to 4Runner's camp - even with high signal strength (and I would consider 3 of 4 bars high), the 5 GHz speeds aren't showing themselves.
    Here's some snap's of my AEBX's setup:
    I think my configuration's fine, although I've tried so many different options, I'm a little confused, but I know that changing the Multicast Rate doesn't have any noticeable effect on the speed. I also have "Use Wide Channels" checked, but as I said, the 5 GHz band is awfully slow for using both channels. I have set "N" only, so no "G" clients to slow it down.
    Mind boggling!

  • How to send XML using UTL_HTTP

    I am trying to workout how to send XML data to a webserver using UTL_HTTP but am not getting any reply
    I need to submit the following XML document to a server "http://api.fastsms.co.uk/api/xmlapi.php"  Their instructions are "The XML Document should be posted unencoded, with a UTF-8 character set as parameter 'xml'"
    If I submit the following XML on their test form
    <?xml version="1.0"?>
    <apirequest version="1">
    <user>
      <username>**USER**</username>
      <password>**PASSWORD**</password>
    </user>
    <application>
      <name>Example Application</name>
      <version>1.0</version>
    </application>
    <inboundcheck lastid="10711399"/>
    </apirequest>
    I get an XML response back with the messages in my inbox. 
    This is the code I am trying to use to accomplish the same from PL/SQL : I know a response is coming back as there is header information - just no content.  What am I doing wrong ?
      l_xml VARCHAR2(5000);
      req utl_http.req;
      resp utl_http.resp;
      header_name VARCHAR2(256); -- Response header name
      header_value VARCHAR2(1024); -- Response header value
      response_text VARCHAR2(4000); -- Response body
      l_url VARCHAR2(100);
    BEGIN
      l_xml := 'xml=<?xml version="1.0"?>';
      l_xml := '<apirequest version="1">';
      l_xml := '<user>';
      l_xml := '<username>**USER**</username>';
      l_xml := '<password>**PASSWORD**</password>';
      l_xml := '</user>';
      l_xml := '<application>';
      l_xml := '<name>Example Application</name>';
      l_xml := '<version>1.0</version>';
      l_xml := '</application>';
      l_xml := '<inboundcheck lastid="10711399"/>';
      l_xml := '</apirequest>';
      -- Open HTTP connection
      l_url := 'http://api.fastsms.co.uk/api/xmlapi.php';
      req := utl_http.begin_request(l_url,'POST',utl_http.HTTP_VERSION_1_1);
      -- Set headers for type and length
      utl_http.set_header(req,'Content-Type','application/x-www-form-urlencoded');
      utl_http.set_header(req,'Content-Length',to_char(length(l_xml)));
      -- Write parameter
      utl_http.write_text(req,l_xml);
      -- Read response file
      resp := utl_http.get_response(req);
      -- Print out the response headers
      FOR i IN 1 .. utl_http.get_header_count(resp) LOOP
        utl_http.get_header(resp,i,header_name,header_value);
        logging_pkg.info(header_name || ': ' || header_value);
      END LOOP;
      -- Print out the response body
      BEGIN
        LOOP
          utl_http.read_text(resp,response_text);
          logging_pkg.info(response_text);
        END LOOP;
      EXCEPTION
        WHEN utl_http.end_of_body THEN
          logging_pkg.info('End of body');
      END;
      -- close http connection
      utl_http.end_response(resp);
      EXCEPTION
        WHEN utl_http.end_of_body THEN
          utl_http.end_response(resp);
    END;
    Cheers,
    Brent

    Hi Billy
    Yikes - how embarassing !  Thanks for pointing out my beginners mistake there.  I've fixed my code - and also implemented the substitutions of parameters like you suggested - I like that approach.
    Unfortunately the end result is no better - the line
    utl_http.read_text(resp,response_text);
    Still returns nothing back
    The headers that are coming back are
    Date: Thu, 04 Jul 2013 08:31:56 GMT
    Server: Apache/2.2.16 (Ubuntu)
    X-Powered-By: PHP/5.3.3-1ubuntu9.3
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    Vary: Accept-Encoding
    Content-Length: 0
    Content-Type: text/html; charset=UTF-8
    Connection: close
    I guess I will need to try chasing it with the fastsms vendor so see if they can check my incoming request and see if there are any glaring problems. I know the xml is correct as I am now logging the xml string just before I send it and when I take that string and put it in their test form it works perfectly - something else in the puzzle is missing. I've had no experience using utl_http before - perhaps it's no possible to read the xml repsonse using this ?
    Anyway, thanks for your help Billy.
    ps - How do you paste your code into your message to get that formatting ?
    Cheers,
    Brent

  • Processing the multiple sender xml one by one in a time gap to RFC

    Dear Experts,
             I have to process the multiple sender xml file one by one from FTP to RFC in time gap.
    For Ex:
            I will place 10 xml file in a FTP path at a  time, PI is picking 10 file at a time and process it to RFC at a time.
    Any other way to process the multiple file one by one through PI in a time gap to RFC
    (i,e) PI needs to process the 10 files one by one, once the first file processed successfully from FTP to RFC then the next file to process in a time gap to avoid getting the error in RFC.
    Kindly suggest your ideas or share some links how to process this multiple files.
    Best Regards,
    Monikandan.

    Hi Monikandan,
    You can use CE BPM with PI 7.1 But first check the suggestion of Anupam in the below thread:
    reading file sequentially from FTP using SAP PI file adapter
    Regards,
    Nabendu.

Maybe you are looking for

  • SQL query not working well

    Hi, I made a small table with 5 rows and want to make them an sql consult using rownum so I'm running select * from mytable where rownum = 1;and it gives me the first row but if I change the 1 for a 2 or 3 or 4 or 5 it's says that theres nothing :S w

  • Problem when using Logitech C270 webcam

    Hi, I've been having problems video calling with my C270 webcam. Initially video calls work fine for a couple of minutes, and then my computer loses its internet connection (just my computer - my other devices work fine). My internet will not reconne

  • How to deploy Oracle Forms

    Hi All, As am new to Oracle forms. I created some forms in 10g. I need to deploy it in Application server. In Jdeveloper we will create .ear file then will deploy it in application server. How can i do it here. Please explain me in details.

  • Time part of date data type

    Please can anybody tell me how to display the time portion of a date data type. The version of Oracle is 7. Ade

  • How to transcribe text "Question x of y"?

    Hello, i'm new here. I need to help with this. I'm creating Quiz for our customers and i need to transcribe text on the Question - "Question x of y", but i don't know where i'll find it. Thank you!