• priyankasingla3101.3916265522429534E12
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 12
    Replies
Hi,
I have a pushtopic in salesforce that has been created with version 31.0, now my Salesforce version has been upgraded to 32.0. Does the change in the version affect the subscriptions anyhow?
Exactly what I want to know is, what is the use of apiVersion field of Pushtopic, where does it come into picture?

Thanks
Priyanka Gupta
Hi,

My web service is authentication enabled in the sense that the SOAP request it receives should also contain SOAP authentication headers along with the SOAP body.
Using outbound messaging option on Salesforce.com is there any provision wherein I can send these authentication headers to an external web service.

Regards,
Priyanka Gupta
Hi
I installed some apps in my salesforce account from appExchange. These apps provides me some operations, for example, there is one app which provides some operations e.g. mass update, mass delete etc.
But when I generate enterprise/partner WSDL, I cannot see these custom operations that are provided by any installed apps. Enterprise/partner WSDL pnly contains the standard salesforce operations.
Is there any way to include these operations in enterprise/partner WSDL, or to generate a custom WSDL that contains these custom operations?

Hi,
I am trying to create a PricebookEntry in my apex code, but it is giving me the following error:

Error: Compile Error: Invalid constructor syntax, name=value pairs can only be used for SObjects

Here is my code:
 

1.Pricebook2 pb = [select Id, IsActive from PriceBook2 where IsStandard=True];

 2. Product2 p1 = new Product2(Name='Prod 1', Family='Container', Description='Prod 1 Description');
 3. insert p1;
            
 // Create a pricebook entry
 4. PricebookEntry pbe = new PricebookEntry (Pricebook2Id=pb.id, Product2Id=p1.id, IsActive=true, UnitPrice=100.0);
 5. insert pbe;
I am getting this error at Line 4. PricebookEntry is a standard object in Salesforce, but I am not able to understand why I am getting this error.

Any help will be appreciated.


 

Hi,

Salesforce provides some standard SOAP headers such as AllowFieldTruncationHeader, MruHeader etc.

But can we create custom headers using apex code, so that they would be visible in the custom WSDL that gets generated from that APEX code?
Hi,

From last few days, I am working on Apex code to generate custom WSDL which includes custom operations. I want to have <documentation> for each custom operation in my custom WSDL, so that the one who is consuming that WSDL comes to know what these operations do. Salesforce Enterprise WSDL does contain <documentation> for each operation, and I want to do the same for custom WSDL.

I tries adding @Desciption annotation in my Apex code to see if it comes as <documentation> in WSDL for that particular operation,  but it didn't work.
Please help me out how to do that.

Thanks in advance
Hi,

Salesforce provides some standard SOAP headers such as AllowFieldTruncationHeader, MruHeader etc.

But can we create custom headers using apex code, so that they would be visible in the custom WSDL that gets generated from that APEX code?
Hi,

From last few days, I am working on Apex code to generate custom WSDL which includes custom operations. I want to have <documentation> for each custom operation in my custom WSDL, so that the one who is consuming that WSDL comes to know what these operations do. Salesforce Enterprise WSDL does contain <documentation> for each operation, and I want to do the same for custom WSDL.

I tries adding @Desciption annotation in my Apex code to see if it comes as <documentation> in WSDL for that particular operation,  but it didn't work.
Please help me out how to do that.

Thanks in advance
hello all,

I deployed bpel, jca reference to soa server.  When i try to test web service that interacts with salesforce, shows error

java.lang.Exception: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Client received SOAP Fault from server : Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'query' failed due to: Unable to create Cloud Operation: ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestModel.java:813) at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:385) at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:302) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.el.parser.AstValue.invoke(AstValue.java:187) at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297) at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53) at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1415) at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96) at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:103) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96) at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:97) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:957) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:427) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:207) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.emSDK.license.LicenseFilter.doFilter(LicenseFilter.java:101) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:128) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446) at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177) at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.help.web.rich.OHWFilter.doFilter(Unknown Source) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.emas.fwk.MASConnectionFilter.doFilter(MASConnectionFilter.java:41) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.AuditServletFilter.doFilter(AuditServletFilter.java:179) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.EMRepLoginFilter.doFilter(EMRepLoginFilter.java:203) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.core.model.targetauth.EMLangPrefFilter.doFilter(EMLangPrefFilter.java:158) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.core.app.perf.PerfFilter.doFilter(PerfFilter.java:141) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:542) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119) at java.security.AccessController.doPrivileged(Native Method) at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324) at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460) at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103) at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171) at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256) at weblogic.work.ExecuteThread.run(ExecuteThread.java:221) Caused by: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Client received SOAP Fault from server : Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'query' failed due to: Unable to create Cloud Operation: ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. at oracle.sysman.emSDK.webservices.wsdlapi.dispatch.DispatchUtil.invoke(DispatchUtil.java:362) at oracle.sysman.emSDK.webservices.wsdlparser.OperationInfoImpl.invokeWithDispatch(OperationInfoImpl.java:1004) at oracle.sysman.emas.model.wsmgt.PortName.invokeOperation(PortName.java:750) at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestModel.java:807) ... 79 more Caused by: oracle.j2ee.ws.client.jaxws.JRFSOAPFaultException: Client received SOAP Fault from server : Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'query' failed due to: Unable to create Cloud Operation: ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. at oracle.j2ee.ws.client.jaxws.DispatchImpl.throwJAXWSSoapFaultException(DispatchImpl.java:1053) at oracle.j2ee.ws.client.jaxws.DispatchImpl.invoke(DispatchImpl.java:839) at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.synchronousInvocationWithRetry(OracleDispatchImpl.java:235) at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.invoke(OracleDispatchImpl.java:106) at oracle.sysman.emSDK.webservices.wsdlapi.dispatch.DispatchUtil.invoke(DispatchUtil.java:358) ... 82 more

