Soap request with attachment --problem in deploye to jboss useing Jdevelope

using Jdeveloper and oc4j application server i made two application.
In application one i exposed a web service method.In this application their is a handler class which able to handle soap request and response with attachment.
In application two a client is sends a soap request with attachment.
If i deploye it in oc4j it is working fine. But if i Deploye to JBoss server [i made a jboss application server connection] and then trying to send the soap request with attachment from the client application i gets the following errors--
Exception in thread "main" javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection refused
     at oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:152)
     at etrans.TripBean.a.ClientGateWay.msgEnvelope(ClientGateWay.java:50)
     at etrans.TripBean.a.ClientGateWay.main(ClientGateWay.java:60)
Caused by: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection refused
     at java.security.AccessController.doPrivileged(Native Method)
     at oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:148)
     ... 2 more
Caused by: javax.xml.soap.SOAPException: Message send failed: Connection refused
     at oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:458)
     at oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:865)
     ... 4 more
Caused by: java.net.ConnectException: Connection refused
     at java.net.PlainSocketImpl.socketConnect(Native Method)
     at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
     at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
     at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
     at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
     at java.net.Socket.connect(Socket.java:516)
     at java.net.Socket.connect(Socket.java:466)
     at java.net.Socket.<init>(Socket.java:366)
     at java.net.Socket.<init>(Socket.java:208)
     at javax.net.DefaultSocketFactory.createSocket(SocketFactory.java:202)
     at HTTPClient.HTTPConnection.getSocket(HTTPConnection.java:3115)
     at HTTPClient.HTTPConnection.doConnect(HTTPConnection.java:3858)
     at HTTPClient.HTTPConnection.sendRequest(HTTPConnection.java:2921)
     at HTTPClient.HttpOutputStream.close(HttpOutputStream.java:421)
     at oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection.sendMessage(HttpSOAPConnection.java:724)
     at oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:373)
     ... 5 more
Am i made any mistake to deploye to jboss or it is not possiable to access the web service in such way?
please suggest me what is the procedure to recover from this.

Hello,
How do you package you WS client application to be deployed in JBoss?
The JAX-RPC clients are not that portable you may need to recompile the client with JBoss WebService implementation/tools, and check that you do have the different deployment descriptors for the client too.
Regards
Tugdual Grall

