[JBoss JIRA] (JBWS-3964) Incorrect behaviour with @WebParam(header = true, mode = IN)
by Xavier Dury (JIRA)
[ https://issues.jboss.org/browse/JBWS-3964?page=com.atlassian.jira.plugin.... ]
Xavier Dury updated JBWS-3964:
------------------------------
Description:
Given the following simple WebService with incoming and outgoing header @WebParams:
{code}
@Stateless
@WebService(name = "MyEchoService", targetNamespace = "urn:echo")
public class MyEchoService {
@WebResult(name = "result")
public String echo(
@WebParam(name = "message") String message,
@WebParam(name = "paramIn", mode = Mode.IN, header = true) Holder<String> paramIn,
@WebParam(name = "paramOut", mode = Mode.OUT, header = true) Holder<String> paramOut) {
paramOut.value = "got paramIn " + paramIn.value;
return "echo " + message;
}
}
{code}
The generated WSDL contains the following operation where the incoming @WebParam (mode = IN) is present in both input and ouput:
{code}
<wsdl:operation name="echo">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="echo">
<soap:header message="tns:echo" part="paramIn" use="literal"></soap:header>
<soap:body parts="parameters" use="literal"/>
</wsdl:input>
<wsdl:output name="echoResponse">
<soap:header message="tns:echoResponse" part="paramIn" use="literal"></soap:header>
<soap:header message="tns:echoResponse" part="paramOut" use="literal"></soap:header>
<soap:body parts="result" use="literal"/>
</wsdl:output>
</wsdl:operation>
{code}
We can see in the following exchange that the incoming @WebParam will be copied verbatim in the response:
{code}
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:echo">
<soapenv:Header>
<urn:paramIn>fred</urn:paramIn>
</soapenv:Header>
<soapenv:Body>
<urn:echo>
<urn:message>hello world!</urn:message>
</urn:echo>
</soapenv:Body>
</soapenv:Envelope>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<paramIn xmlns="urn:echo">fred</paramIn>
<paramOut xmlns="urn:echo">got paramIn fred</paramOut>
</soap:Header>
<soap:Body>
<echoResponse xmlns="urn:echo">
<result>echo hello world!</result>
</echoResponse>
</soap:Body>
</soap:Envelope>
{code}
When the incoming header @WebParam is not set, an empty element will be added to the body of the response:
{code}
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:echo">
<soapenv:Body>
<urn:echo>
<urn:message>hello world!</urn:message>
</urn:echo>
</soapenv:Body>
</soapenv:Envelope>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<paramOut xmlns="urn:echo">got paramIn null</paramOut>
</soap:Header>
<soap:Body>
<echoResponse xmlns="urn:echo">
<result>echo hello world!</result>
</echoResponse>
<paramIn xsi:nil="true" xmlns="urn:echo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</soap:Body>
</soap:Envelope>
{code}
was:
Given the following simple WebService with incoming and outgoing header @WebParams:
{{@Stateless
@WebService(name = "MyEchoService", targetNamespace = "urn:echo")
public class MyEchoService {
@WebResult(name = "result")
public String echo(
@WebParam(name = "message") String message,
@WebParam(name = "paramIn", mode = Mode.IN, header = true) Holder<String> paramIn,
@WebParam(name = "paramOut", mode = Mode.OUT, header = true) Holder<String> paramOut) {
paramOut.value = "got paramIn " + paramIn.value;
return "echo " + message;
}
}}}
The generated WSDL contains the following operation where the incoming @WebParam (mode = IN) is present in both input and ouput:
{{<wsdl:operation name="echo">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="echo">
<soap:header message="tns:echo" part="paramIn" use="literal"></soap:header>
<soap:body parts="parameters" use="literal"/>
</wsdl:input>
<wsdl:output name="echoResponse">
<soap:header message="tns:echoResponse" part="paramIn" use="literal"></soap:header>
<soap:header message="tns:echoResponse" part="paramOut" use="literal"></soap:header>
<soap:body parts="result" use="literal"/>
</wsdl:output>
</wsdl:operation>}}
We can see in the following exchange that the incoming @WebParam will be copied verbatim in the response:
{{<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:echo">
<soapenv:Header>
<urn:paramIn>fred</urn:paramIn>
</soapenv:Header>
<soapenv:Body>
<urn:echo>
<urn:message>hello world!</urn:message>
</urn:echo>
</soapenv:Body>
</soapenv:Envelope>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<paramIn xmlns="urn:echo">fred</paramIn>
<paramOut xmlns="urn:echo">got paramIn fred</paramOut>
</soap:Header>
<soap:Body>
<echoResponse xmlns="urn:echo">
<result>echo hello world!</result>
</echoResponse>
</soap:Body>
</soap:Envelope>}}
When the incoming header @WebParam is not set, an empty element will be added to the body of the response:
{{<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:echo">
<soapenv:Body>
<urn:echo>
<urn:message>hello world!</urn:message>
</urn:echo>
</soapenv:Body>
</soapenv:Envelope>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<paramOut xmlns="urn:echo">got paramIn null</paramOut>
</soap:Header>
<soap:Body>
<echoResponse xmlns="urn:echo">
<result>echo hello world!</result>
</echoResponse>
<paramIn xsi:nil="true" xmlns="urn:echo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</soap:Body>
</soap:Envelope>}}
> Incorrect behaviour with @WebParam(header = true, mode = IN)
> ------------------------------------------------------------
>
> Key: JBWS-3964
> URL: https://issues.jboss.org/browse/JBWS-3964
> Project: JBoss Web Services
> Issue Type: Bug
> Environment: Wildfly 9.0.2
> Reporter: Xavier Dury
>
> Given the following simple WebService with incoming and outgoing header @WebParams:
> {code}
> @Stateless
> @WebService(name = "MyEchoService", targetNamespace = "urn:echo")
> public class MyEchoService {
>
> @WebResult(name = "result")
> public String echo(
> @WebParam(name = "message") String message,
> @WebParam(name = "paramIn", mode = Mode.IN, header = true) Holder<String> paramIn,
> @WebParam(name = "paramOut", mode = Mode.OUT, header = true) Holder<String> paramOut) {
> paramOut.value = "got paramIn " + paramIn.value;
> return "echo " + message;
> }
> }
> {code}
> The generated WSDL contains the following operation where the incoming @WebParam (mode = IN) is present in both input and ouput:
> {code}
> <wsdl:operation name="echo">
> <soap:operation soapAction="" style="document"/>
> <wsdl:input name="echo">
> <soap:header message="tns:echo" part="paramIn" use="literal"></soap:header>
> <soap:body parts="parameters" use="literal"/>
> </wsdl:input>
> <wsdl:output name="echoResponse">
> <soap:header message="tns:echoResponse" part="paramIn" use="literal"></soap:header>
> <soap:header message="tns:echoResponse" part="paramOut" use="literal"></soap:header>
> <soap:body parts="result" use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> {code}
> We can see in the following exchange that the incoming @WebParam will be copied verbatim in the response:
> {code}
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:echo">
> <soapenv:Header>
> <urn:paramIn>fred</urn:paramIn>
> </soapenv:Header>
> <soapenv:Body>
> <urn:echo>
> <urn:message>hello world!</urn:message>
> </urn:echo>
> </soapenv:Body>
> </soapenv:Envelope>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Header>
> <paramIn xmlns="urn:echo">fred</paramIn>
> <paramOut xmlns="urn:echo">got paramIn fred</paramOut>
> </soap:Header>
> <soap:Body>
> <echoResponse xmlns="urn:echo">
> <result>echo hello world!</result>
> </echoResponse>
> </soap:Body>
> </soap:Envelope>
> {code}
> When the incoming header @WebParam is not set, an empty element will be added to the body of the response:
> {code}
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:echo">
> <soapenv:Body>
> <urn:echo>
> <urn:message>hello world!</urn:message>
> </urn:echo>
> </soapenv:Body>
> </soapenv:Envelope>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Header>
> <paramOut xmlns="urn:echo">got paramIn null</paramOut>
> </soap:Header>
> <soap:Body>
> <echoResponse xmlns="urn:echo">
> <result>echo hello world!</result>
> </echoResponse>
> <paramIn xsi:nil="true" xmlns="urn:echo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
> </soap:Body>
> </soap:Envelope>
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 1 month
[JBoss JIRA] (JBWS-3964) Incorrect behaviour with @WebParam(header = true, mode = IN)
by Xavier Dury (JIRA)
Xavier Dury created JBWS-3964:
---------------------------------
Summary: Incorrect behaviour with @WebParam(header = true, mode = IN)
Key: JBWS-3964
URL: https://issues.jboss.org/browse/JBWS-3964
Project: JBoss Web Services
Issue Type: Bug
Environment: Wildfly 9.0.2
Reporter: Xavier Dury
Given the following simple WebService with incoming and outgoing header @WebParams:
{{@Stateless
@WebService(name = "MyEchoService", targetNamespace = "urn:echo")
public class MyEchoService {
@WebResult(name = "result")
public String echo(
@WebParam(name = "message") String message,
@WebParam(name = "paramIn", mode = Mode.IN, header = true) Holder<String> paramIn,
@WebParam(name = "paramOut", mode = Mode.OUT, header = true) Holder<String> paramOut) {
paramOut.value = "got paramIn " + paramIn.value;
return "echo " + message;
}
}}}
The generated WSDL contains the following operation where the incoming @WebParam (mode = IN) is present in both input and ouput:
{{<wsdl:operation name="echo">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="echo">
<soap:header message="tns:echo" part="paramIn" use="literal"></soap:header>
<soap:body parts="parameters" use="literal"/>
</wsdl:input>
<wsdl:output name="echoResponse">
<soap:header message="tns:echoResponse" part="paramIn" use="literal"></soap:header>
<soap:header message="tns:echoResponse" part="paramOut" use="literal"></soap:header>
<soap:body parts="result" use="literal"/>
</wsdl:output>
</wsdl:operation>}}
We can see in the following exchange that the incoming @WebParam will be copied verbatim in the response:
{{<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:echo">
<soapenv:Header>
<urn:paramIn>fred</urn:paramIn>
</soapenv:Header>
<soapenv:Body>
<urn:echo>
<urn:message>hello world!</urn:message>
</urn:echo>
</soapenv:Body>
</soapenv:Envelope>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<paramIn xmlns="urn:echo">fred</paramIn>
<paramOut xmlns="urn:echo">got paramIn fred</paramOut>
</soap:Header>
<soap:Body>
<echoResponse xmlns="urn:echo">
<result>echo hello world!</result>
</echoResponse>
</soap:Body>
</soap:Envelope>}}
When the incoming header @WebParam is not set, an empty element will be added to the body of the response:
{{<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:echo">
<soapenv:Body>
<urn:echo>
<urn:message>hello world!</urn:message>
</urn:echo>
</soapenv:Body>
</soapenv:Envelope>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<paramOut xmlns="urn:echo">got paramIn null</paramOut>
</soap:Header>
<soap:Body>
<echoResponse xmlns="urn:echo">
<result>echo hello world!</result>
</echoResponse>
<paramIn xsi:nil="true" xmlns="urn:echo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</soap:Body>
</soap:Envelope>}}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 1 month
[JBoss JIRA] (JBWS-3963) JBossWS 5.1.1.Final errata
by Alessio Soldano (JIRA)
[ https://issues.jboss.org/browse/JBWS-3963?page=com.atlassian.jira.plugin.... ]
Alessio Soldano commented on JBWS-3963:
---------------------------------------
WildFly 9.0.0.Final, WildFly 9.0.1.Final, WildFly 9.0.2.Final:
* JBWS-3702 FIXME: Add support for https protocol
* JBWS-3620 Authentication failures w/ Undertow
* FIXME: [CXF-1519] Explicitely set the namespace of a WebFault
* FIXME: [CXF-2531] Wrong "transport" attribute in soap12:binding
* FIXME: [CXF-4600] Exception inheritance not working over SOAP protocol
* JBWS-2480 Soap attachments are dropped on server response
* JBWS-2561 XOP request not properly inlined
* Tests migrated from JBossWS-Native specific testsuite which are meant to pass with JBossWS-CXF too, but are still to be fixed
> JBossWS 5.1.1.Final errata
> --------------------------
>
> Key: JBWS-3963
> URL: https://issues.jboss.org/browse/JBWS-3963
> Project: JBoss Web Services
> Issue Type: Task
> Components: jbossws-cxf
> Reporter: Alessio Soldano
> Assignee: Alessio Soldano
> Fix For: jbossws-cxf-5.1.1.Final
>
>
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 1 month