Click here to Skip to main content
15,889,808 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
C#
SoapDocumentMethodAttribute("urn: urn:WebService",
                                RequestNamespace = "urn: urn:WebService ",
                                ResponseNamespace = "urn: urn:WebService ",
                                Use = System.Web.Services.Description.SoapBindingUse.Literal,
                                ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    public string Method (string Parameter)
    {
        NetworkCredential credentials = new NetworkCredential(wsUser, wsPassWord);

        XmlSerializerNamespaces xsn = new XmlSerializerNamespaces();
        xsn.Add("ns0", "urn:Method");

        this.Url = this.Url = "http://";
        this.Credentials = credentials;

        object[] results = this.Invoke("Method", new object[] { Parameter });
        return ((string)(results[0]));
    }


Hello guys, i have a problem with a SOAP Communication, I can access to the web services and everything seems to be working fine, but the client needs a prefix in the XML parameter, so I try
Add these lines:
XmlSerializerNamespaces xsn = new XmlSerializerNamespaces();
       xsn.Add("ns0", "urn:Method");

And hers my first question, how can I see the XML out request I sent to the webservice?
And the second question will be, it’s there a way to add prefix to the send of the web service?

I hope you guys can help me, I am very frustrated with this

Thank you guys.
Posted
Updated 23-Feb-11 17:04pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900