How to make a C # web service to create soapenv namespace instead of soap?

Is there a way to make a C # /. NET web service that usually creates XML like this

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <DHeader xmlns="http://www.abc.com" /> </soap:Header> <soap:Body> <Response xmlns="http://www.abc.com"> <Result> <ErrorObject ObjectID="string" ErrorCode="" /> </Result> </Response> </soap:Body> </soap:Envelope> 

to create such XML.

 <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapv:Header> <DHeader xmlns="http://www.abc.com" /> </soapenv:Header> <soapenv:Body> <Response xmlns="http://www.abc.com"> <Result> <ErrorObject ObjectID="string" ErrorCode="" /> </Result> </Response> </soapenv:Body> </soapenv:Envelope> 

This is an attempt to solve the problem with the AXIS client using the .NET web service. AXIS suffocates in the soap namespace and needs a soapenv namespace. AXIS side change is not possible.

any thoughts or comments would be great.

Following is the exact error.

 line -1: Element Envelope@http ://www.w3.org/2003/05/soap-envelope is not a valid Envelope@http ://schemas.xmlsoap.org/soap/envelope/ document or a valid substitution. 
+4
source share
1 answer

soapenv not a namespace - it is a namespace prefix.

As long as prefixes refer to the same namespace, soap and soapenv refer to the same thing and have the same meaning.

It seems extremely unlikely that any version of AXIS is so badly broken that it specifically handles prefixes. You must assume that you have a different problem. Please send the exact error you receive.

+1
source

Source: https://habr.com/ru/post/1302293/


All Articles