bjmarte, To answer your original question, There are ways to adjust and
tweak the XML / SOAP that is generated by .NET (C#) clients. These are
attributes, but they are usually generated by the wsdl.exe tool that you use
to generate the client proxy or server skeleton.
You also said, originally, that the java client generates <soapenv:Envelope>
while C# generates <soap:Envelope>. This, in itself is not an indication
that the SOAP is different. soapenv: and soap: are namespace "prefixes"
which are defined in the XML itself. They are each defined to the same
thing, and so are equivalent. Eg:
in the Java side
<soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/"
....>
and in the C# side,
<soap:Envelope xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/" ... >
So soapenv: and soap: refer to the same namespace. They are the same.
But, there are meaningful differences in the XML generated by the .NET side
and the Java side, though. For one thing, the namespace for the getCustInfo
request is
"
http://subdomain2.client.com:8000/GetCustInfo" in the Java side, and is
"
https://clientwebsite.com/GetCustInfo" on the .NET side. These are
different and the difference is important. (note, in the Java side this
namespace is associated to prefix ns1 and in .NET it is associated with
prefix q1. The difference in prefix names is not meaningful) I cannot
imagine how your Java client is getting a totally different namespace here.
The WSDL you enclosed does not mention that namespace.
When I try to generate a proxy from the WSDL you sent, first, the WSDL isn't
valid. I guess because of the cleanup you tried to do. If I fix it up a
little, though, I get a valid C# proxy class, and I can also generate a
server skeleton. The client generates the same SOAP your .NET client
generates.
Another significant difference is the Java side obviously has some
additional logic to add in site-specific SOAP Header info. Those extensions
to the SOAP header are not described in the WSDL you enclosed. Not sure if
they are important, though, since it is app-specific. Could be the app
tolerates the omission of such header info.
-Dino
bjmarte said:
It isn't working the same for me.
WSDL (modified for client privacy):
<?xml version="1.0" encoding="UTF-8" ?><wsdl:definitions targetNamespace="
https://clientwebsite.com/GetCustInfo"
xmlns="
http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="
http://xml.apache.org/xml-soap"
xmlns:intf="
https://clientwebsite.com/GetCustInfo"
xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="
http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="
http://www.w3.org/2001/XMLSchema"><wsdl:message
name="getCustInfoRequest"><wsdl
art name="in0" type="xsd:string"
/><wsdl
art name="in1" type="xsd:string" /></wsdl:message><wsdl:message
name="getCustInfoResponse"><wsdl
art name="getCSRReturn" type="xsd:string"
/></wsdl:message><wsdl
ortType name="CustomerInfoManager"><wsdl
peration
name="getCustInfo" parameterOrder="in0 in1"><wsdl:input
message="intf:getCustInfoRequest" name="getCustInfoRequest" /><wsdl
utput
message="intf:getCustInfoResponse" name="getCustInfoResponse"
/></wsdl
peration></wsdl
ortType><wsdl:binding
name="GetCustInfoSoapBinding" type="intf:CustInfoManager"><wsdlsoap:binding
style="rpc" transport="
http://schemas.xmlsoap.org/soap/http"
/><wsdl
peration name="getCustInfo"><wsdlsoap
peration soapAction=""
/><wsdl:input name="getCustInfoRequest"><wsdlsoap:body
encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/"
namespace="
https://clientwebsite.com/getCustInfo" use="encoded"
/></wsdl:input><wsdl
utput name="getCustInfoResponse"><wsdlsoap:body
encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/"
namespace="
https://clientwebsite.com/getCustInfo" use="encoded"
/></wsdl
utput></wsdl
peration></wsdl:binding><wsdl:service
name="CustInfoManagerService"><wsdl
ort
binding="intf:GetCustInfoSoapBinding" name="GetCustInfo"><wsdlsoap:address
location="
https://clientwebsite.com/GetClientInfo"
/> said:
Soap Expected by the Web Service:
<?xml version="1.0" encoding="UTF-8" ?><soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header><x:app
id soapenv:actor="" soapenv:mustUnderstand="0"
xmlns:x="
http://subdomain.clientwebsite.com">MyCompanyCustInfo</x:appid><i:s
ubdomain soapenv:actor="" soapenv:mustUnderstand="0"
xmlns:i="
http://subdomain.clientwebsite.com"/><v:Version soapenv:actor=""
soapenv:mustUnderstand="0"
xmlns:v="
http://subdomain.clientwebsite.com">1</v:Version><call:callcontrol
soapenv:actor="" soapenv:mustUnderstand="0"
xmlns:call="
http://subdomain.clientwebsite.com"><call:calltype>synchronous</
call:calltype><call:transactionid></call:transactionid></call:callcontrol></
soapenv:Header><soapenv:Body><ns1:getCSR
soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="
http://subdomain2.client.com:8000/GetCustInfo"><in0
xsi:type="xsd:string"></in0><in1
xsi:type="xsd:string">111111111 said:
soap:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/"><q1:getCustIn
fo xmlns:q1="
https://clientwebsite.com/GetCustInfo"><in0
xsi:type="xsd:string" /><in1
xsi:type="xsd:string">111111111</in1></q1:getCustInfo></soap:Body></soap:Env
elope>