Sie können mit dem optionalen Steuerparameter outputFormat das Format der Ausgabenachrichten angeben, indem Sie eine Operation in einem Web-Service ausführen. Wenn Sie bei der Implementierung eines Web-Service einen Wert für den Parameter outputFormat angeben, wird das angegebene Ausgabeformat bei jeder Ausführung einer Operation in dem Web-Service verwendet. Geben Sie bei der Implementierung keinen Wert für den Parameter an, kann ein Ausgabeformat angegeben werden, wenn eine Operation im Web-Service ausgeführt wird. Wird kein Ausgabeformat während der Ausführung angegeben, wird das Standardausgabeformat verwendet.
Wie die HTTP-Bindung das Standardausgabeformat bestimmt, können Sie in Tabelle 1 sehen.
| Bindung | Standardausgabeformat | MIME-Typ |
|---|---|---|
| HTTP GET | XML | text/xml |
| HTTP POST (URL-codiert) | XML | text/xml |
| HTTP POST (xml) | XML | text/xml |
| HTTP POST (JSON) | JSON | application/json |
Das Standard-JSON-Ausgabeformat entspricht der JSON-Spezifikation, die Sie unter der folgenden Internetadresse finden können: www.json.org.
{"getEmployeesResponse":
[
{
"EMPNO":"000010",
"FIRSTNME":"CHRISTINE",
"MIDINIT":"I",
"LASTNAME":"HAAS",
"WORKDEPT":"A00",
"PHONENO":"3978",
"HIREDATE":"1995-01-01Z",
"JOB":"PRES ",
"EDLEVEL":18,
"SEX":"F",
"BIRTHDATE":"1963-08-24Z",
"SALARY":96800.00,
"BONUS":21113.19,
"COMM":4220.00},
{
"EMPNO":"000020",
"FIRSTNME":"MICHAEL",
"MIDINIT":"L",
"LASTNAME":"THOMPSON", ...}
]
}
{"getEmployeesResponse":
{
"EMPNO":"000010",
"FIRSTNME":"CHRISTINE",
"MIDINIT":"I",
"LASTNAME":"HAAS",
"WORKDEPT":"A00",
"PHONENO":"3978",
"HIREDATE":"1995-01-01Z",
"JOB":"PRES ",
"EDLEVEL":18,
"SEX":"F",
"BIRTHDATE":"1963-08-24Z",
"SALARY":96800.00,
"BONUS":21113.19,
"COMM":4220.00}
}
{"updateEmployeeResponse":{"updateCount":1}}
{"BONUS_INCREASEResponse":
{
"P_DEPTSWITHOUTNEWBONUSES":"",
"P_COUNTDEPTSVIEWED":8,
"P_COUNTDEPTSBONUSCHANGED":8,
"P_ERRORMSG":"",
"rowset":
[
{
"WORKDEPT":"A00",
"EMPNO":"000010",
"BONUS":25546.95},
{
"WORKDEPT":"A00",
"EMPNO":"000110",
"BONUS":22992.12},
{
"WORKDEPT":"A00",
"EMPNO":"000120",
...}
],
"rowset2":
[
{
"WORKDEPT":"A00",
"EMPNO":"000010",
"BONUS":25546.95},
{
"WORKDEPT":"A00",
"EMPNO":"000110",
"BONUS":22992.12},
{
"WORKDEPT":"A00",
"EMPNO":"000120",
...}
],
...
}
}
{"testXQueryResponse":
[
"Basic Snow Shovel, ",
"A Deluxe Snow Shovel ...",
...
]
}
{"testXQueryResponse":
"Basic Snow Shovel, "
}