Hi
I installed some apps in my salesforce account from appExchange. These apps provides me some operations, for example, there is one app which provides some operations e.g. mass update, mass delete etc.
But when I generate enterprise/partner WSDL, I cannot see these custom operations that are provided by any installed apps. Enterprise/partner WSDL pnly contains the standard salesforce operations.
Is there any way to include these operations in enterprise/partner WSDL, or to generate a custom WSDL that contains these custom operations?

Hi,
I am trying to create a PricebookEntry in my apex code, but it is giving me the following error:

Error: Compile Error: Invalid constructor syntax, name=value pairs can only be used for SObjects

Here is my code:
 

1.Pricebook2 pb = [select Id, IsActive from PriceBook2 where IsStandard=True];

 2. Product2 p1 = new Product2(Name='Prod 1', Family='Container', Description='Prod 1 Description');
 3. insert p1;
            
 // Create a pricebook entry
 4. PricebookEntry pbe = new PricebookEntry (Pricebook2Id=pb.id, Product2Id=p1.id, IsActive=true, UnitPrice=100.0);
 5. insert pbe;
I am getting this error at Line 4. PricebookEntry is a standard object in Salesforce, but I am not able to understand why I am getting this error.

Any help will be appreciated.


 

Hi,

From last few days, I am working on Apex code to generate custom WSDL which includes custom operations. I want to have <documentation> for each custom operation in my custom WSDL, so that the one who is consuming that WSDL comes to know what these operations do. Salesforce Enterprise WSDL does contain <documentation> for each operation, and I want to do the same for custom WSDL.

I tries adding @Desciption annotation in my Apex code to see if it comes as <documentation> in WSDL for that particular operation,  but it didn't work.
Please help me out how to do that.

Thanks in advance

Hi everyone,

 

This question is for anyone that has implemented the Salesforce streaming client in Java. I am looking to find sugestions on the proper way to implement reconnect logic for the Java client. The code that is provided by Salesforce (in the StreamingClientExample.java class) has several listener methods that get events which tell the client whether or not a message was successful. In this code, if there is a failure, the client simply exits and I need logic that will attempt to reconnect the client x number of times.

 

>>> CODE PROVIDED BY SALESFORCE

 

        client.getChannel(Channel.META_CONNECT).addListener(
            new ClientSessionChannel.MessageListener() {
            public void onMessage(ClientSessionChannel channel, Message message) {

                System.out.println("[CHANNEL:META_CONNECT]: " + message);

                boolean success = message.isSuccessful();
                if (!success) {
                    String error = (String) message.get("error");
                    if (error != null) {
                        System.out.println("Error during CONNECT: " + error);
                        System.out.println("Exiting...");
                        System.exit(1);
                    }
                }
            }
        });

 

I am considering putting the reconnect CALL in this method, like in the sample below, and I am wondering if anyone has done this and has come accross any issues with doing it this way. In particular, the kind of issues I am trying to avoid are inefficient loops where the client keeps trying to connect and fails, any threading issues, etc.

 

>>>> PROPOSED RECONNECT CALL:

 

    public void addConnectListener(BayeuxClient client) {
        client.getChannel(Channel.META_CONNECT).addListener(
                new ClientSessionChannel.MessageListener() {
                    public void onMessage(ClientSessionChannel channel,
                            Message message) {

                        logger.info("[CHANNEL:META_CONNECT]: " + message);

                        boolean success = message.isSuccessful();
                        if (!success) {
                            String error = (String) message.get("error");
                            if (error != null) {
                                logger.error("Error during CONNECT: " + error);

                                exception = true;
                                try {
                                    reconnect(message);
                                } catch (FatalStreamingErrorException e) {
                                    throw new RuntimeException(e.getMessage());
                                }
                            }
                        }
                    }
                });
    }

 

Thanks in advance!

Hi all!,

 

I'm trying to add a pricebook entry for each of the products I'm setting as active, but at the time of executing the scheduled code, the System Log gives me the error "PricebookEntry.Product2Id field is not writeable". How can I insert a pricebook entry then? I supose It is possible using Apex...

 

Here is my code:

 

 	List<Product2> prods=Database.query(queryStr1);
         
        for(Product2 p:prods){
            
            p.isActive=TRUE;

            PricebookEntry pricebookEntryItem = new PricebookEntry(Pricebook2Id='01s20000000Hfx5AAC');
            pricebookEntryItem.Product2Id=p.Id;
            pricebookEntryItem.UnitPrice=0;
            pricebookEntryItem.UseStandardPrice=TRUE;
            insert pricebookEntryItem;
            
        } update prods;

 

Any ideas/work arounds are more than welcome.

 

Thank you,

 

MGA