On Mar 27, 2013, at 1:34 PM, ForCripeSake <[email protected]> wrote:

> Hi Daniel,
> 
> Thank you for the response. This is the snippet form the wsdl:
> 
> <complexType name="FetchDocumentResponsePayloadType">
> 
>            <annotation>
> 
>                  <documentation/>
> 
>            </annotation>
> 
>            <sequence>
> 
>              <element name="FileFormat" type="string"/>
> 
>              <element name="attachment" xmlns:wsi="
> http://ws-i.org/profiles/basic/1.1/xsd"/>
> 
>           </sequence>
> 
> </complexType>

That explains a lot actually.   There isn't a "type" on that.   My suggestion 
would be to add type="string" to that element above.  From there, you SHOULD be 
able to get the string CID from the generated object and lookup the attachment 
from the response context.

Actually, if you do something like a 
"System.out.println(attachment.getClass().getName())", what does it print?   Is 
it a DOM node?  JAXBElement?  I'm kind of curious what JAXB is doing there.   
You may be able to figure out where the string is in there based on what class 
JAXB is returning.

Dan







> 
> ---------------------------------------------------------------------------------------------------------------------------------------------------
> 
> I also tried to annotate/modify the generated
> FetchDocumentResponsePayloadType.java's attachment field so the client
> could deal with it more easily:
> 
> @XmlMimeType("application/octet-stream")
> 
> protected DataHandler attachment;
> 
> 
> That field gets generated as an Object originally.
> 
> At this point I'm just stabbing in the dark trying to parse the server's
> response.
> 
> 
> - Patrick
> 
> 
> 
> 
> --
> View this message in context: 
> http://cxf.547215.n5.nabble.com/org-xml-sax-SAXParseException-Content-is-not-allowed-in-prolog-tp5725407p5725411.html
> Sent from the cxf-user mailing list archive at Nabble.com.

-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to