S
Stephen Ahn
Using VS.NET 2003,
Given a web service proxy method like this :
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://testing.com/atest/Test",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)]
public void
Test([System.Xml.Serialization.XmlElementAttribute(Namespace="http://testing.com/atest")]
System.Xml.XmlNode doc) {
this.Invoke("Test", new object[] {doc});
}
generates a soap request something like this :
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<doc xmlns="http://testing.com/atest">
<root xmlns="ns">
<data xmlns="a">one</data>
<data xmlns="a">two</data>
</root>
</doc>
</soap:Body>
</soap:Envelope>
Is it possible to change the web proxy method in some way, so that the
generated request does not have the "doc" element ? i.e. so that the
generated request looks like this :
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<root xmlns="ns">
<data xmlns="a">one</data>
<data xmlns="a">two</data>
</root>
</soap:Body>
</soap:Envelope>
(This is due to the way in which a third party web service expects the
request).
TIA,
Stephen
Given a web service proxy method like this :
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://testing.com/atest/Test",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)]
public void
Test([System.Xml.Serialization.XmlElementAttribute(Namespace="http://testing.com/atest")]
System.Xml.XmlNode doc) {
this.Invoke("Test", new object[] {doc});
}
generates a soap request something like this :
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<doc xmlns="http://testing.com/atest">
<root xmlns="ns">
<data xmlns="a">one</data>
<data xmlns="a">two</data>
</root>
</doc>
</soap:Body>
</soap:Envelope>
Is it possible to change the web proxy method in some way, so that the
generated request does not have the "doc" element ? i.e. so that the
generated request looks like this :
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<root xmlns="ns">
<data xmlns="a">one</data>
<data xmlns="a">two</data>
</root>
</soap:Body>
</soap:Envelope>
(This is due to the way in which a third party web service expects the
request).
TIA,
Stephen