├── .dir-locals.el ├── .gitignore ├── .hgignore ├── COPYING ├── ChangeLog ├── jira2.el ├── soap-client.el └── soap-inspect.el /.dir-locals.el: -------------------------------------------------------------------------------- 1 | ;; -*- no-byte-compile: t -*- 2 | 3 | ((nil . ((bug-reference-url-format . "http://code.google.com/p/emacs-soap-client/issues/detail?id=%s")))) 4 | 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | syntax: glob 2 | *~ 3 | *.elc 4 | *.orig 5 | .DS_Store 6 | -------------------------------------------------------------------------------- /.hgignore: -------------------------------------------------------------------------------- 1 | syntax: glob 2 | *~ 3 | *.elc 4 | *.orig 5 | .DS_Store 6 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | 2017-06-13 Thomas Fitzsimmons 2 | 3 | * soap-client.el: Bump version to 3.1.3. 4 | (soap-name-p): Fix checkdoc issue. 5 | (soap-invoke-internal): Fix indentation. 6 | 7 | 2017-06-13 Alex Harsanyi 8 | 9 | * soap-client.el (soap-invoke-internal): make SOAPAction header a 10 | utf-8 encoded string (See bug #21) 11 | 12 | 2017-05-24 Thomas Fitzsimmons 13 | 14 | * soap-client.el: Bump version to 3.1.2. 15 | 16 | 2017-05-24 Thomas Fitzsimmons 17 | 18 | * soap-client.el (url-http-response-status): Add defvar. 19 | (soap-fetch-xml-from-url): Remove special declaration of 20 | url-http-response-status. 21 | (soap-invoke-internal): Likewise. 22 | 23 | 2017-05-24 Thomas Fitzsimmons 24 | 25 | * soap-client.el: Require cl-lib version 0.6.1. 26 | 27 | 2017-05-24 Thomas Fitzsimmons 28 | 29 | * soap-client.el, soap-inspect.el: Update copyright year to 2017. 30 | 31 | 2017-05-24 Thomas Fitzsimmons 32 | 33 | * soap-client.el (soap-encode-xs-element): Remove progn. 34 | (soap-xs-add-union): Wrap long line. 35 | 36 | 2017-05-24 Thomas Fitzsimmons 37 | 38 | * soap-client.el, soap-inspect.el: Merge emacs.git whitespace 39 | changes to eliminate tabs. 40 | 41 | 2017-05-24 Alex Harsanyi 42 | 43 | * soap-inspect.el: replaced cl library with cl-lib, case replaced 44 | with cl-case, destructuring-bind with cl-destructuring-bind and 45 | loop with cl-loop 46 | 47 | * soap-client.el: replaced cl library with cl-lib. defstruct 48 | replaced with cl-defstruct, assert with cl-assert, case with 49 | cl-case, ecase with cl-ecase, loop with cl-loop and 50 | destructuring-bind with cl-destructuring-bind. 51 | 52 | 2016-03-16 Thomas Fitzsimmons 53 | 54 | * soap-inspect.el (soap-inspect-xs-attribute): Fix checkdoc error. 55 | (soap-inspect-xs-attribute-group): Likewise. 56 | 57 | 2016-03-16 Thomas Fitzsimmons 58 | 59 | * soap-client.el: Bump version to 3.1.1. 60 | 61 | 2016-03-16 Thomas Fitzsimmons 62 | 63 | * soap-client.el (soap-encode-xs-complex-type): Fix error message. 64 | (soap-find-port): Delete trailing whitespace. 65 | (soap-find-operation): Fix documentation and rename parameter. 66 | (soap-find-port): Likewise. 67 | (soap-operation-arity): Likewise. 68 | 69 | 2016-03-16 Thomas Fitzsimmons 70 | 71 | * soap-client.el: Bump version to 3.1.0. 72 | 73 | 2016-03-02 Thomas Fitzsimmons 74 | 75 | Import changes from Emacs master branch 76 | * soap-client.el: Update copyright years. 77 | (soap-warning): Fix docstring quoting. 78 | (soap-decode-date-time): Likewise. 79 | (soap-validate-xs-simple-type): Remove tabs for indentation. 80 | * soap-inspect.el: Update copyright years. 81 | 82 | 2016-02-29 Alex Harsanyi 83 | 84 | * soap-client.el (soap-find-port, soap-find-operation) 85 | (soap-operation-arity): new defuns 86 | (soap-invoke-internal): use soap-find-port, soap-find-operation. 87 | 88 | 2015-11-11 Thomas Fitzsimmons 89 | 90 | * soap-client.el: Bump version to 3.0.2. 91 | 92 | 2015-11-11 Thomas Fitzsimmons 93 | 94 | * soap-client.el (soap-warning): Use format, not format-message. 95 | 96 | 2015-11-08 Thomas Fitzsimmons 97 | 98 | * soap-client.el: Add cl-lib to Package-Requires. Require cl-lib. 99 | (soap-validate-xs-simple-type): Use cl-labels instead of cl-flet. 100 | 101 | 2015-11-08 Thomas Fitzsimmons 102 | 103 | * soap-client.el: Support Emacs versions that do not have 104 | define-error. 105 | 106 | 2015-11-08 Thomas Fitzsimmons 107 | 108 | * soap-inspect.el: Remove version header. 109 | 110 | 2015-11-08 Thomas Fitzsimmons 111 | 112 | * soap-client.el, soap-inspect.el, jira2.el: Fix first line header 113 | format. 114 | 115 | 2015-10-25 Thomas Fitzsimmons 116 | 117 | * soap-client.el, soap-inspect.el: Bump version to 3.0.1. 118 | 119 | 2015-10-25 Thomas Fitzsimmons 120 | 121 | * soap-client.el, soap-inspect.el: Update home page. 122 | 123 | 2015-10-22 Thomas Fitzsimmons 124 | 125 | * soap-client.el, soap-inspect.el: Bump version to 3.0.0. 126 | 127 | 2015-10-22 Thomas Fitzsimmons 128 | 129 | * soap-inspect.el: Merge in changes from Emacs master branch. 130 | 131 | 2015-10-22 Thomas Fitzsimmons 132 | 133 | * soap-client.el: Merge in changes from Emacs master branch. 134 | 135 | 2015-10-22 Thomas Fitzsimmons 136 | 137 | * soap-inspect.el: Shorten first line description. 138 | 139 | 2015-10-21 Thomas Fitzsimmons 140 | 141 | * soap-client.el: Make a small whitespace fix. 142 | 143 | 2015-10-21 Thomas Fitzsimmons 144 | 145 | * soap-inspect.el: Update copyright years. 146 | 147 | 2015-10-17 Thomas Fitzsimmons 148 | 149 | * soap-client.el (soap-encoded-namespaces): Move above first use 150 | in soap-encode-xs-element. 151 | 152 | 2015-10-10 Alex Harsanyi 153 | 154 | * soap-client.el (soap-type-is-array?): new defun 155 | (soap-encode-xs-element): handle array elements in this function 156 | (soap-encode-xs-complex-type): flag error if asked to encode an 157 | array type, this is handled in `soap-encode-xs-element' 158 | 159 | 2015-09-26 Thomas Fitzsimmons 160 | 161 | * soap-inspect.el (soap-inspect-xs-attribute-group): Do not print 162 | type for attribute group. 163 | 164 | 2015-09-26 Thomas Fitzsimmons 165 | 166 | * soap-inspect.el (soap-sample-value-for-xs-attribute-group): New 167 | function. 168 | (soap-inspect-xs-attribute-group): Likewise. 169 | 170 | 2015-09-26 Thomas Fitzsimmons 171 | 172 | * soap-inspect.el 173 | (soap-resolve-references-for-xs-attribute-group): Resolve 174 | references of attributes in an attribute group. 175 | 176 | 2015-09-26 Thomas Fitzsimmons 177 | 178 | * soap-client.el (soap-decode-xs-attributes): Process attribute 179 | type directly, not through soap-wsdl-get. 180 | 181 | 2015-09-26 Thomas Fitzsimmons 182 | 183 | * soap-client.el (soap-xs-parse-attribute): Leave reference nil if 184 | reference attribute is nil. 185 | 186 | 2015-09-26 Thomas Fitzsimmons 187 | 188 | * soap-client.el (soap-resolve-references-for-xs-attribute): 189 | Convert XML schema attributes to xsd:string. 190 | 191 | 2015-09-25 Thomas Fitzsimmons 192 | 193 | * soap-inspect.el (soap-sample-value-for-xs-attribute): New 194 | function. 195 | (soap-sample-value-for-xs-simple-type): Prepend attributes to 196 | result. 197 | (soap-sample-value-for-xs-complex-type): Likewise. 198 | (soap-inspect-xs-attribute): New function. 199 | (soap-inspect-xs-simple-type): Print attributes. 200 | (soap-inspect-xs-complex-type): Likewise. 201 | 202 | 2015-09-25 Thomas Fitzsimmons 203 | 204 | * soap-inspect.el (soap-resolve-references-for-xs-simple-type): 205 | Resolve references for attributes. 206 | (soap-resolve-references-for-xs-complex-type): Likewise. 207 | 208 | 2015-04-07 Thomas Fitzsimmons 209 | 210 | * soap-client.el (soap-xml-node-find-matching-child): Rename from 211 | soap-xml-node-first-child. 212 | (soap-xs-parse-attribute): Call soap-xml-node-find-matching-child. 213 | (soap-xs-parse-simple-type): Likewise. 214 | 215 | 2014-12-06 Thomas Fitzsimmons 216 | 217 | * soap-client.el (soap-invoke-async): Add error checking. 218 | 219 | 2014-12-06 Thomas Fitzsimmons 220 | 221 | * soap-client.el (soap-invoke-internal): New function. 222 | (soap-invoke-async): Call soap-invoke-internal. 223 | (soap-invoke): Likewise. 224 | 225 | 2014-12-06 Thomas Fitzsimmons 226 | 227 | * soap-client.el (soap-invoke-async): Ensure buffer passed to 228 | url-retrieve callback is killed. 229 | 230 | 2014-12-03 Thomas Fitzsimmons 231 | 232 | * soap-client.el (soap-parse-wsdl-phase-validate-node): Rename 233 | function. 234 | (soap-parse-wsdl-phase-fetch-imports): Likewise. 235 | (soap-parse-wsdl-phase-parse-schema): Likewise. 236 | (soap-parse-wsdl-phase-fetch-schema): Likewise. 237 | (soap-parse-wsdl-phase-finish-parsing): Likewise. 238 | (soap-parse-wsdl): Update calls. 239 | 240 | 2014-12-03 Thomas Fitzsimmons 241 | 242 | * soap-client.el (soap-invoke-async): Fix callback invocation. 243 | 244 | 2014-12-03 Thomas Fitzsimmons 245 | 246 | * soap-client.el (soap-invoke-async): New function. 247 | (soap-invoke): Reimplement using soap-invoke-async. 248 | 249 | 2014-12-03 Thomas Fitzsimmons 250 | 251 | * soap-client.el (soap-parse-server-response): Improve docstring. 252 | (soap-invoke): Inline call to soap-parse-server-response. 253 | 254 | 2014-12-03 Thomas Fitzsimmons 255 | 256 | * soap-client.el (soap-decode-xs-complex-type): Prevent incorrect 257 | warning. 258 | 259 | 2014-12-02 Thomas Fitzsimmons 260 | 261 | * soap-client.el (soap-parse-server-response): Rename 262 | soap-process-url-response. Destroy the mime part. 263 | (soap-invoke): Call soap-parse-server-response. 264 | 265 | 2014-12-02 Thomas Fitzsimmons 266 | 267 | * soap-client.el: Update copyright date. 268 | 269 | 2014-12-02 Thomas Fitzsimmons 270 | 271 | * soap-client.el: Fix checkdoc issues. 272 | 273 | 2014-12-02 Thomas Fitzsimmons 274 | 275 | * soap-client.el: Fix indentation and long lines. 276 | 277 | 2014-12-01 Thomas Fitzsimmons 278 | 279 | * soap-client.el (soap-time-format): Remove variable. 280 | (soap-encode-xs-basic-type): Simplify date-time format detection. 281 | (soap-decode-xs-basic-type): Remove soap-time-format support. 282 | 283 | 2014-12-01 Thomas Fitzsimmons 284 | 285 | * soap-client.el (soap-process-url-response): New function. 286 | (soap-fetch-xml-from-url): Call soap-process-url-response. 287 | (soap-parse-wsdl-phase-1): New function. 288 | (soap-parse-wsdl-phase-2): Likewise. 289 | (soap-parse-wsdl-phase-3): Likewise. 290 | (soap-parse-wsdl-phase-4): Likewise. 291 | (soap-parse-wsdl-phase-5): Likewise. 292 | (soap-parse-wsdl): Call phase functions. 293 | 294 | 2014-12-01 Thomas Fitzsimmons 295 | 296 | * soap-client.el (soap-decode-xs-basic-type): Remove one-argument 297 | and call. 298 | 299 | 2014-12-01 Thomas Fitzsimmons 300 | 301 | * soap-client.el (soap-decode-date-time): Improve docstring. 302 | 303 | 2014-12-01 Thomas Fitzsimmons 304 | 305 | * soap-client.el (soap-xmlschema-imports): Remove variable. 306 | (soap-parse-schema): Add wsdl argument. Look up XML schema 307 | imports from wsdl. 308 | (soap-load-wsdl): Do not set soap-xmlschema-imports. 309 | (soap-parse-wsdl): Get XML schema imports from wsdl. 310 | 311 | 2014-12-01 Thomas Fitzsimmons 312 | 313 | * soap-client.el (soap-current-file): Remove variable. 314 | (soap-wsdl): Add current-file slot. 315 | (soap-fetch-xml-from-url): Add wsdl argument. Look up current 316 | file from wsdl. 317 | (soap-fetch-xml-from-file): Likewise. 318 | (soap-fetch-xml): Likewise. 319 | (soap-load-wsdl): Always create wsdl object first. 320 | (soap-parse-wsdl): Pass wsdl to soap-fetch-xml. 321 | 322 | 2014-11-29 Thomas Fitzsimmons 323 | 324 | * soap-client.el (soap-xs-element): Add is-group slot. 325 | (soap-xs-parse-element): Set is-group slot. 326 | (soap-resolve-references-for-xs-element): Skip is-group elements. 327 | (soap-xs-complex-type): Add is-group slot. 328 | (soap-xs-parse-complex-type): Set is-group slot. 329 | (soap-xs-parse-sequence): Parse xsd:group elements. 330 | (soap-resolve-references-for-xs-complex-type): Inline elements 331 | from referenced xsd:group nodes. 332 | (soap-parse-schema): Parse xsd:group nodes. 333 | 334 | 2014-11-25 Thomas Fitzsimmons 335 | 336 | * soap-client.el (soap-invoke): Don't set url-http-version to 1.0. 337 | 338 | 2014-11-25 Thomas Fitzsimmons 339 | 340 | * soap-client.el (soap-decode-xs-complex-type): Allow choice nodes 341 | to accept multiple values. 342 | 343 | 2014-11-12 Thomas Fitzsimmons 344 | 345 | * soap-client.el (soap-encode-body): Check parameters argument for 346 | extra header values. 347 | 348 | 2014-11-11 Thomas Fitzsimmons 349 | 350 | * soap-client.el (soap-well-known-xmlns): Add wsa and wsaw tags. 351 | (soap-operation): Add input-action and output-action slots. 352 | (soap-parse-operation): Parse wsaw:Action nodes. 353 | (soap-encode-body): Encode service-url for WS-Addressing. 354 | (soap-create-envelope): Likewise. 355 | (soap-invoke): Update soap-create-envelope call to provide 356 | service-url argument. 357 | 358 | 2014-09-24 Thomas Fitzsimmons 359 | 360 | * soap-client.el (soap-decode-xs-complex-type): Support xsi:type 361 | override attribute. 362 | (soap-decode-array): Likewise. 363 | 364 | 2014-09-23 Thomas Fitzsimmons 365 | 366 | * soap-client.el (soap-parse-schema): Handle location attribute. 367 | 368 | 2014-08-20 Thomas Fitzsimmons 369 | 370 | * soap-client.el (soap-decode-type): Check that multiRef matched 371 | validation regexp. 372 | 373 | 2014-08-20 Thomas Fitzsimmons 374 | 375 | * soap-client.el (soap-encode-xs-simple-type): Encode xsd:list 376 | nodes. 377 | (soap-decode-xs-simple-type): Decode xsd:list nodes. 378 | 379 | 2014-08-17 Thomas Fitzsimmons 380 | 381 | * soap-client.el (soap-get-candidate-elements): Fix reference 382 | handling. 383 | 384 | 2014-08-17 Thomas Fitzsimmons 385 | 386 | * soap-client.el (soap-xs-simple-type): Add is-list slot. 387 | (soap-xs-parse-simple-type): Call soap-xs-add-list for xsd:list 388 | nodes. 389 | (soap-xs-add-list): New function. 390 | 391 | 2014-08-17 Thomas Fitzsimmons 392 | 393 | * soap-client.el (soap-encode-xs-element): When a boolean is 394 | expected, interpret nil as "false". 395 | 396 | 2014-08-04 Thomas Fitzsimmons 397 | 398 | * soap-client.el (soap-make-xs-basic-types): Add gYearMonth, 399 | gYear, gMonthDay, gDay and gMonth. 400 | 401 | 2014-07-24 Thomas Fitzsimmons 402 | 403 | * soap-client.el (soap-time-format): New variable. 404 | (soap-encode-xs-basic-type): Handle dateTime, time, date, 405 | gYearMonth, gYear, gMonthDay, gDay and gMonth. 406 | (soap-decode-date-time): New function. 407 | (soap-decode-xs-basic-type): Use soap-decode-date-time. 408 | 409 | 2014-07-03 Thomas Fitzsimmons 410 | 411 | * soap-client.el (soap-encode-xs-basic-type): Validate value after 412 | encoding. 413 | (soap-decode-xs-basic-type): Validate value before decoding. 414 | 415 | 2014-07-03 Thomas Fitzsimmons 416 | 417 | * soap-client.el (soap-validate-xs-basic-type): New function. 418 | (soap-validate-xs-simple-type): Call soap-validate-xs-basic-type. 419 | 420 | 2014-06-29 Thomas Fitzsimmons 421 | 422 | * soap-client.el (soap-xs-add-union): Append result to base 423 | instead of overwriting it. 424 | (soap-validate-xs-simple-type): Add union support. 425 | 426 | 2014-06-21 Thomas Fitzsimmons 427 | 428 | * soap-client.el (soap-xs-add-restriction): Translate pattern to 429 | Emacs regexp using xsdre-translate. 430 | (soap-validate-xs-simple-type): Validate value against pattern. 431 | 432 | 2014-06-03 Thomas Fitzsimmons 433 | 434 | * soap-client.el (soap-xs-add-union): Preserve WSDL order of 435 | inline simpleType nodes. 436 | (soap-decode-type): Handle union types. 437 | 438 | 2014-05-25 Thomas Fitzsimmons 439 | 440 | * soap-client.el (soap-decode-xs-attributes): Decode basic-type 441 | attributes. 442 | 443 | 2014-05-25 Alex Harsanyi 444 | 445 | * soap-client.el (soap-get-xs-attributes-from-groups): renamed 446 | from soap-xs-attribute-group-consolidate, all callers updated 447 | (soap-get-xs-attributes): renamed from 448 | soap-xs-attributes-consolidate, all callers updated 449 | 450 | 2014-05-21 Thomas Fitzsimmons 451 | 452 | * soap-client.el (soap-xs-type): Add attribute-group slot. 453 | (soap-xs-attribute-group): New type. 454 | (soap-xs-parse-attribute-group): New function. 455 | (soap-resolve-references-for-xs-attribute-group): Likewise. 456 | (soap-xs-add-extension): Handle attribute groups. 457 | (soap-resolve-references-for-xs-simple-type): Likewise. 458 | (soap-xs-parse-complex-type): Likewise. 459 | (soap-xs-parse-extension-or-restriction): Likewise. 460 | (soap-resolve-references-for-xs-complex-type): Likewise. 461 | (soap-xs-attribute-group-consolidate): New function. 462 | (soap-xs-attributes-consolidate): Handle attribute groups. 463 | (soap-parse-schema): Likewise. 464 | 465 | 2014-05-17 Thomas Fitzsimmons 466 | 467 | * soap-client.el (soap-encode-xs-basic-type): Fix boolean 468 | encoding. 469 | 470 | 2014-05-04 Thomas Fitzsimmons 471 | 472 | * soap-client.el (soap-encode-xs-complex-type): Print ref element 473 | names in warnings. 474 | 475 | 2014-04-27 Thomas Fitzsimmons 476 | 477 | * soap-client.el (soap-decode-xs-complex-type): Fix splicing. 478 | 479 | 2014-04-26 Thomas Fitzsimmons 480 | 481 | * soap-client.el (soap-decode-xs-complex-type): Eliminate invalid 482 | warnings for choice types. 483 | 484 | 2014-04-26 Thomas Fitzsimmons 485 | 486 | * soap-client.el (soap-encode-xs-complex-type-attributes): Also 487 | encode base type attributes. 488 | 489 | 2014-04-26 Thomas Fitzsimmons 490 | 491 | * soap-client.el (soap-encode-xs-complex-type): Fix compilation 492 | warning. Print e-name in warnings, or element if e-name is nil. 493 | 494 | 2014-04-20 Thomas Fitzsimmons 495 | 496 | * soap-client.el (soap-xs-element): Add alternatives slot. 497 | (soap-xs-parse-element): Set substitution-group. 498 | (soap-resolve-references-for-xs-element): Populate alternatives 499 | slot. 500 | (soap-get-candidate-elements): New function. 501 | (soap-encode-xs-complex-type): Iterate through all candidate 502 | elements. Handle types with nil type indicator. Fix warning 503 | logic. 504 | 505 | 2014-03-24 Alex Harsanyi 506 | 507 | * soap-client.el (soap-current-wsdl): moved declaration earlier in 508 | the file to prevent compiler warning. 509 | 510 | 2014-03-23 Thomas Fitzsimmons 511 | 512 | * soap-client.el (soap-node-optional): New function. 513 | (soap-node-multiple): Likewise. 514 | (soap-xs-parse-element): Call soap-node-optional and 515 | soap-node-multiple. 516 | (soap-xs-complex-type): Add optional? and multiple? slots. 517 | (soap-xml-get-children-fq): New function. 518 | (soap-xs-element-get-fq-name): Likewise. 519 | (soap-xs-complex-type-optional-p): Likewise. 520 | (soap-xs-complex-type-multiple-p): Likewise. 521 | (soap-xs-attributes-consolidate): Likewise. 522 | (soap-decode-xs-attributes): Likewise. 523 | (soap-decode-xs-complex-type): Decode types with nil type 524 | indicator. Support children that use local namespaces. Decode 525 | attributes. Add type considerations to optional? and multiple? 526 | warnings. 527 | 528 | 2014-02-04 Thomas Fitzsimmons 529 | 530 | * soap-client.el (soap-xs-parse-extension-or-restriction): Store 531 | parsed attributes. 532 | (soap-encode-xs-complex-type-attributes): Encode custom 533 | attributes. 534 | 535 | 2014-02-04 Thomas Fitzsimmons 536 | 537 | * soap-client.el (soap-encode-xs-complex-type-attributes): don't 538 | add the xsi:type attribute (Exchange refuses requests which have 539 | this attribute) 540 | 541 | 2013-12-27 Alex Harsanyi 542 | 543 | * soap-client.el, soap-inspect.el: converted to lexical binding, 544 | corrected compiler warnings about unused function arguments and 545 | local variables. 546 | 547 | 2013-12-13 Thomas Fitzsimmons 548 | 549 | * soap-client.el (soap-decode-xs-complex-type): Handle nil type 550 | indicator. 551 | (soap-parse-envelope): Handle response headers. 552 | (soap-parse-response): Likewise. Only return non-nil decoded 553 | values. 554 | 555 | 2013-12-12 Thomas Fitzsimmons 556 | 557 | * soap-client.el (soap-validate-xs-simple-type): Return validated 558 | value. 559 | 560 | 2013-12-02 Alex Harsanyi 561 | 562 | * soap-client.el (soap-xs-parse-element) 563 | (soap-xs-parse-simple-type) 564 | (soap-xs-parse-complex-type) 565 | (soap-parse-message) 566 | (soap-parse-operation): add the current namespace to the element 567 | being created 568 | (soap-resolve-references-for-xs-element) 569 | (soap-resolve-references-for-xs-simple-type) 570 | (soap-resolve-references-for-xs-complex-type) 571 | (soap-resolve-references-for-operation): resolve the namespace to 572 | the namespace tag 573 | (soap-make-wsdl): specify a namespace tag when creating the xsd 574 | and soapenc namespaces 575 | (soap-wsdl-resolve-references): don't update namespace tags in 576 | elements here 577 | (soap-parse-port-type): bind the urn: to soap-target-xmlns 578 | (soap-encode-body): don't add nil namespace tags to 579 | soap-encoded-namespaces 580 | 581 | 2013-11-25 Alex Harsanyi 582 | 583 | * soap-inspect.el: use `soap-make-wsdl` to construct the object 584 | for registering the soap-inspect method. 585 | 586 | Make debbugs tests pass 587 | 588 | * soap-client.el (soap-decode-any-type): use soap-l2fq on the type 589 | name, also skip string only nodes when decoding a structure. 590 | (soap-xs-parse-complex-type): (BUG) dispatch parsing for choice 591 | types too 592 | (soap-encode-body): grab the header value from the param table 593 | 594 | 2013-11-23 Thomas Fitzsimmons 595 | 596 | * soap-client.el (soap-should-encode-value-for-xs-element): new 597 | function 598 | (soap-encode-xs-element): don't encode nil value unless needed 599 | 600 | 2013-11-17 Alex Harsanyi 601 | 602 | * soap-client.el (soap-bound-operation): new slot `soap-body` 603 | (soap-parse-binding): parse the message parts required in the body 604 | (soap-encode-body): encode only the parts that are declared to be 605 | part of the body 606 | 607 | 2013-11-15 Alex Harsanyi 608 | 609 | * soap-client.el (soap-encode-xs-element): use the fq name when 610 | writing out the tag. 611 | (soap-encode-body): remove hack that inserts the xmlns in the 612 | element attributes list. 613 | 614 | 2013-11-14 Alex Harsanyi 615 | 616 | * soap-client.el (soap-xs-attribute): add "default" slot 617 | (soap-xs-parse-attribute): default slot is set from the XML 618 | "fixed" attribute. 619 | (soap-encode-xs-complex-type-attributes): encode any attributes 620 | that have a default value. Also, don't put the xsi:nil attribute 621 | when the complex type has no content anyway. 622 | 623 | 2013-11-04 Alex Harsanyi 624 | 625 | * soap-client.el (soap-well-known-xmlns): add the xml namespace 626 | (soap-local-xmlns): start with the xml namespace 627 | (soap-xml-node-first-child): skip xsd:annotation nodes too 628 | (soap-make-xs-basic-types): more xsd types added 629 | (soap-encode-xs-basic-type, soap-decode-xs-basic-type): handle 630 | "language", "time", "date", "nonNegativeInteger" 631 | (soap-resolve-references-for-xs-element): don't signal an error if 632 | the element does not have a type. 633 | (soap-xs-parse-simple-type): subtypes are handled with ecase, 634 | added stum for xsd:list 635 | (soap-xs-add-union): call soap-l2fq on all union members 636 | (soap-xs-add-extension): call soap-l2fq on the base member 637 | (soap-resolve-references-for-xs-simple-type): don't signal an 638 | error if the simple type has no base. 639 | (soap-resolve-references-for-xs-simple-type): bugfix, call 640 | soap-wsdl-get on each type of the base 641 | 642 | 2013-04-03 Alex Harsanyi 643 | 644 | * soap-client.el (soap-resolve-references-for-xs-attribute): 645 | referenced type can be eiher a simple type or a basic type 646 | (soap-xs-add-restriction) 647 | (soap-xs-parse-extension-or-restriction): use `soap-l2fq' on base 648 | (soap-make-xs-basic-types) 649 | (soap-encode-xs-basic-type, soap-decode-xs-basic-type): add 650 | support for more XMLSchema basic types 651 | (soap-current-file, soap-xmlschema-imports): new defvars 652 | (soap-parse-schema): add locations from xsd:import tags to 653 | `soap-xmlschema-imports' 654 | (soap-wsdl): make destructor private 655 | (soap-make-wsdl): new defun, SOAP-WSDL object constructor 656 | (soap-wsdl-add-alias): check if we try to replace aliases 657 | (soap-fetch-xml-from-url, soap-fetch-xml-from-file) 658 | (soap-fetch-xml): new defuns 659 | (soap-load-wsdl): updated to load the WSDL from either a file or 660 | an url 661 | (soap-load-wsdl-from-url): now an alias to `soap-load-wsdl' 662 | (soap-parse-wsdl): process wsdl:import tags and imports from 663 | `soap-xmlschema-imports' 664 | 665 | * soap-client.el (soap-l2wk): bugfix: call symbolp instead of 666 | symbol-name 667 | (soap-l2fq): make the name part always a string 668 | (soap-name-p): new defun, used for name tests 669 | 670 | 2012-12-19 Alex Harsanyi 671 | 672 | * soap-inspect.el (soap-sample-value-for-xs-complex-type): supply 673 | sample values for choice types with a special tag 674 | 675 | * soap-client.el (soap-encode-xs-complex-type): handle anonymous 676 | elements correctly 677 | (soap-encode-value): accept nodes that have no namespace tag 678 | 679 | 2013-01-29 Alex Harsanyi 680 | 681 | * soap-client.el (soap-invoke): encode the string for 682 | `url-request-data' as UTF-8. Fixes issue 16 683 | 2011-12-30 Alex Harsanyi 684 | 685 | * soap-client.el (soap-resolve-references-for-sequence-type) 686 | (soap-resolve-references-for-array-type): hack to prevent self 687 | references, see Bug#9. 688 | (soap-parse-envelope): report the contents of the 'detail' node 689 | when receiving a fault reply. 690 | (soap-parse-envelope): report the contents of the entire 'detail' 691 | node. 692 | 693 | 2011-12-21 Alex Harsanyi 694 | 695 | * soap-inspect.el (soap-sample-value-for-simple-type) 696 | (soap-inspect-simple-type): new function 697 | 698 | * soap-client.el (soap-simple-type): new struct 699 | (soap-default-xsd-types, soap-default-soapenc-types) 700 | (soap-decode-basic-type, soap-encode-basic-type): support 701 | unsignedInt and double basic types 702 | (soap-resolve-references-for-simple-type) 703 | (soap-parse-simple-type, soap-encode-simple-type): new function 704 | (soap-parse-schema): parse xsd:simpleType declarations 705 | 706 | 2011-11-02 Alex Harsanyi 707 | 708 | * soap-client.el (soap-default-xsd-types) 709 | (soap-default-soapenc-types): add integer, byte and anyURI types 710 | (soap-parse-complex-type-complex-content): use `soap-wk2l' to find 711 | the local name of "soapenc:Array" 712 | (soap-decode-basic-type, soap-encode-basic-type): support encoding 713 | decoding integer, byte and anyURI xsd types. 714 | 715 | * jira2.el (jira2-custom-field-value): new function 716 | 717 | 2011-03-05 Alex Harsanyi 718 | 719 | * soap-client.el (soap-namespace-put-link): check if the target 720 | name is fully qualified -- use only the name part. 721 | (soap-parse-complex-type, soap-parse-sequence): recognize xsd:all 722 | types, treated the same as xsd:sequence. 723 | 724 | 2011-02-16 Alex Harsanyi 725 | 726 | * soap-client.el (soap-well-known-xmlns, soap-local-xmlns) 727 | (soap-default-xmlns, soap-multi-refs, soap-decoded-multi-refs) 728 | (soap-current-wsdl, soap-encoded-namespaces): rename CL-style 729 | *...* variables. 730 | 731 | 2011-02-15 Alex Harsanyi 732 | 733 | * soap-inspect.el: fixes suggested by `checkdoc', added Commentary 734 | sections 735 | 736 | * soap-client.el (*soap-current-wsdl*): renamed from 737 | `*current-wsdl*' 738 | (soap-invoke): changed url-package-name to "soap-client.el" 739 | 740 | 2011-02-14 Alex Harsanyi 741 | 742 | * soap-client.el: added commentary section 743 | (soap-load-wsdl-from-url): doc update 744 | 745 | 2011-02-13 Alex Harsanyi 746 | 747 | * soap-client.el: fixes suggested by `checkdoc' and spelling fixes 748 | 749 | 2011-02-07 Alex Harsanyi 750 | 751 | * soap-client.el: 53 some fixes suggested by `checkdoc' 752 | 753 | 2011-02-04 Alex Harsanyi 754 | 755 | * soap-client.el (soap-parse-wsdl, soap-parse-schema) 756 | (soap-parse-schema-element, soap-parse-complex-type) 757 | (soap-parse-sequence, soap-parse-complex-type-complex-content) 758 | (soap-parse-message, soap-parse-port-type, soap-parse-operation) 759 | (soap-parse-binding, soap-parse-envelope, soap-encode-value): add 760 | a helpful message to the assert calls 761 | 762 | 2011-01-03 Alex Harsanyi 763 | 764 | * soap-client.el (soap-xml-get-children1) 765 | (soap-xml-get-attribute-or-nil1): use `ignore-errors' on 766 | `soap-l2wk' 767 | 768 | 2010-12-06 Alex Harsanyi 769 | 770 | * soap-client.el (soap-l2wk): comment out warning about not 771 | finding a well known namespace, it seems to happen too oftern for 772 | benign cases... 773 | (soap-xml-get-children1, soap-xml-get-attribute-or-nil1): install 774 | a local namespace table via `soap-with-local-xmlns', it seems to 775 | be needed for some responses. 776 | (soap-resolve-references-for-operation): always try to intern 777 | elements in the PARAMETER-ORDER list. 778 | (soap-parse-response): replace assert with an error message 779 | (soap-with-local-xmlns): don't change `*soap-default-xmlns*' 780 | unless we have a non nil value 781 | 782 | 2010-12-05 Alex Harsanyi 783 | 784 | * soap-client.el (soap-l2wk): don't report an error if there's no 785 | default namespace, instead, return the unqualified name. 786 | (soap-l2fq): new argument, USE-TNS 787 | (soap-parse-wsdl, soap-parse-sequence) 788 | (soap-parse-complex-type-complex-content, soap-parse-message) 789 | (soap-parse-operation, soap-parse-binding): passs 'USE-TNS to 790 | `soap-l2fq' 791 | 792 | 2010-12-04 Alex Harsanyi 793 | 794 | * soap-inspect.el (soap-inspect-port): use just the port name (not 795 | the fq name) 796 | 797 | * soap-client.el (*soap-well-known-xmlns*): added some new 798 | namespaces 799 | (*soap-target-xmlns*): new variable 800 | (soap-l2wk): new function 801 | (soap-l2fq): use *soap-target-xmlns* if name is unqualified 802 | (soap-extract-xmlns): return the targetNamespace in addition to 803 | the default namespace 804 | (soap-with-local-xmlns): bind *soap-target-xmlns* 805 | (soap-get-target-namespace, soap-xml-get-children1) 806 | (soap-xml-get-attribute-or-nil1): new functions 807 | (soap-resolve-references-for-operation): don't intern the elements 808 | of parameter-order, if we just created it 809 | (soap-parse-wsdl, soap-parse-schema, soap-parse-schema-element) 810 | (soap-parse-complex-type, soap-parse-sequence) 811 | (soap-parse-complex-type-complex-content, soap-parse-message) 812 | (soap-parse-port-type, soap-parse-operation, ) 813 | (soap-parse-binding, soap-decode-type, soap-decode-any-type) 814 | (soap-decode-array, soap-parse-envelope): use local to well-known 815 | translations (instead of the reverse) 816 | 817 | 2010-11-24 Alex Harsanyi 818 | 819 | * soap-client.el (soap-namespace-get): avoid using `find-if' from 820 | the cl package. 821 | (soap-wsdl-find-namespace): new function 822 | (soap-wsdl-add-namespace, soap-wsdl-get): use it 823 | (soap-encode-value, soap-encode-body): use `add-to-list' on 824 | `*soap-encoded-namespaces*' instead of `push' 825 | (soap-create-envelope): no need to call `remove-duplicates' on 826 | `*soap-encoded-namespaces*' 827 | (soap-invoke): use an explicit loop to look for the service, avoid 828 | using `find' from the cl package 829 | 830 | 2010-11-18 Alex Harsanyi 831 | 832 | * soap-inspect.el (soap-sample-value-for-basic-type): bigger 833 | random range for integer values, changed sample string value. 834 | (soap-sample-value-for-array-type): provide two different sample 835 | values for the array elements 836 | (soap-inspect-basic-type, soap-inspect-sequence-type) 837 | (soap-inspect-array-type): provide a sample value when inspecting 838 | these types. 839 | 840 | 2010-10-26 Alex Harsanyi 841 | 842 | * soap-client.el (soap-encode-basic-type): added more error 843 | checking for the input value type 844 | 845 | 2010-10-26 Alex Harsanyi 846 | 847 | * soap-client.el (soap-default-xsd-types) 848 | (soap-default-soapenc-types): add float basic type 849 | (soap-decode-array): bugfix decode the actual child nodes of the 850 | array (Bug #6) 851 | (soap-decode-basic-type): recognize float type as a number 852 | 853 | 2010-10-24 Alex Harsanyi 854 | 855 | * soap-client.el (soap-wsdl): add origin slot 856 | (soap-load-wsdl-from-url, soap-load-wsdl): populate origin slot 857 | 858 | * soap-inspect.el (soap-client): 0 new file 859 | 860 | 2010-10-22 Alex Harsanyi 861 | 862 | * soap-client.el (soap-wsdl-get): convert the name to a string if 863 | it is a symbol (fixes Bug #5) 864 | 865 | 2010-10-22 Alex Harsanyi 866 | 867 | * soap-client.el (soap-l2fq, soap-namespace-get, soap-wsdl-get): 868 | better error checking and reporting 869 | (soap-default-xsd-types, soap-default-soapenc-types): add the 870 | byte[] basic type 871 | 872 | 873 | 2010-10-19 Alex Harsanyi 874 | 875 | * soap-client.el (soap-type-p): new function 876 | (soap-resolve-references-for-sequence-type) 877 | (soap-resolve-references-for-array-type) 878 | (soap-resolve-references-for-message, soap-decode-array): use it 879 | when calling `soap-wsdl-get' 880 | * soap-client.el (soap-invoke): call `mm-destroy-part' on the HTTP 881 | response to avoid leaking temporary buffers. 882 | 883 | 2010-10-18 Alex Harsanyi 884 | 885 | * soap-client.el (soap-l2fq): new function 886 | (soap-wsdl-get): accept fully qualified names + doc update 887 | (soap-l2wsdl): removed 888 | (soap-resolve-references-for-operation): allow unnamed message 889 | parts for inputs outputs and faults. 890 | 891 | 2010-10-16 Alexandru Harsanyi 892 | 893 | * soap-client.el (soap-decode-any-type, soap-decode-array): decode 894 | arrays of anyType values. 895 | 896 | 2010-10-15 Alexandru Harsanyi 897 | 898 | * soap-client.el (soap-default-xsd-types) 899 | (soap-default-soapenc-types): add base64Binary basic type 900 | (soap-decode-any-type): new defun 901 | (soap-decode-basic-type): decode anyType nodes and base64Binary 902 | (soap-parse-response): bind the wsdl to *current-wsdl* 903 | (soap-decode-any-type): use *current-wsdl* 904 | 905 | 2010-10-15 Alex Harsanyi 906 | 907 | * soap-client.el (*soap-encoded-namespaces*): doc update 908 | (soap-encode-value): ensure XML-TAG is a string before passing it 909 | on to the encoders. Also doc update and param order change. 910 | (soap-encode-basic-type, soap-encode-sequence-type) 911 | (soap-encode-array-type): assume XML-TAG is a string 912 | 913 | 2010-10-13 Alex Harsanyi 914 | 915 | * soap-client.el (soap-default-soapenc-types): new function 916 | (soap-parse-wsdl): add the default types from the soapenc 917 | namespace to the wsdl document. Fixes bug #3 918 | 919 | 2010-10-12 Alex Harsanyi 920 | 921 | * soap-client.el (soap-extract-xmlns): if the node has a 922 | targetNamespace attribute define a "tns" alias for that namespace. 923 | (soap-wk2l): documentation update 924 | 925 | 2010-10-10 Alex Harsanyi 926 | 927 | * jira2.el (jira2-link-issue): add the "X-Atlassian-Token" header 928 | to the HTTP request. 929 | 930 | 2010-06-01 Alex Harsanyi 931 | 932 | * jira2.el (jira2-user-login-name): new variable 933 | (jira2-login): update jira2-user-login-name on a succesful login. 934 | (jira2-issue-key, jira2-issue-owner, jira2-issue-status): new functions 935 | 936 | 2010-05-12 Alex Harsanyi 937 | 938 | * soap-client.el (soap-invoke): check the HTTP response before 939 | trying to parse the SOAP XML envelope 940 | (soap-client): new defgroup 941 | (soap-debug): new variable 942 | 943 | 2010-05-07 Alex Harsanyi 944 | 945 | * soap-client.el (soap-resolve-references-for-sequence-type): 946 | resolve references for inline structures (which are not referenced 947 | in the wsdl namespaces) 948 | (soap-parse-sequence): intern element names 949 | 950 | 2010-05-06 Alex Harsanyi 951 | 952 | * soap-client.el (soap-encode-basic-type): encode an emacs style 953 | time value such as received by (current-time) into the xsd format. 954 | (soap-encode-body): when encoding literal documents, make the 955 | toplevel tags unqualified and add their namespace to the tag 956 | itself 957 | (soap-encode-body): add the "soapenc:encodingStyle" attribute only 958 | for encoded documents. 959 | 960 | 2010-05-05 Alex Harsanyi 961 | 962 | * soap-client.el (soap-bound-operation): new struct 963 | (soap-binding): rename soap-actions to operations 964 | (soap-l2wsdl): new function 965 | (soap-resolve-references-for-operation): if no parameter-order is 966 | specified, construct a default one. 967 | (soap-resolve-references-for-binding): resolve references in 968 | bound-operations 969 | (soap-parse-message): recognize the 'element attribute 970 | (soap-parse-binding): extract the soap-action and use for every 971 | operation in this binding. 972 | (soap-parse-envelope, soap-parse-response, soap-encode-body) 973 | (soap-create-envelope, soap-invoke): handle literal vs encoded 974 | bodies 975 | (soap-parse-response): corrected message check 976 | (soap-invoke): increased buffer limit for issuing warning 977 | 978 | 2010-05-04 Alex Harsanyi 979 | 980 | * soap-client.el (soap-namespace-put, soap-namespace-put-link) 981 | (soap-namespace-get): namespaces can now store multiple elements 982 | with the same name. 983 | (soap-wsdl-add-namespace, soap-wsdl-resolve-references): handle 984 | multiple elements with the same name. 985 | (soap-resolve-references-for-binding): request only port type 986 | elements. 987 | (soap-resolve-references-for-port): request only binding type 988 | elements. 989 | (soap-parse-complex-type): look for a name in an attribute tag 990 | (soap-wsdl-get): use a PREDICATE argument to specify the type of 991 | element requested. All callers updated. 992 | (soap-parse-sequence): accept elements that have inline 993 | complexType definitions. 994 | (soap-default-xsd-types): use the 995 | "http://www.w3.org/2001/XMLSchema" as XMLSchema. 996 | (soap-parse-schema): parse toplevel element tags 997 | (soap-parse-schema-element): new function 998 | (soap-parse-complex-type): handle empty complex types 999 | (soap-parse-sequence): make an element nillable if its minOccurs 1000 | is 0 1001 | (soap-binding): add a soap-actions member 1002 | (soap-parse-sequence): an element with 0 minOccurs is nillable 1003 | (soap-parse-binding): new function 1004 | 1005 | 2010-04-30 Alex Harsanyi 1006 | 1007 | * jira2.el (jira2-login): bugfix: pass username and password to 1008 | the jira web login page. 1009 | (jira2-login, jira2-link-issue): add basic check that the URL 1010 | response is OK. 1011 | (jira2-login, jira2-link-issue): `url-http-response-status' is 1012 | only bound in the response buffer 1013 | 1014 | 2010-04-22 Alex Harsanyi 1015 | 1016 | * jira2.el (jira2-token): new variable 1017 | (jira2-login): login into the jira web application as well. 1018 | (jira2-link-issue): new function, uses JIRA web interface instead 1019 | of the SOAP api 1020 | 1021 | 2010-03-31 Alexandru Harsanyi 1022 | 1023 | * jira2.el (jira2-add-worklog-and-autoadjust-remaining-estimate): 1024 | New function (patch by arvid.jakobsson). 1025 | 1026 | 2010-03-31 Alex Harsanyi 1027 | 1028 | * soap-client.el (soap-load-wsdl-from-url): check that we have 1029 | retrieved an XML document before passing it to `xml-parse-region' 1030 | 1031 | 2010-02-11 Alex Harsanyi 1032 | 1033 | * jira2.el (jira2-do-jql-search, jira2-get-available-actions) 1034 | (jira2-get-fields-for-action, jira2-progress-workflow-action): new 1035 | functions. 1036 | 1037 | 2009-12-14 Alex Harsanyi 1038 | 1039 | * jira2.el (jira2-wsdl-descriptor-url): add type and group to 1040 | defcustom 1041 | 1042 | 2009-12-07 Alex Harsanyi 1043 | 1044 | * jira2.el (jira2-update-issue) 1045 | (jira2-create-issue): use car on the jira call result 1046 | 1047 | * soap-client.el (soap-encode-basic-type): use 1048 | `url-insert-entities-in-string` when inserting the user data into 1049 | the message 1050 | -------------------------------------------------------------------------------- /jira2.el: -------------------------------------------------------------------------------- 1 | ;;; jira2.el --- Provide connectivity to JIRA SOAP service 2 | 3 | ;; Copyright (C) 2009 Alex Harsanyi 4 | 5 | ;; This program is free software: you can redistribute it and/or modify 6 | ;; it under the terms of the GNU General Public License as published by 7 | ;; the Free Software Foundation, either version 3 of the License, or 8 | ;; (at your option) any later version. 9 | 10 | ;; This program is distributed in the hope that it will be useful, 11 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ;; GNU General Public License for more details. 14 | 15 | ;; You should have received a copy of the GNU General Public License 16 | ;; along with this program. If not, see . 17 | 18 | ;; Author: Alexandru Harsanyi (AlexHarsanyi@gmail.com) 19 | ;; Created: December, 2009 20 | ;; Keywords: soap, web-services, jira 21 | ;; Homepage: http://code.google.com/p/emacs-soap-client 22 | 23 | ;; This file provides a programatic interface to JIRA. It provides access to 24 | ;; JIRA from other programs, but no user level functionality. 25 | 26 | ;; Jira References: 27 | ;; 28 | ;; http://confluence.atlassian.com/display/JIRA/Creating+a+SOAP+Client 29 | ;; 30 | ;; JavaDoc for the Jira SOAP service 31 | ;; http://docs.atlassian.com/software/jira/docs/api/rpc-jira-plugin/latest/com/atlassian/jira/rpc/soap/JiraSoapService.html 32 | 33 | (require 'soap-client) 34 | 35 | (defgroup jira2 nil 36 | "Access JIRA from emacs." 37 | :group 'tools) 38 | 39 | (defcustom jira2-wsdl-descriptor-url 40 | "http://jira/rpc/soap/jirasoapservice-v2?wsdl" 41 | "The location for the WSDL descriptor for the JIRA service. 42 | This is specific to your local JIRA installation. The URL is 43 | tipically: 44 | 45 | http://YOUR_INSTALLATION/rpc/soap/jirasoapservice-v2?wsdl 46 | 47 | The default value works if JIRA is located at a hostname named 48 | 'jira'." 49 | :type 'string 50 | :group 'jira2) 51 | 52 | (defcustom jira2-host-url 53 | "http://jira" 54 | "The address of the jira host." 55 | :type 'string 56 | :group 'jira2) 57 | 58 | (defvar jira2-token nil 59 | "JIRA token used for authentication") 60 | 61 | (defvar jira2-user-login-name nil 62 | "The name of the user logged into JIRA. 63 | This is maintained by `jira2-login'.") 64 | 65 | (defvar jira2-wsdl nil) 66 | 67 | (defun jira2-load-wsdl () 68 | "Load the JIRA WSDL descriptor." 69 | (setq jira2-wsdl (soap-load-wsdl-from-url jira2-wsdl-descriptor-url))) 70 | 71 | (defun jira2-login (username password) 72 | "Login into JIRA and store the authentication token in `jira2-token'" 73 | ;; NOTE that we cannot rely on `jira2-call' because `jira2-call' relies on 74 | ;; us ;-) 75 | (interactive 76 | (list (read-string 77 | (format "JIRA Username [%s]: " user-login-name) nil nil user-login-name) 78 | (read-passwd "JIRA Password: "))) 79 | (unless jira2-wsdl 80 | (jira2-load-wsdl)) 81 | (setq jira2-token 82 | (car (soap-invoke jira2-wsdl "jirasoapservice-v2" "login" username password))) 83 | (setq jira2-user-login-name username) 84 | 85 | ;; At this poing, soap-invoke didn't raise an error, so the login 86 | ;; credentials are OK. use them to log into the web interface as 87 | ;; well, as this will be used to link issues (an operation which is 88 | ;; not exposed to the SOAP interface. 89 | ;; 90 | ;; Note that we don't validate the response at all -- not sure how we 91 | ;; would do it... 92 | 93 | (let ((url (concat jira2-host-url "/secure/Dashboard.jspa?" 94 | (format "&os_username=%s&os_password=%s&os_cookie=true" 95 | username password)))) 96 | (let ((url-request-method "POST") 97 | (url-package-name "Emacs jira2.el") 98 | (url-package-version "1.0") 99 | (url-mime-charset-string "utf-8;q=1, iso-8859-1;q=0.5") 100 | (url-request-data "abc") 101 | (url-request-coding-system 'utf-8) 102 | (url-http-attempt-keepalives t)) 103 | (let ((buffer (url-retrieve-synchronously url))) 104 | ;; This is just a basic check that the page was retrieved 105 | ;; correctly. No error does not indicate a succesfull login, 106 | ;; we would have to parse the HTML page to find that out... 107 | (with-current-buffer buffer 108 | (declare (special url-http-response-status)) 109 | (if (> url-http-response-status 299) 110 | (error "Error logging into JIRA Web interface %s" 111 | url-http-response-status))) 112 | (kill-buffer buffer))))) 113 | 114 | (defun jira2-call (method &rest params) 115 | "Invoke the JIRA METHOD with supplied PARAMS. 116 | This should be used for all JIRA inteface calls, as the method 117 | ensures the user is logged in and invokes `soap-invoke' with the 118 | correct service name and authentication token. 119 | 120 | All JIRA inteface methods take an authentication token as the 121 | first argument. The authentication token is supplied by this 122 | function, so PARAMS should omit this parameter. For example, the 123 | \"getIssue\" method takes two parameters: auth and key, however, 124 | when invoking it through `jira2-call', the call shoulbe be: 125 | 126 | (jira2-call \"getIssue\" KEY) 127 | " 128 | (unless jira2-token 129 | (call-interactively 'jira2-login)) 130 | (condition-case data 131 | (apply 'soap-invoke jira2-wsdl "jirasoapservice-v2" 132 | method jira2-token params) 133 | (soap-error 134 | ;; If we are here, we had a token, but it expired. Re-login and try 135 | ;; again. 136 | (setq jira2-token nil) 137 | (call-interactively 'jira2-login) 138 | (apply 'soap-invoke jira2-wsdl "jirasoapservice-v2" 139 | method jira2-token params)))) 140 | 141 | 142 | ;;;; Some utility functions 143 | 144 | (defun jira2-make-assoc-list (data key-field value-field) 145 | "Create an association list from a SOAP structure array. 146 | 147 | DATA is a list of association lists (a SOAP array-of type) 148 | KEY-FIELD is the field to use as the key in the returned alist 149 | VALUE-FIELD is the field to use as the value in the returned alist" 150 | (loop for element in data 151 | collect (cons (cdr (assoc key-field element)) 152 | (cdr (assoc value-field element))))) 153 | 154 | (defun jira2-make-remote-field-values (fields) 155 | "Transform a (KEY . VALUE) list into a RemoteFieldValue structure. 156 | 157 | Each (KEY . VALUE) pair is transformed into 158 | ((id . KEY) (values . (VALUE))) 159 | 160 | This method exists because Several JIRA methods require a 161 | RemoteFieldValue list, but it is easier to work with ALISTS in 162 | emacs-lisp" 163 | (let ((remote-field-values)) 164 | 165 | ;; we accept an ALIST of field-name field-values parameter, but we need to 166 | ;; construct a structure that encodes as a RemoteFieldValue which is what 167 | ;; updateIssue wants 168 | (dolist (field fields) 169 | (let ((name (car field)) 170 | (value (cdr field))) 171 | (when (symbolp name) 172 | (setq name (symbol-name name))) 173 | ;; Value must be an "array" (for which soap-client accepts lists) even 174 | ;; if it is just one value 175 | (unless (vectorp value) 176 | (setq value (vector value))) 177 | (push `((id . ,name) (values . ,value)) 178 | remote-field-values))) 179 | 180 | (apply 'vector (nreverse remote-field-values)))) 181 | 182 | ;;;; Wrappers around JIRA methods 183 | 184 | (defun jira2-get-issue (key) 185 | (car (jira2-call "getIssue" key))) 186 | 187 | (defun jira2-get-comments (key) 188 | (car (jira2-call "getComments" key))) 189 | 190 | (defun jira2-add-comment (key comment) 191 | (car (jira2-call "addComment" key `((body . ,comment))))) 192 | 193 | (defun jira2-update-issue (key fields) 194 | (car (jira2-call "updateIssue" key (jira2-make-remote-field-values fields)))) 195 | 196 | (defun jira2-create-issue (fields) 197 | (car (jira2-call "createIssue" fields))) 198 | 199 | (defvar jira2-status-codes-cache nil) 200 | 201 | (defun jira2-get-statuses () 202 | "Return an assoc list mapping a status code to its name. 203 | NOTE: Status codes are stored as strings, not numbers. 204 | 205 | This function will only ask JIRA for the list of codes once, than 206 | will cache it." 207 | (unless jira2-status-codes-cache 208 | (setq jira2-status-codes-cache 209 | (jira2-make-assoc-list (car (jira2-call "getStatuses")) 'id 'name))) 210 | jira2-status-codes-cache) 211 | 212 | (defvar jira2-issue-types-cache nil) 213 | 214 | (defun jira2-get-issue-types () 215 | "Return an assoc list mapping an issue type code to its name. 216 | NOTE: Issue type codes are stored as strings, not numbers. 217 | 218 | This function will only ask JIRA for the list of codes once, than 219 | will cache it." 220 | (unless jira2-issue-types-cache 221 | (setq jira2-issue-types-cache 222 | (jira2-make-assoc-list (car (jira2-call "getIssueTypes")) 'id 'name))) 223 | jira2-issue-types-cache) 224 | 225 | (defvar jira2-priority-codes-cache nil) 226 | 227 | (defun jira2-get-priorities () 228 | "Return an assoc list mapping a priority code to its name. 229 | NOTE: Priority codes are stored as strings, not numbers. 230 | 231 | This function will only ask JIRA for the list of codes once, than 232 | will cache it." 233 | (unless jira2-priority-codes-cache 234 | (setq jira2-priority-codes-cache 235 | (jira2-make-assoc-list (car (jira2-call "getPriorities")) 'id 'name))) 236 | jira2-priority-codes-cache) 237 | 238 | (defvar jira2-resolution-code-cache nil) 239 | 240 | (defun jira2-get-resolutions () 241 | "Return an assoc list mapping a resolution code to its name. 242 | NOTE: Resolution codes are stored as strings, not numbers. 243 | 244 | This function will only ask JIRA for the list of codes once, than 245 | will cache it." 246 | (unless jira2-resolution-code-cache 247 | (setq jira2-resolution-code-cache 248 | (jira2-make-assoc-list (car (jira2-call "getResolutions")) 'id 'name))) 249 | jira2-resolution-code-cache) 250 | 251 | (defvar jira2-issue-regexp nil) 252 | 253 | ;; NOTE: it is not such a good ideea to use this, as it needs a JIRA 254 | ;; connection to construct the regexp (the user might be prompted for a JIRA 255 | ;; username and password). 256 | ;; 257 | ;; The best use of this function is to generate the regexp once-off and 258 | ;; persist it somewhere. 259 | 260 | (defun jira2-get-issue-regexp () 261 | "Return a regexp that matches an issue name. 262 | The regexp is constructed from the project keys in the JIRA 263 | database. An issue is assumed to be in the format KEY-NUMBER, 264 | where KEY is a project key and NUMBER is the issue number." 265 | (unless jira2-issue-regexp 266 | (let ((projects (mapcar (lambda (e) (downcase (cdr (assoc 'key e)))) 267 | (car (jira2-call "getProjectsNoSchemes"))))) 268 | (setq jira2-issue-regexp (concat "\\<" (regexp-opt projects) "-[0-9]+\\>")))) 269 | jira2-issue-regexp) 270 | 271 | (defun jira2-do-jql-search (jql &optional limit) 272 | "Run a JQL query and return the list of issues that matched. 273 | LIMIT is the maximum number of queries to return. Note that JIRA 274 | has an internal limit of how many queries to return, as such, it 275 | might not be possible to find *ALL* the issues that match a 276 | query." 277 | (unless (or limit (numberp limit)) 278 | (setq limit 100)) 279 | (car (jira2-call "getIssuesFromJqlSearch" jql limit))) 280 | 281 | (defun jira2-get-available-actions (issue-key) 282 | "Return the available workflow actions for ISSUE-KEY. 283 | This runs the getAvailableActions SOAP method." 284 | (jira2-make-assoc-list 285 | (car (jira2-call "getAvailableActions" issue-key)) 286 | 'id 'name)) 287 | 288 | (defun jira2-get-fields-for-action (issue-key action-id) 289 | "Return the required fields for the ACTION-ID." 290 | (jira2-make-assoc-list 291 | (car (jira2-call "getFieldsForAction" issue-key action-id)) 292 | 'id 'name)) 293 | 294 | (defun jira2-progress-workflow-action (issue-key action-id params) 295 | (car (jira2-call "progressWorkflowAction" issue-key action-id params))) 296 | 297 | (defun jira2-add-worklog-and-autoadjust-remaining-estimate (issue-key start-date time-spent comment) 298 | "Log time spent on ISSUE-KEY to its worklog. 299 | The time worked begings at START-DATE and has a TIME-SPENT 300 | duration. JIRA will automatically update the remaining estimate 301 | by subtracting TIME-SPENT from it. 302 | 303 | START-DATE should be in the format 2010-02-05T14:30:00Z 304 | 305 | TIME-SPENT can be in one of the following formats: 10m, 120m 306 | hours; 10h, 120h days; 10d, 120d weeks." 307 | (car (jira2-call "addWorklogAndAutoAdjustRemainingEstimate" 308 | issue-key 309 | `((startDate . ,start-date) 310 | (timeSpent . ,time-spent) 311 | (comment . ,comment))))) 312 | 313 | (defun jira2-link-issue (issue-key link-type other-issue-key) 314 | "Create a link between ISSUE-KEY and OTHER-ISSUE-KEY. 315 | LINK-TYPE is a string representing the type of the link, e.g 316 | \"requires\", \"depends on\", etc. I believe each JIRA 317 | installation can define its own link types." 318 | 319 | ;; IMPLEMENTATION NOTES: The linking jira issues functionality is 320 | ;; not exposed through the SOAP api, we must use the web interface 321 | ;; to do the linking. Unfortunately, we cannot parse the result, so 322 | ;; we don't know that the linking was succesfull or not. To reduce 323 | ;; the risk, we use the SOAP api to retrieve the issues for 324 | ;; ISSUE-KEY and OTHER-ISSUE-KEY. This will ensure that we are 325 | ;; logged in (see also jira2-login) and that both issues exist. We 326 | ;; don't validate the LINK-TYPE, not sure how to do it. 327 | ;; 328 | 329 | (let ((issue (jira2-get-issue issue-key)) 330 | (other-issue (jira2-get-issue other-issue-key))) 331 | (let ((url (concat jira2-host-url 332 | "/secure/LinkExistingIssue.jspa?" 333 | (format "linkDesc=%s&linkKey=%s&id=%s&Link=Link" 334 | link-type other-issue-key (cdr (assq 'id issue)))))) 335 | (let ((url-request-method "POST") 336 | (url-package-name "Emacs scratch.el") 337 | (url-package-version "1.0") 338 | (url-mime-charset-string "utf-8;q=1, iso-8859-1;q=0.5") 339 | (url-request-data "abc") 340 | (url-request-coding-system 'utf-8) 341 | (url-http-attempt-keepalives t) 342 | ;; see http://confluence.atlassian.com/display/JIRA/Form+Token+Handling 343 | (url-request-extra-headers '(("X-Atlassian-Token" . "no-check")))) 344 | 345 | (let ((buffer (url-retrieve-synchronously url))) 346 | ;; This is just a basic check that the page was retrieved 347 | ;; correctly. No error does not indicate a success as we 348 | ;; have to parse the HTML page to find that out... 349 | (with-current-buffer buffer 350 | (declare (special url-http-response-status)) 351 | (if (> url-http-response-status 299) 352 | (error "Error linking issue through JIRA Web interface %s" 353 | url-http-response-status))) 354 | (kill-buffer buffer)))))) 355 | 356 | 357 | ;................................................ issue field accessors .... 358 | 359 | (defun jira2-issue-key (issue) 360 | "Return the key of ISSUE." 361 | (cdr (assoc 'key issue))) 362 | 363 | (defun jira2-issue-owner (issue) 364 | "Return the owner of ISSUE." 365 | (cdr (assq 'assignee issue))) 366 | 367 | (defun jira2-issue-status (issue) 368 | "Return the status of ISSUE as a status string (not as a number!)" 369 | (let ((status-code (cdr (assq 'status issue)))) 370 | (cdr (assoc status-code (jira2-get-statuses))))) 371 | 372 | (defun jira2-custom-field-value (custom-field issue) 373 | "Return the value of CUSTOM-FIELD for ISSUE. 374 | Return nil if the field is not found" 375 | (catch 'found 376 | (dolist (field (cdr (assq 'customFieldValues issue))) 377 | (when (equal (cdr (assq 'customfieldId field)) custom-field) 378 | (throw 'found (cadr (assq 'values field))))))) 379 | 380 | (provide 'jira2) 381 | -------------------------------------------------------------------------------- /soap-inspect.el: -------------------------------------------------------------------------------- 1 | ;;; soap-inspect.el --- Interactive WSDL inspector -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2010-2018 Free Software Foundation, Inc. 4 | 5 | ;; Author: Alexandru Harsanyi 6 | ;; Created: October 2010 7 | ;; Keywords: soap, web-services, comm, hypermedia 8 | ;; Package: soap-client 9 | ;; Homepage: https://github.com/alex-hhh/emacs-soap-client 10 | 11 | ;; This file is part of GNU Emacs. 12 | 13 | ;; GNU Emacs is free software: you can redistribute it and/or modify 14 | ;; it under the terms of the GNU General Public License as published by 15 | ;; the Free Software Foundation, either version 3 of the License, or 16 | ;; (at your option) any later version. 17 | 18 | ;; GNU Emacs is distributed in the hope that it will be useful, 19 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | ;; GNU General Public License for more details. 22 | 23 | ;; You should have received a copy of the GNU General Public License 24 | ;; along with GNU Emacs. If not, see . 25 | 26 | ;;; Commentary: 27 | ;; 28 | ;; This package provides an inspector for a WSDL document loaded with 29 | ;; `soap-load-wsdl' or `soap-load-wsdl-from-url'. To use it, evaluate: 30 | ;; 31 | ;; (soap-inspect *wsdl*) 32 | ;; 33 | ;; This will pop-up the inspector buffer. You can click on ports, operations 34 | ;; and types to explore the structure of the wsdl document. 35 | ;; 36 | 37 | 38 | ;;; Code: 39 | 40 | (require 'cl-lib) 41 | (require 'soap-client) 42 | 43 | ;;; sample-value 44 | 45 | (defun soap-sample-value (type) 46 | "Provide a sample value for TYPE, a WSDL type. 47 | A sample value is a LISP value which soap-client.el will accept 48 | for encoding it using TYPE when making SOAP requests. 49 | 50 | This is a generic function, depending on TYPE a specific function 51 | will be called." 52 | (let ((sample-value (get (soap-type-of type) 'soap-sample-value))) 53 | (if sample-value 54 | (funcall sample-value type) 55 | (error "Cannot provide sample value for type %s" (soap-type-of type))))) 56 | 57 | (defun soap-sample-value-for-xs-basic-type (type) 58 | "Provide a sample value for TYPE, an xs-basic-type. 59 | This is a specialization of `soap-sample-value' for xs-basic-type 60 | objects." 61 | (cl-case (soap-xs-basic-type-kind type) 62 | (string "a string") 63 | (anyURI "an URI") 64 | (QName "a QName") 65 | (dateTime "a time-value-p or string") 66 | (boolean "t or nil") 67 | ((long int integer byte unsignedInt) 42) 68 | ((float double) 3.14) 69 | (base64Binary "a string") 70 | (t (format "%s" (soap-xs-basic-type-kind type))))) 71 | 72 | (defun soap-sample-value-for-xs-element (element) 73 | "Provide a sample value for ELEMENT, a WSDL element. 74 | This is a specialization of `soap-sample-value' for xs-element 75 | objects." 76 | (if (soap-xs-element-name element) 77 | (cons (intern (soap-xs-element-name element)) 78 | (soap-sample-value (soap-xs-element-type element))) 79 | (soap-sample-value (soap-xs-element-type element)))) 80 | 81 | (defun soap-sample-value-for-xs-attribute (attribute) 82 | "Provide a sample value for ATTRIBUTE, a WSDL attribute. 83 | This is a specialization of `soap-sample-value' for 84 | soap-xs-attribute objects." 85 | (if (soap-xs-attribute-name attribute) 86 | (cons (intern (soap-xs-attribute-name attribute)) 87 | (soap-sample-value (soap-xs-attribute-type attribute))) 88 | (soap-sample-value (soap-xs-attribute-type attribute)))) 89 | 90 | (defun soap-sample-value-for-xs-attribute-group (attribute-group) 91 | "Provide a sample value for ATTRIBUTE-GROUP, a WSDL attribute group. 92 | This is a specialization of `soap-sample-value' for 93 | soap-xs-attribute objects." 94 | (let ((sample-values nil)) 95 | (dolist (attribute (soap-xs-attribute-group-attributes attribute-group)) 96 | (if (soap-xs-attribute-name attribute) 97 | (setq sample-values 98 | (append sample-values 99 | (cons (intern (soap-xs-attribute-name attribute)) 100 | (soap-sample-value (soap-xs-attribute-type 101 | attribute))))) 102 | (setq sample-values 103 | (append sample-values 104 | (soap-sample-value 105 | (soap-xs-attribute-type attribute)))))))) 106 | 107 | (defun soap-sample-value-for-xs-simple-type (type) 108 | "Provide a sample value for TYPE, a `soap-xs-simple-type'. 109 | This is a specialization of `soap-sample-value' for 110 | `soap-xs-simple-type' objects." 111 | (append 112 | (mapcar 'soap-sample-value-for-xs-attribute 113 | (soap-xs-type-attributes type)) 114 | (cond 115 | ((soap-xs-simple-type-enumeration type) 116 | (let ((enumeration (soap-xs-simple-type-enumeration type))) 117 | (nth (random (length enumeration)) enumeration))) 118 | ((soap-xs-simple-type-pattern type) 119 | (format "a string matching %s" (soap-xs-simple-type-pattern type))) 120 | ((soap-xs-simple-type-length-range type) 121 | (cl-destructuring-bind (low . high) (soap-xs-simple-type-length-range type) 122 | (cond 123 | ((and low high) 124 | (format "a string between %d and %d chars long" low high)) 125 | (low (format "a string at least %d chars long" low)) 126 | (high (format "a string at most %d chars long" high)) 127 | (t (format "a string OOPS"))))) 128 | ((soap-xs-simple-type-integer-range type) 129 | (cl-destructuring-bind (min . max) (soap-xs-simple-type-integer-range type) 130 | (cond 131 | ((and min max) (+ min (random (- max min)))) 132 | (min (+ min (random 10))) 133 | (max (random max)) 134 | (t (random 100))))) 135 | ((consp (soap-xs-simple-type-base type)) ; an union of values 136 | (let ((base (soap-xs-simple-type-base type))) 137 | (soap-sample-value (nth (random (length base)) base)))) 138 | ((soap-xs-basic-type-p (soap-xs-simple-type-base type)) 139 | (soap-sample-value (soap-xs-simple-type-base type)))))) 140 | 141 | (defun soap-sample-value-for-xs-complex-type (type) 142 | "Provide a sample value for TYPE, a `soap-xs-complex-type'. 143 | This is a specialization of `soap-sample-value' for 144 | `soap-xs-complex-type' objects." 145 | (append 146 | (mapcar 'soap-sample-value-for-xs-attribute 147 | (soap-xs-type-attributes type)) 148 | (cl-case (soap-xs-complex-type-indicator type) 149 | (array 150 | (let* ((element-type (soap-xs-complex-type-base type)) 151 | (sample1 (soap-sample-value element-type)) 152 | (sample2 (soap-sample-value element-type))) 153 | ;; Our sample value is a vector of two elements, but any number of 154 | ;; elements are permissible 155 | (vector sample1 sample2 '&etc))) 156 | ((sequence choice all) 157 | (let ((base (soap-xs-complex-type-base type))) 158 | (let ((value (append (and base (soap-sample-value base)) 159 | (mapcar #'soap-sample-value 160 | (soap-xs-complex-type-elements type))))) 161 | (if (eq (soap-xs-complex-type-indicator type) 'choice) 162 | (cons '***choice-of*** value) 163 | value))))))) 164 | 165 | (defun soap-sample-value-for-message (message) 166 | "Provide a sample value for a WSDL MESSAGE. 167 | This is a specialization of `soap-sample-value' for 168 | `soap-message' objects." 169 | ;; NOTE: parameter order is not considered. 170 | (let (sample-value) 171 | (dolist (part (soap-message-parts message)) 172 | (push (soap-sample-value (cdr part)) sample-value)) 173 | (nreverse sample-value))) 174 | 175 | (progn 176 | ;; Install soap-sample-value methods for our types 177 | (put (soap-type-of (make-soap-xs-basic-type)) 178 | 'soap-sample-value 179 | 'soap-sample-value-for-xs-basic-type) 180 | 181 | (put (soap-type-of (make-soap-xs-element)) 182 | 'soap-sample-value 183 | 'soap-sample-value-for-xs-element) 184 | 185 | (put (soap-type-of (make-soap-xs-attribute)) 186 | 'soap-sample-value 187 | 'soap-sample-value-for-xs-attribute) 188 | 189 | (put (soap-type-of (make-soap-xs-attribute)) 190 | 'soap-sample-value 191 | 'soap-sample-value-for-xs-attribute-group) 192 | 193 | (put (soap-type-of (make-soap-xs-simple-type)) 194 | 'soap-sample-value 195 | 'soap-sample-value-for-xs-simple-type) 196 | 197 | (put (soap-type-of (make-soap-xs-complex-type)) 198 | 'soap-sample-value 199 | 'soap-sample-value-for-xs-complex-type) 200 | 201 | (put (soap-type-of (make-soap-message)) 202 | 'soap-sample-value 203 | 'soap-sample-value-for-message)) 204 | 205 | 206 | 207 | ;;; soap-inspect 208 | 209 | (defvar soap-inspect-previous-items nil 210 | "A stack of previously inspected items in the *soap-inspect* buffer. 211 | Used to implement the BACK button.") 212 | 213 | (defvar soap-inspect-current-item nil 214 | "The current item being inspected in the *soap-inspect* buffer.") 215 | 216 | (progn 217 | (make-variable-buffer-local 'soap-inspect-previous-items) 218 | (make-variable-buffer-local 'soap-inspect-current-item)) 219 | 220 | (defun soap-inspect (element) 221 | "Inspect a SOAP ELEMENT in the *soap-inspect* buffer. 222 | The buffer is populated with information about ELEMENT with links 223 | to its sub elements. If ELEMENT is the WSDL document itself, the 224 | entire WSDL can be inspected." 225 | (let ((inspect (get (soap-type-of element) 'soap-inspect))) 226 | (unless inspect 227 | (error "Soap-inspect: no inspector for element")) 228 | 229 | (with-current-buffer (get-buffer-create "*soap-inspect*") 230 | (setq buffer-read-only t) 231 | (let ((inhibit-read-only t)) 232 | (erase-buffer) 233 | 234 | (when soap-inspect-current-item 235 | (push soap-inspect-current-item 236 | soap-inspect-previous-items)) 237 | (setq soap-inspect-current-item element) 238 | 239 | (funcall inspect element) 240 | 241 | (unless (null soap-inspect-previous-items) 242 | (insert "\n\n") 243 | (insert-text-button 244 | "[back]" 245 | 'type 'soap-client-describe-back-link 246 | 'item element) 247 | (insert "\n")) 248 | (goto-char (point-min)) 249 | (pop-to-buffer (current-buffer)))))) 250 | 251 | 252 | (define-button-type 'soap-client-describe-link 253 | 'face 'link 254 | 'help-echo "mouse-2, RET: describe item" 255 | 'follow-link t 256 | 'action (lambda (button) 257 | (let ((item (button-get button 'item))) 258 | (soap-inspect item))) 259 | 'skip t) 260 | 261 | (define-button-type 'soap-client-describe-back-link 262 | 'face 'link 263 | 'help-echo "mouse-2, RET: browse the previous item" 264 | 'follow-link t 265 | 'action (lambda (_button) 266 | (let ((item (pop soap-inspect-previous-items))) 267 | (when item 268 | (setq soap-inspect-current-item nil) 269 | (soap-inspect item)))) 270 | 'skip t) 271 | 272 | (defun soap-insert-describe-button (element) 273 | "Insert a button to inspect ELEMENT when pressed." 274 | (insert-text-button 275 | (soap-element-fq-name element) 276 | 'type 'soap-client-describe-link 277 | 'item element)) 278 | 279 | (defun soap-inspect-xs-basic-type (type) 280 | "Insert information about TYPE, a soap-xs-basic-type, in the current buffer." 281 | (insert "Basic type: " (soap-element-fq-name type)) 282 | (insert "\nSample value:\n") 283 | (pp (soap-sample-value type) (current-buffer))) 284 | 285 | (defun soap-inspect-xs-element (element) 286 | "Insert information about ELEMENT, a soap-xs-element, in the current buffer." 287 | (insert "Element: " (soap-element-fq-name element)) 288 | (insert "\nType: ") 289 | (soap-insert-describe-button (soap-xs-element-type element)) 290 | (insert "\nAttributes:") 291 | (when (soap-xs-element-optional? element) 292 | (insert " optional")) 293 | (when (soap-xs-element-multiple? element) 294 | (insert " multiple")) 295 | (insert "\nSample value:\n") 296 | (pp (soap-sample-value element) (current-buffer))) 297 | 298 | (defun soap-inspect-xs-attribute (attribute) 299 | "Insert information about ATTRIBUTE in the current buffer. 300 | ATTRIBUTE is a soap-xs-attribute." 301 | (insert "Attribute: " (soap-element-fq-name attribute)) 302 | (insert "\nType: ") 303 | (soap-insert-describe-button (soap-xs-attribute-type attribute)) 304 | (insert "\nSample value:\n") 305 | (pp (soap-sample-value attribute) (current-buffer))) 306 | 307 | (defun soap-inspect-xs-attribute-group (attribute-group) 308 | "Insert information about ATTRIBUTE-GROUP in the current buffer. 309 | ATTRIBUTE is a soap-xs-attribute-group." 310 | (insert "Attribute group: " (soap-element-fq-name attribute-group)) 311 | (insert "\nSample values:\n") 312 | (pp (soap-sample-value attribute-group) (current-buffer))) 313 | 314 | (defun soap-inspect-xs-simple-type (type) 315 | "Insert information about TYPE, a soap-xs-simple-type, in the current buffer." 316 | (insert "Simple type: " (soap-element-fq-name type)) 317 | (insert "\nBase: " ) 318 | (if (listp (soap-xs-simple-type-base type)) 319 | (let ((first-time t)) 320 | (dolist (b (soap-xs-simple-type-base type)) 321 | (unless first-time 322 | (insert ", ") 323 | (setq first-time nil)) 324 | (soap-insert-describe-button b))) 325 | (soap-insert-describe-button (soap-xs-simple-type-base type))) 326 | (insert "\nAttributes: ") 327 | (dolist (attribute (soap-xs-simple-type-attributes type)) 328 | (let ((name (or (soap-xs-attribute-name attribute) "*inline*")) 329 | (type (soap-xs-attribute-type attribute))) 330 | (insert "\n\t") 331 | (insert name) 332 | (insert "\t") 333 | (soap-insert-describe-button type))) 334 | (when (soap-xs-simple-type-enumeration type) 335 | (insert "\nEnumeration values: ") 336 | (dolist (e (soap-xs-simple-type-enumeration type)) 337 | (insert "\n\t") 338 | (pp e))) 339 | (when (soap-xs-simple-type-pattern type) 340 | (insert "\nPattern: " (soap-xs-simple-type-pattern type))) 341 | (when (car (soap-xs-simple-type-length-range type)) 342 | (insert "\nMin length: " 343 | (number-to-string (car (soap-xs-simple-type-length-range type))))) 344 | (when (cdr (soap-xs-simple-type-length-range type)) 345 | (insert "\nMin length: " 346 | (number-to-string (cdr (soap-xs-simple-type-length-range type))))) 347 | (when (car (soap-xs-simple-type-integer-range type)) 348 | (insert "\nMin value: " 349 | (number-to-string (car (soap-xs-simple-type-integer-range type))))) 350 | (when (cdr (soap-xs-simple-type-integer-range type)) 351 | (insert "\nMin value: " 352 | (number-to-string (cdr (soap-xs-simple-type-integer-range type))))) 353 | (insert "\nSample value:\n") 354 | (pp (soap-sample-value type) (current-buffer))) 355 | 356 | (defun soap-inspect-xs-complex-type (type) 357 | "Insert information about TYPE in the current buffer. 358 | TYPE is a `soap-xs-complex-type'" 359 | (insert "Complex type: " (soap-element-fq-name type)) 360 | (insert "\nKind: ") 361 | (cl-case (soap-xs-complex-type-indicator type) 362 | ((sequence all) 363 | (insert "a sequence ") 364 | (when (soap-xs-complex-type-base type) 365 | (insert "extending ") 366 | (soap-insert-describe-button (soap-xs-complex-type-base type))) 367 | (insert "\nAttributes: ") 368 | (dolist (attribute (soap-xs-complex-type-attributes type)) 369 | (let ((name (or (soap-xs-attribute-name attribute) "*inline*")) 370 | (type (soap-xs-attribute-type attribute))) 371 | (insert "\n\t") 372 | (insert name) 373 | (insert "\t") 374 | (soap-insert-describe-button type))) 375 | (insert "\nElements: ") 376 | (let ((name-width 0) 377 | (type-width 0)) 378 | (dolist (element (soap-xs-complex-type-elements type)) 379 | (let ((name (or (soap-xs-element-name element) "*inline*")) 380 | (type (soap-xs-element-type element))) 381 | (setq name-width (max name-width (length name))) 382 | (setq type-width 383 | (max type-width (length (soap-element-fq-name type)))))) 384 | (setq name-width (+ name-width 2)) 385 | (setq type-width (+ type-width 2)) 386 | (dolist (element (soap-xs-complex-type-elements type)) 387 | (let ((name (or (soap-xs-element-name element) "*inline*")) 388 | (type (soap-xs-element-type element))) 389 | (insert "\n\t") 390 | (insert name) 391 | (insert (make-string (- name-width (length name)) ?\ )) 392 | (soap-insert-describe-button type) 393 | (insert 394 | (make-string 395 | (- type-width (length (soap-element-fq-name type))) ?\ )) 396 | (when (soap-xs-element-multiple? element) 397 | (insert " multiple")) 398 | (when (soap-xs-element-optional? element) 399 | (insert " optional")))))) 400 | (choice 401 | (insert "a choice ") 402 | (when (soap-xs-complex-type-base type) 403 | (insert "extending ") 404 | (soap-insert-describe-button (soap-xs-complex-type-base type))) 405 | (insert "\nElements: ") 406 | (dolist (element (soap-xs-complex-type-elements type)) 407 | (insert "\n\t") 408 | (soap-insert-describe-button element))) 409 | (array 410 | (insert "an array of ") 411 | (soap-insert-describe-button (soap-xs-complex-type-base type)))) 412 | (insert "\nSample value:\n") 413 | (pp (soap-sample-value type) (current-buffer))) 414 | 415 | 416 | (defun soap-inspect-message (message) 417 | "Insert information about MESSAGE into the current buffer." 418 | (insert "Message name: " (soap-element-fq-name message) "\n") 419 | (insert "Parts:\n") 420 | (dolist (part (soap-message-parts message)) 421 | (insert "\t" (symbol-name (car part)) 422 | " type: ") 423 | (soap-insert-describe-button (cdr part)) 424 | (insert "\n"))) 425 | 426 | (defun soap-inspect-operation (operation) 427 | "Insert information about OPERATION into the current buffer." 428 | (insert "Operation name: " (soap-element-fq-name operation) "\n") 429 | (let ((input (soap-operation-input operation))) 430 | (insert "\tInput: " (symbol-name (car input)) " (" ) 431 | (soap-insert-describe-button (cdr input)) 432 | (insert ")\n")) 433 | (let ((output (soap-operation-output operation))) 434 | (insert "\tOutput: " (symbol-name (car output)) " (") 435 | (soap-insert-describe-button (cdr output)) 436 | (insert ")\n")) 437 | 438 | (insert "\n\nSample invocation:\n") 439 | (let ((sample-message-value 440 | (soap-sample-value (cdr (soap-operation-input operation)))) 441 | (funcall (list 'soap-invoke '*WSDL* "SomeService" 442 | (soap-element-name operation)))) 443 | (let ((sample-invocation 444 | (append funcall (mapcar 'cdr sample-message-value)))) 445 | (pp sample-invocation (current-buffer))))) 446 | 447 | (defun soap-inspect-port-type (port-type) 448 | "Insert information about PORT-TYPE into the current buffer." 449 | (insert "Port-type name: " (soap-element-fq-name port-type) "\n") 450 | (insert "Operations:\n") 451 | (cl-loop for o being the hash-values of 452 | (soap-namespace-elements (soap-port-type-operations port-type)) 453 | do (progn 454 | (insert "\t") 455 | (soap-insert-describe-button (car o))))) 456 | 457 | (defun soap-inspect-binding (binding) 458 | "Insert information about BINDING into the current buffer." 459 | (insert "Binding: " (soap-element-fq-name binding) "\n") 460 | (insert "\n") 461 | (insert "Bound operations:\n") 462 | (let* ((ophash (soap-binding-operations binding)) 463 | (operations (cl-loop for o being the hash-keys of ophash 464 | collect o)) 465 | op-name-width) 466 | 467 | (setq operations (sort operations 'string<)) 468 | 469 | (setq op-name-width (cl-loop for o in operations maximizing (length o))) 470 | 471 | (dolist (op operations) 472 | (let* ((bound-op (gethash op ophash)) 473 | (soap-action (soap-bound-operation-soap-action bound-op)) 474 | (use (soap-bound-operation-use bound-op))) 475 | (unless soap-action 476 | (setq soap-action "")) 477 | (insert "\t") 478 | (soap-insert-describe-button (soap-bound-operation-operation bound-op)) 479 | (when (or use (not (equal soap-action ""))) 480 | (insert (make-string (- op-name-width (length op)) ?\s)) 481 | (insert " (") 482 | (insert soap-action) 483 | (when use 484 | (insert " " (symbol-name use))) 485 | (insert ")")) 486 | (insert "\n"))))) 487 | 488 | (defun soap-inspect-port (port) 489 | "Insert information about PORT into the current buffer." 490 | (insert "Port name: " (soap-element-name port) "\n" 491 | "Service URL: " (soap-port-service-url port) "\n" 492 | "Binding: ") 493 | (soap-insert-describe-button (soap-port-binding port))) 494 | 495 | (defun soap-inspect-wsdl (wsdl) 496 | "Insert information about WSDL into the current buffer." 497 | (insert "WSDL Origin: " (soap-wsdl-origin wsdl) "\n") 498 | (insert "Ports:") 499 | (dolist (p (soap-wsdl-ports wsdl)) 500 | (insert "\n--------------------\n") 501 | ;; (soap-insert-describe-button p) 502 | (soap-inspect-port p)) 503 | (insert "\n--------------------\nNamespace alias table:\n") 504 | (dolist (a (soap-wsdl-alias-table wsdl)) 505 | (insert "\t" (car a) " => " (cdr a) "\n"))) 506 | 507 | (progn 508 | ;; Install the soap-inspect methods for our types 509 | 510 | (put (soap-type-of (make-soap-xs-basic-type)) 'soap-inspect 511 | 'soap-inspect-xs-basic-type) 512 | 513 | (put (soap-type-of (make-soap-xs-element)) 'soap-inspect 514 | 'soap-inspect-xs-element) 515 | 516 | (put (soap-type-of (make-soap-xs-simple-type)) 'soap-inspect 517 | 'soap-inspect-xs-simple-type) 518 | 519 | (put (soap-type-of (make-soap-xs-complex-type)) 'soap-inspect 520 | 'soap-inspect-xs-complex-type) 521 | 522 | (put (soap-type-of (make-soap-xs-attribute)) 'soap-inspect 523 | 'soap-inspect-xs-attribute) 524 | 525 | (put (soap-type-of (make-soap-xs-attribute-group)) 'soap-inspect 526 | 'soap-inspect-xs-attribute-group) 527 | 528 | (put (soap-type-of (make-soap-message)) 'soap-inspect 529 | 'soap-inspect-message) 530 | (put (soap-type-of (make-soap-operation)) 'soap-inspect 531 | 'soap-inspect-operation) 532 | 533 | (put (soap-type-of (make-soap-port-type)) 'soap-inspect 534 | 'soap-inspect-port-type) 535 | 536 | (put (soap-type-of (make-soap-binding)) 'soap-inspect 537 | 'soap-inspect-binding) 538 | 539 | (put (soap-type-of (make-soap-port)) 'soap-inspect 540 | 'soap-inspect-port) 541 | 542 | (put (soap-type-of (soap-make-wsdl "origin")) 'soap-inspect 543 | 'soap-inspect-wsdl)) 544 | 545 | (provide 'soap-inspect) 546 | ;;; soap-inspect.el ends here 547 | --------------------------------------------------------------------------------