Jain SIP sample code to do a VOIP...

Hi,
Right now I have a problem with my current project, can somebody give me some sample codes/can help me on how to make an client VOIP application using Jain SIP API to do a VOIP call... I have an PBX Server but i dont know how to start writing my application to connect to my server...
thanks,
dOnie

[https://jain-sip.dev.java.net/]
Edited by: cotton.m on 10-Jun-2010 10:05 AM

Similar Messages

  • Jain SIP Rookie needs help!

    Ok here is my story....i was given a project to develop a client application that can do voip calls...so i started researching and it led me to jain-sip...i've been researching on it for weeks now and still i do not have a clue on how to start this....so what i did first was build my GUI using swing.. but now that im done with that i do not know where to start....So far this is what i know....We here have a SIP Proxy server waiting for my application to start registering...but thats the thing i even dont know what is needed to code this application...I already downloaded the nist-sip.jar package that lets me use the javax.sip.* package...thats it....I also know that i should implement the SipListener and use its abstract method..but that as far as i got....please anyone please...this is my first post so please be patient with me...thanks guys

    so far here is my code.....
    package rurutalk;
    public void start()
    System.out.println("Inside Start Function");
    try
    properties.setProperty("javax.sip.IP_ADDRESS","202.124.134.44");
    sipFactory = SipFactory.getInstance();
    sipFactory.setPathName("gov.nist");
    sipStack = sipFactory.createSipStack(properties);
    headerFactory = sipFactory.createHeaderFactory();
    addressFactory = sipFactory.createAddressFactory();
    messageFactory = sipFactory.createMessageFactory();
    catch(Exception e)
    e.printStackTrace();
    public void stop()
    System.out.println("Inside Stop Function");
    public static void main(String args[])
    new SipExample ();
    /** Sip Listener Interface method.*/
    public void processTimeout(TimeoutEvent timeOutEvent)
    System.out.println("Inside processTimeout Function");
    /** Sip Listener Interface method.*/
    public void processResponse(ResponseEvent responseEvent)
         //Response response = responseEvent.getResponse();
    System.out.println("Inside processResponse Function");
    /** Sip Listener Interface method.*/
    public void processRequest(RequestEvent requestEvent)
    System.out.println("Inside processRequest Function");
    Message was edited by:
    iromswa
    Message was edited by:
    iromswa
    null

  • Memory leak in Jain-SIP ?

    Hi there.
    We implemented a SIP gateway to MS OCS 2007 using
    Jain-SIP version 1.2.1906.
    One problem we have is memory consumption.
    Using jconsole we found out that memory is not
    completely released when SIP clients log out.
    E.g. the following classes keep on accumulating:
    53134 instances of class gov.nist.core.NameValueList
    41730 instances of class gov.nist.core.NameValue
    20330 instances of class gov.nist.core.Host
    20330 instances of class gov.nist.core.HostPort
    19767 instances of class gov.nist.core.DuplicateNameValueList
    19767 instances of class gov.nist.core.MultiValueMapImpl
    16162 instances of class gov.nist.javax.sip.address.Authority
    16162 instances of class gov.nist.javax.sip.address.SipUri
    13570 instances of class gov.nist.javax.sip.address.UserInfo
    12261 instances of class gov.nist.javax.sip.address.AddressImpl
    5210 instances of class gov.nist.javax.sip.header.Protocol
    5210 instances of class gov.nist.javax.sip.header.Via
    4168 instances of class gov.nist.javax.sip.header.CallID
    4168 instances of class gov.nist.javax.sip.header.CallIdentifier
    3901 instances of class gov.nist.javax.sip.header.CSeq
    3901 instances of class gov.nist.javax.sip.header.ContentLength
    3901 instances of class gov.nist.javax.sip.header.From
    3901 instances of class gov.nist.javax.sip.header.MaxForwards
    3901 instances of class gov.nist.javax.sip.header.RequestLine
    3901 instances of class gov.nist.javax.sip.header.To
    3901 instances of class gov.nist.javax.sip.header.ViaList
    3901 instances of class gov.nist.javax.sip.message.SIPRequest
    3901 instances of class gov.nist.javax.sip.stack.SIPTransaction$TransactionSemaphore
    2858 instances of class gov.nist.javax.sip.DialogFilter
    2618 instances of class gov.nist.javax.sip.header.Route
    2618 instances of class gov.nist.javax.sip.header.RouteList
    2592 instances of class gov.nist.javax.sip.stack.SIPServerTransaction
    2590 instances of class gov.nist.javax.sip.header.ContentDisposition
    2590 instances of class gov.nist.javax.sip.header.ContentType
    2590 instances of class gov.nist.javax.sip.header.MediaRange
    1579 instances of class org.apache.xmlbeans.SchemaType$Ref
    1309 instances of class gov.nist.javax.sip.header.UserAgent
    1309 instances of class gov.nist.javax.sip.parser.Pipeline
    1309 instances of class gov.nist.javax.sip.parser.PipelinedMsgParser
    1309 instances of class gov.nist.javax.sip.parser.StringMsgParser
    1309 instances of class gov.nist.javax.sip.stack.HopImpl
    1309 instances of class gov.nist.javax.sip.stack.SIPClientTransaction
    1309 instances of class gov.nist.javax.sip.stack.SIPClientTransaction$TransactionTimer
    1309 instances of class gov.nist.javax.sip.stack.SIPDialog
    These all are classes from the SIP stack aren't they ?
    Are there any known issues with memory leaks
    in Jain-SIP ?
    Is it probably a configuration issue with
    the properties/parameters for the SIP stack ?
    (There is a property gov.nist.javax.sip.AGGRESSIVE_CLEANUP which we set
    to TRUE but it didn't help)
    Do we miss to release/initialize anything in the SIP stack manually ?
    Thanks a lot in advance,
    Fred

    Nobody else seems ton have this problem. I haven't run my SIP code for as long as a week at a time but i didn't notice any undue memory usage, and I also trawled inside the source a lot without seeing anything odd. So is it your code leaking? Are you sure you're releasing everything to do with a conversation when it ends? Rather than say accumulating things in some static data structure?

  • How to continually reregister using Jain SIP?

    I currently use Jain-Sip to successfully send a REGISTER request and get a 401 UnAuth back, I then use the nonce to generate the response and send it back and I successfully get a 200 OK response.
    However when I go to re register again I cant seem to be able to send the request again, I keep getting null pointer exceptions.
    Here is my code:
    public class CSip extends Activity implements javax.sip.SipListener {
         private static AddressFactory addressFactory;
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            digest = new DigestClientAuthenticationMethod();
            myAddress = getLocalIpAddress();
            tv = new TextView(this);  
            setContentView(tv);
                 try {
                    init(tv);
                    register();
                 } catch (Exception ex) {
                    tv.append("Unxpected exception " + ex.getMessage());
                    ex.printStackTrace();
        super.finish();
        public void init(TextView tv) throws Exception {
              SipFactory sipFactory = null;
              sipStack = null;
              sipFactory = SipFactory.getInstance();
              sipFactory.setPathName("gov.nist");
              Properties properties = new Properties();
              properties.setProperty("javax.sip.STACK_NAME", "Sip_Test");
              // Create SipStack object
              sipStack = sipFactory.createSipStack(properties);
              tv.setText("sipStack = " + sipStack);
              headerFactory = sipFactory.createHeaderFactory();
              addressFactory = sipFactory.createAddressFactory();
              messageFactory = sipFactory.createMessageFactory();
              lp = sipStack.createListeningPoint(getLocalIpAddress(),
                        8002, ListeningPoint.UDP);
              if(sipProvider == null){
              sipProvider = sipStack.createSipProvider(lp);
              sipOnOffFlag = true;
              tv.append("\n jain sip stack started on " + getLocalIpAddress() + ":" + myPort + "/" + ListeningPoint.UDP + " ");
              sipProvider.addSipListener(this);
              Log.d("INIT", "SipProvider = : " + sipProvider.toString());
        public void register()throws Exception{
              String fromName = "xxxxxxxx";
              String fromSipAddress = "sip.network.com";
              String toSipAddress = "sip.network.com";
              String toUser = "xxxxxxxx";
              SipURI fromAddress = addressFactory.createSipURI(fromName,
                        fromSipAddress);
              Address fromNameAddress = addressFactory.createAddress(fromAddress);
              FromHeader fromHeader = headerFactory.createFromHeader(
                        fromNameAddress, null);
              SipURI toAddress = addressFactory
                        .createSipURI(toUser, toSipAddress);
              Address toNameAddress = addressFactory.createAddress(toAddress);
              ToHeader toHeader = headerFactory.createToHeader(toNameAddress,
                        null);
              URI requestURI = addressFactory.createURI(
                        "sip:" + "sip.network.com");
              List<ViaHeader> viaHeaders = new ArrayList<ViaHeader>();
              String ipAddress = lp.getIPAddress();
              ViaHeader viaHeader = headerFactory.createViaHeader(ipAddress,
                        lp.getPort(),
                        lp.getTransport(), null);
              viaHeaders.add(viaHeader);
              CallIdHeader callIdHeader = sipProvider.getNewCallId();
              CSeqHeader cSeqHeader = headerFactory.createCSeqHeader(1L,
                        Request.REGISTER);
              MaxForwardsHeader maxForwards = headerFactory
                        .createMaxForwardsHeader(70);
              Request request = messageFactory.createRequest(requestURI,
                        Request.REGISTER, callIdHeader, cSeqHeader, fromHeader,
                        toHeader, viaHeaders, maxForwards);
              SipURI contactUrl = addressFactory.createSipURI(fromName, fromSipAddress);
              contactUrl.setPort(8002);
              contactUrl.setLrParam();
              SipURI contactURI = addressFactory.createSipURI(fromName, "sip.network.com");
              contactURI.setPort(sipProvider.getListeningPoint(lp.getTransport())
                        .getPort());
              Address contactAddress = addressFactory.createAddress(contactURI);
              contactHeader = headerFactory.createContactHeader(contactAddress);
              request.addHeader(contactHeader);
              Header extensionHeader = headerFactory.createHeader("Expires",
                   "120");
              request.addHeader(extensionHeader);
              Log.d("SIP", "" + request.toString());
              // Create the client transaction.
              Log.d("BEFORE TID", "SipProvider = : " + sipProvider.toString());
              inviteTid = sipProvider.getNewClientTransaction(request);
              inviteTid.sendRequest();
              Log.d("AFTERSENDREQUEST", "SipProvider = : " + sipProvider.toString());
              Log.d("INVITETID", "inviteTid = " + inviteTid.getState());
              dialog = inviteTid.getDialog();
         public void processResponse(ResponseEvent responseEvent) {
              Log.d("RESPONSE", "response " + responseEvent.getResponse());
              Message message = Message.obtain();
              message.obj = "received response "+responseEvent.getResponse();
              handler.sendMessage(message);     
              Response response = (Response) responseEvent.getResponse();
              ClientTransaction tid = responseEvent.getClientTransaction();
              CSeqHeader cseq = (CSeqHeader) response.getHeader(CSeqHeader.NAME);                    
              Log.d("STATUS CODE", "status code = " + response.getStatusCode());
              Log.d("STATUS CODE", "header code = " + response.getHeader("WWW-Authenticate"));
              Log.d("STATUS CODE", "reason code = " + response.getReasonPhrase());
              CallIdHeader callid = (CallIdHeader) response.getHeader("Call-ID");
              WWWAuthenticate wwwAuth = (WWWAuthenticate) response.getHeader("WWW-Authenticate");
              Log.d("STATUS NONCE", ", nonce : " + wwwAuth.getNonce());
              Log.d("STATUS NONCE", "nonce : " + wwwAuth.getNonce());
              String nonce = wwwAuth.getNonce();
              String cNonce = wwwAuth.getCNonce();
              Log.d("STATUS ", "cnonce : " + cNonce);
              String realm = wwwAuth.getRealm();
              Log.d("STATUS ", "realm : " + realm);
              String method = wwwAuth.getQop();
              Log.d("STATUS", "method : " + method);
              String alg = wwwAuth.getAlgorithm();
              Log.d("STATUS", "alg : " + alg);
              String authResponse = null;
              AuthorizationHeader authHeader = null;
              try {
                   digest.initialize(realm,"xxxxxxxx","sip:sip.network.com",
                             nonce,"xxxxxxx", "REGISTER",null, alg);
                   Log.d("GENRESPONSE", "" + digest.generateResponse());
                   authResponse = digest.generateResponse();
              } catch (Exception e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              try {
                    authHeader = headerFactory.createAuthorizationHeader("Digest");
                    authHeader.setUsername("xxxxxxxx");
                    authHeader.setRealm(realm);
                    authHeader.setNonce(nonce);
                    authHeader.setResponse(authResponse);
                    authHeader.setAlgorithm(alg);
                    URI authURI = addressFactory.createURI(
                                  "sip:" + "sipnetworks.com");
                    authHeader.setURI(authURI);
              } catch (ParseException e) {
                   e.printStackTrace();
              Log.d("AUTH HEADER", "Auth Header = " + authHeader);
              if (response.getStatusCode() == Response.UNAUTHORIZED){
              try {
                   authHeader.setNonceCount(1);
                   createAuthReply(authHeader, callid);
              } catch (Exception e) {
                   e.printStackTrace();
              scheduleReRegistration(120, callid);     
         }

    I have tried putting in my register() method several times and if I call the different register() methods,
    so call register() then register2() then register3() it works this way.
    But not if I simply put register() in a timer looping.
    So there must be something I have to terminate and restart or something each time I run the method?
    Edited by: draffodx on Feb 11, 2010 10:12 AM

  • Jain-sip-proxy server does not display in browser

    Hi JCP
    I have downloaded the codes for JAin-sip-Proxy Server, Jain-sip-applet-phone.my problems are:-
    1. I have downloaded all libraries and don't find any error in boiuding the code, but when I deploy using Sailfin it just display Hello World in browser- where else the
    Netbeans Ide tells me deployment was successful.
    2. When I use Tomcat 6.26 Server, the browser just displays JavaFaces(Welcoming page of jsp framework)
    I can't see both the server site and the applet phone. My O.S is Windows 7
    (I have followed all instructions in setup including in control panels->Java Plug in)
    thanx. Can someone help me implementing this two codes( I downloaded them form NIST JAIN SIP WEB SIT)
    Edited by: FihlaTV on Aug 6, 2010 10:54 AM

    If I try to look at your XML file directly, I get an error.
    http://www.ericaeschmann.com/photos.xml
    That is likely the cause. Fix that closing tag issue and check it...

  • JAIN SIP Android Problem

    I use this tutorial :
    [http://www.oracle.com/technology/pub/articles/dev2arch/2007/10/introduction-jain-sip.html]
    to devlope an JAIN SIP Application the code works fine, but whene I use the same code in an Android application I get this message :
    The Peer SIP Stack: gov.nist.javax.sip.SipStackImpl could not be instantiated. Ensure the Path Name has been set.

    I use this tutorial :
    [http://www.oracle.com/technology/pub/articles/dev2arch/2007/10/introduction-jain-sip.html]
    to devlope an JAIN SIP Application the code works fine, but whene I use the same code in an Android application I get this message :
    The Peer SIP Stack: gov.nist.javax.sip.SipStackImpl could not be instantiated. Ensure the Path Name has been set.

  • Current JAIN-SIP RI (JSR 32)

    Hello to the community of JAIN-SIP (JSR 32),
    I'm a student currently working on a project utilizing
    JAIN-SIP 1.2 RI in the implementation of the application.
    In the application, there is an API from another project
    being used that has a SipListener implementation. I would
    like to develop my application using existing RI's or any
    interface implementations as much as possible to avoid the
    need of implementing interfaces required to run my
    application.
    The API mentioned earlier involves pure TCP transfer of data
    only, and it serves as the network setup layer of my
    applicaiton that establishes SIP conferencing. An exception
    of "listening point not found for this provider" was observed
    which failed the setup of the conference. It was discovered
    later that the DefaultRouter class in gov.nist.javax.sip.stack
    package defaults the transfer type to UDP which causes the
    error. After this has been changed to TCP, things worked fine.
    I'm trying to avoid packaging this "fix" into my application as
    I would like people using the application to obtain their copy
    of the JAIN-SIP RI. Fiddling with a public RI probably isn't a
    good idea!
    Is it possible to change the default transfer type in the default
    router to TCP instead of UDP? Can this change be realized
    by the JAIN-SIP community in the form of a new release of the RI?
    Or...any suggestions for possible solutions the this problem?
    Thanks for looking into this,
    Any comment is greatly appreciated!

    Hi,
    I got error 500 Internal Server Error when i send a text message from jain-sip client, Client send the Text message to server but server return the above error.
    There is no Text Message Handler Code in Server Proxy Class,
    Also when i try to start Voice Connversation, Client sent a INVITE request to server but server return 500 Server Intnal Error. also there is no INVITE handler code in Server Proxy Class.
    I am using jain-sip-presence-proxy SIP server and jain-sip-applet-phone.
    please help me .......................................Its Urgent
    why server could not handle the text or voice messages.
    How i make the text and voice conversation.
    with regards

  • How to Delete a Specific Cell in a Matrix + plz Give sample code for Lost F

    hello there !!!!
    i m in Great Trouble please help me out..
    i have to search for a specific Column n then i have to validate that portion, similarly after validating i have to add update delete all the fuction apply... so please help me i m very upset.
    Public Sub HandleEventts_Allowance(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByRef BubbleEvent As Boolean)
            Try
                Dim Count As Int32
                If FormUID.Equals("Allowance") Then
                    If (pVal.BeforeAction = True) And (pVal.ItemUID = "1") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK) Then
                        If pVal.Row = 0 Then
                            'BubbleEvent = False
                        End If
                        o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
                        Count = o_Matrix.RowCount()
                        SBO_Application1.MessageBox("Matrix Count is " & o_Matrix.RowCount)
                        Validate(pVal, EventEnum, FormUID, BubbleEvent)
                    End If
                End If
            Catch ex As Exception
                SBO_Application1.MessageBox(ex.Message)
            End Try
        End Sub
        Public Sub Validate(ByRef pval As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByVal FormUID As String, ByRef BubbleEvent As Boolean)
            Dim Row, ii As Integer
            o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
            o_Matrix.FlushToDataSource()
            Try
                For Row = 2 To o_Matrix.RowCount
                    StrName = Convert.ToString(DBtable.GetValue("CardCode", Row - 1)).Trim()''' i got Error over there n rest of my code is also not working pls...
                    StrUId = Convert.ToString(DBtable.GetValue("U_AlwID", Row - 1)).Trim()
                    StrEnter = Convert.ToString(DBtable.GetValue("U_SupEnter", Row - 1)).Trim()
                    StrExist = Convert.ToString(DBtable.GetValue("U_SupExist", Row - 1)).Trim()
                    If Row - 1 < DBtable.Rows.Count - 1 Or (Not (StrName.Equals(String.Empty) And StrUId.Equals(String.Empty) And (StrEnter.Equals(String.Empty) Or StrExist.Equals(String.Empty))) And (Row - 1 = DBtable.Rows.Count - 1)) Then
                        If (Not StrName.Equals(String.Empty)) And ((StrUId.Equals(String.Empty) Or StrEnter.Equals(String.Empty)) Or StrExist.Trim.Equals(String.Empty)) Then
                            SBO_Application1.StatusBar.SetText("Invalid values provided!Blank values not vllowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
                            BubbleEvent = False
                            Exit Sub
                        End If
                        For ii = Row To DBtable.Rows.Count - 1
                            If Convert.ToString(DBtable.GetValue("ColName", ii)).Trim().Equals(StrName.Trim()) Then
                                SBO_Application1.StatusBar.SetText("Invalid Allowance ID: Duplication Not Allowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
                                oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
                                BubbleEvent = False
                                Exit Sub
                            End If
                        Next
                        If CDbl(StrName) < 0 Then
                            SBO_Application1.StatusBar.SetText("Invalid values provided!Blank values not vllowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
                            BubbleEvent = False
                            Exit Sub
                        End If
                    End If
                Next Row
            Catch ex As Exception
                SBO_Application1.MessageBox(ex.Message)
            End Try
        End Sub

    Hello there
    sir i want to Add Update and delete these three basic operation onto the Matrix, Sir u game me a Sample code of Delete a specific Column...
    Sir can u do me a favour pls leave every thing n just told me how to update a matrix ,like i have to fill the matrix field through the DATABASE table now i want to update the DataBase table from the matrix..
    i just only know thta i have to fill back database table with the help of FLUSHTODATABASE()
    here is my Sample Code...n i have to update in the validate portion...
    Public Sub HandleEventts_Allowance(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByRef BubbleEvent As Boolean)
            Try
                Dim oCellValue As SAPbouiCOM.EditText
                If FormUID.Equals("Allowance") Then
                    If (pVal.ItemUID = "MatAllow") Then
                        If pVal.Row = 0 Then Exit Sub
                        o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
                        If (pVal.Row > o_Matrix.RowCount) Then Exit Sub
                        oForm = SBO_Application1.Forms.Item(FormUID)
                        If (pVal.ItemUID = "1" Or EventEnum = SAPbouiCOM.BoEventTypes.et_CLICK) Then
                            o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
                            If pVal.ColUID = "ColName" And pVal.BeforeAction = True Then
                                If pVal.Row = 0 Then Exit Sub
                                oCellValue = CType(o_Matrix.Columns.Item(pVal.ColUID).Cells.Item(pVal.Row).Specific(), SAPbouiCOM.EditText)
                                If (oCellValue.Value.Trim().Equals(String.Empty) And o_Matrix.RowCount <> pVal.Row) Then
                                    SBO_Application1.StatusBar.SetText("Invalid Allowance ID: Blank Value Not Allowed", )
                                    oCellValue.Active = True
                                    BubbleEvent = False
                                    Exit Sub
                                End If
                            End If
                        End If
                    End If
                End If
                Validate(pVal, EventEnum, FormUID, BubbleEvent)
            Catch ex As Exception
                SBO_Application1.MessageBox(ex.Message)
            End Try
        End Sub
    Public Sub Validate(ByRef pval As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByVal FormUID As String, ByRef BubbleEvent As Boolean)
            Dim str, str1 As String
            Dim checkbox1, Checkbox2 As SAPbouiCOM.CheckBox
            Dim o_Matrix As SAPbouiCOM.Matrix
            Dim Sum As Integer
            Dim oRecordset As SAPbobsCOM.Recordset
            Dim Container As Integer
            Dim Count As Int32
            o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
            oRecordset = o_CompanyObj.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
            Try
                For Count = 0 To DBtable.Rows.Count - 1
                    CodeFill = Convert.ToString(DBtable.GetValue("Name", Count).Trme())
                    NameID = Convert.ToString(DBtable.GetValue("ColUID", Count).Trim())
                    Price = Convert.ToString(DBtable.GetValue("ColPrice", Count).Trim())
                    Quantity = Convert.ToString(DBtable.GetValue("ColQuant", Count).Trim())
                    Total = Convert.ToString(DBtable.GetValue("ColTotal", Count).Trim())
                    checkbox1 = o_Matrix.Columns.Item("ColSEnter").Cells.Item(Count).Specific
                    Checkbox2 = o_Matrix.Columns.Item("ColSExist").Cells.Item(Count).Specific
                    If (checkbox1.Checked = True) And (Checkbox2.Checked = True) Then
                        Dim Sql As String
                        Sql = "Update [@Supplier] Set U_Price=' " & Price & " ',U_ID=" & NameID & "Where Name ='" & CodeFill & " '"
                        oRecordset.DoQuery(Sql)
                    End If
                Next Count
                SBO_Application1.MessageBox("Record was Updated")
            Catch ex As Exception
                SBO_Application1.MessageBox(ex.Message)
            End Try
        End Sub

  • Error while running a sample code

    Hello,
    I 'm getting the following error while i'm trying to run a
    sample code which I have imported into Flex 3.
    ===================================================================
    Severity and Description Path Resource Location Creation Time
    Id
    unable to open 'C:\Documents and Settings\sn55179\My
    Documents\Flex Builder
    3\FlexForDummies_Chapter3_Code\libs'FlexForDummies_Chapter3_Code
    Unknown 1237909480511 215
    ===================================================================
    Can anyone help me in resolving this issue.
    Many thanks in advance.

    It's very frustrating that FB stops working when the libs
    folder is missing. If you are checking in project files to a source
    control app like Perforce, empty folders don't get added, so if you
    don't add an initial dummy file, the next time you do a clean sync,
    the libs folder may not be there, and even though there is nothing
    there, FB complains. :-(

  • Sample code for routine

    Hi all,
    This is what I want to achieve. I have an attribute for an IO, but the values for that has to be decided at the transfer structure level. I want to write a routine in the transfer rules to populate the field.
    I have another field that gets populated from R/3. I need to write a routine which would take this value and see if it falls in the range and have to decide the value and populate.
    I have gl_account coming in, and in the routine I need to take that value of the gl_account and see if it falls in the range of 1 – 5000 or 6700 - 8130 if so assign a + sign and if not assign a – sign to the new field.
    Any sample code would be appreciated and rewarded.
    Thanks,
    Sri

    Global code used by conversion rules
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    DATA:   ...
    $$ end of global - insert your declaration only before this line   -
    $$ begin of routine - insert your code only below this line        -
    DATA: l_s_errorlog TYPE rssm_s_errorlog_int.
       Data:  temp1 TYPE RANGE OF TRAN_STRUCTURE-ZDEBITCREDIT,
       Data:  temp1_line LIKE LINE OF temp1.
       temp1_line-sign = 'I'.
       temp1_line-option = 'BT'.
       temp1_line-low = '001'.
       temp1_line-high = '5000'.
       APPEND temp1_line TO temp1
      Data:  temp2 TYPE RANGE OF TRAN_STRUCTURE-ZDEBITCREDIT,
       Data:  temp2_line LIKE LINE OF temp2.
       temp2_line-sign = 'I'.
       temp2_line-option = 'BT'.
       temp2_line-low = '5001'.
       temp2_line-high = '8000'.
       APPEND temp2_line TO temp2
    Data: temp(1) char.
    if TRAN_STRUCTURE-0glaccnt  IN temp1.
       temp3  = '+'.
    elseif TRAN_STRUCTURE-0glaccnt  IN temp2.
      temp 3= '-'.
    endif
      RESULT = temp3 .
    returncode <> 0 means skip this record
      RETURNCODE = 0.
    abort <> 0 means skip whole data package !!!
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -

  • Routine sample code for reading 2 fields from existing DSO

    Hi Gurus,
                 I am a monkey when it comes to write ABAP code. I have one DSO-A where we store accounting info of purchading (from DS 2lis_02_acc) and one DSO-B getting data from 2lis_02_scl data source.
    We need to write a rountine to read DSO-A for G/L account and populate DSO-B G/L account field.
    Please provide me the sample code for this.
    Warm Regards,
    Anil

    Hi anil,
    Create a local table this is type of you source,
    Data : LV_table  TYPE  XXXX
    use the select statement to read the table of DSO .You have to use th active table for the dso that you want to read data from.
    Select xxxfieldxxx FROM  /BIC/A..........50
    into lv_table where
    filed name of of scheule line probably order no and item no .
    <soruce-fields>-IOBELN = IOBELN
    and <source-fields>-IOBELP = IOBELP.
    Checke the techinal name i am not sure about it. It will be something like that.
    Cheers mate

  • Sample Code for CRM enhancement in BADI

    hi,
      can anybody please give me sample code for BADI for CRM enhancement.
    i have added couple of z field in a extract structure. now i have to write code in BADI to populate those fields.
    please do not send code for user exit.
    Regards
    Subrata

    Hi Aviral,
    Please consider below thread :
    http://scn.sap.com/thread/2069370
    Best regards - Christophe

  • Need sample code to get handle of Selected rows from ADF Table

    Hi,
    I am new to ADF. I have an ADF table based on VO object.On some button action,I need to get handle of selected rows in application module.
    If anybody is having sample code to do this then please share with me.
    Thanks,
    ashok

    wow now link http://blogs.oracle.com/smuenchadf/examples/#134 is working.thanks a lot.
    also the link http://baigsorcl.blogspot.com/2010/06/deleting-multi-selected-rows-from-adf.html is very useful. Thanks a lot for Sameh Nassar too.He made it clear that in 11g Select column is not available for a ADF table and provided a solution to get Select column.
    Thanks,
    ashok

  • How to create a database for sample code from Tutorial/Book?

    I want to try out the sample code from [http://shop.oreilly.com/product/0636920013471.do] for the book SQL Pocket Guide 3rd Ed.
    I have downloaded the oracle vm/appliance for oracle 11g2 and I have started sqlplus as sysdba.
    I'm feeling overwhelmed with these links describing how to create a database:
    [http://www.adp-gmbh.ch/ora/admin/creatingdbmanually.html]
    [http://tldp.org/HOWTO/Oracle-7-HOWTO-3.html]
    [http://www.adp-gmbh.ch/ora/admin/creatingdbmanually.html]
    (1) What is the command to list the existing databases?
    (2) What is the command to delete an existing database?
    (3) When creating a new database with the create database command, is it necessary to specify the logfile, character set, national character set, datafile, sysaux datafile, undo tablespace, temp table space? Do these have reasonable defaults? I'm not sure what proper directories are to specify for Linux and the examples are for windows.
    Can someone give me a simplified create database command to create a database called 3rdEdPocketGuide? Should I follow the example at [http://tldp.org/HOWTO/Oracle-7-HOWTO-3.html] and instead of orcl use 3rdEdPocketGuide?
    (4) What command do I use to execute the script that comes with the book SQL Pocket Guide 3rd Ed? This is the script that has all the drop table, create table and insert commands in it.
    (5) What command do I use in sqlplus to set the current default database prior to running this script? Perhaps this is the connect command? I don't want my script to create tables in the system database.
    (6) I tried the command "connect 3rdEdPocketGuide" and it prompted for a password! Yikes! What password? Do I need to specify a password when I create a database? I cannot tell if I have successfully created such a database or it is just prompting me for a password to thwart malicious users. Is it is possible to create databases which don't require a password or maybe a zero length password?
    Thanks
    Siegfried
    Edited by: user8816970 on Sep 26, 2012 12:01 PM
    Edited by: user8816970 on Sep 26, 2012 12:18 PM

    user8816970 wrote:
    Paul,
    Thanks! I tried changing my profile name to siegfried but I'm not seeing the change...
    Anyway, I'm trying your suggestion to use SQL Developer which was already installed in the virtual box appliance and I cannot figure out how to get a connection.
    When I use the defaults of sid=xe, port=1521, hostname=localhost and specify
    username=sysdba
    password=
    I get status: failure - test failed: listener refursed connection with the following error: ORA 12505, TNS: listener does not current know of sid given.
    So I try sid=orcl and that works better: status: failure - test failed: ORA-01017: invalid username/passowrd; login denied
    OK, sqlplus let me in with out a password, why does not this work?
    So I try checking the box for "OS Authentication" and I get the same error!
    Hoek: I tried searching the documentation and found "3 Exploring Oracle Database with SQL Developer" at http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/toc.htm but following those directions did not help. Can you be more specific? The directions were for a tutorial and I need to know what the passwords are for the database set up with [http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html|http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html] . I also found [http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG|http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG] but that did not help either.
    Everyone:
    Do I need to create a user using SQL*Plus first so I can login with "Oracle SQL Developer" so I create my database called? What would be the "create user" command I would execute?
    OK, so I run sqlplus and issue these commands
    create user siegfried identified by abc ;
    grant connect to siegfried ;
    connect siegfried/abc;
    Now, how do I create a database? In Microsoft SQL Server one has to create a database first and if you just start creating tables without creating a database first, the tables will be created in the system database and this is usually undesirable.
    Sometimes a database is known in the java connection string as the catalog. Is there any such analog in oracle SQL plus?
    So now what do I do? I want to create a bunch of tables using my script I downloaded from 3rd Ed SQL Pocket Guide. Does my new user "siegfried" have the right to create tables? I guess I could try but I don't want to create tables in the system database.
    I noticed I can also use "Oracle SQL Developer" to connect with my new "siegfried" account. It seems that I should have been able to connect with sysdba... strange.
    So now I am connected in the "Oracle SQL Developer" and I see no list of databases.
    Thanks!
    Siegfried
    >Paul,
    Thanks! I tried changing my profile name to siegfried but I'm not seeing the change...
    Anyway, I'm trying your suggestion to use SQL Developer which was already installed in the virtual box appliance and I cannot figure out how to get a connection.
    When I use the defaults of sid=xe, port=1521, hostname=localhost and specify
    username=sysdba
    password=
    I get status: failure - test failed: listener refursed connection with the following error: ORA 12505, TNS: listener does not current know of sid given.
    So I try sid=orcl and that works better: status: failure - test failed: ORA-01017: invalid username/passowrd; login denied
    OK, sqlplus let me in with out a password, why does not this work?
    So I try checking the box for "OS Authentication" and I get the same error!
    Hoek: I tried searching the documentation and found "3 Exploring Oracle Database with SQL Developer" at http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/toc.htm but following those directions did not help. Can you be more specific? The directions were for a tutorial and I need to know what the passwords are for the database set up with [http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html|http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html] . I also found [http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG|http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG] but that did not help either.
    Everyone:
    Do I need to create a user using SQL*Plus first so I can login with "Oracle SQL Developer" so I create my database called? What would be the "create user" command I would execute?
    OK, so I run sqlplus and issue these commands
    create user siegfried identified by abc ;
    grant connect to siegfried ;
    connect siegfried/abc;
    above does NOT use SQL*Net to connect to the instance
    >
    Now, how do I create a database? In Microsoft SQL Server one has to create a database first and if you just start creating tables without creating a database first, the tables will be created in the system database and this is usually undesirable.
    Sometimes a database is known in the java connection string as the catalog. Is there any such analog in oracle SQL plus?
    So now what do I do? I want to create a bunch of tables using my script I downloaded from 3rd Ed SQL Pocket Guide. Does my new user "siegfried" have the right to create tables? I guess I could try but I don't want to create tables in the system database.
    I noticed I can also use "Oracle SQL Developer" to connect with my new "siegfried" account. It seems that I should have been able to connect with sysdba... strange.
    So now I am connected in the "Oracle SQL Developer" and I see no list of databases.SQL Developer can only connect to the instance via SQL*Net
    >
    Thanks!
    Siegfrieda database in SQL Server is same as schema/user in Oracle

  • Report Engine SDK sample code questions

    Hello,
    I've been able to view a boxi report in an iframe via the Enterprise SDK by modifying the sample code in the HowToViewWebiReports_VB example.
    I'm not totally happy with the way that's working, so I'm looking at using the Report Engine SDK, although I understand it's performance and scalability isn't quite as good as the Enterprise SDK.
    I'm a VB.NET guy, not a C# guy, and I'm not clear on how the wssdk_net2.0_portal_sample_12.0_en example is supposed to work.
    I don't have one and my CMS server is running Tomcat, not IIS so there's not going to be an ASP.NET web service running there.
    In the dsws.config for the wssdk_net2.0_portal_sample_12.0_en example I put the name of the CMS server, but it's looking for a web service at http://cmsservername:8080/dswsbobje/services/Session, but I get a 404 when i try to hit that. 
    I'm not familiar with Tomcat, but in searching around on the server, I see a dswsbobje directory under the webapps in my Tomcat installation, but I don't see a services or a Session folder underneath that.  In the dswsbobje folder I see the following folders:
    BOAR-INF
    META-INF
    WEB-INF
    xsd
    Is there something else that needs to be installed on the Tomcat server to get the web service running?
    -Eric

    It looks like I have something there.  When I launch launch http://servername:8080/dswsbobje,  I see:
    Apache-AXIS
    Hello! Welcome to Apache-Axis.
    What do you want to do today?
    Validate the local installation's configuration
    see below if this does not work.
    To enable the disabled features, uncomment the appropriate declarations in WEB-INF/web.xml in the webapplication and restart it.
    Validating Axis
    If the "happyaxis" validation page displays an exception instead of a status page, the likely cause is that you have multiple XML parsers in your classpath. Clean up your classpath by eliminating extraneous parsers.
    I clicked on the "Validate" link and I see:
    Axis Happiness Page
    Examining webapp configuration
    QaaWS Configuration
    QaaWS Servlet is not valid.
    ErrorServer servername not found or server may be down
    See Web Application log to get more info or read QaaWS v2 documentation starting with section
    Perhaps this environment needs some additional configuration?

Maybe you are looking for

  • Cant share photos by email

    hello my name is emily and i need HELP iwent to the share button to email a photo and a box appeared telling me to enter my sever that way i could email photos, so i entered what i thought was right which was http, well it wasnt right, it would not e

  • Says that my serial number is not valid. Adobe Pro XI

    says that my serial number is not valid. Adobe Pro XI

  • Can it be done (drill into another application seamlessly from dashboard)

    Is it possible to drill from a BI EE Dashboard report directly into another non-Oracle web based application? For instance, we move budget data at a summarized level into our data warehouse, which is available as a report in BI EE. If the user wants

  • Extraction error in OrgChart 3.0 SP1

    Hi Experts, We are implementing the OrgChart 3.0 SP1 for staged environment. after configuring the extractor when I run the extract it shows the following error.....and extraction is fail. 4167. 15 Jul 2011 11:24:17 ERROR com.nakisa.Logger - SAPExtra

  • Lenovo AC/DC combo adapter fuse

    I am looking for a supplier of the fuses inside the cigarette lighter plug.  Any ideas?