Anne,
Sorry, returning the mail directly to you was a mistake. I promise not to do
it again. :)
Thank you for the tip with WRAPPED. Now the complex objects do not produce
any error messages any more. Only the costum exception object derived from
AxisFault still leads to "Please register a typemapping/beanmapping for
...AplanException". (see the listings below)
In DOCUMENT style I had another problem (it seems to me like a BUG):
When I defined a method without any arguments, just a string
as return value, the result was always null instead of the correct text.
All works fine in RPC or WRAPPED style or if I define at least one
parameter.
If this is not a known behaviour I can send you additional information if
needed.
The source java interface is like following:
----------------------------------------------
package tecit.ws.ImportExport;
public interface ImportExport
{
public void addEntity (Entity ent) throws AplanException;
public Entity getEntity (long nForeignID) throws AplanException;
public void setEntity (long nForeignID, Entity ent)throws AplanException;
public void deleteLogically (long nForeignID) throws AplanException;
public String alive ();
}
-------------------------------------
and the exception class ...
-------------------------------------
package tecit.ws.ImportExport;
import org.apache.axis.AxisFault;
public class AplanException extends AxisFault
{
private String text;
private String eCode;
public String getECode() { return eCode; }
public String getText() { return text; }
public void setECode(String code) { eCode = code; }
public void setText(String text) { this.text = text; }
}
--------------------------------------
The produced WSDL file seems to be correct
(but I am sure not with the details - and finally it should work
also with .NET):
-------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="services:ImportExport"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="services:ImportExport" xmlns:intf="services:ImportExport"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.2RC3
Built on Feb 28, 2005 (10:15:14 EST)-->
<wsdl:types>
<schema elementFormDefault="qualified"
targetNamespace="services:ImportExport"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="setEntity">
<complexType>
<sequence>
<element name="in0" type="xsd:long"/>
<element name="in1" type="impl:Entity"/>
</sequence>
</complexType>
</element>
<complexType name="ArrayOf_xsd_string">
<sequence>
<element maxOccurs="unbounded" minOccurs="0" name="item"
type="xsd:string"/>
</sequence>
</complexType>
<complexType name="Remark">
<sequence>
<element name="changed" nillable="true" type="xsd:dateTime"/>
<element name="text" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ArrayOfRemark">
<sequence>
<element maxOccurs="unbounded" minOccurs="0" name="item"
type="impl:Remark"/>
</sequence>
</complexType>
<complexType name="Entity">
<sequence>
<element name="category" nillable="true" type="xsd:string"/>
<element name="create" nillable="true" type="xsd:dateTime"/>
<element name="creator" nillable="true" type="xsd:string"/>
<element name="daysEmail" type="xsd:int"/>
<element name="description" nillable="true" type="xsd:string"/>
<element name="foreignId" type="xsd:long"/>
<element name="grpAssigned" nillable="true"
type="impl:ArrayOf_xsd_string"/>
<element name="hyp" nillable="true" type="impl:ArrayOf_xsd_string"/>
<element name="lights" nillable="true" type="xsd:string"/>
<element name="priority" type="xsd:int"/>
<element name="private" type="xsd:boolean"/>
<element name="proj" nillable="true" type="xsd:string"/>
<element name="remark" nillable="true" type="impl:ArrayOfRemark"/>
<element name="responsible" nillable="true" type="xsd:string"/>
<element name="state" nillable="true" type="xsd:string"/>
<element name="sub" nillable="true" type="xsd:string"/>
<element name="target" nillable="true" type="xsd:dateTime"/>
<element name="title" nillable="true" type="xsd:string"/>
<element name="top" nillable="true" type="xsd:string"/>
<element name="usrAssigned" nillable="true"
type="impl:ArrayOf_xsd_string"/>
</sequence>
</complexType>
<element name="setEntityResponse">
<complexType/>
</element>
<complexType name="AplanException">
<sequence>
<element name="ECode" nillable="true" type="xsd:string"/>
<element name="text" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<element name="fault" type="impl:AplanException"/>
<element name="alive">
<complexType/>
</element>
<element name="aliveResponse">
<complexType>
<sequence>
<element name="aliveReturn" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="alive2">
<complexType/>
</element>
<element name="alive2Response">
<complexType>
<sequence>
<element name="alive2Return" type="xsd:int"/>
</sequence>
</complexType>
</element>
</schema>
</wsdl:types>
<wsdl:message name="setEntityRequest">
<wsdl:part element="impl:setEntity" name="parameters"/>
</wsdl:message>
<wsdl:message name="AplanException">
<wsdl:part element="impl:fault" name="fault"/>
</wsdl:message>
<wsdl:message name="alive2Request">
<wsdl:part element="impl:alive2" name="parameters"/>
</wsdl:message>
<wsdl:message name="setEntityResponse">
<wsdl:part element="impl:setEntityResponse" name="parameters"/>
</wsdl:message>
<wsdl:message name="aliveResponse">
<wsdl:part element="impl:aliveResponse" name="parameters"/>
</wsdl:message>
<wsdl:message name="aliveRequest">
<wsdl:part element="impl:alive" name="parameters"/>
</wsdl:message>
<wsdl:message name="alive2Response">
<wsdl:part element="impl:alive2Response" name="parameters"/>
</wsdl:message>
<wsdl:portType name="ImportExport">
<wsdl:operation name="setEntity">
<wsdl:input message="impl:setEntityRequest"
name="setEntityRequest"/>
<wsdl:output message="impl:setEntityResponse"
name="setEntityResponse"/>
<wsdl:fault message="impl:AplanException" name="AplanException"/>
</wsdl:operation>
<wsdl:operation name="alive">
<wsdl:input message="impl:aliveRequest" name="aliveRequest"/>
<wsdl:output message="impl:aliveResponse" name="aliveResponse"/>
</wsdl:operation>
<wsdl:operation name="alive2">
<wsdl:input message="impl:alive2Request" name="alive2Request"/>
<wsdl:output message="impl:alive2Response" name="alive2Response"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ImpExpServiceSoapBinding" type="impl:ImportExport">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="setEntity">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="setEntityRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="setEntityResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="AplanException">
<wsdlsoap:fault name="AplanException" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="alive">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="aliveRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="aliveResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="alive2">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="alive2Request">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="alive2Response">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ImportExportService">
<wsdl:port binding="impl:ImpExpServiceSoapBinding"
name="ImpExpService">
<wsdlsoap:address
location="http://eos:7001/aplan/services/ImpExpService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
------------------------------------------------------------
Thomas
> Thomas,
>
> Please send all questions to the axis-user list rather than to me
> personally.
>
> Try using "wrapped" style. Also, I suggest that you convert all your
> collections to arrays. As long as all your value types are defined as
> JavaBeans, you shouldn't need to register typemappings.
>
> If you are still having problems, please send a note to the list and
> provide more information.
>
>
> On Mon, 21 Mar 2005 10:38:01 +0100 (MET), Thomas Neuhofer <[EMAIL PROTECTED]>
> wrote:
> > Hello Anne,
> >
> > thank you for your response. I 've done so (Axis V1.2 RC3).
> > But now I have other problems.
> > I get following (or similair) error message for all complex types:
> >
> > "- Please register a typemapping/beanmapping for
> > 'tecit.ws.ImportExport.Entity'"
> >
> > And still with "rpc" style it works fine.
> > What could be wrong? Do you need the source code of the java interface?
> >
> > Thanks,
> > Thomas
> >
> > P.S.: I am still Thomas. I 've just changed my email tool.
> >
> > > Upgrade to Axis 1.2.
> > >
> > >
> > > On Thu, 17 Mar 2005 20:12 +0100, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> > > wrote:
> > > > Hello,
> > > >
> > > > I am using axis 1.1. (downloaded last week)
> > > > When I try to call Java2WSDL to generate a document/literal WSDL
> file I
> > > always
> > > > get following error message
> > > > "Attempted to write schema for bad QName".
> > > >
> > > > If I use rpc/encoded style all works fine. But since I should be
> > > compatible with
> > > > .NET-WS I should use document style.
> > > >
> > > > I have just seen in the BUG list, that this is an already known bug
> (No.
> > > 19274).
> > > > Now, my question is, how can I fix it (I have to admit I am newbie).
> > > >
> > > > I would be happy, if you could help me!
> > > >
> > > > Thanks in advance,
> > > >
> > > > Thomas
> > > >
> > > > --
> > > > Ein Service von http://www.sms.at
> > > >
> > > >
> > >
> >
> > --
> > "Happy ProMail" bis 24. M�rz: http://www.gmx.net/de/go/promail
> > Zum 6. Geburtstag gibt's GMX ProMail jetzt 66 Tage kostenlos!
> >
>
--
"Happy ProMail" bis 24. M�rz: http://www.gmx.net/de/go/promail
Zum 6. Geburtstag gibt's GMX ProMail jetzt 66 Tage kostenlos!