Run report from JasperServer using PHP SOAP client

有些话、适合烂在心里 提交于 2019-12-03 20:33:44

This is more a comment than an answer, but probably helpful. There is a library called WSO2 WSF/PHP:

WSO2 WSF/PHP is intended to fill some of the gaps in the PHP extension. WSO2 WSF/PHP is an open source implementation like the SOAP extension and supports MTOM, WS-Addressing, WS-Security, and WS-RelaiableMessaging. WSO2 WSF/PHP supports a similar API to that of the SOAP extension. There are plans to wrap the API to provide the same API of the SOAP extension; it will be written in C.

I think you're looking for Binary attachment (MTOM).

The following links might be useful as well:

On their own site they have also some examples about integration to Web Services via php.

Is there any help for this?

SOAP request has no attachment support.

The idea is how you process your request. The only way I use SOAP requests with attachments is to Base64 Encode the data to be attached, and add it to a Text node.

Add the tag with attribute encoded="true/false". If its a file content, supply the name of the file in the request.

In the server side, if you find the node with an attribute encoded="true", You can take the data from the node, Base64Decode it and do what ever you need.

The idea of Base64 is to avoid many special characters that a SOAP request doesn't support in Request. Some SOAP processors have the option with "encoded" attribute.

You want to include a xml file in your SOAP query or response?

You could encode it base64 like in emails and then require the user on the other end to decode it.

$data = chunk_split(base64_encode($xml_data));

Then just add it in a seperate xml tag in your SOAP query/response.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!