axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From keith chapman <keithgchap...@gmail.com>
Subject Re: Issue with Axis OMElement
Date Tue, 10 Feb 2009 02:02:11 GMT
Its hard to say what went wrong where from this. The reason it happened is
because of some malformed XML. That's all I can tell you looking at the
stack trace.

Thanks,
Keith.

On Mon, Feb 9, 2009 at 11:43 PM, Chandra suriya pandian, Sathish (GE Infra,
Energy) <sathish.chandra@ge.com> wrote:

>  Thanks Keith.
>
> I am able to get through that error by changing the type to xs:any.
> But now i am getting the following exception under the same scenario:
>
>
> Caused by:
> *com.ctc.wstx.exc.WstxParsingException*: Expected a text token, got
> START_ELEMENT.
>
> at [row,col {unknown-source}]: [1,208]
>
> at com.ctc.wstx.sr.StreamScanner.constructWfcException(*
> StreamScanner.java:605*)
>
> at com.ctc.wstx.sr.StreamScanner.throwParseError(*StreamScanner.java:461*)
>
> at com.ctc.wstx.sr.BasicStreamReader.getElementText(*
> BasicStreamReader.java:677*)
>
> at org.apache.axiom.om.impl.llom.OMStAXWrapper.getElementText(*
> OMStAXWrapper.java:899*)
>
> Any idea on the above problem.
>
> Regards,
> *Sathish Chandra***
>
>
>  ------------------------------
>  *From:* keith chapman [mailto:keithgchapman@gmail.com]
> *Sent:* 09 February 2009 16:29
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Issue with Axis OMElement
>
> Hi,
>
> This is due to a bug in Axis2. Ideally an OMElement should map to xs:any
> and not xs:anyType in the WSDL. Therefore the workaround I could suggest is
> this, Save the WSDL and edit it to use xs:any instead of xs:anyType.
>
> Thanks,
> Keith.
>
> On Mon, Feb 9, 2009 at 8:30 PM, Chandra suriya pandian, Sathish (GE Infra,
> Energy) <sathish.chandra@ge.com> wrote:
>
>> Hi,
>>
>> > I have WebService enabled a service method that returns OMElement. The
>> > generated WSDL shows the element type as 'anyType'.
>> >
>> > I generated a stub from the WSDL and executed a client invoking the
>> > WebService method through the stub.
>> >
>> > The HTTP trace shows the response stream returned by WebService is
>> > correct.
>> > But in the client I am getting the following error:
>> >
>> > org.apache.axis2.databinding.ADBException: Any type element type has
>> > not been given
>> >       at
>> > org.apache.axis2.databinding.utils.ConverterUtil.getAnyTypeObject(Conv
>> > erterUtil.java:1612)
>> >
>> > Exerpt from WSDL is:
>> >
>> > <xs:element name="mtomSampleResponse">
>> > <xs:complexType><xs:sequence>
>> > <xs:element minOccurs="0" name="return" nillable="true"
>> > type="xs:anyType"/>
>> > </xs:sequence></xs:complexType>
>> > </xs:element>
>> >
>> > Exerpt from the response stream is:
>> >
>> > <?xml version='1.0' encoding='UTF-8'?>
>> > <soapenv:Envelope
>> > xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body>
>> > <ns:mtomSampleResponse
>> > xmlns:ns="http://ws.apache.org/axis2"><ns:return>
>> > <return><xop:Include
>> > href="cid:1.urn:uuid:49F67B152B605353D81233939394759@apache.org<cid%3A1.urn%3Auuid%3A49F67B152B605353D81233939394759@apache.org>
>> "
>> > xmlns:xop="http://www.w3.org/2004/08/xop/include" /></return>
>> > </ns:return></ns:mtomSampleResponse>
>> > </soapenv:Body></soapenv:Envelope>
>> >
>> > Could you please kindly look into the same and let me know how I can
>> > overcome the above problem.
>> > Do I have to configure anything to map the response element of type
>> > 'anyType' anywhere to construct 'OMElement' back.
>> >
>> I am using Axis 2-1.4.1.
>>
>>
>> > Regards,
>> > Sathish Chandra
>> >
>>
>
>
>
> --
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.org
>



-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org

Mime
View raw message