• Blandger
  • NEWBIE
  • 0 Points
  • Member since 2005

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 16
    Replies
Hi all.

I need create SoapBindingStub object w/o calling

LoginResult lr = binding.login(userName, password);

I need to avoid the 'full scenario':

SoapBindingStub binding = (SoapBindingStub) new SforceServiceLocator().getSoap();
LoginResult lr = binding.login(userName, password);
binding = (SoapBindingStub) new SforceServiceLocator().getSoap(new URL(lr.getServerUrl()));
_SessionHeader sh = new _SessionHeader();
sh.setSessionId(lr.getSessionId());
binding.setHeader(new SforceServiceLocator().getServiceName().getNamespaceURI(), "SessionHeader", sh);


The main idea is:
I want to recieve session ID value from the web-link then I want to create correct/working SoapBindingStub object WITHOUT invocation binding.login(userName, password) method.

is is possible to do? How is better accomplish it?

Now I'm trying something like that:

SforceServiceLocator locator = new SforceServiceLocator();
System.out.println("----- service URL is = " + locator.getSoapAddress()); // URL is correct !
binding = (SoapBindingStub) locator.getSoap();

// I can try to make a dummy call but it doesn't help
// binding.describeGlobal();

_SessionHeader sh = new _SessionHeader();
sh.setSessionId(sessionId);
binding.setHeader(new SforceServiceLocator().getServiceName().getNamespaceURI(), "SessionHeader", sh);

I'm getting error (on the dummy binding.describeGlobal() or on the real subseqWS call):

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
faultSubcode:
faultString: Destination URL not reset. The URL returned from login must be set in the SforceService
faultActor:
faultNode:
faultDetail:
{urn:fault.enterprise.soap.sforce.com}fault: UNKNOWN_EXCEPTIONtionCode> Destination URL not reset. The URL returned from login must be set in the SforceService
Destination URL not reset. The URL returned from login must be set in th
e SforceService
I want to get 'User' that is in the 'Sales Team' list for the particular Opportunity. User has already assigned to the Opportunity using WEB-UI.

How to check if it exists and get it using WS API? I'd like to get it using 'OpportunityId' and 'Team Role' name for it.



There is little info about 'OpportunityTeamMember' in the API book. I suppose 'OpportunityTeamMember' should be used in my case. Correct me if I'm wrong.

-----------
'OpportunityTeamMember' - Represents an individual User on the sales team of a particular Opportunity.
For a complete list of fields in this object, see the Enterprise WSDL...

OpportunityTeamMember Fields:
OpportunityId, UserId, TeamMemberRole

In the salesforce.com user interface, users can set up a sales team for the opportunities they own. The sales team includes other users that are working on the Opportunity with them. The OpportunityTeamMember object is available only in organizations that have enabled the team selling functionality.
-----------

What doest it mean (The OpportunityTeamMember object is available only in organizations that have enabled the team selling functionality) ?

