python-zeep icon indicating copy to clipboard operation
python-zeep copied to clipboard

add xmlns in the request

Open ibelevts opened this issue 9 months ago • 1 comments

Hello,

I'm trying to leverage WSDL files posted here

Changing locations to local files I made zeep parse it. Request which goes out looks like this below

014925: Feb 4 08:35:35.385: wsapi_https_data_read: base_buf (3FEE114)<?xml version="1.0" encoding="utf-8"?> <soap-env:Envelope xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope"> <soap-env:Body> <RequestXccRegister> <msgHeader> <transactionID>9a44b99e-1b68-4f0f-ad45-9f25ad0119f3</transactionID> </msgHeader> <applicationData> <url>http://10.80.76.244:50000/xcc</url> <name>mycurri</name> </applicationData> <providerData> <url>http://172.21.250.6:8090/cisco_xcc</url> </providerData> </RequestXccRegister> </soap-env:Body> </soap-env:Envelope> 014926: Feb 4 08:35:35.385: //WSAPI/INFRA/131/0/wsapi_https_recv: 014927: Feb 4 08:35:35.385: //WSAPI/INFRA/131/0/wsapi_https_recv: xml_parser_msg_parse fail, reason 7 014928: Feb 4 08:35:35.385: //WSAPI/INFRA/131/0/wsapi_response_xml_fault: 014929: Feb 4 08:35:35.385: //WSAPI/XCC/wsapi_xcc_operation_unknown_namespace: 014930: Feb 4 08:35:35.385: //WSAPI/INFRA/131/0/wsapi_response_xml_fault: Exit

As it is seen rejected due to unknown namespace which is defined as targetnamespace in WSDL.

It works if I send it as below:

<?xml version="1.0" encoding="utf-8"?> <soap-env:Envelope xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope"> <soap-env:Body> <RequestXccRegister xmlns="http://www.cisco.com/schema/cisco_xcc/v1_0"> <msgHeader> ....

Could you please suggest how to make zeep append this xmlns? Thanks

ibelevts avatar Feb 05 '25 13:02 ibelevts