Hi,
I installed a packet sniffer (Whireshark), executed the IBM Content
Manager WebServices Java demo program, and figured out the CM
WebServices Soap request.
The CM WebService reply consist of a Soap xml reply with 2 attachments
(1 tiff and 1 jpeg).
SOAP =
'<?xml version="1.0" encoding="UTF-8"?>'
+'<soapenv:Envelope '
+'xmlns:soapenv="[1]http://schemas.xmlsoap.org/soap/envelope/" '
+'xmlns:soapenc="[2]http://schemas.xmlsoap.org/soap/encoding/" '
+'xmlns:xsd="[3]http://www.w3.org/2001/XMLSchema" '
+'xmlns:xsi="[4]http://www.w3.org/2001/XMLSchema-instance%22%3E'
+'<soapenv:Header/><soapenv:Body>'
+'<p226:processXMLRequest '
+'xmlns:p226="[5]http://was60.webservices.mm.ibm.com%22%3e'/
+'<arg_0_0><RetrieveItemRequest contentOption='
+'"ATTACHMENTS" retrieveOption="CONTENT" '
+'xmlns="http://www.ibm.com/xmlns/db2/cm/beans/1.0/schema'
+'"><AuthenticationData connectString='
+'"SCHEMA=ICMADMIN" '
+'configString=""><ServerDef>'
+'<ServerType>ICM</ServerType><ServerName>'
+'icmnlsdb</ServerName></ServerDef>'
+'<LoginData><UserID>icmadmin'
+'</UserID><Password>xxxxxxxx</Password>'
+'</LoginData></AuthenticationData>'
+'<Item URI="http://192.168.0.6'
+'/CMBGenericWebService/CMBGetPIDUrl?pid='
+'93 3 ICM8 icmnlsdb13 XYZ_ClaimForm59 26 '
+'A1001001A08A25A01125D7608218 A08A25A01125D760821 '
+'14 1028&server=icmnlsdb&dsType=ICM"/>'
+'</RetrieveItemRequest></arg_0_0>'
+'<arg_1_0 xsi:nil="true"/>'
+'<arg_2_0 xsi:nil="true"/>'
+'<arg_3_0 xsi:nil="true"/></p226:processXMLRequest>'
+'</soapenv:Body></soapenv:Envelope>';
HTTP_setCCSIDs(1208: 277); // CCSID 1208 = UTF-8
// Send Soap xml til InfoTorg Person.
// Incoming subrutinen vil parse returen fra InfoTorg.
// rc = http_url_post_xml(
// 'http://192.168.0.6/CMBGenericWebService'
// +'/services/CMBGenericWebService'
// : %addr(SOAP) + 2
// : %len(SOAP)
// : *NULL
// : %paddr(Incoming)
// : *NULL
// : HTTP_TIMEOUT
// : HTTP_USERAGENT
// : 'text/xml;charset=utf-8'
// : ' ');
rc=http_url_post('http://192.168.0.6/CMBGenericWebService'
+'/services/CMBGenericWebService':
%addr(soap) + 2: %len(%trimr(soap)):
'/tmp/cmtest.xml'
: HTTP_TIMEOUT
: HTTP_USERAGENT
: 'text/xml;charset=utf-8'
: ' ');
I get a parse error when I use http_url_post_xml, but that makes sense
since the reply from CM WebService is a multi-part message with Soap
xml and 2 attachement (tiff and jpeg).
See the enclosed CM reply file. Hope this is helpfull in developing
WSDL2RPG with attachments.
I guess that I have to handle the reply manually. Or is there any way
to do this with httpapi?
I also need to upload attachments to the CM WebServices.
Can I use the example17 approach to send a multi part message with
soap xml and file attachments (pdf,tiff,jpeg).
Best regards,
Magne
References
1. http://schemas.xmlsoap.org/soap/envelope/
2. http://schemas.xmlsoap.org/soap/encoding/
3. http://www.w3.org/2001/XMLSchema
4. http://www.w3.org/2001/XMLSchema-instance%22%3E'
5. http://was60.webservices.mm.ibm.com%22%3e'/
Attachment:
cmtest.xml
Description: Binary data
----------------------------------------------------------------------- This is the FTPAPI mailing list. To unsubscribe, please go to: http://www.scottklement.com/mailman/listinfo/ftpapi -----------------------------------------------------------------------