axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Fell (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-266) can't serialize a request that contains a derived type
Date Tue, 04 Oct 2005 05:22:48 GMT
can't serialize a request that contains a derived type
------------------------------------------------------

         Key: AXIS2-266
         URL: http://issues.apache.org/jira/browse/AXIS2-266
     Project: Apache Axis 2.0 (Axis2)
        Type: Bug
  Components: client-api  
 Environment: WinXP, JDK 5.0, code from SVN 10/3/2005
    Reporter: Simon Fell
 Attachments: enterprise.wsdl

The WSDL (attached) defines a base type, sObject, and a type that extends it, Account. it
also defines an operation called create which take 0..n sObject's.
Trying to call this operation using the WSDL2Code generated code causes an IllegalStateException.

Exception in thread "main" org.apache.axis2.om.OMException: java.lang.IllegalStateException
	at org.apache.axis2.om.impl.llom.builder.StAXOMBuilder.next(StAXOMBuilder.java:279)
	at org.apache.axis2.om.impl.llom.OMDocumentImpl.getDocumentElement(OMDocumentImpl.java:107)
	at org.apache.axis2.om.impl.llom.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:289)
	at codegen.databinding.SoapcreateDatabindingSupporter.toOM(SoapcreateDatabindingSupporter.java:50)
	at codegen.SoapStub.create(SoapStub.java:1278)
	at client.testEnterpriseClient.main(testEnterpriseClient.java:95)
Caused by: java.lang.IllegalStateException
	at org.apache.xmlbeans.impl.store.Jsr173$XMLStreamReaderForString.next(Jsr173.java:1110)
	at org.apache.xmlbeans.impl.store.Jsr173$SyncedJsr173.next(Jsr173.java:1138)
	at org.apache.axis2.clientapi.StreamWrapper.next(StreamWrapper.java:55)
	at org.apache.axis2.om.impl.llom.builder.StAXOMBuilder.next(StAXOMBuilder.java:197)
	... 5 more

The code is doing
		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 message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message