Similar Messages

  • How to send SOAP message with attachment?

    Hi Experts,
    How do I simulate to send a SOAP message with an attachment? Can I use XMLSpy?
    Please help.
    Thanks,
    Shobhit

    Ravi,
    With the generic SOAP client, it asks for the http based wsdl file location. But my wsdl has been generated by XI and I have the file stored on my desktop.
    Something to do with the path http://zpidd01:8030/XISOAPAdapter/MessageServlet?channel=NetworkPartners:NP_Order_BS:NP_SOAP_Sender_CC ??
    Stefan,
    my scenario is to send a SOAP request with attachment and post the attachment in ECC through the ABAP server proxy.
    WebService Client -
    SOAP----> XI -
    ABAP PROXY CALL ---> ECC
    Need further assistance from both of you how to achieve this scenario.
    Thanks,
    Shobhit
    Edited by: Shobhit Swarup Mathur on Jul 24, 2008 4:34 AM

  • SOAP Request with Web Service Security

    Hi masters of XI,
    the Oasis standard for web services security saids that exists three levels of security for web services, at higher level is Encryption, middle level is signature and at lower level is authentication with username and password inside the soap envelope.
    I need to do a SOAP Request signed with a X.509 certificate and username and password too in SAP PI 7.0 SP11. I can sign the request with X.509 certificate without problems but i can't authenticate the request with username and password in usernametoken element like saids the Oasis standard
    <wsse:Security>
    <wsse:UsernameToken>
    <wsse:Username>XXXX</wsse:Username>
    <wsse:Password>XXXXXXXXX</wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    How can we send UserNameToken's elements inside SOAP web service envelope
    signing with X.509 certificate also? There are any way to do it in the
    receiver agreement or receiver SOAP adapter?
    thanks.

    Hi,
    thank you very much for your answers.
    I have solved the SSL comunication and i can sign with X.509 certificates. My problem is that in the SOAP envelope of resquest signed only travels the X.509 certificate and I need to send the username security token (wsse:UsernameToken) also.
    <wsse:Security>
    <wsse:UsernameToken>
    <wsse:Username>XXXX</wsse:Username>
    <wsse:Password>XXXXXXXXX</wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    I can't find the solution to do it. The Netweaver documentation says that Netweaver is able to sign SOAP request with X.509 certificates and is able too for using UsernameToken as part of Oasis standard for web service security. In abap stack of NW you can assign a security profile to a web service call for signing the message or authenticate it with username/password inside SOAP envelope, but in java stack of XI i think that there is no way to do it.
    This is my Request:
    <?xml version="1.0" encoding="utf-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <soapenv:Header>
        <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1">
          <wsse:BinarySecurityToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="CertId-71968700">MIIHdTCCBl2gAwIBAgIQOq4nmg5zi4NGsIGjPUZVuTANBgkqhkiG9w0BAQUFADCCAT4xCzAJBgNVBAYTAkVTMTswOQYDVQQKEzJBZ...8d4pAJYk=</wsse:BinarySecurityToken>
          <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="Signature-104376803">
            <ds:SignedInfo>
              <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
              <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
              <ds:Reference URI="#id-104309952">
                <ds:Transforms>
                  <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
                </ds:Transforms>
                <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                <ds:DigestValue>R6WE9gs+l496jHCgslgALWswEnE=</ds:DigestValue>
              </ds:Reference>
              <ds:Reference URI="#Timestamp-104310599">
                <ds:Transforms>
                  <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
                </ds:Transforms>
                <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                <ds:DigestValue>aiCTZ0WwiZQEv8zVmmf8GLu/bYA=</ds:DigestValue>
              </ds:Reference>
            </ds:SignedInfo>
            <ds:SignatureValue>YR9Q5oUA6kFFmPYOIOQPTOgTgapMbkmgdlDM/TZJ2CS8ENAntfsnmpEbpUgOPUVMkgaECog0OKvlADHP0HvJtPdm2NJljZNCCgrk3hlmmtkXkRauVuH5KRiHE5NeWT4+Uspp3ashebu0IuOO66zt4Q=</ds:SignatureValue>
            <ds:KeyInfo Id="KeyId-104377209">
              <wsse:SecurityTokenReference xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="STRId-104377346">
                <wsse:Reference URI="#CertId-71968700" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
              </wsse:SecurityTokenReference>
            </ds:KeyInfo>
          </ds:Signature>     
          <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-104310599">
            <wsu:Created>2008-01-16T21:28:44.081Z</wsu:Created>
            <wsu:Expires>2008-01-16T21:33:44.081Z</wsu:Expires>
          </wsu:Timestamp>
        </wsse:Security>
      </soapenv:Header>
    And this is the request I need:
    <?xml version="1.0" encoding="utf-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <soapenv:Header>
        <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1">
          <wsse:BinarySecurityToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="CertId-71968700">MIIHdTCCBl2gAwIBAgIQOq4nmg5zi4NGsIGjPUZVuTANBgkqhkiG9w0BAQUFADCCAT4xCzAJBgNVBAYTAkVTMTswOQYDVQQKEzJBZ...8d4pAJYk=</wsse:BinarySecurityToken>
          <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="Signature-104376803">
            <ds:SignedInfo>
              <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
              <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
              <ds:Reference URI="#id-104309952">
                <ds:Transforms>
                  <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
                </ds:Transforms>
                <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                <ds:DigestValue>R6WE9gs+l496jHCgslgALWswEnE=</ds:DigestValue>
              </ds:Reference>
              <ds:Reference URI="#Timestamp-104310599">
                <ds:Transforms>
                  <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
                </ds:Transforms>
                <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                <ds:DigestValue>aiCTZ0WwiZQEv8zVmmf8GLu/bYA=</ds:DigestValue>
              </ds:Reference>
            </ds:SignedInfo>
            <ds:SignatureValue>YR9Q5oUA6kFFmPYOIOQPTOgTgapMbkmgdlDM/TZJ2CS8ENAntfsnmpEbpUgOPUVMkgaECog0OKvlADHP0HvJtPdm2NJljZNCCgrk3hlmmtkXkRauVuH5KRiHE5NeWT4+Uspp3ashebu0IuOO66zt4Q=</ds:SignatureValue>
            <ds:KeyInfo Id="KeyId-104377209">
              <wsse:SecurityTokenReference xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="STRId-104377346">
                <wsse:Reference URI="#CertId-71968700" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
              </wsse:SecurityTokenReference>
            </ds:KeyInfo>
          </ds:Signature>
    <!-- THIS IS THE PART I NEED -->
    <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-104312926">
            <wsse:Username>xxxxxxx</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"/>
          </wsse:UsernameToken>
    <!--  -->
    <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-104310599">
            <wsu:Created>2008-01-16T21:28:44.081Z</wsu:Created>
            <wsu:Expires>2008-01-16T21:33:44.081Z</wsu:Expires>
          </wsu:Timestamp>
        </wsse:Security>
      </soapenv:Header>

  • Create soap request with class "csoapdocument"

    Hi,
    i want to create a soap request with class "csoapdocument".
    The request looks like:
         <SOAP-ENV:Body>
            <m:SearchRequest xmlns:m="https://abcdefg">          
              <Root>
                     <MetaData>
                   <SourceID>ID1</SourceID>
                   <FName>sitris_request</FName>
                   <DataType>text/xml</DataType>
                     </MetaData>
                    <Data>
                   <DATA1>
                        <Req Id="1234">                                   <NUMBER>12345678</NUMBER>
                   </DATA1>
                    </Data>
                            </Root>                    
              </m:SearchRequest>
         </SOAP-ENV:Body>
    Is it possible to create this request with method add_parameter of class csoapdocument?
    Thanks

    Solved myself.
    The above soap reqeust can be created with set_body_from_fragment.

  • Can't remote debug appliaction with jdeveloper10.1.3 deployed in JBoss 4.2

    can't remote debug appliaction with jdeveloper10.1.3 deployed in JBoss 4.2.2
    when i try to debugg with old version like jboss-4.0.3SP1 it is workking good
    but when i'm try to debugg with jboss-4.2.2.GA and add project newly libaray jboss client jars of this version i got error
    Exception in thread "main" java.lang.NoClassDefFoundError: in
    and the debugger stoped in URLClassLoader and throw NoClassDefFoundError exception, i think the reason is the client jars
    which jars should i add to project libarary to success remotely debugg application in jboss 4.2.2 GA ?

    Remote debugging with JBoss 4.2 is the same as for 4.0.
    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.3?topic=rem_p_servlet_general_html

  • Sending a SOAP request with binary attachment

    hi all,
    I am sending a SOAP request from a SOAP client SOAP UI  with a binary attachment ( image file as an attachment )  and creating a file on the receiver side with attachment.
    But how do i see this attachment in XI and do i have to specify some additional configuration in my receiver or sender adapter modules.
    Regards ,
    Loveena.

    creating a file on the receiver side with attachment.
    Is this working? Receiver file adapter does not support attachment.
    But how do i see this attachment in XI
    In the pipeline steps, under payload, you will find two entries, one for payload and other for attachment.
    Regards,
    Prateek

  • UCCX Soap request with wav attachment

    I am trying to modify my working UCCX 9.0 soap request so that I can send a wav recording from the caller.  I understand that there are several ways that an attachment could be handled by a soap request, inline, mime or mtom.
    Has anyone done an attachment like this?

    I can appreciate your point about the load of encoding and decoding the wav file.  I can guess that to load the wav file into the repository would be similar to how a prompt recording application would load new prompts. However wouldn't the soap server have to log into the CRS administration site to download the wav file.  Also the wav files would left in the repository so I would have to come up with something clean up after the wav file was downloaded. The url method not sounding as simple as just encoding the wav file.

  • SOAP call with attachment from ABAP

    Dear ABAP guru's
    We have a requirement to trigger a SOAP call from the ABAP stack. We have used the instructions from SAP as specified in the SAP help as specified in this link:
    http://help.sap.com/saphelp_47x200/helpdata/en/2d/64d029e74911d6b2e400508b6b8a93/frameset.htm
    This works fine. However, we would like to send an attachment with the call and don't see a method available for this. Is there anybody who knows how to achieve this?
    Thanks a lot in advance,
    Rudy Claassen

    Dear ABAP guru's
    We have a requirement to trigger a SOAP call from the ABAP stack. We have used the instructions from SAP as specified in the SAP help as specified in this link:
    http://help.sap.com/saphelp_47x200/helpdata/en/2d/64d029e74911d6b2e400508b6b8a93/frameset.htm
    This works fine. However, we would like to send an attachment with the call and don't see a method available for this. Is there anybody who knows how to achieve this?
    Thanks a lot in advance,
    Rudy Claassen

  • Outbound SOAP Message with Attachment

    The requirement is to invoke a web service by sending attachments in the outbound SOAP message. The attachment body needs to be assigned in the message flow, using an element E1 extracted from the message incoming into the flow.
    I am trying to use attachments variable to set content-type (text/xml) and body using E1. However, these are not getting assigned to attachments variable, as seen by logging the variable.
    I was told that $attachments cannot be changed inside the flow (it is marked black in the console unlike the header and body that are marked green). If that is the case, how do we invoke services using attachments from a message flow?
    Any pointers would be appreciated.

    Hi,
    A SOAP message may need to be transmitted together with attachments of various sorts, ranging from facsimile images of legal documents to engineering drawings. Such data are often in some binary format. For example, most images on the Internet are transmitted using either GIF or JPEG data formats. In this document we describe a standard way to associate a SOAP message with one or more attachments in their native format in a multipart MIME structure for transport.
    yes it is possible to send attachment with the SOAP.
    SOAP Message Packages
    A "SOAP message package" contains a primary SOAP 1.1 message. It may also contain additional entities that are not lexically within the SOAP message but are related in some manner. These entities may contain data in formats other than XML. The primary SOAP 1.1 message in a message package may reference the additional entities. Such additional entities are often informally referred to as "attachments." This section describes how to construct SOAP message packages and how SOAP processors will process them.
    A SOAP message package is constructed using the Multipart/Related media type, which is defined in RFC 2387. The rules for the construction of SOAP message packages are as follows:
    The primary SOAP 1.1 message must be carried in the root body part of the Multipart/Related structure. Consequently the type parameter of the Multipart/Related media header will always equal the Content-Type header for the primary SOAP 1.1 message, i.e., text/xml.
    The MIME Multipart/Related encapsulation of a SOAP message is semantically equivalent to a SOAP protocol binding in that the SOAP message itself is not aware that it is being encapsulated. That is, there is nothing in the primary SOAP message proper that indicates that the SOAP message is encapsulated .
    For more details you can refer these links
    http://www.w3.org/TR/SOAP-attachments
    http://www.w3.org/TR/soap12-af/
    regards
    Aashish Sinha
    PS : reward points if helpful

  • Soap message with Attachment

    Hi All,
    I have a requirement wherin I have to send an attachment(image) along with the soap payload.i.e. the soap message contains the payload and an attachment.For eg. the soap message is as shown below:
    <?xml version="1.0" encoding="UTF-8" ?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
      <SOAP-ENV:Body>
        <ns1:MT_Soap xmlns:ns1="http://www.adc.com/sample">
             <Record>
                <FieldXML>abc</FieldXML>
                <FieldAthmt />
             </Record>
          </ns1:MT_Soap>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    How can I include the attachment(which is on a local machine) in the above soap message?
    Is it posssible to send the attachment in the field "FieldAtthmt"?
    If it is possible to send an attachment with the soap message then how can that attachment be handled in XI?
    Thanks in advance,
    Vikram

    Hi,
    A SOAP message may need to be transmitted together with attachments of various sorts, ranging from facsimile images of legal documents to engineering drawings. Such data are often in some binary format. For example, most images on the Internet are transmitted using either GIF or JPEG data formats. In this document we describe a standard way to associate a SOAP message with one or more attachments in their native format in a multipart MIME structure for transport.
    yes it is possible to send attachment with the SOAP.
    SOAP Message Packages
    A "SOAP message package" contains a primary SOAP 1.1 message. It may also contain additional entities that are not lexically within the SOAP message but are related in some manner. These entities may contain data in formats other than XML. The primary SOAP 1.1 message in a message package may reference the additional entities. Such additional entities are often informally referred to as "attachments." This section describes how to construct SOAP message packages and how SOAP processors will process them.
    A SOAP message package is constructed using the Multipart/Related media type, which is defined in RFC 2387. The rules for the construction of SOAP message packages are as follows:
    The primary SOAP 1.1 message must be carried in the root body part of the Multipart/Related structure. Consequently the type parameter of the Multipart/Related media header will always equal the Content-Type header for the primary SOAP 1.1 message, i.e., text/xml.
    The MIME Multipart/Related encapsulation of a SOAP message is semantically equivalent to a SOAP protocol binding in that the SOAP message itself is not aware that it is being encapsulated. That is, there is nothing in the primary SOAP message proper that indicates that the SOAP message is encapsulated .
    For more details you can refer these links
    http://www.w3.org/TR/SOAP-attachments
    http://www.w3.org/TR/soap12-af/
    regards
    Aashish Sinha
    PS : reward points if helpful

  • UTL_SMTP mail with attachment( Problem in attaching zip file)

    Hi All,
    I used the below code for sending email with attachment. but when i try to add the message body its not working in the sense its not attaching my file. when i commented that line its attaching the file.
    commented lines:
    -- utl_smtp.write_data(mail_conn,UTL_TCP.CRLF ||'Body' ||':'|| text || UTL_TCP.CRLF);
      --utl_smtp.write_data(mail_conn,UTL_TCP.CRLF||text || UTL_TCP.CRLF );How to resolve this issue???
    Complete procedure.
    create or replace
    procedure sssl_send_mail (
          p_sender varchar2,
          p_recipient varchar2,
          p_cc varchar2,
          p_subject varchar2,
          p_filename varchar2,
          text varchar2) is    
        --c utl_smtp.connection;
        v_raw raw(57);
        v_length integer := 0;
        v_buffer_size integer := 57;
        v_offset integer := 1;
        mailhost    VARCHAR2(64) := 'xxxxxxxxxx';
        port constant number(2):=25;
        timeout number :=180;
        mail_conn  utl_smtp.connection;  
    p_blob Blob;
    temp_os_file bfile;
    ex number; 
    begin 
       DBMS_LOB.CREATETEMPORARY(p_blob,true);
       temp_os_file := BFILENAME ('xxxxxxxx',p_filename);
       ex := dbms_lob.fileexists(temp_os_file);
          if ex = 1 then
             dbms_lob.fileopen(temp_os_file, dbms_lob.file_readonly);
             dbms_lob.loadfromfile(p_blob,temp_os_file, dbms_lob.getlength(temp_os_file));
             dbms_lob.fileclose(temp_os_file);
           end if;
       mail_conn := utl_smtp.open_connection(mailhost, port,timeout);
       utl_smtp.helo(mail_conn, mailhost);
       utl_smtp.mail(mail_conn, p_sender);
       utl_smtp.rcpt(mail_conn, p_recipient);
       utl_smtp.rcpt(mail_conn, p_cc);
       utl_smtp.open_data(mail_conn);
      utl_smtp.write_data(mail_conn,'From'||':'|| p_sender || UTL_TCP.CRLF);
      utl_smtp.write_data(mail_conn,'To'||':'|| p_recipient || UTL_TCP.CRLF);
      utl_smtp.write_data(mail_conn,'CC'||':'|| p_cc || UTL_TCP.CRLF);
      utl_smtp.write_data(mail_conn,'Subject' ||':'|| p_subject || UTL_TCP.CRLF);
    -- utl_smtp.write_data(mail_conn,UTL_TCP.CRLF ||'Body' ||':'|| text || UTL_TCP.CRLF);
      --utl_smtp.write_data(mail_conn,UTL_TCP.CRLF||text || UTL_TCP.CRLF );
        utl_smtp.write_data( mail_conn, 'Content-Disposition: attachment; filename="' || p_filename || '"' || utl_tcp.crlf);
        utl_smtp.write_data( mail_conn, 'Content-Transfer-Encoding: base64' || utl_tcp.crlf );
        utl_smtp.write_data( mail_conn, utl_tcp.crlf );
        v_length := dbms_lob.getlength(p_blob);    
        <<while_loop>>
        while v_offset < v_length loop
          dbms_lob.read( p_blob, v_buffer_size, v_offset, v_raw );
          utl_smtp.write_raw_data( mail_conn, utl_encode.base64_encode(v_raw) );
          utl_smtp.write_data( mail_conn, utl_tcp.crlf );
          v_offset := v_offset + v_buffer_size;
        end loop while_loop;
        utl_smtp.write_data( mail_conn, utl_tcp.crlf );
        utl_smtp.close_data(mail_conn);
        utl_smtp.quit(mail_conn);
      exception
        when utl_smtp.transient_error or utl_smtp.permanent_error then
          utl_smtp.quit(mail_conn);
          raise;
        when others then
        raise;
      end;Please help me out to resolve this issue.
    Thanks in advance.
    Cheers ,
    Shan.
    Edited by: Shan on 13 Jan, 2011 1:08 PM
    Edited by: Shan on 14 Jan, 2011 3:22 PM

    Hi,
    Some Problems i am facing with this procedure. when i try to add CC in this procedure. Its sending the mail for recipent , But the CC person not getting the mail. How to resolve this??
    create or replace
    PROCEDURE sssl_send_mail( p_sender varchar2,
          p_recipient varchar2,
          p_cc varchar2,
          p_subject varchar2,
          p_filename varchar2,
          text varchar2) is 
        /*LOB operation related varriables */
       v_src_loc  BFILE;
       l_buffer   RAW(200);
       l_amount   BINARY_INTEGER := 200;
       l_pos      INTEGER := 1;
       l_blob     BLOB := EMPTY_BLOB;
       l_blob_len INTEGER;
       v_amount   INTEGER;
        /*UTL_SMTP related varriavles. */
        v_connection_handle  UTL_SMTP.CONNECTION;
        v_from_email_address VARCHAR2(200);
        v_to_email_address   VARCHAR2(200) ;
        v_smtp_host          VARCHAR2(10) ;
        v_subject            VARCHAR2(500) ;
        l_message            VARCHAR2(3000);
        /* This send_header procedure is written in the documentation */
        PROCEDURE send_header(pi_name IN VARCHAR2, pi_header IN VARCHAR2) AS
        BEGIN
        --dbms_output.put_line('entering into procedure');
        --dbms_output.put_line(pi_name || ': ' || pi_header);
          UTL_SMTP.WRITE_DATA(v_connection_handle,
                              pi_name || ': ' || pi_header || UTL_TCP.CRLF);
        END;
      BEGIN
       v_src_loc             := BFILENAME('BROKERREPORTS',p_filename);
       v_from_email_address  := p_sender;
       v_to_email_address    := p_recipient;
       v_smtp_host           := 'sbssld1'; --My mail server, replace it with yours.
       v_subject             := p_subject;
       l_message      := 'test';
        /*Preparing the LOB from file for attachment. */
        DBMS_LOB.OPEN(v_src_loc, DBMS_LOB.LOB_READONLY); --Read the file
        DBMS_LOB.CREATETEMPORARY(l_blob, TRUE); --Create temporary LOB to store the file.
        v_amount := DBMS_LOB.GETLENGTH(v_src_loc); --Amount to store.
        DBMS_LOB.LOADFROMFILE(l_blob, v_src_loc, v_amount); -- Loading from file into temporary LOB
        l_blob_len := DBMS_LOB.getlength(l_blob);
    /*UTL_SMTP related coding. */
        v_connection_handle := UTL_SMTP.OPEN_CONNECTION(host => v_smtp_host);
        UTL_SMTP.HELO(v_connection_handle, v_smtp_host);
        UTL_SMTP.MAIL(v_connection_handle, v_from_email_address);
        UTL_SMTP.RCPT(v_connection_handle, v_to_email_address);
        UTL_SMTP.OPEN_DATA(v_connection_handle);
        send_header('From', v_from_email_address || '<'||'>');
        send_header('TO', v_to_email_address || '<'||'>');
        send_header('CC', p_cc        || '<'||'>');
        send_header('Subject', v_subject);
        --MIME header.
       UTL_SMTP.WRITE_DATA(v_connection_handle,
                          'MIME-Version: 1.0' || UTL_TCP.CRLF);
       UTL_SMTP.WRITE_DATA(v_connection_handle,
                            'Content-Type: multipart/mixed; ' || UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            ' boundary= "' || 'SAUBHIK.SECBOUND' || '"' ||
                            UTL_TCP.CRLF);
       UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
        -- Mail Body
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            '--' || 'SAUBHIK.SECBOUND' || UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            'Content-Type: text/plain;' || UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            ' charset=US-ASCII' || UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle, l_message || UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
        -- Mail Attachment
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            '--' || 'SAUBHIK.SECBOUND' || UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                           'Content-Type: application/octet-stream' ||
                            UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            'Content-Disposition: attachment; ' || UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            ' filename="' || p_filename || '"' || --My filename
                            UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            'Content-Transfer-Encoding: base64' || UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
      /* Writing the BLOL in chunks */
        WHILE l_pos < l_blob_len LOOP
          DBMS_LOB.READ(l_blob, l_amount, l_pos, l_buffer);
          UTL_SMTP.write_raw_data(v_connection_handle,
                                  UTL_ENCODE.BASE64_ENCODE(l_buffer));
          UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
          l_buffer := NULL;
          l_pos    := l_pos + l_amount;
        END LOOP;
        UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
        -- Close Email
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            '--' || 'SAUBHIK.SECBOUND' || '--' || UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            UTL_TCP.CRLF || '.' || UTL_TCP.CRLF);
        UTL_SMTP.CLOSE_DATA(v_connection_handle);
        UTL_SMTP.QUIT(v_connection_handle);
        DBMS_LOB.FREETEMPORARY(l_blob);
        DBMS_LOB.FILECLOSE(v_src_loc);
      EXCEPTION
        WHEN OTHERS THEN
          UTL_SMTP.QUIT(v_connection_handle);
          DBMS_LOB.FREETEMPORARY(l_blob);
          DBMS_LOB.FILECLOSE(v_src_loc);
         sssl_internal_error_track(sqlcode,sqlerrm,'SSSL_SEND_MAIL',NULL);
      END;Thanks in Advance.
    Cheers,
    Shan.
    Edited by: Shan on 13 Jan, 2011 12:33 PM
    Edited by: Shan on 13 Jan, 2011 1:05 PM

  • Associating SOAP Request with Response in Handlers

    Hi,
    In the handler framework, there are handleRequest(MessageContext) and handleResponse(MessageContext) methods, which allow processing of the SOAP Request and Response envelopes, respectively.
    Is there a way to know which request belongs to which response?
    I would like to log these request and response envelopes together.
    Thanks,
    Puny Sen

    Hi,
    I guess you could create a property in the MessageContext while processing the request to keep a message id, and then access the same property in the response.
    Best regards,
    Miguel Pardal

  • Deployment of EJB using JDeveloper 3.2

    i am using sunsolaris version 5.6 on which we have installed Oracle 8.1.7 database enterprise edition.
    And when i am trying to deploy Enterprise Java Bean (Session Bean) on Oracle 8.1.7 using
    JDeveloper 3.2 i am getting following error on message screen of jdeveloper :-
    oracle.aurora.ejb.deployment.GenerateEjb
    -u
    ssc_admin
    -p
    ssc_proj
    -s
    sess_iiop://10.232.1.27:54754:rbsdevp
    -republish
    -keep
    -temp
    TEMP
    -descriptor
    "C:\Program Files\Oracle\JDeveloper 3.2\myprojects\Trail.xml"
    -oracledescriptor
    C:\Program Files\Oracle\JDeveloper 3.2\myprojects\Trail_oracle.xml
    -generated
    "C:\Program Files\Oracle\JDeveloper 3.2\myprojects\TrailGenerated.jar"
    "C:\Program Files\Oracle\JDeveloper 3.2\myprojects\TrailSource.jar"
    Reading Deployment Descriptor...done
    Verifying Deployment Descriptor...done
    Gathering users...done
    Generating Comm Stubs.......................................done
    Compiling Stubs...done
    Generating Jar File...done
    Loading EJB Jar file and Comm Stubs Jar file...done
    Generating EJBHome and EJBObject on the server...
    Message [IOEXCEPTION_DESERIALIZING] not found in 'oracle.aurora.ejb.deployment.server.Messages'.
    *** Errors occurred while deploying the EJB to 8i JVM ***
    *** Deployment completed ***
    And the Trace file in the server gives following error :-
    *** 2001-02-15 11:47:23.600
    *** SESSION ID:(10.11) 2001-02-15 11:47:23.600
    java.io.InvalidClassException: oracle.aurora.ejb.dd.DeploymentDescriptor; Local class not
    compatible: stream classdesc serialVersionUID=59662438620610069 local class
    serialVersionUID=-4578117701936276373
    at java.io.ObjectStreamClass.validateLocalClass(ObjectStreamClass.java)
    at java.io.ObjectStreamClass.setClass(ObjectStreamClass.java)
    at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
    at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
    at java.io.ObjectInputStream.inputObject(ObjectInputStream.java)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
    at oracle.aurora.ejb.deployment.server.DeployEjbImpl.descriptor(DeployEjbImpl.java)
    at oracle.aurora.ejb.deployment.server.DeployEjbImpl.generate(DeployEjbImpl.java)
    at oracle.aurora.AuroraServices._DeployEJBImplBase._execute(_DeployEJBImplBase.java)
    at oracle.aurora.AuroraServices._DeployEJBImplBase._execute(_DeployEJBImplBase.java)
    at com.visigenic.vbroker.orb.SkeletonDelegateImpl.execute(SkeletonDelegateImpl.java)
    at oracle.aurora.server.GiopProtocolAdapter.doRequest(GiopProtocolAdapter.java)
    at com.visigenic.vbroker.orb.GiopProtocolAdapter.dispatchMessage(GiopProtocolAdapter.java)
    at oracle.aurora.server.ThreadSessionDispatcher.run(ThreadSessionDispatcher.java)
    at oracle.aurora.server.VCIiopConnection.processRequest(VCIiopConnection.java)
    at oracle.aurora.server.GiopServer._service(GiopServer.java)
    at oracle.aurora.server.GiopServer.service(GiopServer.java)
    at oracle.aurora.net.VirtualCircuit.processRequest(VirtualCircuit.java)
    at oracle.aurora.net.Presentation.handleRequest(Presentation.java)
    Can anybody help me out.
    null

    According to the JDeveloper 3.2 readme.htm file. "You will not be able to deploy EJBs from JDeveloper 3.2 to Oracle8i Release 3 (8.1.7) on Solaris. We expect this to be fixed in the Solaris patchset 8.1.7.1. This problem does not exist on Oracle8i Release 3 (8.1.7) on Windows NT."
    My question again is "Can this be done out-side of JDeveloper?". Instructions would be appreciated.

  • HOW TO CREATE A NEW J2EE APP FOR DEPLOYING ORACLE REPORTS USING JDEVELOPER?

    Hi,
    I'm new to JDeveloper and Java, JSP etc. I'm trying to deploy a sample parameter form for JSP report. My question is: When I create a J2EE application using JDeveloper, how to make sure "The WEB-INF directory must contain the JSP tag library for Oracle Reports, called reports_tld.jar"? How to do it via JDeveloper?
    In my JSP page, I use <%@ taglib uri="/WEB-INF/lib/reports_tld.jar" prefix="rw" %>.

    Does anyone know the answer to this question?
    I get the following error in Jdeveloper when running my test jsp report:
    Error(8): Unable to load taghandler class: /WEB-INF/lib/reports_tld.jar
    Thanks.
    Hi,
    I'm new to JDeveloper and Java, JSP etc. I'm trying
    to deploy a sample parameter form for JSP report. My
    question is: When I create a J2EE application using
    JDeveloper, how to make sure "The WEB-INF directory
    must contain the JSP tag library for Oracle Reports,
    called reports_tld.jar"? How to do it via JDeveloper?
    In my JSP page, I use <%@ taglib
    uri="/WEB-INF/lib/reports_tld.jar" prefix="rw" %>.

  • Deploying applications developed using Jdeveloper in IBM Web Sphere

    Hi
    I want to deploy the applications developed using jdeveloper on IBM Web Sphere. Pl suggest me the procedure
    Thanks
    Satya

    Refer
    Websphere 5.1 and ADF/UIX
    Websphere 5.1 and ADF/UIX

