Bug is in codegeneration. Please raise a JIRA and upload your wsdl.

thanks,
dims

On 6/26/07, "Björn Hamann" <[EMAIL PROTECTED]> wrote:
Hi,

I am using axis2 with jaxbri databinding. After generating the source with 
wsdl2java I am getting compiler errors in the generated class 
..MessageReceiverInOut.

The error is as follows:

TestMessageReceiverInOut.java:[68,24] cannot find symbol
symbol  : method toOM(com.example.xsd.TechnicalWebserviceServerFault,boolean)
location: class TestMessageReceiverInOut

The problem is that the call of the method toOm with two parameters does not 
match the signature of the method toOM wich has three parameters.

// wrong method call
f.setDetail(toOM(e.getFaultMessage(),false));

// method signature
private org.apache.axiom.om.OMElement 
toOM(com.example.xsd.TechnicalWebserviceServerFault param, 
org.apache.axiom.soap.SOAPFactory factory, boolean optimizeContent)

The problem occurs when trying to add a wsdl:fault to the wsdl file. I am using 
jaxbri as databinding and the wsdl is as follows:

<wsdl:definitions
        xmlns:axis2="http://example.com";
        xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/";
        xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
        xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
        xmlns:ns="http://example.com/xsd";
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
        targetNamespace="http://example.com";>
        <wsdl:types>
                <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
                        attributeFormDefault="qualified" 
elementFormDefault="qualified"
                        targetNamespace="http://example.com/xsd";>
                        <xs:element
                                name="TechnicalWebserviceServerFault">
                                <xs:complexType>
                                        <xs:sequence>
                                                <xs:element
                                                        name="description" 
nillable="true"
                                                        type="xs:string" />
                                                <xs:element
                                                        name="cause" 
nillable="true"
                                                        type="xs:string" />
                                        </xs:sequence>
                                </xs:complexType>
                        </xs:element>
                        <xs:element name="store">
                                <xs:complexType>
                                        <xs:sequence>
                                                <xs:element name="param0" 
nillable="true"
                                                        type="ns:Message" />
                                                <xs:element name="param1" 
nillable="true"
                                                        type="xs:int" />
                                        </xs:sequence>
                                </xs:complexType>
                        </xs:element>
                        <xs:element name="Message" type="ns:Message" />
                        <xs:complexType name="Message">
                                <xs:sequence>
                                        <xs:element maxOccurs="unbounded" 
name="content"
                                                nillable="true" type="ns:Content" 
/>
                                </xs:sequence>
                        </xs:complexType>
                        <xs:element name="Content" type="ns:Content" />
                        <xs:complexType name="Content">
                                <xs:sequence>
                                        <xs:element name="test" nillable="true"
                                                type="xs:long" />
                                </xs:sequence>
                        </xs:complexType>
                        <xs:element name="storeResponse">
                                <xs:complexType>
                                        <xs:sequence>
                                                <xs:element name="return" 
nillable="true"
                                                        type="xs:boolean" />
                                        </xs:sequence>
                                </xs:complexType>
                        </xs:element>
                </xs:schema>
        </wsdl:types>
        <wsdl:message name="storeMessage">
                <wsdl:part name="part1" element="ns:store" />
        </wsdl:message>
        <wsdl:message name="storeResponseMessage">
                <wsdl:part name="part1" element="ns:storeResponse" />
        </wsdl:message>
        <wsdl:message name="TechnicalWebserviceServerFault">
                <wsdl:part name="TechnicalWebserviceServerFault"
                        element="ns:TechnicalWebserviceServerFault" />
        </wsdl:message>
        <wsdl:portType name="testPortType">
                <wsdl:operation name="store">
                        <wsdl:input
                                
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl";
                                wsaw:Action="urn:store" 
message="axis2:storeMessage" />
                        <wsdl:output
                                
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl";
                                message="axis2:storeResponseMessage" 
wsaw:Action="urn:store" />
                        <wsdl:fault name="fault" 
message="axis2:TechnicalWebserviceServerFault"/>
                </wsdl:operation>
        </wsdl:portType>
        <wsdl:binding name="testSOAP11Binding"
                type="axis2:testPortType">
                <soap:binding transport="http://schemas.xmlsoap.org/soap/http";
                        style="document" />
                <wsdl:operation name="store">
                        <soap:operation soapAction="urn:store" style="document" 
/>
                        <wsdl:input>
                                <soap:body use="literal" />
                        </wsdl:input>
                        <wsdl:output>
                                <soap:body use="literal" />
                        </wsdl:output>
                        <wsdl:fault name="fault">
                                <soap:fault use="literal" name="fault"/>
                        </wsdl:fault>
                </wsdl:operation>
        </wsdl:binding>
        <wsdl:service name="test">
                <wsdl:port name="testSOAP11port"
                        binding="axis2:testSOAP11Binding">
                        <soap:address
                                
location="http://localhost:8282/axis2/services/test"; />
                </wsdl:port>
        </wsdl:service>
</wsdl:definitions>

Is this a bug in the code generation of the MessageReceiverInOut for jaxbri or 
is there a problem in the wsdl (which is valid according to Eclipse WTP Plugin)?

Thanks,

Björn
--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser

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




--
Davanum Srinivas :: http://davanum.wordpress.com

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

Reply via email to