[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Xml parsed failed (MIMEBoundary)



Hi,
 
I get this "xml parsed failed" error 
 
HTTPAPI Ver 1.23 released 2008-04-24
OS/400 Ver V5R4M0
SetError() Æ66: XML parse failed at line 1, col 0: syntax error
 
when using:
 
SOAP =                                                                  
 '<?xml version="1.0" encoding="UTF-8"?>'                               
+'<soapenv:Envelope '                                                   
+'xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; '           
+'xmlns:xsd="http://component.maservices.multisupport.com/xsd"; '        
+'xmlns:cred="http://multisupport.com/credentials"; '                    
+'xmlns:glob="http://multisupport.com/globalId";>'                       
+'<soapenv:Header/>'                                                    
+'<soapenv:Body>'                                                       
+'<xsd:componentRequest>'                                               
+'<cred:credentials xmlns:cred="http://multisupport.com/credentials";>'  
+'<cred:sessionId>' + %trim(sessionId) + '</cred:sessionId>'            
+'<cred:securityToken>' + %trim(securityToken) + '</cred:securityToken> 
+'</cred:credentials>'                                                  
+'<glob:componentId>' + %trim(folder) + '</glob:componentId>'           
+'</xsd:componentRequest>'                                              
+'</soapenv:Body>'                                               
+'</soapenv:Envelope>';                                          
                                                                 
HTTP_setCCSIDs(1208: 277);  // CCSID 1208 = UTF-8                
rc = http_url_post_xml(                                          
'https://sculptor.no:26032/multiarchiveservices' +
 '/services/Component'                                           
                  : %addr(SOAP) + 2                              
                  : %len(SOAP)                                   
                  : *NULL                                        
                  : %paddr(Incoming)                             
                  : *NULL                                        
                  : HTTP_TIMEOUT                                 
                  : HTTP_USERAGENT                               
                  : 'text/xml;charset=utf-8'                     
                  : 'urn:getComponent');       
 
I get a response when I use:
 
rc=http_url_post(                                               
https://sculptor.no:26032/multiarchiveservices' +
'/services/Component':                                          
     %addr(data): %len(%trimr(data)):                           
     '/magnek/Mafolder.xml'                                     
                   : HTTP_TIMEOUT                               
                   : HTTP_USERAGENT                             
                   : 'text/xml;charset=utf-8'                   
                   : 'urn:getComponent');                       
                  
Here is the response file:
 
--MIMEBoundaryurn_uuid_5FE8D4B1BC1BF63A551233827422467

Content-Type: application/xop+xml; charset=utf-8; type="text/xml"

Content-Transfer-Encoding: binary

Content-ID: <0.urn:uuid:5FE8D4B1BC1BF63A551233827422468@xxxxxxxxxx>

<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Body><rs:componentResponse xmlns:rs="http://component.maservices.multisupport.com/xsd";><component:component xmlns:component="http://multisupport.com/component"; xmlns:item="http://multisupport.com/item"; xmlns:composite="http://multisupport.com/composite"; xmlns:property="http://multisupport.com/property"; xmlns:description="http://multisupport.com/linkDescription"; xmlns:relation="http://multisupport.com/link"; xmlns:folder="http://multisupport.com/folder"; id="urn:multiarchive:folder:TST:/KUNDE/1718255" type="folder"><component:folder><component:properties><property:property property:type="character"><property:name>FOLDER_NAME</property:name><property:value>1718255</property:value></property:property><property:property property:type="character"><property:name>FOLDER_DESCRIPTION</property:name><property:value>Eyvind Olsen</property:value></property:property></component:properties><component:description>Eyvind Olsen</component:description><composite:subComponents><relation:subComponent relation:type="part_off" relation:actuate="on_request"><relation:from relation:anchorType="folder" relation:ref="urn:multiarchive:folder:TST:/KUNDE/1718255"><relation:folderDescription>

<description:label>Eyvind Olsen</description:label><description:endPointType>folder</description:endPointType><description:folderName>1718255</description:folderName></relation:folderDescription></relation:from><relation:to relation:anchorType="item" relation:ref="urn:multiarchive:item:TST:41645"><relation:itemDescription>

<description:label>Oppsigelse/flytting</description:label><description:endPointType>item</description:endPointType><description:date>2008-10-06T10:55:46</description:date><description:itemType>OppsigelseFlyttingPDF</description:itemType></relation:itemDescription></relation:to></relation:subComponent></composite:subComponents><folder:name>1718255</folder:name></component:folder></component:component></rs:componentResponse></soapenv:Body></soapenv:Envelope>

--MIMEBoundaryurn_uuid_5FE8D4B1BC1BF63A551233827422467--

 
 
Do I have to delete the "MIMEBoundary" line (and the http header lines) before I parse the xml?
Or are there other options in the httpapi (http_url_post_xml)?
 
Best regards,
Magne
 
 
 
 

<<winmail.dat>>

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------