Error using DI API on Item Revaluation

Dear All
While on Revaluation of Item using DI API System gives error meaasage as "Internal Error 5002" ans displaya 'Material Revaluation failed'.
Can any one help me to find the reason for this error and how to overcome the situation?
With regards
Aloke

Dear Siva
Following is the code I am using for revaluation of items which is giveing "Internal Error 5002':
Dim lMaterialRevaluation As SAPbobsCOM.MaterialRevaluation
        lMaterialRevaluation = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oMaterialRevaluation)
        For li As Integer = 0 To ls_Lines.Length - 1
            If ls_Lines(li).Split(vbTab).Length <> 5 Then
                My.Computer.FileSystem.WriteAllText(ls_OutFileName, lnl_SrlNo & "--> Can't Read in the data in Line " & li + 1, True)
                My.Computer.FileSystem.WriteAllText(ls_OutFileName, vbNewLine, True)
                lnl_SrlNo += 1
                Continue For
            End If
            ls_ItemCode = ls_Lines(li).Split(vbTab)(0).Trim
            ls_WareHouseCode = ls_Lines(li).Split(vbTab)(1).Trim
            ld_Price = ls_Lines(li).Split(vbTab)(2).Trim
            li_IncAccount = ls_Lines(li).Split(vbTab)(3).Trim
            li_DecAccount = ls_Lines(li).Split(vbTab)(4).Trim
            lMaterialRevaluation.Lines.SetCurrentLine(li)
            lMaterialRevaluation.Lines.ItemCode = ls_ItemCode
            lMaterialRevaluation.Lines.WarehouseCode = ls_WareHouseCode
            lMaterialRevaluation.Lines.Price = ld_Price
            lMaterialRevaluation.Lines.RevaluationIncrementAccount = li_IncAccount
            lMaterialRevaluation.Lines.RevaluationDecrementAccount = li_DecAccount
            lMaterialRevaluation.Lines.Add()
        Next
        Dim li_Ret As Integer
        li_Ret = lMaterialRevaluation.Add
        If li_Ret = 0 Then
            MsgBox("Material Revaluation Completed")
            System.Runtime.InteropServices.Marshal.ReleaseComObject(lMaterialRevaluation)
        Else
            oCompany.GetLastError(lErrCode, sErrMsg)
            MsgBox(sErrMsg & ", Material Revaluation failed")
        End If
Can you or any one else suggest where the error lies.
Thanks & with regards
Aloke
Edited by: ALOKE BANDYOPADHYAY on Jul 5, 2011 3:01 PM

