Re: List or object array in response?

2007-02-28 Thread Deepal Jayasinghe
Hi Ronald ;

Can you please attach other relevant code as well the client code .

Thanks
Deepal

 Absolutely, thanks for the quick reply!

 This is my service operation:

 public ListContactDatabaseInfo getDatabases(AuthInfo authInfo)
 {
 ClientDomain client =
 clientDomainManager.findByLabel(authInfo.getOrganization());
 if (client == null) {
 throw new TripolisSecurityException(client not found);
 }

 User user =
 userManager.findByNameAndClientDomainId(authInfo.getUserName(),
 client.getId());
 if (user == null) {
 throw new TripolisSecurityException(user not found);
 }

 ListContactDatabase databases =
 contactDatabaseManager.findByClientDomain(client.getId());
 ArrayListContactDatabaseInfo databaseInfos = new
 ArrayListContactDatabaseInfo();

 for (ContactDatabase database : databases) {
 databaseInfos.add(
 new ContactDatabaseInfo(
 database.getId().getEncryptedStringValue(),
 database.getName()
 )
 );
 }
 return databaseInfos;
 }

 Note: The returning of an actual ArrayList I got from a posting on the
 mailing list. Before I tried to return an Array and a List of
 ContactDatabaseInfo objects.

 With the use of Spring I have public setters in my service class
 (managers that are injected) which are exposed in the generated wsdl,
 so I use a custom wsdl where I removed these sertters:

 wsdl:definitions
 xmlns:axis2=http://services.tripolis.com;
 xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/;
 xmlns:http=http://schemas.xmlsoap.org/wsdl/http/;
 xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/;
 xmlns:ns0=http://model.services.tripolis.com/xsd;
 xmlns:ns1=http://security.business.tripolis.com/xsd;
 xmlns:ns3=http://datamanager.contact.business.tripolis.com/xsd;
 xmlns:ns2=http://services.tripolis.com/xsd;
 xmlns:xs=http://www.w3.org/2001/XMLSchema;
 xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
 xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
 targetNamespace=http://services.tripolis.com;

 wsdl:documentationPrototype of the dialogue
 service/wsdl:documentation
 wsdl:types

 xs:schema xmlns:ax22=http://model.services.tripolis.com/xsd;
 targetNamespace=http://model.services.tripolis.com/xsd;
 attributeFormDefault=qualified elementFormDefault=qualified
 xs:element name=AuthInfo type=ax22:AuthInfo /
 xs:complexType name=AuthInfo
 xs:sequence
 xs:element name=organization type=xs:string
 nillable=true /
 xs:element name=userName type=xs:string
 nillable=true /
 xs:element name=password type=xs:string
 nillable=true /
 /xs:sequence
 /xs:complexType
 xs:element name=ContactDatabaseInfo
 type=ax22:ContactDatabaseInfo /
 xs:complexType name=ContactDatabaseInfo
 xs:sequence
 xs:element name=id type=xs:string
 nillable=true /
 xs:element name=name type=xs:string
 nillable=true /
 xs:element name=fieldDescriptors
 maxOccurs=unbounded type=xs:string nillable=true /
 xs:element name=fieldGroups
 maxOccurs=unbounded type=xs:string nillable=true /
 xs:element name=defaultFieldGroupId
 type=xs:string nillable=true /
 /xs:sequence
 /xs:complexType
 /xs:schema

 xs:schema xmlns:ns=http://services.tripolis.com/xsd;
 targetNamespace=http://services.tripolis.com/xsd;
 attributeFormDefault=qualified elementFormDefault=qualified
 xs:element name=getDatabases
 xs:complexType
 xs:sequence
 xs:element name=authInfo
 type=ns0:AuthInfo nillable=true /
 /xs:sequence
 /xs:complexType
 /xs:element
 xs:element name=getDatabasesResponse
 xs:complexType
 xs:sequence
 xs:element name=return
 maxOccurs=unbounded type=ns0:ContactDatabaseInfo nillable=true /
 /xs:sequence
 /xs:complexType
 /xs:element
 /xs:schema
 /wsdl:types

 wsdl:message name=getDatabasesMessage
 wsdl:part name=part1 element=ns2:getDatabases /
 /wsdl:message
 wsdl:message name=getDatabasesResponse
 wsdl:part name=part1 element=ns2:getDatabasesResponse /
 /wsdl:message

 wsdl:portType name=DialogueServicePortType
 wsdl:operation name=getDatabases
 wsdl:input
 xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl;
 message=axis2:getDatabasesMessage 

Re: List or object array in response?

2007-02-28 Thread Ronald Pieterse

Here's my services.xml too :-)

/serviceGroup
   service name=DialogueService
   descriptionPrototype of the dialogue service/description
  
   messageReceivers
   messageReceiver 
mep=http://www.w3.org/2004/08/wsdl/in-only;
   
class=org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver /

   messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-out;
   
class=org.apache.axis2.rpc.receivers.RPCMessageReceiver /
   /messageReceivers   
  
   parameter name=ServiceObjectSupplier locked=false
   
org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier

   /parameter
  
   parameter name=SpringBeanName 
locked=falsedialogueService/parameter
   operation name=getDatabases 
mep=http://www.w3.org/2004/08/wsdl/in-out; /
  
   /service

/serviceGroup

Ronald

Deepal Jayasinghe wrote:

Hi Ronald;

Can you please send us the source code , that will help us to find out
the issue.

Thanks
Deepal

  

Hello,

After working with Axis1.x for some time now I just started working
with Axis2. It works pretty nice out of the box until I tried
returning a List or Array of objects.
I read in some posting that I should get the latest snapshot release
to get this working but that did not help.
I get:* IllegalArgumentException: null rcl*

Does anyone know how I can resolve this? Returning a String or a
complex object works fine by the way.

specs:
I work /code first/; I have a simple webservice operation that should
return a List or an Array of objects. That's it.

Roepie




  




Re: List or object array in response?

2007-02-28 Thread Ronald Pieterse
I just sent my services.xml and here's my client code. That's all. It's 
the most basic way of creating a webservice, right?


Just to make clear: everything works fine apart from returning an Array 
or List. So the Spring connection and returning a string works good.


  ...
   DialogueServiceStub stub = new DialogueServiceStub();
   DialogueServiceStub.GetDatabases getDatabases = new 
DialogueServiceStub.GetDatabases();
  
   AuthInfo authInfo = new AuthInfo();

   authInfo.setOrganization(haralds company);
   authInfo.setUserName([EMAIL PROTECTED]);
   authInfo.setPassword(Ronald1);
   getDatabases.setAuthInfo(authInfo);
  
   DialogueServiceStub.GetDatabasesResponse response = 
stub.getDatabases(getDatabases);

   for (ContactDatabaseInfo databaseInfo : response.get_return())
   {
   System.out.println(db name:  + databaseInfo.getName());
   }
  ...

Ronald

Deepal Jayasinghe wrote:

Hi Ronald ;

Can you please attach other relevant code as well the client code .

Thanks
Deepal

  

Absolutely, thanks for the quick reply!

This is my service operation:

public ListContactDatabaseInfo getDatabases(AuthInfo authInfo)
{
ClientDomain client =
clientDomainManager.findByLabel(authInfo.getOrganization());
if (client == null) {
throw new TripolisSecurityException(client not found);
}
   
User user =

userManager.findByNameAndClientDomainId(authInfo.getUserName(),
client.getId());
if (user == null) {
throw new TripolisSecurityException(user not found);
}
   
ListContactDatabase databases =

contactDatabaseManager.findByClientDomain(client.getId());
ArrayListContactDatabaseInfo databaseInfos = new
ArrayListContactDatabaseInfo();
   
for (ContactDatabase database : databases) {

databaseInfos.add(
new ContactDatabaseInfo(
database.getId().getEncryptedStringValue(),
database.getName()
)
);
}
return databaseInfos;
}

