You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Ivan Dubrov (JIRA)" <de...@geronimo.apache.org> on 2005/06/23 06:37:09 UTC
[jira] Created: (GERONIMO-684) Wrapped document/literal do not work for empty message parts
Wrapped document/literal do not work for empty message parts
------------------------------------------------------------
Key: GERONIMO-684
URL: http://issues.apache.org/jira/browse/GERONIMO-684
Project: Geronimo
Type: Bug
Components: webservices
Versions: 1.0-M4
Reporter: Ivan Dubrov
Attachments: patch2
If WSDL contains message parts with empty XML type, NullPointerException is thrown during the deployment.
Here is the relevant pieces from the WSDL:
Piece from the schema embedded in the WSDL:
<complexType name="methodResponseType">
<sequence/>
</complexType>
<element name=methodResponse" type="tns:methodResponseTyoe"/>
Snippet from the WSDL:
<message name="SomeEndpoint_someResponse">
<part name="result" element="ns2:someResponse"/>
</message>
The following patch shows the possible solution:
Index: HeavyweightOperationDescBuilder.java
===================================================================
--- HeavyweightOperationDescBuilder.java (revision 190889)
+++ HeavyweightOperationDescBuilder.java (working copy)
@@ -229,14 +229,17 @@
// schemaType should be complex using xsd:sequence compositor
SchemaParticle parametersType = operationType.getContentModel();
- if (SchemaParticle.ELEMENT == parametersType.getParticleType()) {
- expectedInParams.add(parametersType.getName().getLocalPart());
- } else if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
- SchemaParticle[] parameters = parametersType.getParticleChildren();
- for (int i = 0; i < parameters.length; i++) {
- expectedInParams.add(parameters[i].getName().getLocalPart());
- }
- }
+ // check if parameters are exist
+ if(parametersType != null) {
+ if (SchemaParticle.ELEMENT == parametersType.getParticleType()) {
+ expectedInParams.add(parametersType.getName().getLocalPart());
+ } else if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
+ SchemaParticle[] parameters = parametersType.getParticleChildren();
+ for (int i = 0; i < parameters.length; i++) {
+ expectedInParams.add(parameters[i].getName().getLocalPart());
+ }
+ }
+ }
if (!inParamNames.equals(expectedInParams)) {
throw new DeploymentException("Not all wrapper children were mapped for operation name" + operationName);
}
@@ -297,14 +300,17 @@
// schemaType should be complex using xsd:sequence compositor
SchemaParticle parametersType = operationType.getContentModel();
- if (SchemaParticle.ELEMENT == parametersType.getParticleType()) {
- expectedOutParams.add(parametersType.getName().getLocalPart());
- } else if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
- SchemaParticle[] parameters = parametersType.getParticleChildren();
- for (int i = 0; i < parameters.length; i++) {
- expectedOutParams.add(parameters[i].getName().getLocalPart());
- }
- }
+ // check result exists
+ if(parametersType != null) {
+ if (SchemaParticle.ELEMENT == parametersType.getParticleType()) {
+ expectedOutParams.add(parametersType.getName().getLocalPart());
+ } else if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
+ SchemaParticle[] parameters = parametersType.getParticleChildren();
+ for (int i = 0; i < parameters.length; i++) {
+ expectedOutParams.add(parameters[i].getName().getLocalPart());
+ }
+ }
+ }
if (!outParamNames.equals(expectedOutParams)) {
throw new DeploymentException("Not all wrapper children were mapped to parameters or a return value for operation " + operationName);
}
Note that problem is that operationType.getContentModel() returns null if it consists of one empty sequence. If check is added, everything works fine.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (GERONIMO-684) Wrapped document/literal do not work for empty message parts
Posted by "Ivan Dubrov (JIRA)" <de...@geronimo.apache.org>.
[ http://issues.apache.org/jira/browse/GERONIMO-684?page=all ]
Ivan Dubrov updated GERONIMO-684:
---------------------------------
Component: webservices
Version: 1.0-M4
> Wrapped document/literal do not work for empty message parts
> ------------------------------------------------------------
>
> Key: GERONIMO-684
> URL: http://issues.apache.org/jira/browse/GERONIMO-684
> Project: Geronimo
> Type: Bug
> Components: webservices
> Versions: 1.0-M4
> Reporter: Ivan Dubrov
> Attachments: patch2
>
> If WSDL contains message parts with empty XML type, NullPointerException is thrown during the deployment.
> Here is the relevant pieces from the WSDL:
> Piece from the schema embedded in the WSDL:
> <complexType name="methodResponseType">
> <sequence/>
> </complexType>
> <element name=methodResponse" type="tns:methodResponseTyoe"/>
> Snippet from the WSDL:
> <message name="SomeEndpoint_someResponse">
> <part name="result" element="ns2:someResponse"/>
> </message>
> The following patch shows the possible solution:
> Index: HeavyweightOperationDescBuilder.java
> ===================================================================
> --- HeavyweightOperationDescBuilder.java (revision 190889)
> +++ HeavyweightOperationDescBuilder.java (working copy)
> @@ -229,14 +229,17 @@
>
> // schemaType should be complex using xsd:sequence compositor
> SchemaParticle parametersType = operationType.getContentModel();
> - if (SchemaParticle.ELEMENT == parametersType.getParticleType()) {
> - expectedInParams.add(parametersType.getName().getLocalPart());
> - } else if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
> - SchemaParticle[] parameters = parametersType.getParticleChildren();
> - for (int i = 0; i < parameters.length; i++) {
> - expectedInParams.add(parameters[i].getName().getLocalPart());
> - }
> - }
> + // check if parameters are exist
> + if(parametersType != null) {
> + if (SchemaParticle.ELEMENT == parametersType.getParticleType()) {
> + expectedInParams.add(parametersType.getName().getLocalPart());
> + } else if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
> + SchemaParticle[] parameters = parametersType.getParticleChildren();
> + for (int i = 0; i < parameters.length; i++) {
> + expectedInParams.add(parameters[i].getName().getLocalPart());
> + }
> + }
> + }
> if (!inParamNames.equals(expectedInParams)) {
> throw new DeploymentException("Not all wrapper children were mapped for operation name" + operationName);
> }
> @@ -297,14 +300,17 @@
>
> // schemaType should be complex using xsd:sequence compositor
> SchemaParticle parametersType = operationType.getContentModel();
> - if (SchemaParticle.ELEMENT == parametersType.getParticleType()) {
> - expectedOutParams.add(parametersType.getName().getLocalPart());
> - } else if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
> - SchemaParticle[] parameters = parametersType.getParticleChildren();
> - for (int i = 0; i < parameters.length; i++) {
> - expectedOutParams.add(parameters[i].getName().getLocalPart());
> - }
> - }
> + // check result exists
> + if(parametersType != null) {
> + if (SchemaParticle.ELEMENT == parametersType.getParticleType()) {
> + expectedOutParams.add(parametersType.getName().getLocalPart());
> + } else if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
> + SchemaParticle[] parameters = parametersType.getParticleChildren();
> + for (int i = 0; i < parameters.length; i++) {
> + expectedOutParams.add(parameters[i].getName().getLocalPart());
> + }
> + }
> + }
> if (!outParamNames.equals(expectedOutParams)) {
> throw new DeploymentException("Not all wrapper children were mapped to parameters or a return value for operation " + operationName);
> }
> Note that problem is that operationType.getContentModel() returns null if it consists of one empty sequence. If check is added, everything works fine.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (GERONIMO-684) Wrapped document/literal do not work for empty message parts
Posted by "David Jencks (JIRA)" <de...@geronimo.apache.org>.
[ http://issues.apache.org/jira/browse/GERONIMO-684?page=all ]
David Jencks closed GERONIMO-684:
---------------------------------
Fix Version: 1.0-M4
1.0-M5
Resolution: Duplicate
Assign To: David Jencks
I should pay more attention to bug reports. I ran into this also and fixed it as GERONIMO-768
> Wrapped document/literal do not work for empty message parts
> ------------------------------------------------------------
>
> Key: GERONIMO-684
> URL: http://issues.apache.org/jira/browse/GERONIMO-684
> Project: Geronimo
> Type: Bug
> Components: webservices
> Versions: 1.0-M4
> Reporter: Ivan Dubrov
> Assignee: David Jencks
> Fix For: 1.0-M4, 1.0-M5
> Attachments: patch2
>
> If WSDL contains message parts with empty XML type, NullPointerException is thrown during the deployment.
> Here is the relevant pieces from the WSDL:
> Piece from the schema embedded in the WSDL:
> <complexType name="methodResponseType">
> <sequence/>
> </complexType>
> <element name=methodResponse" type="tns:methodResponseType"/>
> Snippet from the WSDL:
> <message name="SomeEndpoint_someResponse">
> <part name="result" element="ns2:someResponse"/>
> </message>
> The attached patch shows the possible solution:
> Note that problem is that operationType.getContentModel() in the line HeavyweightOperationDescBuilder.java:231 returns null if it consists of one empty sequence. If check is added, everything works fine.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (GERONIMO-684) Wrapped document/literal do not work for empty message parts
Posted by "Ivan Dubrov (JIRA)" <de...@geronimo.apache.org>.
[ http://issues.apache.org/jira/browse/GERONIMO-684?page=all ]
Ivan Dubrov updated GERONIMO-684:
---------------------------------
Attachment: patch2
Possible fix
> Wrapped document/literal do not work for empty message parts
> ------------------------------------------------------------
>
> Key: GERONIMO-684
> URL: http://issues.apache.org/jira/browse/GERONIMO-684
> Project: Geronimo
> Type: Bug
> Components: webservices
> Versions: 1.0-M4
> Reporter: Ivan Dubrov
> Attachments: patch2
>
> If WSDL contains message parts with empty XML type, NullPointerException is thrown during the deployment.
> Here is the relevant pieces from the WSDL:
> Piece from the schema embedded in the WSDL:
> <complexType name="methodResponseType">
> <sequence/>
> </complexType>
> <element name=methodResponse" type="tns:methodResponseTyoe"/>
> Snippet from the WSDL:
> <message name="SomeEndpoint_someResponse">
> <part name="result" element="ns2:someResponse"/>
> </message>
> The following patch shows the possible solution:
> Index: HeavyweightOperationDescBuilder.java
> ===================================================================
> --- HeavyweightOperationDescBuilder.java (revision 190889)
> +++ HeavyweightOperationDescBuilder.java (working copy)
> @@ -229,14 +229,17 @@
>
> // schemaType should be complex using xsd:sequence compositor
> SchemaParticle parametersType = operationType.getContentModel();
> - if (SchemaParticle.ELEMENT == parametersType.getParticleType()) {
> - expectedInParams.add(parametersType.getName().getLocalPart());
> - } else if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
> - SchemaParticle[] parameters = parametersType.getParticleChildren();
> - for (int i = 0; i < parameters.length; i++) {
> - expectedInParams.add(parameters[i].getName().getLocalPart());
> - }
> - }
> + // check if parameters are exist
> + if(parametersType != null) {
> + if (SchemaParticle.ELEMENT == parametersType.getParticleType()) {
> + expectedInParams.add(parametersType.getName().getLocalPart());
> + } else if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
> + SchemaParticle[] parameters = parametersType.getParticleChildren();
> + for (int i = 0; i < parameters.length; i++) {
> + expectedInParams.add(parameters[i].getName().getLocalPart());
> + }
> + }
> + }
> if (!inParamNames.equals(expectedInParams)) {
> throw new DeploymentException("Not all wrapper children were mapped for operation name" + operationName);
> }
> @@ -297,14 +300,17 @@
>
> // schemaType should be complex using xsd:sequence compositor
> SchemaParticle parametersType = operationType.getContentModel();
> - if (SchemaParticle.ELEMENT == parametersType.getParticleType()) {
> - expectedOutParams.add(parametersType.getName().getLocalPart());
> - } else if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
> - SchemaParticle[] parameters = parametersType.getParticleChildren();
> - for (int i = 0; i < parameters.length; i++) {
> - expectedOutParams.add(parameters[i].getName().getLocalPart());
> - }
> - }
> + // check result exists
> + if(parametersType != null) {
> + if (SchemaParticle.ELEMENT == parametersType.getParticleType()) {
> + expectedOutParams.add(parametersType.getName().getLocalPart());
> + } else if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
> + SchemaParticle[] parameters = parametersType.getParticleChildren();
> + for (int i = 0; i < parameters.length; i++) {
> + expectedOutParams.add(parameters[i].getName().getLocalPart());
> + }
> + }
> + }
> if (!outParamNames.equals(expectedOutParams)) {
> throw new DeploymentException("Not all wrapper children were mapped to parameters or a return value for operation " + operationName);
> }
> Note that problem is that operationType.getContentModel() returns null if it consists of one empty sequence. If check is added, everything works fine.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (GERONIMO-684) Wrapped document/literal do not work for empty message parts
Posted by "Ivan Dubrov (JIRA)" <de...@geronimo.apache.org>.
[ http://issues.apache.org/jira/browse/GERONIMO-684?page=all ]
Ivan Dubrov updated GERONIMO-684:
---------------------------------
Description:
If WSDL contains message parts with empty XML type, NullPointerException is thrown during the deployment.
Here is the relevant pieces from the WSDL:
Piece from the schema embedded in the WSDL:
<complexType name="methodResponseType">
<sequence/>
</complexType>
<element name=methodResponse" type="tns:methodResponseType"/>
Snippet from the WSDL:
<message name="SomeEndpoint_someResponse">
<part name="result" element="ns2:someResponse"/>
</message>
The attached patch shows the possible solution:
Note that problem is that operationType.getContentModel() in the line HeavyweightOperationDescBuilder.java:231 returns null if it consists of one empty sequence. If check is added, everything works fine.
was:
If WSDL contains message parts with empty XML type, NullPointerException is thrown during the deployment.
Here is the relevant pieces from the WSDL:
Piece from the schema embedded in the WSDL:
<complexType name="methodResponseType">
<sequence/>
</complexType>
<element name=methodResponse" type="tns:methodResponseTyoe"/>
Snippet from the WSDL:
<message name="SomeEndpoint_someResponse">
<part name="result" element="ns2:someResponse"/>
</message>
The following patch shows the possible solution:
Index: HeavyweightOperationDescBuilder.java
===================================================================
--- HeavyweightOperationDescBuilder.java (revision 190889)
+++ HeavyweightOperationDescBuilder.java (working copy)
@@ -229,14 +229,17 @@
// schemaType should be complex using xsd:sequence compositor
SchemaParticle parametersType = operationType.getContentModel();
- if (SchemaParticle.ELEMENT == parametersType.getParticleType()) {
- expectedInParams.add(parametersType.getName().getLocalPart());
- } else if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
- SchemaParticle[] parameters = parametersType.getParticleChildren();
- for (int i = 0; i < parameters.length; i++) {
- expectedInParams.add(parameters[i].getName().getLocalPart());
- }
- }
+ // check if parameters are exist
+ if(parametersType != null) {
+ if (SchemaParticle.ELEMENT == parametersType.getParticleType()) {
+ expectedInParams.add(parametersType.getName().getLocalPart());
+ } else if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
+ SchemaParticle[] parameters = parametersType.getParticleChildren();
+ for (int i = 0; i < parameters.length; i++) {
+ expectedInParams.add(parameters[i].getName().getLocalPart());
+ }
+ }
+ }
if (!inParamNames.equals(expectedInParams)) {
throw new DeploymentException("Not all wrapper children were mapped for operation name" + operationName);
}
@@ -297,14 +300,17 @@
// schemaType should be complex using xsd:sequence compositor
SchemaParticle parametersType = operationType.getContentModel();
- if (SchemaParticle.ELEMENT == parametersType.getParticleType()) {
- expectedOutParams.add(parametersType.getName().getLocalPart());
- } else if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
- SchemaParticle[] parameters = parametersType.getParticleChildren();
- for (int i = 0; i < parameters.length; i++) {
- expectedOutParams.add(parameters[i].getName().getLocalPart());
- }
- }
+ // check result exists
+ if(parametersType != null) {
+ if (SchemaParticle.ELEMENT == parametersType.getParticleType()) {
+ expectedOutParams.add(parametersType.getName().getLocalPart());
+ } else if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
+ SchemaParticle[] parameters = parametersType.getParticleChildren();
+ for (int i = 0; i < parameters.length; i++) {
+ expectedOutParams.add(parameters[i].getName().getLocalPart());
+ }
+ }
+ }
if (!outParamNames.equals(expectedOutParams)) {
throw new DeploymentException("Not all wrapper children were mapped to parameters or a return value for operation " + operationName);
}
Note that problem is that operationType.getContentModel() returns null if it consists of one empty sequence. If check is added, everything works fine.
> Wrapped document/literal do not work for empty message parts
> ------------------------------------------------------------
>
> Key: GERONIMO-684
> URL: http://issues.apache.org/jira/browse/GERONIMO-684
> Project: Geronimo
> Type: Bug
> Components: webservices
> Versions: 1.0-M4
> Reporter: Ivan Dubrov
> Attachments: patch2
>
> If WSDL contains message parts with empty XML type, NullPointerException is thrown during the deployment.
> Here is the relevant pieces from the WSDL:
> Piece from the schema embedded in the WSDL:
> <complexType name="methodResponseType">
> <sequence/>
> </complexType>
> <element name=methodResponse" type="tns:methodResponseType"/>
> Snippet from the WSDL:
> <message name="SomeEndpoint_someResponse">
> <part name="result" element="ns2:someResponse"/>
> </message>
> The attached patch shows the possible solution:
> Note that problem is that operationType.getContentModel() in the line HeavyweightOperationDescBuilder.java:231 returns null if it consists of one empty sequence. If check is added, everything works fine.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira