Hi Tim,

thank yor for your answer.

going into generated source code, apply
"https://recettage.ria.neopod.fm-ged.com/ws"; in first arg for qname
=>         private static final javax.xml.namespace.QName RETURN$0 =
            new
javax.xml.namespace.QName("https://recettage.ria.neopod.fm-ged.com/ws";,
"return");

Repack jar-file (of generated classes)

and start test

Unfortunately, test fails
=> java.lang.ClassCastException:
org.apache.xmlbeans.impl.values.XmlAnyTypeImpl cannot be cast to
com.fm_ged.neopod.ria.recettage.ws.Order
        at 
com.fm_ged.neopod.ria.recettage.ws.impl.GetImageURLResponseDocumentImpl$GetImageURLResponseImpl.getReturn(GetImageURLResponseDocumentImpl.java:102)



Regards,
Sascha



On Mon, Nov 26, 2012 at 12:09 PM, Tim Watts <t...@cliftonfarm.org> wrote:
> On Mon, 2012-11-26 at 08:37 +0100, moh.sushi wrote:
>> Hello together,
>>
>> i have a problem with using xmlbeans.
>> Following situation is given.
>>
>> - remote wsdl available (see http://pastebin.com/5qnFScMx)
>> - code generation using axis2 and databinding xmlbeans
>>
>> i can do a request and i get a response, too.
>>
>> The problem is while iterating through given response.
>> I just want to get part of the response with xmlbeans therefore i post
>> the question on this mailing list.
>>
>> this is toString-ouput of the response:
>>
>> (1)
>> <GetImageURLResponse xmlns="https://recettage.ria.neopod.fm-ged.com/ws";
>>       xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
>>       xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>>       xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
>>       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>>       <return>
>>               <CODE_ORDER>xyz</CODE_ORDER>
>>               <PICTURES>
>>                       <item>
>>                               <OCD>2011-10-20</OCD>
>>                               <PICTURE_ID>1</PICTURE_ID>
>>                               <URL>https://host.fr/images/1.jpg</URL>
>>                               <SCAN_DATE>2011-11-18</SCAN_DATE>
>>                       </item>
>>                       <item>
>>                               <OCD>2011-10-20</OCD>
>>                               <PICTURE_ID>2</PICTURE_ID>
>>                               <URL>https://host.fr/images/2.jpg</URL>
>>                               <SCAN_DATE>2011-10-31</SCAN_DATE>
>>                       </item>
>>                       <item>
>>                               <OCD>2011-10-20</OCD>
>>                               <PICTURE_ID>3</PICTURE_ID>
>>                               <URL>https://host.fr/images/3.jpg</URL>
>>                               <SCAN_DATE>2011-11-18</SCAN_DATE>
>>                       </item>
>>               </PICTURES>
>>       </return>
>> </GetImageURLResponse>
>>
>> the toString output of the return fragement
>> (2)
>> <xml-fragment xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>> xmlns:ws="https://recettage.ria.neopod.fm-ged.com/ws";>
>>       <ws:return>
>>               <ws:CODE_ORDER>yxz</ws:CODE_ORDER>
>>               <ws:PICTURES>
>>                       <ws:item>
>>                               <ws:OCD>2011-10-20</ws:OCD>
>>                               <ws:PICTURE_ID>1</ws:PICTURE_ID>
>>                               <ws:URL>https://host.fr/images/1.jpg</ws:URL>
>>                               <ws:SCAN_DATE>2011-11-18</ws:SCAN_DATE>
>>                       </ws:item>
>>                       <ws:item>
>>                               <ws:OCD>2011-10-20</ws:OCD>
>>                               <ws:PICTURE_ID>2</ws:PICTURE_ID>
>>                               <ws:URL>https://host.fr/images/2.jpg</ws:URL>
>>                               <ws:SCAN_DATE>2011-10-31</ws:SCAN_DATE>
>>                       </ws:item>
>>                       <ws:item>
>>                               <ws:OCD>2011-10-20</ws:OCD>
>>                               <ws:PICTURE_ID>3</ws:PICTURE_ID>
>>                               <ws:URL>https://host.fr/images/3.jpg</ws:URL>
>>                               <ws:SCAN_DATE>2011-11-18</ws:SCAN_DATE>
>>                       </ws:item>
>>               </ws:PICTURES>
>>       </ws:return>
>> </xml-fragment>
>>
>>
>> Following code snippet i use:
>> fully object "GetImageURLResponseDocument response" is given  (see 1)
>> GetImageURLResponse imageResponse = response.getGetImageURLResponse();  (see 
>> 2)
>> Order order = imageResponse.getReturn();  <==  null returns
>>
>> method body of "getReturn" is :
>>         public com.fm_ged.neopod.ria.recettage.ws.Order getReturn()
>>         {
>>             synchronized (monitor())
>>             {
>>                 check_orphaned();
>>                 com.fm_ged.neopod.ria.recettage.ws.Order target = null;
>>                 target =
>> (com.fm_ged.neopod.ria.recettage.ws.Order)get_store().find_element_user(RETURN$0,
>> 0);   <= nothing is found therefore null
>>                 if (target == null)
>>                 {
>>                     return null;
>>                 }
>>                 return target;
>>             }
>>         }
>>
>> The variable "RETURN$0" is:
>>         private static final javax.xml.namespace.QName RETURN$0 = new
>> javax.xml.namespace.QName("", "return");
>>
>
> I think you need to use "https://recettage.ria.neopod.fm-ged.com/ws"; in
> the first QName arg above.
>
>> i use
>> Axis 1.6.0
>> xmlbeans-2.3.0.jar
>>
>> What is going wrong?
>> Is the server response maybe wrong?
>> Something wrong on my client side?
>>
>> Any help is appreciated!
>>
>> Thanks in advance!
>>
>>
>> Regards,
>> Sascha
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
>> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org

Reply via email to