hi folks, I created a web service returning an array of beans.
The bean is called ‘Con’, the service itself is called
‘ConService’. The corresponding entry in my server-config.wsdd
looks like the following: <service name="ConService"
provider="java:RPC"> <parameter name="allowedMethods"
value="*" /> <parameter
name="className" value="com.xcell.ConService" /> <beanMapping
qname="ns:Con" xmlns:ns="http://xxx/webservices" languageSpecificType="java:com.xcell.Con"
/> <typeMapping
qname="ns:ArrayOfCon" xmlns:ns="http://xxx/webservices" type="java:com.xcell.Con[]" serializer="org.apache.axis.encoding.ser.ArraySerializerFactory" deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
/> </service> For the xmlns:ns entries in both <beanMapping>
and <typemapping> I chose an arbitrary address that does not really exist
(you can’t access it from a web browser, perhaps this is my first
mistake?) The wsdl-file then looks like this: <types> <schema
xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace=”xxxrealAddressxxx"> <import
namespace="http://xxx/webservices"/> <import
namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <complexType name="ArrayOf_soapenc_string"> <complexContent> <restriction
base="soapenc:Array"> <attribute ref="soapenc:arrayType"
wsdl:arrayType="soapenc:string[]"/> </restriction> </complexContent> </complexType> </schema> <schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://xxx/webservices"> <import namespace="http://xxxrealAdressxxx"/> <import
namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <complexType name="Con"> <sequence> <element name="abbreviation"
nillable="true" type="soapenc:string"/> <element name="city"
nillable="true" type="soapenc:string"/> <element name="country"
nillable="true" type="soapenc:string"/> <element name="dateFrom"
nillable="true" type="soapenc:string"/> <element name="dateTo"
nillable="true" type="soapenc:string"/> <element name="venue"
nillable="true" type="soapenc:string"/> <element name="website"
nillable="true" type="soapenc:string"/> </sequence> </complexType> <complexType name="ArrayOfCon"> <complexContent> <restriction
base="soapenc:Array"> <attribute ref="soapenc:arrayType"
wsdl:arrayType="tns1:Con[]"/> </restriction> </complexContent> </complexType> </schema> </types> … <wsdl:message name="getConInfoRequest2"> <wsdl:part
name="in0" type="xsd:int"/> </wsdl:message> <wsdl:message
name="getConInfoResponse2"> <wsdl:part
name="getConInfoReturn" type="tns1:ArrayOfCon"/> </wsdl:message> As is changed the xmlns:ns entries to the address the
web service is actually located the wsdl looks like this <types> <schema
xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace=”xxxrealAddressxxx"> <import
namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <complexType
name="ArrayOf_soapenc_string"> <complexContent> <restriction
base="soapenc:Array"> <attribute ref="soapenc:arrayType"
wsdl:arrayType="soapenc:string[]"/> </restriction> </complexContent> </complexType> <complexType name="Con"> <sequence> <element name="abbreviation"
nillable="true" type="soapenc:string"/> <element name="city"
nillable="true" type="soapenc:string"/> <element name="country"
nillable="true" type="soapenc:string"/> <element name="dateFrom"
nillable="true" type="soapenc:string"/> <element name="dateTo"
nillable="true" type="soapenc:string"/> <element name="venue"
nillable="true" type="soapenc:string"/> <element name="website"
nillable="true" type="soapenc:string"/> </sequence> </complexType> <complexType name="ArrayOfCon"> <complexContent> <restriction
base="soapenc:Array"> <attribute ref="soapenc:arrayType"
wsdl:arrayType="impl:Con[]"/> </restriction> </complexContent> </complexType> </schema> </types> … <wsdl:message name="getConInfoRequest2"> <wsdl:part name="in0"
type="xsd:int"/> </wsdl:message> <wsdl:message name="getConInfoResponse2"> <wsdl:part name="getConInfoReturn"
type="impl:ArrayOfCon"/> </wsdl:message> I marked the differences in bold, perhaps there are
more less obvious deviations?? Could someone explain me what I’m doing wrong
or what the right choice is? Either way when I’m trying to create a web
service control in BEA Workshop 8.1 based on both wsdl’s shown above, it
says that the ‘operations cannot be called’ and that ‘Schema
type null is undefined’! So there is probably more to fix that I originally
thought… Any thoughts are highly appreciated Thanks Flo |