Similar Messages

  • Error using JXL api in a KM Report

    Hi Expert,
    My report have to use JXL api. I have already a DC containing libraries, including JXL 2.6.2.
    I declare my DC in Used DC of my report, but each time I launch it it throws me this error :
    "error executing: /reporting/reports/Content Management/Tools/rise_metrics/1237311667619.xml(com.sapportals.wcm.service.reporting.ReportInput@356422d2) - java.lang.NoClassDefFoundError: jxl/format/CellFormat at com.ctsao.project.rise.metrics.RISEMetrics.execute(RISEMetrics.java:460) at com.sapportals.wcm.repository.manager.reporting.monitor.ReportComponent$ReportWrapper.execute(ReportComponent.java:160) at com.sapportals.wcm.service.reporting.scheduler.ReportScheduler$Runner.run(ReportScheduler.java:220)"
    Is it possible to use this API in a report or there is some restriction ?
    Thanks in advance for your help,
    Jean-Edouard Nicolet.

    Hi,
    Try to include the jxl.jar file inside your private/lib folder of project and run as a workaround.
    Regards
    Baby

  • SSL error using Neutron API and CLI directly on controller nodes

    VIO 1.0 + NSX + vSphere 6.0
    I am trying to execute the following segment of code:
    139         credentials = get_credentials()
    140         neutron = client.Client('2.0',
    141                                 username=credentials['username'],
    142                                 password=credentials['password'],
    143                                 auth_url=credentials['auth_url'],
    144                                 tenant_name=credentials['tenant_name'],
    145                                 endpoint_url=credentials['url'],
    146                                 token=credentials['token'],
    147                                 insecure=True)
    148         response = neutron.list_ports()
    When I run the Python script, it errors out with the following:
    Traceback (most recent call last):
      File "getMACAddr.py", line 148, in <module>
        response = neutron.list_ports()
      File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 111, in with_params
        ret = self.function(instance, *args, **kwargs)
      File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 306, in list_ports
        **_params)
      File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1250, in list
        for r in self._pagination(collection, path, **params):
      File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1263, in _pagination
        res = self.get(path, params=params)
      File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1236, in get
        headers=headers, params=params)
      File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1221, in retry_request
        headers=headers, params=params)
      File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1156, in do_request
        resp, replybody = self.httpclient.do_request(action, method, body=body)
      File "/usr/lib/python2.7/dist-packages/neutronclient/client.py", line 192, in do_request
        **kwargs)
      File "/usr/lib/python2.7/dist-packages/neutronclient/client.py", line 148, in _cs_request
        raise exceptions.SslCertificateValidationError(reason=e)
    neutronclient.common.exceptions.SslCertificateValidationError: SSL certificate validation has failed: [Errno 1] _ssl.c:510: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
    The /var/log/neutron/server.log file has the following corresponding entry for when the script tries to make the connection:
    2015-04-11 07:17:31.941 2096 INFO neutron.wsgi [-] (2096) accepted ('10.27.16.164', 34495)
    When I run the CLI from the same controller node, I get the error with or without the —insecure flag:
    root@controller02:/tmp# neutron port-list
    SSL certificate validation has failed: [Errno 1] _ssl.c:510: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
    root@controller02:/tmp# neutron --insecure port-list
    SSL certificate validation has failed: [Errno 1] _ssl.c:510: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
    If I run the neutron CLI command from my local Macbook Pro, it works just fine. That leads me to believe it is a communication error when the controller node tries to talk to itself. I have tried setting the OS_AUTH_URL and OS_URL to both the localhost IP and the 10-network IP address -- both result in the same error.
    Any ideas?
    Chris

    Hello Chris,
    Thanks for checking out VMware Integrated OpenStack and for sharing your concern.
    By default, VMware Integrated OpenStack uses a self-signed certificate, which will require the use of the OS_CACERT environment variable in your openrc file and when using the API.
    The better way to resolve this is to use a CA-signed certificate.  Fortunately, VMware Integrated OpenStack makes the CSR generation and signed certificate import process very easy.
    If this is production, of course, use a trusted Root CA.  If this is a Dev Lab, you can generate your own Root CA certificate and use it for testing.
    I wrote up a quick blog post on how to do this.
    Let us know if you have any further questions.
    Regards,
    Trevor

  • Room creation error using Room API

    Hi Experts.
    We're triying to create a collaboration room through Room API
    As a previous step a standard template copy was created (SAP_Information_Site_2)  to be used in the room creation through API.
    In this template we defined one parameter (FolderPath) which sets the KM navigation path  of a specific folder and then we made the mappings of this parameter into the views used by template to show documents.
    When Room is created using "Room creation wizard" we set name, description, category, template (SAP_Information_Site_2), FolderPath, etc. this way everything is OK.
    The problem is triying to create it when generating the room througn a Webdynpro using Room API, afeter we set all same parameters the room is created with no errors. but despite having put all the parameters like those we place using creation wizard the Room API created Room shows the default folderpath and not we have set through API.
    We are able to compare both rooms and they shows same properties except the folderpath.
    Here the used code:
          private  void createRoom(){
                String strTemplateName = "Techint_Template";
                String strRoleName = "Admin";
                String strCategory = "Default_Category";
                //Get the Rooms 6.0 API Portal Service
                IRooms roomsAPI = (IRooms)PortalRuntime.getRuntimeResources().
                                              getService(IRooms.PORTAL_SERVICE_ID);
                //Get Template Related Infos
                ITemplate template = null;
                IRoomRole role1 = null;
                IRoomCategoryFactory cf = roomsAPI.getRoomCategoryFactory();
                try {
                      template = roomsAPI.getRoomTemplate(strTemplateName);
                      role1 = template.getRoomRole(strRoleName);
                      //Get an empty RoomInfo object
                      IRoomInfo roomInfo = roomsAPI.getRoomCreationInfo();
                      //Fill RoomInfo object with values
                      roomInfo.setName(wdContext.currentFormDataElement().getProjectCode().trim()+" - "
                                  +wdContext.currentFormDataElement().getRevisionNumber());
                      String strDescription = wdContext.currentFormDataElement().getTechintDocument();
                      if (strDescription!=null && strDescription.length()>0)
                            roomInfo.setDescription(wdContext.currentFormDataElement().getTechintDocument());
                      else
                            roomInfo.setDescription(wdContext.currentFormDataElement().getProjectCode().trim()+" - "
                                  +wdContext.currentFormDataElement().getRevisionNumber());
                      roomInfo.setTemplateName(strTemplateName);
                      roomInfo.addRoomParameter("FolderPath", "FolderPath",strRevisionFoldePath, false);
                      //asign the room category
                      IRoomCategory objRoomCategory = cf.getDefaultRoomCategory();
                      IRoomCategory objRCA[] = {objRoomCategory};
                      roomInfo.setCategories(objRCA);
                      //Set User Role Assignments
                      com.sap.security.api.IUser owner = UMFactory.getUserFactory().getUserByLogonID("km_user");
                      roomInfo.setOwnerId(owner.getUniqueID());
                      roomInfo.addUserToRole(owner.getUniqueID(), role1);
                      //Finally Create the Room
                      IRoomDataElement objRoomDE =  wdContext.createRoomDataElement();
                      if(roomInfo.validate()){
                            IRoom newRoom = roomsAPI.createRoom(roomInfo, true);
                            objRoomDE.setRoomLink(newRoom.getRoomAccessURLExternal());
                      }else{
                            RoomCreationValidationErrors[] errors = roomInfo.getValidationErrors();
                            for (int i=0; errors.length>i;i++){
                                  logWebDynproMessages(IS_LOG_ENABLED,
                                        //ILoggingConstants.INFO,
                                        4,wdComponentAPI.getMessageManager(),
                                        "ErrorRoom: "+errors<i>.getShortText(), false);
                            objRoomDE.setRoomLink("ERROR");
                      wdContext.nodeRoomData().addElement(objRoomDE);
                      logWebDynproMessages(IS_LOG_ENABLED,
                            //ILoggingConstants.INFO,
                            1,wdComponentAPI.getMessageManager(),
                            "Se creo el room asociado al proceso/revision:"+strRevisionFoldePath, false);
                } catch (TemplateInstantiationException e) {
                      printException(wdComponentAPI.getMessageManager(), e);
                      e.printStackTrace();
                } catch (NoSuchRoleException e1) {
                      printException(wdComponentAPI.getMessageManager(), e1);
                      e1.printStackTrace();
                } catch (UMException ex){
                      printException(wdComponentAPI.getMessageManager(), ex);
                      ex.printStackTrace();
                } catch (RoomCreationException ex){
                      printException(wdComponentAPI.getMessageManager(), ex);
                      ex.printStackTrace();
                } catch (NoSuchRoomCategoryException ex){
                      printException(wdComponentAPI.getMessageManager(), ex);
                      ex.printStackTrace();
                } catch (Exception ex){
                      printException(wdComponentAPI.getMessageManager(), ex);
                      ex.printStackTrace();
    This code was created using the following directions
    http://help.sap.com/saphelp_nw04s/helpdata/en/7d/c69c42d706c66ae10000000a155106/content.
    Any help will be really appreciated and accordingly rewarded
    Thaks in advance,
    Ramien.-

    Hi Venkat,
    did you check the Initial Configuration Tasks ? especially the portal permisions...
    http://help.sap.com/saphelp_nw04/helpdata/en/f6/2604f005fd11d7b84200047582c9f7/content.htm
    and there is a SAP Note which references a How To Guide for configuring permissions. The Note number is 766765 and the document it references is "How To... Configure Permissions for Initial Content in SAP Enterprise Portal 6.0 SP9 & Higher."
    PS: Please consider rewarding points for helpful answers on SDN. Thanks in advance!

  • Error using Workflow API to retrieve result of closed instance.

    Hello,
    I have been attempting to use the workflow Java API to retrieve the payloads of open and completed instances of a particular BPEL Process. I have been able to use the IInstanceHandle.getField method to retrieve the payload of an active/open instance but I am having difficulty with the IInstancehandle.getResult method to retrieve the result of a closed.completed instance. The error I receive is: "Scope not found. The scope "BpPrc0.1" has not been defined in the current instance. I have checked out the audit history for this instance and have seen this particular scope scattered throughout the XML. Any ideas on what may be causing this issue or something I should be looking for?
    Thanks in advance.

    Hi,
    Use the getField() method:
    Object field = handle.getField("outputVariable");
    This returns a HashMap with the payload as one of its entries.

  • Error Using REST API to Retrieve SharePoint content

    I am developing a rather simple application that retrieves files from SharePoint using the REST Office 365 API. This is a batch job running in the background with no user interface so the following simple 2-step  flow is what I'm doing:
    (1) Requesting an Access Token from Azure AD (supplying client ID, client secret, resource, and grant_type=client_credentials) 
    (2) Invoke the SharePoint API (https://{base url}/_api/v1.0/Files) using the "Authorization: Bearer <access_token>" as a request header .
    That process seems pretty straightforward and sounds simple but I keep getting the following error :
    401 Unauthorized
    x-ms-diagnostics:  3001000;reason="There has been an error authenticating the request.";category="invalid_client"
    Any idea what the problem is and how this can be resolved ? I have been stuck on this for days now. I would REALLY appreciate somebody's help with this. Thanks.
    - CW

    Hi,
    According to the error message, the issue is related to Office 365 Rest API authentication.
    I suggest you can check the detailed web request using Fiddler to check the access token is valid in the request.
    Here are detailed articles for your reference:
    Files REST operations
    Remote authentication in SharePoint Online
    Fiddler
    Thanks
    Best Regards
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jerry Guo
    TechNet Community Support

  • I am Trying to update Item category by using Standar API .. But no Updating .. and it show some erros message.. INV INV_VALID_CAT error message

    Hi 
      I am using Standard API to Update Item category. But it was not updating.any value  what passing to paramenter in API But iwas through some.. error mesage INV INV_VALID_CAT
    Regards,
    Sam

    Please see if (PA_PROJECT_PUB.create_project Errors - The Class Category Is Invalid (Doc ID 1323904.1)) helps.
    Thanks,
    Hussein

  • Error 30694: Error in API - update item failed

    Today we are seeing this error:
    "Error 30694: Error in API - update item failed"
    when trying to edit existing url items or create new ones. I see
    three other entries for this error, but no resolution.
    iAS 1022, portal 3.0.9.8.0

    I suggest you apply the 3.0.9.8.1 patch, available on metalink.
    Let us know if that clears up the problem.
    Also, what version of the database are you using.
    Regards,
    Jerry

  • BP Error in memory while uploading using DI API

    hi experts,
    can someone help me how to reduce the memory used while uploading the business partner using DI API..
    i encountered error "memory corrupted".
    because i already used 1.1 gb of memory while I'm in the process of uploading the business partner.
    this is the error
    "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
    thanks

    No DTW is not possible to used...
    this is the code i use... the error comes out in
            lRetCode = oBusinessPartners.Add
    Public oBusinessPartners As SAPbobsCOM.BusinessPartners = Nothing
            oBusinessPartners = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBusinessPartners)
            oBusinessPartners.CardCode = CardCode
            oBusinessPartners.CardName = CardName
            oBusinessPartners.CardType = SAPbobsCOM.BoCardTypes.cCustomer
            oBusinessPartners.GroupCode = GroupCode
            oBusinessPartners.Phone1 = Phone1
            oBusinessPartners.Address = Address
            oBusinessPartners.UserFields.Fields.Item("E_Mail").Value = Email
            oBusinessPartners.UserFields.Fields.Item("U_COURSE").Value = Course
            oBusinessPartners.PayTermsGrpCode = "-1"
            Dim oContactEmps As SAPbobsCOM.ContactEmployees = Nothing
            oContactEmps = oBusinessPartners.ContactEmployees
            oContactEmps.Name = contact1
            oContactEmps.Add()
            oContactEmps.Name = contact2
            lRetCode = oBusinessPartners.Add
    i also used the uploading using xml but it doesn't work...
    the error still comes out...
    THANKS A LOT...
    Edited by: Joey Bryan Dante on Feb 22, 2011 3:18 AM

  • Update item in list using rest api - failed when browsing in juniper session

    this issue is about browsing to an on premises sharepoint 2013 inside a LAN using Juniper session
    the user can see everything and can create new list items with rest api but
    cannot update existing items using the function below.
    we've got this function which we use to update list items in rest
    it works like a charm when browsing inside the LAN
    function updateListItem(itemIdentityField, itemIdentity, listName, siteUrl, item, success, failure) {
    getListItemWithId(itemIdentityField, itemIdentity, listName, siteUrl, function (data) {
    $.ajax({
    url: data.__metadata.uri,
    type: "POST",
    contentType: "application/json;odata=verbose",
    data: JSON.stringify(item),
    headers: {
    "Accept": "application/json;odata=verbose",
    "X-RequestDigest": $("#__REQUESTDIGEST").val(),
    "X-HTTP-Method": "MERGE",
    "If-Match": data.__metadata.etag
    success: function (data) { success(data, callBackIndex, null) },
    error: function (data) {
    getError(data);
    }, function (data) {
    failure(data);
    the error i get in ULS log is:
    Original error: Microsoft.SharePoint.Client.InvalidClientQueryException: The parameter __metadata does not exist in method GetItemByStringId.
    at Microsoft.SharePoint.Client.MethodInformation.GetParameter(String parameterName)
    at Microsoft.SharePoint.Client.ClientCallableEdmModelBuilder.CreateFunctionImportForMethodBodyParser(MethodInformation clientMethod, List`1 parameterNames, ProxyContext proxyContext)
    at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.ParseParametersFromBody(MethodInformation methodInfo, Boolean allowPostBodyAccess, Boolean isLeafSegment, ClientValueCollection args)
    at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.ParseParametersFromBodyOrQueryString(MethodInformation methodInfo, Boolean allowPostBodyAccess, Boolean isLeafSegment, ClientValueCollection args)
    at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.CreateMethodArgumentsUsingNamedParameters(MethodInformation methodInfo, IList`1 parameterList, Boolean isLeafSegment, Boolean allowPostBodyAccess)
    at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.InvokeMethod(Boolean mainRequestPath, Object value, ServerStub serverProxy, EdmParserNode node, Boolean resourceEndpoint, MethodInformation methodInfo, Boolean isExtensionMethod, Boolean isIndexerMethod)
    at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.GetObjectFromPathMember(Boolean mainRequestPath, String path, Object value, EdmParserNode node, Boolean resourceEndpoint, MethodInformation& methodInfo)
    at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.GetObjectFromPath(Boolean mainRequestPath, String path, String pathForErrorMessage)
    at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.Process()
    at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.ProcessRequest()
    at Microsoft.SharePoint.Client.Rest.RestService.ProcessQuery(Stream inputStream, IList`1 pendingDisposableContainer)
    Any help?
    Somebody?
    Thanks

    Hi patrik
    Really appreciate your replying.
    Could you try and refer to the issues below:
     this error occurs even with site collection administrator (i tested it with three different
    users)
    there isnt any difference between items in list - all have same permissions
    it occurs in several lists in site (all lists have same permissions)
    if browsing inside the LAN everything works just fine
    updating from the UI works fine in all means
    It really seems like a Rest related problem(is there anyone from the Microsoft REST team who can take look at this error?)
    Thanks
    Hushay

  • Custom report  using KM API Error

    Hi All,
    I have to create a report using KM API. i got the custom report using KM API from sdn and I imported into my NWDS. While i compile it, it is giving me this error.
    "The project cannot be build because the classpath for com.sap.netweaver.bc.rf.common.exception.ResourceException is not found."
    I have imported all the required jar files.
    How can i rectify this error?  Could anyone help me out in this issue?
    Regards,
    Divya

    Hi Divya,
    > I have imported all the required jar files
    First, I don't know what you mean with "imported" - in any case, you should <i>not</i> put the JARs into your project but just reference these.
    Also, obviously you have <i>not</i> referenced <i>all the required jar files</i>; ResourceException is part of bc.rf.common_api.jar, which is part of portal application com.sap.netweaver.bc.rf, at least for NW2004s.
    Please use the ClassLocator tool (search the WebLogs for this term to get some initial instruction) to avoid such questions in the future. It will make your life much easier.
    Hope it helps
    Detlev

  • Returning error while listing  reportees of a user by using worklist api.

    Hi,
    I am trying to list reportees of a user by using bpel worklist APi in custom application.the following is the code fragment of that:
    BPMUser bpmUser = gu.getWorkflowServiceClient().getAuthorizationService("dm.hoogly").lookupUser(gu.getWorkflowServiceClient().getTaskQueryService().getWorkflowContext("dm.hoogly").getUser());
    List directs = bpmUser.getReportees(1);
    System.out.println(" size..."+directs.size());
    its retuning error.
    Can any one help me how to list a reportees of a user by using BPELworklist api
    thanks
    Murali

    Hi..
    I am using 10.1.3.3 SOA suite.
    thanks
    Murali

  • While creating Projects Using the API, get two errors: 'Customer name must be passed' and 'class category is invalid'

    Hi
    While trying to Create Projects using the API, I'm getting two types of errors -
    The first is : 'API failed in one stage 1 Customer Name is a mandatory Quick Entry field. Value must be passed'
    The second is : '
    'API failed in one stage 1 Project: '<Project_Number>'
    The class category is invalid.'
    Both the messages are produced by our custom program. .. however I am not able to understand why the underlying errors occur.
    The first error ( Customer Name is a mandatory quick entry field), is caused by Projects that are to be created from Project templates where it is configured with Quick Entry Customer Name required. We are passing Customer Site number ( Party Bill to site number and Party Ship to side number). The site numbers being passed are also set as 'Primary'. Yet they are failing.
    For the second Error ( The Class Category is invalid), I rechecked multiple times, the Class categories for the Projects I am trying to create, with the Config in R12 and they are fine. Can't understand the reason for these two issues. Has anyone encountered such an issue ? If so how was it resolved?
    Regards
    Vivek

    HI All
    I resolved both the issues. In case there are others facing similar issues, following was the cause and resolution of my errors
    1. Error 1: Customer Name is a Mandatory Quick Entry field. Value must be passed.
    The cause was that the data loaded into our custom staging table was not in the right fields. This was because the data file values and the CTL were not in sync.
    Resolution:
    Corrected the data file to be in Sync with the structure defined in the CTL and  this loaded it successfully
    2. Error 2: The class category is invalid.
    The cause of this error was that  in the  Projects Template (used to create the project from), the Quick Entry setup had a Class Category set as required and I was not passing a value ( a class code value) for that Class Category.
    Hope this helps somebody else
    Cheers
    Turnbill

  • SSL: Connection reset by peer ; Failed to enable crypto error while calling the report using bing API with SOAP client

    Hi,
    I am trying to fetch report using bing API and making a SOAP call for fetching the data. I get the following error:
    [Warning] fopen(): SSL: Connection reset by peer [file] /var/www/sites/psmedia/perfectstormmedia/tools/class/msn_api.class.php [line] 780
    02-04-2015 10:17:41 (BST) : [Warning] fopen(): Failed to enable crypto [file] /var/www/sites/psmedia/perfectstormmedia/tools/class/msn_api.class.php [line] 780
    02-04-2015 10:17:41 (BST) : [Warning] fopen(https://download.api.bingads.microsoft.com/ReportDownload/Download.aspx?q=rzr63XFt5qJduddohoIRyOYAP%2f1%2ftsnhk8L%2bzBmUpdU2CQlcUB98RpY%2bbOaLFFGMqAC4IUUadC%2fNdNnJqeVCY%2f%2bpy6noVsVA%2fMJp47a3Xb1VjABfKhcdKy6vqpgEdcQg%2fQZ7QcEpZ3bEloJjUtGpDquFk53BnkeHEPVWZkDYcsQegRz%2fpG4t4w6gKCCRmhArd6osr6ZU9CMJ3lbxtGXjcQEMPvP2apNyr9P%2fc8niyfWA2aBcm1aEmOLX2KL3aRJ4rz9N7gG7uBslVZH%2b4rUjHdB7CMkbb%2fHyHwvPTqGPbPCHnicefr%2b%2fDP70hlkBEGfyOOswK67%2bl1zh7CyIv%2bcMlaDsuDX1HeFf4uORfD41H1z7):
    failed to open stream: operation failed [file] /var/www/sites/psmedia/perfectstormmedia/tools/class/msn_api.class.php [line] 780
    Whenever I execute my script. Can you please let me know what we can do to solve this issue. The version of PHP we are using is 5.3.3 with open ssl. 

    Hi Shobha,
    I can't confirm what version of PHP you are using, but to err on the side of caution please use the version specified in the sample/SDK:
    PHP 5.4.14 has been installed from PHP.
    Here is our code examples:
    https://msdn.microsoft.com/en-US/library/bing-ads-overview-getting-started-php-with-web-services.aspx
    Thanks,
    Itai

  • Add attachments using workflow api throwing error

    Hi,
    I am getting the following error when i am trying to add attachments using worklist API.
         Missing class: invokeBPEL.MetaData
         Dependent class: com.evermind.io.ClassLoaderObjectInputStream
         Loader: oc4j:10.1.3
         Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar
         Configuration: <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar
    This load was initiated at hw_services.root:0.0.0 using the Class.forName() method.
    The missing class is not available from any code-source or loader in the system.
         at oracle.classloader.PolicyClassLoader.handleClassNotFound (PolicyClassLoader.java:2068) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@10469011]
         at oracle.classloader.PolicyClassLoader.internalLoadClass (PolicyClassLoader.java:1679) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@10469011]
         at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1635) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@10469011]
         at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1620) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@10469011]
         at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:319) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at java.lang.Class.forName0 (Native method) [unknown, by unknown]
         at java.lang.Class.forName (Class.java:242) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at com.evermind.io.ClassLoaderObjectInputStream.resolveClass (ClassLoaderObjectInputStream.java:33) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at java.io.ObjectInputStream.readNonProxyDesc (ObjectInputStream.java:1538) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at java.io.ObjectInputStream.readClassDesc (ObjectInputStream.java:1460) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at java.io.ObjectInputStream.readOrdinaryObject (ObjectInputStream.java:1693) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at java.io.ObjectInputStream.readObject0 (ObjectInputStream.java:1299) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at java.io.ObjectInputStream.readObject (ObjectInputStream.java:339) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at com.evermind.server.rmi.RMIProtocol$Version.unmarshallParameterDirectly (RMIProtocol.java:402) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIProtocol$Version_1_0.unmarshallParameter (RMIProtocol.java:471) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIProtocol.readObject (RMIProtocol.java:80) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIProtocol.readValue (RMIProtocol.java:161) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.ServerRmiMessageHandler.handleMethodInvocation (ServerRmiMessageHandler.java:514) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.ServerRmiMessageHandler.handleOrmiRequest (ServerRmiMessageHandler.java:272) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.ServerRmiMessageHandler.dispatchRequest (ServerRmiMessageHandler.java:241) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIServerConnection.processReceivedCommand (RMIServerConnection.java:176) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIConnection.handleCommand (RMIConnection.java:152) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands (RMIConnection.java:127) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIServerConnection.listenForOrmiCommands (RMIServerConnection.java:390) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIConnection.run (RMIConnection.java:107) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run (ReleasableResourcePooledExecutor.java:303) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at java.lang.Thread.run (Thread.java:595) [jre bootstrap, by jre.bootstrap:1.5.0_06]
    Exception in thread "main"
    This is the code i used
         String userId = "oc4jadmin";
         String password = "welcome1";
         String sTaskId = "";
         IWorkflowServiceClient wfSvcClient = WorkflowServiceClientFactory.getWorkflowServiceClient(WorkflowServiceClientFactory.REMOTE_CLIENT);
         System.out.println("Before getting TaskService");
         ITaskQueryService querySvc = wfSvcClient.getTaskQueryService();
         System.out.println("After getting TaskService");
         IWorkflowContext wfCtx = querySvc.authenticate(userId,password,"jazn.com",null);
         System.out.println("Last out");
         Predicate pred = new Predicate(TableConstants.WFTASK_STATE_COLUMN,Predicate.OP_EQ,IWorkflowConstants.TASK_STATE_ASSIGNED);
         List queryColumns = new ArrayList();
         queryColumns.add("TITLE");
         queryColumns.add("PRIORITY");
         queryColumns.add("STATE");
         queryColumns.add("TASKID");
         queryColumns.add("TASKNUMBER");
         List tasks = querySvc.queryTasks(wfCtx,
                   queryColumns,
                   null, //Do not query addtional info
                   ITaskQueryService.ASSIGNMENT_FILTER_MY_AND_GROUP,
                   null, //No keywords
                   pred, //No custom predicate
                   null, //No special ordering
                   0, //Do not page the query result
                   0);
         System.out.println("Task Size !!" +tasks.size());
         if (tasks != null)
         String[] taskList = new String[tasks.size()];
         for (int i=0; i< tasks.size(); i++)
         Task t = (Task)tasks.get(i);
         taskList[i] = t.getSystemAttributes().getTaskId();
         System.out.println("Found task: "+taskList);
         sTaskId = taskList[i];
         else
         System.out.println("Did not find any tasks");
         Task task = querySvc.getTaskDetailsById(wfCtx, sTaskId);
         //Add Attachments
         FileInputStream fs = new FileInputStream("D:/Test.txt");
         ITaskService itask = wfSvcClient.getTaskService();
         MetaData mdata = new MetaData();
         mdata.setMimeType("text/html");
         mdata.setContent("D:/Test.txt");
         mdata.setInputStream(fs);
         mdata.setName("Test Document");
         itask.addAttachment(wfCtx, sTaskId, mdata);
         if (task != null)
         System.out.println("Completing task: "+task.getTitle());
         wfSvcClient.getTaskService().updateTaskOutcome(wfCtx, task, "APPROVE");
    Kindly let me know how to solve this issue.
    Thanks,
    Gomathi

    hi,
    Actually i have used AttachmentType..MetaData is the class which i created for implementing AttachmentType as it is Interface Class. Here is the code of MetaData class.
    public class MetaData implements AttachmentType,java.io.Serializable{
         public String getBoundary() {
              // TODO Auto-generated method stub
              return null;
         public String getContent() {
              // TODO Auto-generated method stub
              return null;
         public InputStream getInputStream() {
              // TODO Auto-generated method stub
              return null;
         public String getMimeType() {
              // TODO Auto-generated method stub
              return null;
         public String getName() {
              // TODO Auto-generated method stub
              return null;
         public String getSystemVersionFlag() {
              // TODO Auto-generated method stub
              return null;
         public String getTaskId() {
              // TODO Auto-generated method stub
              return null;
         public String getURI() {
              // TODO Auto-generated method stub
              return null;
         public String getUpdatedBy() {
              // TODO Auto-generated method stub
              return null;
         public int getVersion() {
              // TODO Auto-generated method stub
              return 0;
         public void setBoundary(String arg0) {
              // TODO Auto-generated method stub
         public void setContent(String arg0) {
              String cont = null;
              cont = arg0;
         public void setInputStream(InputStream arg0) {
              InputStream sStream = null;
              sStream = arg0;
         public void setMimeType(String arg0) {
              String mime = null;
              mime = arg0;
         public void setName(String arg0) {
              String sname = null;
              sname = arg0;
         public void setSystemVersionFlag(String arg0) {
              // TODO Auto-generated method stub
         public void setTaskId(String arg0) {
              // TODO Auto-generated method stub
         public void setURI(String arg0) {
              // TODO Auto-generated method stub
         public void setUpdatedBy(String arg0) {
              // TODO Auto-generated method stub
         public void setVersion(int arg0) {
              // TODO Auto-generated method stub
    kindly tell me how can i solve this issue.
    Thanks,
    Gomathi
    Edited by: user647559 on Sep 23, 2008 10:05 PM

Maybe you are looking for

  • Is there a way to edit text in a smart object brought in from illustrator?

    Is there a way to edit text in a smart object brought in from illustrator? Many thanks for the help! And can anyone recommend learning resources for someone (me) who is an AI user for a decade who needs to work in PS for web mockups? Something other

  • Problems submitting a clob

    Hello, I've a form with three fields that I'm trying to submit to a database table. The third field is displayed as a HTML Editor, and submits to a clob field on the table. Everything works fine when I submit some small amounts of test data, but when

  • Update a JTree from a file

    Hello everyone i have a wee bit of a problem here i have a JTree that gets updated by a text file. That bit works grand when the JTree is loaded it reads the text file and displays the contents now the bother i am having is the user has the option to

  • No more EXPORT (Share) into File

    Hi, without wanting to critizise iPhoto 6, actually, almost everything worked out without issues in my case, I am missing out on one function which I used on iPhoto 5 a lot. The SHARE to FILE function. I really used it a lot to convert a certain amou

  • Creating dynamic filter which shows next 30 days

    Hi, How to create dynamic filter which shows next 30 days? I've tried greater than or equal to TIMESTAMPADD(SQL_TSI_DAY, 30, CURRENT_DATE) but it doesn't work.