Maybe you are looking for

  • VGA Adapter and 1920x1080

    I have an odd problem with my 2011 MBP (15").  I use an external monitor (Samsung SA350, identified as SMS23A350H by the mac) hooked up to a KVM switch using the VGA port.  The display support 1920x1080@60hz.  It gets detected as such, and everything

  • Upgrading OS

    I have an older MacBook Pro, running OS X  10.5.8. My local support shop tells me they can't help me upgrade any further and I need some basic info about how to proceed. Can my MAC be upgraded or is it too old? If it can be ugraded, where do I obtain

  • How to create a wav file from 24bit 96Khz sampling rate data

    Hi I am trying to make an VI which will play sound while acquiring data from PXI 4472 DAQ card. My sampling rate is 96Khz and PXI 4472 card is a 24bit card. Wave files are in 8 or 16 bit and the sampling rate is 8000, 11025, 22050 and 44100. How will

  • CRM - BI Data Extraction Problem

    Hi Gurus, We have CRM 2007 and BI 7.0. We have activated all the DS and also replicated them in BW and also activated all the necessary Infocubes in and Transfer rules etc. In CRM, the data is available in service order header table but when I check

  • The MTP software has a MAJOR BUG---loss of hard-drive capac

    I can't believe it! I can't believe it I just got back my REPLACEMENT Zen Touch 40 GB from Creative, and THIS one (different serial number) will only access 9 GB's of the 40 GB hard dri've before no longer writing, and timing out!!!! My original one