You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Gul Onural (JIRA)" <ji...@apache.org> on 2006/11/06 22:39:37 UTC
[jira] Created: (AXIS2-1625) Axis2 OMElement navigation is broken
Axis2 OMElement navigation is broken
------------------------------------
Key: AXIS2-1625
URL: http://issues.apache.org/jira/browse/AXIS2-1625
Project: Apache Axis 2.0 (Axis2)
Issue Type: Bug
Components: om
Reporter: Gul Onural
Priority: Blocker
What I am trying to do is really simple:
I have a service method takes OMElement as input and returns
an OMElement as output.
At the beginning of the method, I print the OMElement input parameter
and I see it as expected. But when I try to iterate elements of the
OMElement using following code I don't see the child elements but get
null pointer instead.
Is this a known issue ? This code was working couple of weeks ago.
Gul
Xml snippet
==========
<tns:CreateSimpleXXXRequest xsi:schemaLocation="http://www.example.com CommonTypes.xsd" xmlns:tns="http://www.example.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tns:simpleXXX>
<tns:name>String</tns:name>
</tns:simpleXXX>
</tns:CreateSimpleXXXRequest>
Code snippet
==========
Iterator children = element.getChildren();
while (children.hasNext()) {
OMElement root = (OMElement) children.next();
System.out.println("ELEMENT = " + root.toString());
OMElement temp = root.getFirstChildWithName(new QName(
"http://example.com", "name"));
if (temp != null) {
System.out.println("NAME = " + temp.getText());
}
}
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Resolved: (AXIS2-1625) Axis2 OMElement navigation is broken
Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/AXIS2-1625?page=all ]
Davanum Srinivas resolved AXIS2-1625.
-------------------------------------
Resolution: Invalid
see prev comment.
-- dims
> Axis2 OMElement navigation is broken
> ------------------------------------
>
> Key: AXIS2-1625
> URL: http://issues.apache.org/jira/browse/AXIS2-1625
> Project: Apache Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: om
> Reporter: Gul Onural
> Assigned To: Eran Chinthaka
> Priority: Blocker
> Attachments: simpleclient.zip, simpleservice.zip
>
>
> What I am trying to do is really simple:
> I have a service method takes OMElement as input and returns
> an OMElement as output.
> At the beginning of the method, I print the OMElement input parameter
> and I see it as expected. But when I try to iterate elements of the
> OMElement using following code I don't see the child elements but get
> null pointer instead.
> Is this a known issue ? This code was working couple of weeks ago.
> Gul
> Xml snippet
> ==========
> <tns:CreateSimpleXXXRequest xsi:schemaLocation="http://www.example.com CommonTypes.xsd" xmlns:tns="http://www.example.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <tns:simpleXXX>
> <tns:name>String</tns:name>
> </tns:simpleXXX>
> </tns:CreateSimpleXXXRequest>
> Code snippet
> ==========
> Iterator children = element.getChildren();
> while (children.hasNext()) {
> OMElement root = (OMElement) children.next();
> System.out.println("ELEMENT = " + root.toString());
> OMElement temp = root.getFirstChildWithName(new QName(
> "http://example.com", "name"));
> if (temp != null) {
> System.out.println("NAME = " + temp.getText());
> }
> }
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Updated: (AXIS2-1625) Axis2 OMElement navigation is broken
Posted by "Gul Onural (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/AXIS2-1625?page=all ]
Gul Onural updated AXIS2-1625:
------------------------------
Attachment: simpleservice.zip
> Axis2 OMElement navigation is broken
> ------------------------------------
>
> Key: AXIS2-1625
> URL: http://issues.apache.org/jira/browse/AXIS2-1625
> Project: Apache Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: om
> Reporter: Gul Onural
> Assigned To: Eran Chinthaka
> Priority: Blocker
> Attachments: simpleclient.zip, simpleservice.zip
>
>
> What I am trying to do is really simple:
> I have a service method takes OMElement as input and returns
> an OMElement as output.
> At the beginning of the method, I print the OMElement input parameter
> and I see it as expected. But when I try to iterate elements of the
> OMElement using following code I don't see the child elements but get
> null pointer instead.
> Is this a known issue ? This code was working couple of weeks ago.
> Gul
> Xml snippet
> ==========
> <tns:CreateSimpleXXXRequest xsi:schemaLocation="http://www.example.com CommonTypes.xsd" xmlns:tns="http://www.example.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <tns:simpleXXX>
> <tns:name>String</tns:name>
> </tns:simpleXXX>
> </tns:CreateSimpleXXXRequest>
> Code snippet
> ==========
> Iterator children = element.getChildren();
> while (children.hasNext()) {
> OMElement root = (OMElement) children.next();
> System.out.println("ELEMENT = " + root.toString());
> OMElement temp = root.getFirstChildWithName(new QName(
> "http://example.com", "name"));
> if (temp != null) {
> System.out.println("NAME = " + temp.getText());
> }
> }
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Assigned: (AXIS2-1625) Axis2 OMElement navigation is broken
Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/AXIS2-1625?page=all ]
Davanum Srinivas reassigned AXIS2-1625:
---------------------------------------
Assignee: Eran Chinthaka
> Axis2 OMElement navigation is broken
> ------------------------------------
>
> Key: AXIS2-1625
> URL: http://issues.apache.org/jira/browse/AXIS2-1625
> Project: Apache Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: om
> Reporter: Gul Onural
> Assigned To: Eran Chinthaka
> Priority: Blocker
>
> What I am trying to do is really simple:
> I have a service method takes OMElement as input and returns
> an OMElement as output.
> At the beginning of the method, I print the OMElement input parameter
> and I see it as expected. But when I try to iterate elements of the
> OMElement using following code I don't see the child elements but get
> null pointer instead.
> Is this a known issue ? This code was working couple of weeks ago.
> Gul
> Xml snippet
> ==========
> <tns:CreateSimpleXXXRequest xsi:schemaLocation="http://www.example.com CommonTypes.xsd" xmlns:tns="http://www.example.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <tns:simpleXXX>
> <tns:name>String</tns:name>
> </tns:simpleXXX>
> </tns:CreateSimpleXXXRequest>
> Code snippet
> ==========
> Iterator children = element.getChildren();
> while (children.hasNext()) {
> OMElement root = (OMElement) children.next();
> System.out.println("ELEMENT = " + root.toString());
> OMElement temp = root.getFirstChildWithName(new QName(
> "http://example.com", "name"));
> if (temp != null) {
> System.out.println("NAME = " + temp.getText());
> }
> }
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Commented: (AXIS2-1625) Axis2 OMElement navigation is broken
Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/AXIS2-1625?page=comments#action_12447970 ]
Davanum Srinivas commented on AXIS2-1625:
-----------------------------------------
works fine for me. Here's what i see on the client:
REQUEST = <simple:createXXX xmlns:simple="http://www.example.com/"><common:CreateXXXRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:common="http://www.example.com/common" xsi:schemaLocation="http://www.example.com/common CommonTypes.xsd">
<common:xxx>
<common:name>String</common:name>
</common:xxx>
</common:CreateXXXRequest></simple:createXXX>
RESPONSE = <simple:createXXXResponse xmlns:tns="http://www.example.com/SimpleService" xmlns:simple="http://www.example.com/">blah</simple:createXXXResponse>
Here's the tcpmon captured request:
POST /axis2/services/SimpleService HTTP/1.1
SOAPAction: "urn:anonOutInOp"
User-Agent: Axis2
Host: localhost:8080
Transfer-Encoding: chunked
Content-Type: text/xml; charset=UTF-8
223
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header /><soapenv:Body><simple:createXXX xmlns:simple="http://www.example.com/"><common:CreateXXXRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:common="http://www.example.com/common" xsi:schemaLocation="http://www.example.com/common CommonTypes.xsd">
<common:xxx>
<common:name>String</common:name>
</common:xxx>
</common:CreateXXXRequest></simple:createXXX></soapenv:Body></soapenv:Envelope>
0
Here's the tcpmon response:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=83784915A21B22EB859BC7F5E31B4CD2; Path=/axis2
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Tue, 07 Nov 2006 23:19:12 GMT
145
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header /><soapenv:Body><simple:createXXXResponse xmlns:tns="http://www.example.com/SimpleService" xmlns:simple="http://www.example.com/">blah</simple:createXXXResponse></soapenv:Body></soapenv:Envelope>
0
And here's the print on the tomcat console:
createXXX has been invoked. OMElement = <simple:createXXX xmlns:simple="http://www.example.com/"><common:CreateXXXRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:common="http://www.example.com/common" xsi:schemaLocation="http://www.example.com/common CommonTypes.xsd">
<common:xxx>
<common:name>String</common:name>
</common:xxx>
</common:CreateXXXRequest></simple:createXXX>
ELEMENT = <common:CreateXXXRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:common="http://www.example.com/common" xsi:schemaLocation="http://www.example.com/common CommonTypes.xsd">
<common:xxx>
<common:name>String</common:name>
</common:xxx>
</common:CreateXXXRequest>
COULDN'T FIND
The loop over the iterator in createXXX method should be over the "common:xxx" element and not the "simple:createXXX" as it is now. So you won't find the element named ""name"
closing the bug as invalid.
thanks,
dims
> Axis2 OMElement navigation is broken
> ------------------------------------
>
> Key: AXIS2-1625
> URL: http://issues.apache.org/jira/browse/AXIS2-1625
> Project: Apache Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: om
> Reporter: Gul Onural
> Assigned To: Eran Chinthaka
> Priority: Blocker
> Attachments: simpleclient.zip, simpleservice.zip
>
>
> What I am trying to do is really simple:
> I have a service method takes OMElement as input and returns
> an OMElement as output.
> At the beginning of the method, I print the OMElement input parameter
> and I see it as expected. But when I try to iterate elements of the
> OMElement using following code I don't see the child elements but get
> null pointer instead.
> Is this a known issue ? This code was working couple of weeks ago.
> Gul
> Xml snippet
> ==========
> <tns:CreateSimpleXXXRequest xsi:schemaLocation="http://www.example.com CommonTypes.xsd" xmlns:tns="http://www.example.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <tns:simpleXXX>
> <tns:name>String</tns:name>
> </tns:simpleXXX>
> </tns:CreateSimpleXXXRequest>
> Code snippet
> ==========
> Iterator children = element.getChildren();
> while (children.hasNext()) {
> OMElement root = (OMElement) children.next();
> System.out.println("ELEMENT = " + root.toString());
> OMElement temp = root.getFirstChildWithName(new QName(
> "http://example.com", "name"));
> if (temp != null) {
> System.out.println("NAME = " + temp.getText());
> }
> }
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Updated: (AXIS2-1625) Axis2 OMElement navigation is broken
Posted by "Gul Onural (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/AXIS2-1625?page=all ]
Gul Onural updated AXIS2-1625:
------------------------------
Attachment: simpleclient.zip
> Axis2 OMElement navigation is broken
> ------------------------------------
>
> Key: AXIS2-1625
> URL: http://issues.apache.org/jira/browse/AXIS2-1625
> Project: Apache Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: om
> Reporter: Gul Onural
> Assigned To: Eran Chinthaka
> Priority: Blocker
> Attachments: simpleclient.zip, simpleservice.zip
>
>
> What I am trying to do is really simple:
> I have a service method takes OMElement as input and returns
> an OMElement as output.
> At the beginning of the method, I print the OMElement input parameter
> and I see it as expected. But when I try to iterate elements of the
> OMElement using following code I don't see the child elements but get
> null pointer instead.
> Is this a known issue ? This code was working couple of weeks ago.
> Gul
> Xml snippet
> ==========
> <tns:CreateSimpleXXXRequest xsi:schemaLocation="http://www.example.com CommonTypes.xsd" xmlns:tns="http://www.example.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <tns:simpleXXX>
> <tns:name>String</tns:name>
> </tns:simpleXXX>
> </tns:CreateSimpleXXXRequest>
> Code snippet
> ==========
> Iterator children = element.getChildren();
> while (children.hasNext()) {
> OMElement root = (OMElement) children.next();
> System.out.println("ELEMENT = " + root.toString());
> OMElement temp = root.getFirstChildWithName(new QName(
> "http://example.com", "name"));
> if (temp != null) {
> System.out.println("NAME = " + temp.getText());
> }
> }
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Commented: (AXIS2-1625) Axis2 OMElement navigation is broken
Posted by "Gul Onural (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/AXIS2-1625?page=comments#action_12447945 ]
Gul Onural commented on AXIS2-1625:
-----------------------------------
Added service and client programs to reproduce the issue.
Gul
> Axis2 OMElement navigation is broken
> ------------------------------------
>
> Key: AXIS2-1625
> URL: http://issues.apache.org/jira/browse/AXIS2-1625
> Project: Apache Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: om
> Reporter: Gul Onural
> Assigned To: Eran Chinthaka
> Priority: Blocker
> Attachments: simpleclient.zip, simpleservice.zip
>
>
> What I am trying to do is really simple:
> I have a service method takes OMElement as input and returns
> an OMElement as output.
> At the beginning of the method, I print the OMElement input parameter
> and I see it as expected. But when I try to iterate elements of the
> OMElement using following code I don't see the child elements but get
> null pointer instead.
> Is this a known issue ? This code was working couple of weeks ago.
> Gul
> Xml snippet
> ==========
> <tns:CreateSimpleXXXRequest xsi:schemaLocation="http://www.example.com CommonTypes.xsd" xmlns:tns="http://www.example.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <tns:simpleXXX>
> <tns:name>String</tns:name>
> </tns:simpleXXX>
> </tns:CreateSimpleXXXRequest>
> Code snippet
> ==========
> Iterator children = element.getChildren();
> while (children.hasNext()) {
> OMElement root = (OMElement) children.next();
> System.out.println("ELEMENT = " + root.toString());
> OMElement temp = root.getFirstChildWithName(new QName(
> "http://example.com", "name"));
> if (temp != null) {
> System.out.println("NAME = " + temp.getText());
> }
> }
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org