Buenas,
A ver si te sirve. solo he quitado mi nombre y cif el resto esta tal cual.
No te preocupes que a las malas te paso el modulo de cancelar (yo tambien trabajo en .net aunque algo antiguo el framework)
Código:
**********************************
soap que se envia
**********************************
------=_Part_8b104c3f639d484db914ab05f0cff449
Content-Type: application/soap+xml; charset=UTF-8
Content-Transfer-Encoding: 8bit
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:eb3="http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/"><soapenv:Header><eb3:Messaging soapenv:mustUnderstand="1"><eb3:UserMessage><eb3:MessageInfo><eb3:Timestamp>2026-11-18T17:19:03.166Z</eb3:Timestamp><eb3:MessageId>uuid-d1b7de57-6612-4385-93fe-ae3fa22dab16</eb3:MessageId></eb3:MessageInfo><eb3:PartyInfo><eb3:From><eb3:PartyId type="urn:oasis:names:tc:ebcore:partyid-type:iso6523:9920">nif emisor(*******)</eb3:PartyId><eb3:Role>ebms:initiator</eb3:Role></eb3:From><eb3:To><eb3:PartyId type="urn:oasis:names:tc:ebcore:partyid-type:iso6523:9920">Q2826000H</eb3:PartyId><eb3:Role>ebms:responder</eb3:Role></eb3:To></eb3:PartyInfo><eb3:CollaborationInfo><eb3:Service>urn:cen.eu:en16931:cancelinvoice</eb3:Service><eb3:Action>CANCELINVOICE</eb3:Action><eb3:ConversationId>99c0f826-25b3-4407-968a-8caf1b961a73</eb3:ConversationId></eb3:CollaborationInfo><eb3:PayloadInfo><eb3:PartInfo href="cid:CancelarFact.xml"><eb3:PartProperties><eb3:Property name="MimeType">application/xml</eb3:Property></eb3:PartProperties></eb3:PartInfo></eb3:PayloadInfo></eb3:UserMessage></eb3:Messaging></soapenv:Header><soapenv:Body/></soapenv:Envelope>
------=_Part_8b104c3f639d484db914ab05f0cff449
Content-Type: application/xml; charset=UTF-8
Content-ID: <CancelarFact.xml>
Content-Transfer-Encoding: 8bit
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ApplicationResponse xmlns="urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><cbc:ID>VOID-20261118-13377187</cbc:ID><cbc:IssueDate>2026-11-18</cbc:IssueDate><cac:SenderParty></cac:SenderParty><cac:ReceiverParty></cac:ReceiverParty><cac:DocumentResponse><cac:Response><cbc:ResponseCode>CANCELINVOICE</cbc:ResponseCode><cbc:Description>Anulacion por error en emision sin transaccion real</cbc:Description><cbc:EffectiveDate>2026-10-05</cbc:EffectiveDate></cac:Response><cac:DocumentReference><cbc:ID>FAC202600007</cbc:ID><cbc:IssueDate>2026-10-05</cbc:IssueDate><cbc:DocumentType>Invoice</cbc:DocumentType><cac:IssuerParty><cac:PartyTaxScheme><cbc:CompanyID>nif emisor(*******)</cbc:CompanyID><cac:TaxScheme/></cac:PartyTaxScheme><cac:PartyLegalEntity><cbc:RegistrationName>nombre del emisor(*********)</cbc:RegistrationName></cac:PartyLegalEntity></cac:IssuerParty></cac:DocumentReference></cac:DocumentResponse></ApplicationResponse>
------=_Part_8b104c3f639d484db914ab05f0cff449--
******************************************************
documento XML del ApplicationResponse (lo que quiero anular)
*****************************************************
<ApplicationResponse>
<cbc:ID>VOID-20261118-13377187</cbc:ID>
<cbc:IssueDate>2026-11-18</cbc:IssueDate>
<cac:SenderParty/>
<cac:ReceiverParty/>
<cac:DocumentResponse>
<cac:Response>
<cbc:ResponseCode>CANCELINVOICE</cbc:ResponseCode>
<cbc:Description>
Anulacion por error en emision sin transaccion real
</cbc:Description>
<cbc:EffectiveDate>2026-10-05</cbc:EffectiveDate>
</cac:Response>
<cac:DocumentReference>
<cbc:ID>FAC202600007</cbc:ID>
<cbc:IssueDate>2026-10-05</cbc:IssueDate>
<cbc:DocumentType>Invoice</cbc:DocumentType>
<cac:IssuerParty>
<cac:PartyTaxScheme>
<cbc:CompanyID>nif emisor(*******)</cbc:CompanyID>
<cac:TaxScheme/>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>nombre del emisor(*********)</cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:IssuerParty>
</cac:DocumentReference>
</cac:DocumentResponse>
</ApplicationResponse>