You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by José Renato <rm...@gmail.com> on 2011/01/07 20:34:38 UTC

Eclipse + axis2 + wsdl = Undefined ConverterUtil.convertTo

Hi All,

I am trying to generate client classes (Stub and Callback) to access a
remote WS using axis2 inside Eclipse 3 (Helius) with a wsdl as source
supplied by a partner. The situation is that some objects do not present the
right converters, as this sample:

//...
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

    if (reader.isStartElement() && new javax.xml.namespace.QName("
http://localhost
/xml/service","Header").equals(reader.getName())){

        java.lang.String content = reader.getElementText();

        //error: The next line is not properly generated (undefined method)

object.setHeader(org.apache.axis2.databinding.utils.ConverterUtil.convertToHeader_type0(content));
        reader.next();

    }  // End of if for expected property start element
    else{
        // A start element we are not expecting indicates an invalid
parameter was passed
        throw new org.apache.axis2.databinding.ADBException("Unexpected
subelement " + reader.getLocalName());
    }
//...

I did one attempt replacing ConverterUtil by a Header.Factory.parse(reader)
to make the source compilable, but I guess this is not correct to be done.
Other weird thing is that using axis1, the classes are generated correctly.
How can I fix that? Could the third part wsdl be wrong?

Thanks in advance,
José Renato

Re: Eclipse + axis2 + wsdl = Undefined ConverterUtil.convertTo

Posted by José Renato <rm...@gmail.com>.
I have not found a way to handle this situation. At this moment my best
choice is to use the axis1 generated stub classes.

Thanks,
José Renato.

2011/1/10 Amila Suriarachchi <am...@gmail.com>

> if you don't specify -u option it will create one class.
>
> thanks,
> Amila.
>
>
> On Mon, Jan 10, 2011 at 3:41 PM, José Renato <rm...@gmail.com> wrote:
>
>> Amila, thanks for your reply. Just a simple question considering your
>> suggestions. Will those tools generate only one stub or many classes (I
>> would like to avoid the second option)?
>>
>>
>> Best regards,
>> José Renato.
>>
>> 2011/1/8 Amila Suriarachchi <am...@gmail.com>
>>
>>
>>>
>>> On Sat, Jan 8, 2011 at 1:21 AM, José Renato <rm...@gmail.com> wrote:
>>>
>>>> Christopher, thanks for this quick answer! Actually I tried this
>>>> approach as well. The generated stub has the same undefined methods poiting
>>>> to ConverterUtil using the built in axis2 comand line. Mate, any other
>>>> valuable suggestion?
>>>>
>>>
>>> This seems to be a non supporting feature of ADB. Please try with another
>>> data binding framework like jaxb (-d jaxbri) or xmlbeans (-d xmlbeans)
>>>
>>> thanks,
>>> Amila.
>>>
>>>>
>>>> Thanks a lot,
>>>> José Renato.
>>>>
>>>> 2011/1/7 Meeusen, Christopher W. <Me...@mayo.edu>
>>>>
>>>> We use the wsdl2java utility included in the axis2 binary to generate
>>>>> our stubs.  Make sure you use the same version of wsdl2java as your axis2
>>>>> install.  Works great.  There is also a maven plugin to gen them.
>>>>>
>>>>>
>>>>>
>>>>> Chris
>>>>>
>>>>>
>>>>>
>>>>> *From:* java-user-return-83907-Meeusen.Christopher=mayo.edu@
>>>>> axis.apache.org [mailto:java-user-return-83907-Meeusen.Christopher=
>>>>> mayo.edu@axis.apache.org] *On Behalf Of *José Renato
>>>>> *Sent:* Friday, January 07, 2011 1:35 PM
>>>>> *To:* java-user@axis.apache.org
>>>>> *Subject:* Eclipse + axis2 + wsdl = Undefined ConverterUtil.convertTo
>>>>>
>>>>>
>>>>>
>>>>> Hi All,
>>>>>
>>>>> I am trying to generate client classes (Stub and Callback) to access a
>>>>> remote WS using axis2 inside Eclipse 3 (Helius) with a wsdl as source
>>>>> supplied by a partner. The situation is that some objects do not present the
>>>>> right converters, as this sample:
>>>>>
>>>>> //...
>>>>> while (!reader.isStartElement() && !reader.isEndElement())
>>>>> reader.next();
>>>>>
>>>>>     if (reader.isStartElement() && new javax.xml.namespace.QName("
>>>>> http://localhost
>>>>> /xml/service","Header").equals(reader.getName())){
>>>>>
>>>>>         java.lang.String content = reader.getElementText();
>>>>>
>>>>>         //error: The next line is not properly generated (undefined
>>>>> method)
>>>>>
>>>>> object.setHeader(org.apache.axis2.databinding.utils.ConverterUtil.convertToHeader_type0(content));
>>>>>         reader.next();
>>>>>
>>>>>     }  // End of if for expected property start element
>>>>>     else{
>>>>>         // A start element we are not expecting indicates an invalid
>>>>> parameter was passed
>>>>>         throw new org.apache.axis2.databinding.ADBException("Unexpected
>>>>> subelement " + reader.getLocalName());
>>>>>     }
>>>>> //...
>>>>>
>>>>> I did one attempt replacing ConverterUtil by a
>>>>> Header.Factory.parse(reader) to make the source compilable, but I guess this
>>>>> is not correct to be done. Other weird thing is that using axis1, the
>>>>> classes are generated correctly. How can I fix that? Could the third part
>>>>> wsdl be wrong?
>>>>>
>>>>> Thanks in advance,
>>>>> José Renato
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Amila Suriarachchi
>>> WSO2 Inc.
>>> blog: http://amilachinthaka.blogspot.com/
>>>
>>
>>
>
>
> --
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
>

Re: Eclipse + axis2 + wsdl = Undefined ConverterUtil.convertTo

Posted by Amila Suriarachchi <am...@gmail.com>.
if you don't specify -u option it will create one class.

thanks,
Amila.

On Mon, Jan 10, 2011 at 3:41 PM, José Renato <rm...@gmail.com> wrote:

> Amila, thanks for your reply. Just a simple question considering your
> suggestions. Will those tools generate only one stub or many classes (I
> would like to avoid the second option)?
>
>
> Best regards,
> José Renato.
>
> 2011/1/8 Amila Suriarachchi <am...@gmail.com>
>
>
>>
>> On Sat, Jan 8, 2011 at 1:21 AM, José Renato <rm...@gmail.com> wrote:
>>
>>> Christopher, thanks for this quick answer! Actually I tried this approach
>>> as well. The generated stub has the same undefined methods poiting to
>>> ConverterUtil using the built in axis2 comand line. Mate, any other valuable
>>> suggestion?
>>>
>>
>> This seems to be a non supporting feature of ADB. Please try with another
>> data binding framework like jaxb (-d jaxbri) or xmlbeans (-d xmlbeans)
>>
>> thanks,
>> Amila.
>>
>>>
>>> Thanks a lot,
>>> José Renato.
>>>
>>> 2011/1/7 Meeusen, Christopher W. <Me...@mayo.edu>
>>>
>>> We use the wsdl2java utility included in the axis2 binary to generate our
>>>> stubs.  Make sure you use the same version of wsdl2java as your axis2
>>>> install.  Works great.  There is also a maven plugin to gen them.
>>>>
>>>>
>>>>
>>>> Chris
>>>>
>>>>
>>>>
>>>> *From:* java-user-return-83907-Meeusen.Christopher=mayo.edu@
>>>> axis.apache.org [mailto:java-user-return-83907-Meeusen.Christopher=
>>>> mayo.edu@axis.apache.org] *On Behalf Of *José Renato
>>>> *Sent:* Friday, January 07, 2011 1:35 PM
>>>> *To:* java-user@axis.apache.org
>>>> *Subject:* Eclipse + axis2 + wsdl = Undefined ConverterUtil.convertTo
>>>>
>>>>
>>>>
>>>> Hi All,
>>>>
>>>> I am trying to generate client classes (Stub and Callback) to access a
>>>> remote WS using axis2 inside Eclipse 3 (Helius) with a wsdl as source
>>>> supplied by a partner. The situation is that some objects do not present the
>>>> right converters, as this sample:
>>>>
>>>> //...
>>>> while (!reader.isStartElement() && !reader.isEndElement())
>>>> reader.next();
>>>>
>>>>     if (reader.isStartElement() && new javax.xml.namespace.QName("
>>>> http://localhost
>>>> /xml/service","Header").equals(reader.getName())){
>>>>
>>>>         java.lang.String content = reader.getElementText();
>>>>
>>>>         //error: The next line is not properly generated (undefined
>>>> method)
>>>>
>>>> object.setHeader(org.apache.axis2.databinding.utils.ConverterUtil.convertToHeader_type0(content));
>>>>         reader.next();
>>>>
>>>>     }  // End of if for expected property start element
>>>>     else{
>>>>         // A start element we are not expecting indicates an invalid
>>>> parameter was passed
>>>>         throw new org.apache.axis2.databinding.ADBException("Unexpected
>>>> subelement " + reader.getLocalName());
>>>>     }
>>>> //...
>>>>
>>>> I did one attempt replacing ConverterUtil by a
>>>> Header.Factory.parse(reader) to make the source compilable, but I guess this
>>>> is not correct to be done. Other weird thing is that using axis1, the
>>>> classes are generated correctly. How can I fix that? Could the third part
>>>> wsdl be wrong?
>>>>
>>>> Thanks in advance,
>>>> José Renato
>>>>
>>>
>>>
>>
>>
>> --
>> Amila Suriarachchi
>> WSO2 Inc.
>> blog: http://amilachinthaka.blogspot.com/
>>
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Re: Eclipse + axis2 + wsdl = Undefined ConverterUtil.convertTo

Posted by José Renato <rm...@gmail.com>.
Amila, thanks for your reply. Just a simple question considering your
suggestions. Will those tools generate only one stub or many classes (I
would like to avoid the second option)?


Best regards,
José Renato.

2011/1/8 Amila Suriarachchi <am...@gmail.com>

>
>
> On Sat, Jan 8, 2011 at 1:21 AM, José Renato <rm...@gmail.com> wrote:
>
>> Christopher, thanks for this quick answer! Actually I tried this approach
>> as well. The generated stub has the same undefined methods poiting to
>> ConverterUtil using the built in axis2 comand line. Mate, any other valuable
>> suggestion?
>>
>
> This seems to be a non supporting feature of ADB. Please try with another
> data binding framework like jaxb (-d jaxbri) or xmlbeans (-d xmlbeans)
>
> thanks,
> Amila.
>
>>
>> Thanks a lot,
>> José Renato.
>>
>> 2011/1/7 Meeusen, Christopher W. <Me...@mayo.edu>
>>
>> We use the wsdl2java utility included in the axis2 binary to generate our
>>> stubs.  Make sure you use the same version of wsdl2java as your axis2
>>> install.  Works great.  There is also a maven plugin to gen them.
>>>
>>>
>>>
>>> Chris
>>>
>>>
>>>
>>> *From:* java-user-return-83907-Meeusen.Christopher=mayo.edu@
>>> axis.apache.org [mailto:java-user-return-83907-Meeusen.Christopher=
>>> mayo.edu@axis.apache.org] *On Behalf Of *José Renato
>>> *Sent:* Friday, January 07, 2011 1:35 PM
>>> *To:* java-user@axis.apache.org
>>> *Subject:* Eclipse + axis2 + wsdl = Undefined ConverterUtil.convertTo
>>>
>>>
>>>
>>> Hi All,
>>>
>>> I am trying to generate client classes (Stub and Callback) to access a
>>> remote WS using axis2 inside Eclipse 3 (Helius) with a wsdl as source
>>> supplied by a partner. The situation is that some objects do not present the
>>> right converters, as this sample:
>>>
>>> //...
>>> while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
>>>
>>>     if (reader.isStartElement() && new javax.xml.namespace.QName("
>>> http://localhost
>>> /xml/service","Header").equals(reader.getName())){
>>>
>>>         java.lang.String content = reader.getElementText();
>>>
>>>         //error: The next line is not properly generated (undefined
>>> method)
>>>
>>> object.setHeader(org.apache.axis2.databinding.utils.ConverterUtil.convertToHeader_type0(content));
>>>         reader.next();
>>>
>>>     }  // End of if for expected property start element
>>>     else{
>>>         // A start element we are not expecting indicates an invalid
>>> parameter was passed
>>>         throw new org.apache.axis2.databinding.ADBException("Unexpected
>>> subelement " + reader.getLocalName());
>>>     }
>>> //...
>>>
>>> I did one attempt replacing ConverterUtil by a
>>> Header.Factory.parse(reader) to make the source compilable, but I guess this
>>> is not correct to be done. Other weird thing is that using axis1, the
>>> classes are generated correctly. How can I fix that? Could the third part
>>> wsdl be wrong?
>>>
>>> Thanks in advance,
>>> José Renato
>>>
>>
>>
>
>
> --
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
>

Re: Eclipse + axis2 + wsdl = Undefined ConverterUtil.convertTo

Posted by Amila Suriarachchi <am...@gmail.com>.
On Sat, Jan 8, 2011 at 1:21 AM, José Renato <rm...@gmail.com> wrote:

> Christopher, thanks for this quick answer! Actually I tried this approach
> as well. The generated stub has the same undefined methods poiting to
> ConverterUtil using the built in axis2 comand line. Mate, any other valuable
> suggestion?
>

This seems to be a non supporting feature of ADB. Please try with another
data binding framework like jaxb (-d jaxbri) or xmlbeans (-d xmlbeans)

thanks,
Amila.

>
> Thanks a lot,
> José Renato.
>
> 2011/1/7 Meeusen, Christopher W. <Me...@mayo.edu>
>
> We use the wsdl2java utility included in the axis2 binary to generate our
>> stubs.  Make sure you use the same version of wsdl2java as your axis2
>> install.  Works great.  There is also a maven plugin to gen them.
>>
>>
>>
>> Chris
>>
>>
>>
>> *From:* java-user-return-83907-Meeusen.Christopher=mayo.edu@
>> axis.apache.org [mailto:java-user-return-83907-Meeusen.Christopher=
>> mayo.edu@axis.apache.org] *On Behalf Of *José Renato
>> *Sent:* Friday, January 07, 2011 1:35 PM
>> *To:* java-user@axis.apache.org
>> *Subject:* Eclipse + axis2 + wsdl = Undefined ConverterUtil.convertTo
>>
>>
>>
>> Hi All,
>>
>> I am trying to generate client classes (Stub and Callback) to access a
>> remote WS using axis2 inside Eclipse 3 (Helius) with a wsdl as source
>> supplied by a partner. The situation is that some objects do not present the
>> right converters, as this sample:
>>
>> //...
>> while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
>>
>>     if (reader.isStartElement() && new javax.xml.namespace.QName("
>> http://localhost
>> /xml/service","Header").equals(reader.getName())){
>>
>>         java.lang.String content = reader.getElementText();
>>
>>         //error: The next line is not properly generated (undefined
>> method)
>>
>> object.setHeader(org.apache.axis2.databinding.utils.ConverterUtil.convertToHeader_type0(content));
>>         reader.next();
>>
>>     }  // End of if for expected property start element
>>     else{
>>         // A start element we are not expecting indicates an invalid
>> parameter was passed
>>         throw new org.apache.axis2.databinding.ADBException("Unexpected
>> subelement " + reader.getLocalName());
>>     }
>> //...
>>
>> I did one attempt replacing ConverterUtil by a
>> Header.Factory.parse(reader) to make the source compilable, but I guess this
>> is not correct to be done. Other weird thing is that using axis1, the
>> classes are generated correctly. How can I fix that? Could the third part
>> wsdl be wrong?
>>
>> Thanks in advance,
>> José Renato
>>
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Re: Eclipse + axis2 + wsdl = Undefined ConverterUtil.convertTo

Posted by José Renato <rm...@gmail.com>.
Christopher, thanks for this quick answer! Actually I tried this approach as
well. The generated stub has the same undefined methods poiting to
ConverterUtil using the built in axis2 comand line. Mate, any other valuable
suggestion?

Thanks a lot,
José Renato.

2011/1/7 Meeusen, Christopher W. <Me...@mayo.edu>

> We use the wsdl2java utility included in the axis2 binary to generate our
> stubs.  Make sure you use the same version of wsdl2java as your axis2
> install.  Works great.  There is also a maven plugin to gen them.
>
>
>
> Chris
>
>
>
> *From:* java-user-return-83907-Meeusen.Christopher=mayo.edu@
> axis.apache.org [mailto:java-user-return-83907-Meeusen.Christopher=
> mayo.edu@axis.apache.org] *On Behalf Of *José Renato
> *Sent:* Friday, January 07, 2011 1:35 PM
> *To:* java-user@axis.apache.org
> *Subject:* Eclipse + axis2 + wsdl = Undefined ConverterUtil.convertTo
>
>
>
> Hi All,
>
> I am trying to generate client classes (Stub and Callback) to access a
> remote WS using axis2 inside Eclipse 3 (Helius) with a wsdl as source
> supplied by a partner. The situation is that some objects do not present the
> right converters, as this sample:
>
> //...
> while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
>
>     if (reader.isStartElement() && new javax.xml.namespace.QName("
> http://localhost
> /xml/service","Header").equals(reader.getName())){
>
>         java.lang.String content = reader.getElementText();
>
>         //error: The next line is not properly generated (undefined
> method)
>
> object.setHeader(org.apache.axis2.databinding.utils.ConverterUtil.convertToHeader_type0(content));
>         reader.next();
>
>     }  // End of if for expected property start element
>     else{
>         // A start element we are not expecting indicates an invalid
> parameter was passed
>         throw new org.apache.axis2.databinding.ADBException("Unexpected
> subelement " + reader.getLocalName());
>     }
> //...
>
> I did one attempt replacing ConverterUtil by a Header.Factory.parse(reader)
> to make the source compilable, but I guess this is not correct to be done.
> Other weird thing is that using axis1, the classes are generated correctly.
> How can I fix that? Could the third part wsdl be wrong?
>
> Thanks in advance,
> José Renato
>

RE: Eclipse + axis2 + wsdl = Undefined ConverterUtil.convertTo

Posted by "Meeusen, Christopher W." <Me...@mayo.edu>.
We use the wsdl2java utility included in the axis2 binary to generate our stubs.  Make sure you use the same version of wsdl2java as your axis2 install.  Works great.  There is also a maven plugin to gen them.

 

Chris

 

From: java-user-return-83907-Meeusen.Christopher=mayo.edu@axis.apache.org [mailto:java-user-return-83907-Meeusen.Christopher=mayo.edu@axis.apache.org] On Behalf Of José Renato
Sent: Friday, January 07, 2011 1:35 PM
To: java-user@axis.apache.org
Subject: Eclipse + axis2 + wsdl = Undefined ConverterUtil.convertTo

 

Hi All,

I am trying to generate client classes (Stub and Callback) to access a remote WS using axis2 inside Eclipse 3 (Helius) with a wsdl as source supplied by a partner. The situation is that some objects do not present the right converters, as this sample:

//...
while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
                                
    if (reader.isStartElement() && new javax.xml.namespace.QName("http://localhost            /xml/service","Header").equals(reader.getName())){
                                
        java.lang.String content = reader.getElementText();

        //error: The next line is not properly generated (undefined method)
        object.setHeader(org.apache.axis2.databinding.utils.ConverterUtil.convertToHeader_type0(content));
        reader.next();
                                    
    }  // End of if for expected property start element
    else{
        // A start element we are not expecting indicates an invalid parameter was passed
        throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
    }
//...

I did one attempt replacing ConverterUtil by a Header.Factory.parse(reader) to make the source compilable, but I guess this is not correct to be done. Other weird thing is that using axis1, the classes are generated correctly. How can I fix that? Could the third part wsdl be wrong?

Thanks in advance,
José Renato