There is no 'OpportunityTeamMember' in the WSDL. I can't make a query for that entity as I'm getting error 'no deserialiser for the OpportunityTeamMember' (it's correct).

How can I get such 'Sales team member' having 'OpportunityId' and 'Team Role' name correctly?

Hi all.

I just want to know if it's possible to use Jboss's Axis 1.1 version? What are problems I can encounter using Axis 1.1 supplied with Jboss 4.0.1? Are there some known pitfalls?

Now I'm trying to compile sforce quick start example using that Axis vesrsion. I got compile error in the 'login method'.

It says the signature is unknown for the code:

binding.setHeader(new SforceServiceLocator().getServiceName().getNamespaceURI(), "SessionHeader", sh);

// for the original code also

binding.setHeader("SforceService", "SessionHeader", sh);

How can I resolve it? If I try to change it like that:

binding.setHeader(new SforceServiceLocator().getServiceName().getNamespaceURI(), "SessionHeader", sh.toString());

I'm getting 'Session Id is invalid' error. I'm sure I doing something wrong but can't get it. I tried example code using Axis 1.2RC2 library. The code compiles and runs correctly. What is wrong?

Thank you.

I want to get 'User' that is in the 'Sales Team' list for the particular Opportunity. User has already assigned to the Opportunity using WEB-UI.

How to check if it exists and get it using WS API? I'd like to get it using 'OpportunityId' and 'Team Role' name for it.



There is little info about 'OpportunityTeamMember' in the API book. I suppose 'OpportunityTeamMember' should be used in my case. Correct me if I'm wrong.

-----------
'OpportunityTeamMember' - Represents an individual User on the sales team of a particular Opportunity.
For a complete list of fields in this object, see the Enterprise WSDL...

OpportunityTeamMember Fields:
OpportunityId, UserId, TeamMemberRole

In the salesforce.com user interface, users can set up a sales team for the opportunities they own. The sales team includes other users that are working on the Opportunity with them. The OpportunityTeamMember object is available only in organizations that have enabled the team selling functionality.
-----------

What doest it mean (The OpportunityTeamMember object is available only in organizations that have enabled the team selling functionality) ?

There is no 'OpportunityTeamMember' in the WSDL. I can't make a query for that entity as I'm getting error 'no deserialiser for the OpportunityTeamMember' (it's correct).

How can I get such 'Sales team member' having 'OpportunityId' and 'Team Role' name correctly?

Hi all.

I just want to know if it's possible to use Jboss's Axis 1.1 version? What are problems I can encounter using Axis 1.1 supplied with Jboss 4.0.1? Are there some known pitfalls?

Now I'm trying to compile sforce quick start example using that Axis vesrsion. I got compile error in the 'login method'.

It says the signature is unknown for the code:

binding.setHeader(new SforceServiceLocator().getServiceName().getNamespaceURI(), "SessionHeader", sh);

// for the original code also

binding.setHeader("SforceService", "SessionHeader", sh);

How can I resolve it? If I try to change it like that:

binding.setHeader(new SforceServiceLocator().getServiceName().getNamespaceURI(), "SessionHeader", sh.toString());

I'm getting 'Session Id is invalid' error. I'm sure I doing something wrong but can't get it. I tried example code using Axis 1.2RC2 library. The code compiles and runs correctly. What is wrong?

Thank you.

Hi,

I'm trying to query tasks (just one simple select statement) and I get this error below.

Source:

  private void getTasks() {

      final Double UNO = new Double(1.0);

      //check to see if we are already logged in
      if (lr == null) {
        System.out.println("Run the login sample before the others.\n");
        getUserInput("Hit enter to continue: ");
        System.out.println("\n");
        return;
      }

      //create a variable to hold the query result
      QueryResult qr = null;

      //TO SELECT THE OPPORTUNITY MODIFIED TODAY
      QueryResult qr1 = null;

      // Call the query saving the results in qr
      String sqlquery =
          "select whatId, time25Increments__c, billable_Status__c from Task "

          + " where billable_Status__c='Billable'";
      try {
        qr = binding.query(sqlquery);
      }
      catch (UnexpectedErrorFault uef) {
        System.out.println(uef.getExceptionMessage() + "\n\n");
        return;
      }
      catch (Exception e) {
        e.printStackTrace();
        System.out.println("\n\n");
        return;
      }

      if (qr != null) {
      SObject[] records = qr.getRecords();
      System.out.println( "THE LENGTH RETURNED IS = " + records.length);
      //we can loop through the returned records
      for (int i = 0; i < records.length; i++) {
        //Because we asked for accounts we will convert
        //the SObject for each record into an Account object
        Task task = (Task) records[i];

        //Now we can access any of the fields we had in the query
        //select clause directly from the account variable
        System.out.print(new Integer(i).toString() + ". ");
        System.out.print("WHAT ID "+ task.getWhatId() + " - ");
        System.out.print("time25Increments__c "+ task.getTime25Increments__c() + " - ");
        System.out.print("getBillable_Status__c "+ task.getBillable_Status__c() + " - ");
      }
      System.out.println("");
    }

 

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.net.SocketTimeoutException: Read timed out
 faultActor:
 faultNode:
 faultDetail:
        {http://xml.apache.org/axis/}stackTrace: java.net.SocketTimeoutException Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:129)
        at com.sun.net.ssl.internal.ssl.InputRecord.a(DashoA6275)
        at com.sun.net.ssl.internal.ssl.InputRecord.read(DashoA6275)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
        at com.sun.net.ssl.internal.ssl.AppInputStream.read(DashoA6275)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
        at org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(HTTPS
ender.java:506)
        at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:127)

        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg
y.java:71)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
        at org.apache.axis.client.Call.invoke(Call.java:2553)
        at org.apache.axis.client.Call.invoke(Call.java:2248)
        at org.apache.axis.client.Call.invoke(Call.java:2171)
        at org.apache.axis.client.Call.invoke(Call.java:1691)
        at com.sforce.soap.enterprise.SoapBindingStub.query(SoapBindingStub.java1386)
        at com.salesforce.quickstart.products.getTasks(products.java:589)
        at com.salesforce.quickstart.products.&lt;init&gt;(products.java:77)
        at com.salesforce.quickstart.products.main(products.java:55)

java.net.SocketTimeoutException: Read timed out
        at org.apache.axis.AxisFault.makeFault(AxisFault.java:129)
        at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:131)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg
y.java:71)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
        at org.apache.axis.client.Call.invoke(Call.java:2553)
        at org.apache.axis.client.Call.invoke(Call.java:2248)
        at org.apache.axis.client.Call.invoke(Call.java:2171)
        at org.apache.axis.client.Call.invoke(Call.java:1691)
        at com.sforce.soap.enterprise.SoapBindingStub.query(SoapBindingStub.java1386)
        at com.salesforce.quickstart.products.getTasks(products.java:589)
        at com.salesforce.quickstart.products.<init>(products.java:77)
        at com.salesforce.quickstart.products.main(products.java:55)
Caused by: java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:129)
        at com.sun.net.ssl.internal.ssl.InputRecord.a(DashoA6275)
        at com.sun.net.ssl.internal.ssl.InputRecord.read(DashoA6275)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
        at com.sun.net.ssl.internal.ssl.AppInputStream.read(DashoA6275)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
        at org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(HTTPS
ender.java:506)
        at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:127)
        ... 13 more