views:

141

answers:

0

I have Reference generated from WSDL (JIRA-SOAP API), which will throw an exception at deserialization (http://stackoverflow.com/questions/2188662/jira-soap-createissue-from-c), so my workaround would be to return only XmlNode of the response and parse it myself. However if i change [return:] element of:

    [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://soap.rpc.jira.atlassian.com", ResponseNamespace="http://somenamespace")]
    [return: System.Xml.Serialization.SoapElementAttribute("createIssueReturn")]
    public RemoteIssue createIssue(string in0, RemoteIssue in1) {
        object[] results = this.Invoke("createIssue", new object[] {
                    in0,
                    in1});
        return ((RemoteIssue)(results[0]));
    }

to: [return:System.Xml.Serialization.SoapElementAttribute("createIssueReturn")]

page will throw runtime exception: There was an error reflecting 'createIssueResult'. ---> System.NotSupportedException: The type System.Xml.XmlNode may not be serialized with SOAP-encoded messages. Set the Use for your message to Literal.

So is there a way to do it with SoapRpcMethodAttribute somehow. The trouble when turning it to SoapDocumentMethodAttribute[..., Use=System.Web.Services.Description.SoapBindingUse.Literal]

is i get null as a return, though the response is valid (Wireshark)