Note: The returning of an actual ArrayList I got from a posting on the
mailing list. Before I tried to return an Array and a List of
ContactDatabaseInfo objects.

With the use of Spring I have public setters in my service class
(managers that are injected) which are exposed in the generated wsdl,
so I use a custom wsdl where I removed these sertters:

wsdl:definitions
xmlns:axis2=http://services.tripolis.com;
xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/;
xmlns:http=http://schemas.xmlsoap.org/wsdl/http/;
xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/;
xmlns:ns0=http://model.services.tripolis.com/xsd;
xmlns:ns1=http://security.business.tripolis.com/xsd;
xmlns:ns3=http://datamanager.contact.business.tripolis.com/xsd;
xmlns:ns2=http://services.tripolis.com/xsd;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
targetNamespace=http://services.tripolis.com;
   
wsdl:documentationPrototype of the dialogue

service/wsdl:documentation
wsdl:types
   
xs:schema xmlns:ax22=http://model.services.tripolis.com/xsd;

targetNamespace=http://model.services.tripolis.com/xsd;
attributeFormDefault=qualified elementFormDefault=qualified
xs:element name=AuthInfo type=ax22:AuthInfo /
xs:complexType name=AuthInfo
xs:sequence
xs:element name=organization type=xs:string
nillable=true /
xs:element name=userName type=xs:string
nillable=true /
xs:element name=password type=xs:string
nillable=true /
/xs:sequence
/xs:complexType
xs:element name=ContactDatabaseInfo
type=ax22:ContactDatabaseInfo /
xs:complexType name=ContactDatabaseInfo
xs:sequence
xs:element name=id type=xs:string
nillable=true /
xs:element name=name type=xs:string
nillable=true /
xs:element name=fieldDescriptors
maxOccurs=unbounded type=xs:string nillable=true /
xs:element name=fieldGroups
maxOccurs=unbounded type=xs:string nillable=true /
xs:element name=defaultFieldGroupId
type=xs:string nillable=true /
/xs:sequence
/xs:complexType
/xs:schema
   
xs:schema xmlns:ns=http://services.tripolis.com/xsd;

targetNamespace=http://services.tripolis.com/xsd;
attributeFormDefault=qualified elementFormDefault=qualified
xs:element name=getDatabases
xs:complexType
xs:sequence
xs:element name=authInfo
type=ns0:AuthInfo nillable=true /
/xs:sequence

Re: List or object array in response?

2007-02-28 Thread Ronald Pieterse
After some more research I discovered that it does have to do with the 
spring involvement; I get the *java.lang.IllegalArgumentException: null 
rcl* when I try to return a custom object array like an arry of 
ContactDatabaseInfo objects.
Only then does it fail. When I try to return an array of Strings it 
works fine.


Any thoughts on that?

Deepal Jayasinghe wrote:

Hi Ronald ;

Can you please attach other relevant code as well the client code .

Thanks
Deepal

  

Absolutely, thanks for the quick reply!

This is my service operation:

public ListContactDatabaseInfo getDatabases(AuthInfo authInfo)
{
ClientDomain client =
clientDomainManager.findByLabel(authInfo.getOrganization());
if (client == null) {
throw new TripolisSecurityException(client not found);
}
   
User user =

userManager.findByNameAndClientDomainId(authInfo.getUserName(),
client.getId());
if (user == null) {
throw new TripolisSecurityException(user not found);
}
   
ListContactDatabase databases =

contactDatabaseManager.findByClientDomain(client.getId());
ArrayListContactDatabaseInfo databaseInfos = new
ArrayListContactDatabaseInfo();
   
for (ContactDatabase database : databases) {

databaseInfos.add(
new ContactDatabaseInfo(
database.getId().getEncryptedStringValue(),
database.getName()
)
);
}
return databaseInfos;
}

Note: The returning of an actual ArrayList I got from a posting on the
mailing list. Before I tried to return an Array and a List of
ContactDatabaseInfo objects.

With the use of Spring I have public setters in my service class
(managers that are injected) which are exposed in the generated wsdl,
so I use a custom wsdl where I removed these sertters:

wsdl:definitions
xmlns:axis2=http://services.tripolis.com;
xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/;
xmlns:http=http://schemas.xmlsoap.org/wsdl/http/;
xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/;
xmlns:ns0=http://model.services.tripolis.com/xsd;
xmlns:ns1=http://security.business.tripolis.com/xsd;
xmlns:ns3=http://datamanager.contact.business.tripolis.com/xsd;
xmlns:ns2=http://services.tripolis.com/xsd;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
targetNamespace=http://services.tripolis.com;
   
wsdl:documentationPrototype of the dialogue

service/wsdl:documentation
wsdl:types
   
xs:schema xmlns:ax22=http://model.services.tripolis.com/xsd;

targetNamespace=http://model.services.tripolis.com/xsd;
attributeFormDefault=qualified elementFormDefault=qualified
xs:element name=AuthInfo type=ax22:AuthInfo /
xs:complexType name=AuthInfo
xs:sequence
xs:element name=organization type=xs:string
nillable=true /
xs:element name=userName type=xs:string
nillable=true /
xs:element name=password type=xs:string
nillable=true /
/xs:sequence
/xs:complexType
xs:element name=ContactDatabaseInfo
type=ax22:ContactDatabaseInfo /
xs:complexType name=ContactDatabaseInfo
xs:sequence
xs:element name=id type=xs:string
nillable=true /
xs:element name=name type=xs:string
nillable=true /
xs:element name=fieldDescriptors
maxOccurs=unbounded type=xs:string nillable=true /
xs:element name=fieldGroups
maxOccurs=unbounded type=xs:string nillable=true /
xs:element name=defaultFieldGroupId
type=xs:string nillable=true /
/xs:sequence
/xs:complexType
/xs:schema
   
xs:schema xmlns:ns=http://services.tripolis.com/xsd;

targetNamespace=http://services.tripolis.com/xsd;
attributeFormDefault=qualified elementFormDefault=qualified
xs:element name=getDatabases
xs:complexType
xs:sequence
xs:element name=authInfo
type=ns0:AuthInfo nillable=true /
/xs:sequence
/xs:complexType
/xs:element
xs:element name=getDatabasesResponse
xs:complexType
xs:sequence
xs:element name=return
maxOccurs=unbounded type=ns0:ContactDatabaseInfo nillable=true /
/xs:sequence
/xs:complexType
/xs:element
/xs:schema
/wsdl:types
   
wsdl:message name=getDatabasesMessage

wsdl:part name=part1 element=ns2:getDatabases /
/wsdl:message
wsdl:message name=getDatabasesResponse
wsdl:part name=part1 

List or object array in response?

2007-02-27 Thread Ronald Pieterse

Hello,

After working with Axis1.x for some time now I just started working with 
Axis2. It works pretty nice out of the box until I tried returning a 
List or Array of objects.
I read in some posting that I should get the latest snapshot release to 
get this working but that did not help.

I get:* IllegalArgumentException: null rcl*

Does anyone know how I can resolve this? Returning a String or a complex 
object works fine by the way.


specs:
I work /code first/; I have a simple webservice operation that should 
return a List or an Array of objects. That's it.


Roepie


Re: List or object array in response?

2007-02-27 Thread Deepal Jayasinghe
Hi Ronald;

Can you please send us the source code , that will help us to find out
the issue.

Thanks
Deepal

 Hello,

 After working with Axis1.x for some time now I just started working
 with Axis2. It works pretty nice out of the box until I tried
 returning a List or Array of objects.
 I read in some posting that I should get the latest snapshot release
 to get this working but that did not help.
 I get:* IllegalArgumentException: null rcl*

 Does anyone know how I can resolve this? Returning a String or a
 complex object works fine by the way.

 specs:
 I work /code first/; I have a simple webservice operation that should
 return a List or an Array of objects. That's it.

 Roepie


-- 
Thanks,
Deepal

The highest tower is built one brick at a time



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]