axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ajith Ranabahu" <ajith.ranab...@gmail.com>
Subject Re: [Axis2]java.lang.IllegalStateException when calling salesforce.com api methods
Date Thu, 31 Aug 2006 00:42:17 GMT
Hi,
I've added the solution to the Jira already. It seems that your code
is missing a crucial assignment statement. If you can post the code
(atleast a piece of it) I'll be happy to correct it for you.
Just to give you an Idea where things might go wrong here is the code
that was listed in the Jira

CreateDocument createDoc = CreateDocument.Factory.newInstance();
Create create = Create.Factory.newInstance();
Account acc = Account.Factory.newInstance();
acc.setName("Axis 2.0/Enterprise");
acc.setAccountNumber("Acc9999");
create.setSObjectsArray(new SObject [] {acc});
SaveResult sr = stub.create(createDoc, sd,
ard).getCreateResponse().getResultArray(0);

This code is missing a crucial statement!
The corrected code is as follows

CreateDocument createDoc = CreateDocument.Factory.newInstance();
Create create = Create.Factory.newInstance();
Account acc = Account.Factory.newInstance();
acc.setName("Axis 2.0/Enterprise");
acc.setAccountNumber("Acc9999");
create.setSObjectsArray(new SObject [] {acc});
*createDoc.setCreate(create);*  <------ the missing assignment
SaveResult sr = stub.create(createDoc, sd,
ard).getCreateResponse().getResultArray(0);

unfortunately XMLBeans does not provide a very meaningful error
message in this case

HTH
Ajith


On 8/30/06, Sidharth Kuruvila <sidharth.kuruvila@gmail.com> wrote:
> I missed this before, someone has already filed a bug report on this one.
>
> http://issues.apache.org/jira/browse/AXIS2-266
>
> The issue seems to be marked as resolved as this is a XMLBeans bug. Some
> clarification might be helpful here.
>



-- 
Ajith Ranabahu

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message