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

Antwort: WSD2RPG and attachments





Magne,

I greatly appreciate every help and every piece of information I can get
regarding to WSDL2RPG in general and specific for attachments. Your trace
data confirms to be true what is described in "Attachments Profile Version
1.0".

> I guess that I have to handle the reply manually. Or is there any
> way to do this with httpapi?

I do not know if there is any way to do that with HTTP API. However it was
nice if there was a feature like the mfd_encoder to decode multi part
messages. I assume that Scott has an idea how to process the response data.
I guess that you have to put the reply into a IFS file and then splitt the
attachments and feed the parser with the SOAP message.

> Can I use the example17 approach to send a multi part message with
> soap xml and file attachments (pdf,tiff,jpeg).

I do not know that, too. But EXAMPLE17 looks promising and I will look at
it when I start with attachments. I did not know about the mfd_encoder
before. It seems as if it is THE way to go with SOAP and attachments.

Regards,

Thomas.

ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx schrieb am 27.01.2008 19:10:27:

> 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="http://schemas.xmlsoap.org/soap/envelope/"; '
> +'xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; '
> +'xmlns:xsd="http://www.w3.org/2001/XMLSchema"; '
> +'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance%22%3E'
> +'<soapenv:Header/><soapenv:Body>'
> +'<p226:processXMLRequest '
> +'xmlns:p226="http://was60.webservices.mm.ibm.com%22%3e'/
> +'<arg_0_0>&lt;RetrieveItemRequest contentOption='
> +'&quot;ATTACHMENTS&quot; retrieveOption=&quot;CONTENT&quot; '
> +'xmlns=&quot;http://www.ibm.com/xmlns/db2/cm/beans/1.0/schema'
> +'&quot;&gt;&lt;AuthenticationData connectString='
> +'&quot;SCHEMA=ICMADMIN&quot; '
> +'configString=&quot;&quot;&gt;&lt;ServerDef&gt;'
> +'&lt;ServerType&gt;ICM&lt;/ServerType&gt;&lt;ServerName&gt;'
> +'icmnlsdb&lt;/ServerName&gt;&lt;/ServerDef&gt;'
> +'&lt;LoginData&gt;&lt;UserID&gt;icmadmin'
> +'&lt;/UserID&gt;&lt;Password&gt;xxxxxxxx&lt;/Password&gt;'
> +'&lt;/LoginData&gt;&lt;/AuthenticationData&gt;'
> +'&lt;Item URI=&quot;http://192.168.0.6'
> +'/CMBGenericWebService/CMBGetPIDUrl?pid='
> +'93 3 ICM8 icmnlsdb13 XYZ_ClaimForm59 26 '
> +'A1001001A08A25A01125D7608218 A08A25A01125D760821 '
> +'14 1028&amp;server=icmnlsdb&amp;dsType=ICM&quot;/&gt;'
> +'&lt;/RetrieveItemRequest&gt;</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


--
IMPORTANT NOTICE:
This email is confidential, may be legally privileged, and is for the
intended recipient only. Access, disclosure, copying, distribution, or
reliance on any of it by anyone else is prohibited and may be a criminal
offence. Please delete if obtained in error and email confirmation to the sender.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------