@karibulab/wsdl2tsx-runtime 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +34 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -77,6 +77,40 @@ export function ConsultaCodigoPlan(props: ConsultaCodigoPlanProps) {
77
77
  }
78
78
  ```
79
79
 
80
+ ### Obteniendo el string XML
81
+
82
+ Las funciones generadas retornan directamente un string XML. Puedes usarlas así:
83
+
84
+ ```tsx
85
+ import { ConsultaCodigoPlan } from './consultaCodigoPlan';
86
+
87
+ // Llamar a la función con los props
88
+ const xmlString = ConsultaCodigoPlan({
89
+ codigoPlanList: {
90
+ planTO: {
91
+ codigoPlan: "12345",
92
+ tipoCliente: "FISICO"
93
+ }
94
+ }
95
+ });
96
+
97
+ // xmlString es un string XML válido que puedes usar directamente
98
+ console.log(xmlString);
99
+ // Output: <soap:Envelope xmlns:soap="...">...</soap:Envelope>
100
+
101
+ // Enviar en una petición HTTP
102
+ fetch('https://api.ejemplo.com/soap', {
103
+ method: 'POST',
104
+ headers: {
105
+ 'Content-Type': 'text/xml; charset=utf-8',
106
+ 'SOAPAction': 'consultaCodigoPlan'
107
+ },
108
+ body: xmlString
109
+ });
110
+ ```
111
+
112
+ **Nota importante:** El runtime convierte JSX directamente a strings XML. No necesitas renderizar ni procesar el resultado - las funciones retornan el XML como string listo para usar.
113
+
80
114
  ## Características
81
115
 
82
116
  - ✅ JSX personalizado para construir XML
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@karibulab/wsdl2tsx-runtime",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Runtime XML para código TSX generado desde WSDL",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",