Loading ...
Sorry, an error occurred while loading the content.

4782Parameters not being correctly translated by C# web service

Expand Messages
  • uzairaqeel
    Jul 5 11:41 AM
      Hi,

      I've got a simple webservice that requires a SOAP request that looks
      something like this:

      ---

      SOAPAction: "http://scm/doWinBuild"

      <?xml version="1.0" encoding="utf-8"?>
      <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:Body>
      <doWinBuild xmlns="http://scm">
      <projectName>string</projectName>
      <sourceURL>string</sourceURL>
      <buildTool>string</buildTool>
      <buildParams>string</buildParams>
      </doWinBuild>
      </soap:Body>
      </soap:Envelope>

      ---

      After much tweaking, I've finally got my SOAP::Lite client producing
      similar XML:

      ---

      <?xml version="1.0" encoding="UTF-8"?>
      <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-
      instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-
      ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <SOAP-ENV:Body>
      <namesp1:doWinBuild xmlns:namesp1="http://scm">
      <projectName xsi:type="xsd:string">myproject</projectName>
      <sourceURL xsi:type="xsd:string">mysource</sourceURL>
      <buildTool xsi:type="xsd:string">mybuildtool</buildTool>
      <buildParams xsi:type="xsd:string">mybuildparams</buildParams>
      </namesp1:doWinBuild>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      ---

      I've also checked that the SOAPAction is correct. However, when this
      hits the C# web service, it is not interpreted correctly: although
      the correct method (doWinBuild) is called, all the parameter
      variables (projectName, sourceURL etc.) are null.

      This is clearly because of some fault in the request, but I don't see
      anything obvious to explain it (of course, my XML is subpar, so...)

      Does anyone have any suggestions? Thanks in advance.