vendredi 3 juin 2016

missing prefix in soap request c# dynamic web request

I´m using the WsdlImporter to read a wsdl-file and create a dynamic web request. But if I create the request a prefix in my request is missing and the consuming web service can not handle with this request. How can I force, that the prefix will be set? This is how the request should be:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://ift.tt/sVJIaE" xmlns:xsi="http://ift.tt/ra1lAU" xmlns:xsd="http://ift.tt/tphNwY"  xmlns:urn="urn:sap-com:document:sap:rfc:functions>
  <soap:Body>
    <urn:K23G_GET_COST_ELEMENTS>
      <ID_BEKNZ xmlns="">S</ID_BEKNZ>
      <ID_COLLECT_MESSAGES xmlns="">X</ID_COLLECT_MESSAGES>
      <ID_GJAHR xmlns="">2016</ID_GJAHR>
      <ID_KOKRS xmlns="">K001</ID_KOKRS>
      <ID_VERSN xmlns="">000</ID_VERSN>
      <ID_WRTTP xmlns="">04</ID_WRTTP>
      <ET_MESG xmlns="">
        <item />
      </ET_MESG>
      <ET_RESULTS xmlns="">
        <item />
      </ET_RESULTS>
      <IT_COSEL_KSTAR xmlns="">
        <item />
      </IT_COSEL_KSTAR>
      <IT_COSEL_OBJ xmlns="">
        <item />
      </IT_COSEL_OBJ>
    </urn:K23G_GET_COST_ELEMENTS>
  </soap:Body>
</soap:Envelope>

An this is how the request looks like: The urn before K23G_GET_COST_ELEMENTS is missing

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://ift.tt/sVJIaE" xmlns:xsi="http://ift.tt/ra1lAU" xmlns:xsd="http://ift.tt/tphNwY">
  <soap:Body>
    <K23G_GET_COST_ELEMENTS xmlns:urn="urn:sap-com:document:sap:rfc:functions>
      <ID_BEKNZ xmlns="">S</ID_BEKNZ>
      <ID_COLLECT_MESSAGES xmlns="">X</ID_COLLECT_MESSAGES>
      <ID_GJAHR xmlns="">2016</ID_GJAHR>
      <ID_KOKRS xmlns="">K001</ID_KOKRS>
      <ID_VERSN xmlns="">000</ID_VERSN>
      <ID_WRTTP xmlns="">04</ID_WRTTP>
      <ET_MESG xmlns="">
        <item />
      </ET_MESG>
      <ET_RESULTS xmlns="">
        <item />
      </ET_RESULTS>
      <IT_COSEL_KSTAR xmlns="">
        <item />
      </IT_COSEL_KSTAR>
      <IT_COSEL_OBJ xmlns="">
        <item />
      </IT_COSEL_OBJ>
    </urn:K23G_GET_COST_ELEMENTS>
  </soap:Body>
</soap:Envelope>

Somebody there who can help me? Thank you




Aucun commentaire:

Enregistrer un commentaire