|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
[jira] Created: (XFIRE-635) Parse exception on empty elements of type java.lang.IntegerParse exception on empty elements of type java.lang.Integer
----------------------------------------------------------- Key: XFIRE-635 URL: http://jira.codehaus.org/browse/XFIRE-635 Project: XFire Issue Type: Sub-task Affects Versions: 1.1.2, 1.0 Environment: java 1.4 Reporter: Jakub Mendys Assigned To: Dan Diephouse Priority: Minor When java.lang.Integer is used as a method parameter in your web service implementation then xFire will not accept null values nor empty element. Instead xFire will try to parse content of next elements and raise an exception. See test case: Under link http://jmendys.com/test.zip you will find a test case to reproduce the problem The zip contains folder 'test' which is an exploded war ready to deploy. After deployment is exposes 2 services: * XFireTestService1 (without xmlbean) * XFireTestService2 (with xmlbean) When you send a following request (to any of those): <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <getBasket xmlns="http://www.roche.com/drugsafety"> <referenceNo>STRINGA</referenceNo> <basketVersion></basketVersion> <medDRAVersionName>STRINGB</medDRAVersionName> </getBasket> </SOAP-ENV:Body> </SOAP-ENV:Envelope> you will get something like this: org.apache.commons.httpclient.HttpException : <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>For input string: "STRINGB"</faultstring></soap:Fault></soap:Body></soap:Envelope> And only if you provide valid and non null integer in basketVersion (e.g. <basketVersion>0</basketVersion>) the request will be processed correctly. Plaese note that xFire tries to parse STRINGB which is in next element as an value for the integer type element. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (XFIRE-635) Parse exception on empty elements of type java.lang.Integer [ http://jira.codehaus.org/browse/XFIRE-635?page=comments#action_74507 ]
Dan Diephouse commented on XFIRE-635: ------------------------------------- Well this actually seems to be more of a bug with xfire error reporting. An empty value for an integer is not valid according to xml schema. If it is a nillable you can supply an xsi:nil="true" attribute, in no cases can you just have an empty element. > Parse exception on empty elements of type java.lang.Integer > ----------------------------------------------------------- > > Key: XFIRE-635 > URL: http://jira.codehaus.org/browse/XFIRE-635 > Project: XFire > Issue Type: Sub-task > Affects Versions: 1.0, 1.1.2 > Environment: java 1.4 > Reporter: Jakub Mendys > Assigned To: Dan Diephouse > Priority: Minor > > When java.lang.Integer is used as a method parameter in your web service implementation then xFire will not accept null values nor empty element. Instead xFire will try to parse content of next elements and raise an exception. See test case: > Under link http://jmendys.com/test.zip you will find a test case to reproduce the problem > The zip contains folder 'test' which is an exploded war ready to deploy. After > deployment is exposes 2 services: > * XFireTestService1 (without xmlbean) > * XFireTestService2 (with xmlbean) > When you send a following request (to any of those): > <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> > <SOAP-ENV:Header/> > <SOAP-ENV:Body> > <getBasket xmlns="http://www.roche.com/drugsafety"> > <referenceNo>STRINGA</referenceNo> > <basketVersion></basketVersion> > <medDRAVersionName>STRINGB</medDRAVersionName> > </getBasket> > </SOAP-ENV:Body> > </SOAP-ENV:Envelope> > you will get something like this: > org.apache.commons.httpclient.HttpException : > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>For > input string: "STRINGB"</faultstring></soap:Fault></soap:Body></soap:Envelope> > And only if you provide valid and non null integer in basketVersion (e.g. > <basketVersion>0</basketVersion>) the request will be processed correctly. > Plaese note that xFire tries to parse STRINGB which is in next element as an value for the integer type element. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (XFIRE-635) Parse exception on empty elements of type java.lang.Integer [ http://jira.codehaus.org/browse/XFIRE-635?page=comments#action_74538 ]
Jakub Mendys commented on XFIRE-635: ------------------------------------ Seting element to null (xsi:nil="true" ) does not change zfire behaviour so I might be there are two problems here: with error reporing you emntioned (for empty elements) and the other with parsing/binding (for null values) > Parse exception on empty elements of type java.lang.Integer > ----------------------------------------------------------- > > Key: XFIRE-635 > URL: http://jira.codehaus.org/browse/XFIRE-635 > Project: XFire > Issue Type: Sub-task > Affects Versions: 1.0, 1.1.2 > Environment: java 1.4 > Reporter: Jakub Mendys > Assigned To: Dan Diephouse > Priority: Minor > > When java.lang.Integer is used as a method parameter in your web service implementation then xFire will not accept null values nor empty element. Instead xFire will try to parse content of next elements and raise an exception. See test case: > Under link http://jmendys.com/test.zip you will find a test case to reproduce the problem > The zip contains folder 'test' which is an exploded war ready to deploy. After > deployment is exposes 2 services: > * XFireTestService1 (without xmlbean) > * XFireTestService2 (with xmlbean) > When you send a following request (to any of those): > <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> > <SOAP-ENV:Header/> > <SOAP-ENV:Body> > <getBasket xmlns="http://www.roche.com/drugsafety"> > <referenceNo>STRINGA</referenceNo> > <basketVersion></basketVersion> > <medDRAVersionName>STRINGB</medDRAVersionName> > </getBasket> > </SOAP-ENV:Body> > </SOAP-ENV:Envelope> > you will get something like this: > org.apache.commons.httpclient.HttpException : > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>For > input string: "STRINGB"</faultstring></soap:Fault></soap:Body></soap:Envelope> > And only if you provide valid and non null integer in basketVersion (e.g. > <basketVersion>0</basketVersion>) the request will be processed correctly. > Plaese note that xFire tries to parse STRINGB which is in next element as an value for the integer type element. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Updated: (XFIRE-635) Parse exception on empty elements of type java.lang.Integer [ http://jira.codehaus.org/browse/XFIRE-635?page=all ]
Jakub Mendys updated XFIRE-635: ------------------------------- Attachment: test.zip test case (maven build) > Parse exception on empty elements of type java.lang.Integer > ----------------------------------------------------------- > > Key: XFIRE-635 > URL: http://jira.codehaus.org/browse/XFIRE-635 > Project: XFire > Issue Type: Sub-task > Affects Versions: 1.0, 1.1.2 > Environment: java 1.4 > Reporter: Jakub Mendys > Assigned To: Dan Diephouse > Priority: Minor > Attachments: test.zip > > > When java.lang.Integer is used as a method parameter in your web service implementation then xFire will not accept null values nor empty element. Instead xFire will try to parse content of next elements and raise an exception. See test case: > Under link http://jmendys.com/test.zip you will find a test case to reproduce the problem > The zip contains folder 'test' which is an exploded war ready to deploy. After > deployment is exposes 2 services: > * XFireTestService1 (without xmlbean) > * XFireTestService2 (with xmlbean) > When you send a following request (to any of those): > <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> > <SOAP-ENV:Header/> > <SOAP-ENV:Body> > <getBasket xmlns="http://www.roche.com/drugsafety"> > <referenceNo>STRINGA</referenceNo> > <basketVersion></basketVersion> > <medDRAVersionName>STRINGB</medDRAVersionName> > </getBasket> > </SOAP-ENV:Body> > </SOAP-ENV:Envelope> > you will get something like this: > org.apache.commons.httpclient.HttpException : > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>For > input string: "STRINGB"</faultstring></soap:Fault></soap:Body></soap:Envelope> > And only if you provide valid and non null integer in basketVersion (e.g. > <basketVersion>0</basketVersion>) the request will be processed correctly. > Plaese note that xFire tries to parse STRINGB which is in next element as an value for the integer type element. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (XFIRE-635) Parse exception on empty elements of type java.lang.Integer [ http://jira.codehaus.org/browse/XFIRE-635?page=comments#action_75206 ]
Jakub Mendys commented on XFIRE-635: ------------------------------------ original test case mentioned in first post has been replaced with maven project attached > Parse exception on empty elements of type java.lang.Integer > ----------------------------------------------------------- > > Key: XFIRE-635 > URL: http://jira.codehaus.org/browse/XFIRE-635 > Project: XFire > Issue Type: Sub-task > Affects Versions: 1.0, 1.1.2 > Environment: java 1.4 > Reporter: Jakub Mendys > Assigned To: Dan Diephouse > Priority: Minor > Attachments: test.zip > > > When java.lang.Integer is used as a method parameter in your web service implementation then xFire will not accept null values nor empty element. Instead xFire will try to parse content of next elements and raise an exception. See test case: > Under link http://jmendys.com/test.zip you will find a test case to reproduce the problem > The zip contains folder 'test' which is an exploded war ready to deploy. After > deployment is exposes 2 services: > * XFireTestService1 (without xmlbean) > * XFireTestService2 (with xmlbean) > When you send a following request (to any of those): > <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> > <SOAP-ENV:Header/> > <SOAP-ENV:Body> > <getBasket xmlns="http://www.roche.com/drugsafety"> > <referenceNo>STRINGA</referenceNo> > <basketVersion></basketVersion> > <medDRAVersionName>STRINGB</medDRAVersionName> > </getBasket> > </SOAP-ENV:Body> > </SOAP-ENV:Envelope> > you will get something like this: > org.apache.commons.httpclient.HttpException : > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>For > input string: "STRINGB"</faultstring></soap:Fault></soap:Body></soap:Envelope> > And only if you provide valid and non null integer in basketVersion (e.g. > <basketVersion>0</basketVersion>) the request will be processed correctly. > Plaese note that xFire tries to parse STRINGB which is in next element as an value for the integer type element. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Updated: (XFIRE-635) Parse exception on empty elements of type java.lang.Integer [ http://jira.codehaus.org/browse/XFIRE-635?page=all ]
Dan Diephouse updated XFIRE-635: -------------------------------- Fix Version/s: 1.2.3 > Parse exception on empty elements of type java.lang.Integer > ----------------------------------------------------------- > > Key: XFIRE-635 > URL: http://jira.codehaus.org/browse/XFIRE-635 > Project: XFire > Issue Type: Sub-task > Affects Versions: 1.0, 1.1.2 > Environment: java 1.4 > Reporter: Jakub Mendys > Assigned To: Dan Diephouse > Priority: Minor > Fix For: 1.2.3 > > Attachments: test.zip > > > When java.lang.Integer is used as a method parameter in your web service implementation then xFire will not accept null values nor empty element. Instead xFire will try to parse content of next elements and raise an exception. See test case: > Under link http://jmendys.com/test.zip you will find a test case to reproduce the problem > The zip contains folder 'test' which is an exploded war ready to deploy. After > deployment is exposes 2 services: > * XFireTestService1 (without xmlbean) > * XFireTestService2 (with xmlbean) > When you send a following request (to any of those): > <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> > <SOAP-ENV:Header/> > <SOAP-ENV:Body> > <getBasket xmlns="http://www.roche.com/drugsafety"> > <referenceNo>STRINGA</referenceNo> > <basketVersion></basketVersion> > <medDRAVersionName>STRINGB</medDRAVersionName> > </getBasket> > </SOAP-ENV:Body> > </SOAP-ENV:Envelope> > you will get something like this: > org.apache.commons.httpclient.HttpException : > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>For > input string: "STRINGB"</faultstring></soap:Fault></soap:Body></soap:Envelope> > And only if you provide valid and non null integer in basketVersion (e.g. > <basketVersion>0</basketVersion>) the request will be processed correctly. > Plaese note that xFire tries to parse STRINGB which is in next element as an value for the integer type element. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Closed: (XFIRE-635) Parse exception on empty elements of type java.lang.Integer [ http://jira.codehaus.org/browse/XFIRE-635?page=all ]
Dan Diephouse closed XFIRE-635. ------------------------------- Resolution: Won't Fix You can't use XMLBeans generated classes with the aegis binding, which is why you're having problems with service 1. Which would explain your marshalling problems... > Parse exception on empty elements of type java.lang.Integer > ----------------------------------------------------------- > > Key: XFIRE-635 > URL: http://jira.codehaus.org/browse/XFIRE-635 > Project: XFire > Issue Type: Sub-task > Affects Versions: 1.0, 1.1.2 > Environment: java 1.4 > Reporter: Jakub Mendys > Assigned To: Dan Diephouse > Priority: Minor > Fix For: 1.2.3 > > Attachments: test.zip > > > When java.lang.Integer is used as a method parameter in your web service implementation then xFire will not accept null values nor empty element. Instead xFire will try to parse content of next elements and raise an exception. See test case: > Under link http://jmendys.com/test.zip you will find a test case to reproduce the problem > The zip contains folder 'test' which is an exploded war ready to deploy. After > deployment is exposes 2 services: > * XFireTestService1 (without xmlbean) > * XFireTestService2 (with xmlbean) > When you send a following request (to any of those): > <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> > <SOAP-ENV:Header/> > <SOAP-ENV:Body> > <getBasket xmlns="http://www.roche.com/drugsafety"> > <referenceNo>STRINGA</referenceNo> > <basketVersion></basketVersion> > <medDRAVersionName>STRINGB</medDRAVersionName> > </getBasket> > </SOAP-ENV:Body> > </SOAP-ENV:Envelope> > you will get something like this: > org.apache.commons.httpclient.HttpException : > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>For > input string: "STRINGB"</faultstring></soap:Fault></soap:Body></soap:Envelope> > And only if you provide valid and non null integer in basketVersion (e.g. > <basketVersion>0</basketVersion>) the request will be processed correctly. > Plaese note that xFire tries to parse STRINGB which is in next element as an value for the integer type element. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (XFIRE-635) Parse exception on empty elements of type java.lang.Integer[ http://jira.codehaus.org/browse/XFIRE-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=146854#action_146854 ] Karl Palsson commented on XFIRE-635: ------------------------------------ I'm having what I assume to be similar to the comments (thought not the description) I have a WebService that takes Long as a parameter, the wsdl generated by xfire is for this param is <xsd:element maxOccurs="1" minOccurs="1" name="telephoneSubscriptionId" nillable="true" type="xsd:long"/> which looks good. If I send in (using soapUi) a request that has xsi:nil="true" set for the telephone sub id, I still get a Soap failure, (for input string "") java.lang.NumberFormatException: For input string: "" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Long.parseLong(Long.java:424) at java.lang.Long.parseLong(Long.java:461) at org.codehaus.xfire.aegis.AbstractMessageReader.getValueAsLong(AbstractMessageReader.java:78) at org.codehaus.xfire.aegis.type.basic.LongType.readObject(LongType.java:16) at org.codehaus.xfire.aegis.AegisBindingProvider.readParameter(AegisBindingProvider.java:162) at org.codehaus.xfire.service.binding.AbstractBinding.read(AbstractBinding.java:206) at org.codehaus.xfire.service.binding.WrappedBinding.readMessage(WrappedBinding.java:50) at org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke(SoapBodyHandler.java:42) at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131) at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64) at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38) at org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:301) at org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:130) at org.codehaus.xfire.spring.remoting.XFireServletControllerAdapter.handleRequest(XFireServletControllerAdapter.java:67) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) I can use xsi:nil happily for other objects, what am I getting wrong here? I don't believe I'm using xmlbeans, but I am using annotations which I guess superseded beans? > Parse exception on empty elements of type java.lang.Integer > ----------------------------------------------------------- > > Key: XFIRE-635 > URL: http://jira.codehaus.org/browse/XFIRE-635 > Project: XFire > Issue Type: Sub-task > Affects Versions: 1.0, 1.1.2 > Environment: java 1.4 > Reporter: Jakub Mendys > Assignee: Dan Diephouse > Priority: Minor > Fix For: 1.2.3 > > Attachments: test.zip > > > When java.lang.Integer is used as a method parameter in your web service implementation then xFire will not accept null values nor empty element. Instead xFire will try to parse content of next elements and raise an exception. See test case: > Under link http://jmendys.com/test.zip you will find a test case to reproduce the problem > The zip contains folder 'test' which is an exploded war ready to deploy. After > deployment is exposes 2 services: > * XFireTestService1 (without xmlbean) > * XFireTestService2 (with xmlbean) > When you send a following request (to any of those): > <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> > <SOAP-ENV:Header/> > <SOAP-ENV:Body> > <getBasket xmlns="http://www.roche.com/drugsafety"> > <referenceNo>STRINGA</referenceNo> > <basketVersion></basketVersion> > <medDRAVersionName>STRINGB</medDRAVersionName> > </getBasket> > </SOAP-ENV:Body> > </SOAP-ENV:Envelope> > you will get something like this: > org.apache.commons.httpclient.HttpException : > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>For > input string: "STRINGB"</faultstring></soap:Fault></soap:Body></soap:Envelope> > And only if you provide valid and non null integer in basketVersion (e.g. > <basketVersion>0</basketVersion>) the request will be processed correctly. > Plaese note that xFire tries to parse STRINGB which is in next element as an value for the integer type element. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (XFIRE-635) Parse exception on empty elements of type java.lang.Integer[ http://jira.codehaus.org/browse/XFIRE-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=146854#action_146854 ] Karl Palsson commented on XFIRE-635: ------------------------------------ I'm having what I assume to be similar to the comments (thought not the description) I have a WebService that takes Long as a parameter, the wsdl generated by xfire is for this param is <xsd:element maxOccurs="1" minOccurs="1" name="telephoneSubscriptionId" nillable="true" type="xsd:long"/> which looks good. If I send in (using soapUi) a request that has xsi:nil="true" set for the telephone sub id, I still get a Soap failure, (for input string "") java.lang.NumberFormatException: For input string: "" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Long.parseLong(Long.java:424) at java.lang.Long.parseLong(Long.java:461) at org.codehaus.xfire.aegis.AbstractMessageReader.getValueAsLong(AbstractMessageReader.java:78) at org.codehaus.xfire.aegis.type.basic.LongType.readObject(LongType.java:16) at org.codehaus.xfire.aegis.AegisBindingProvider.readParameter(AegisBindingProvider.java:162) at org.codehaus.xfire.service.binding.AbstractBinding.read(AbstractBinding.java:206) at org.codehaus.xfire.service.binding.WrappedBinding.readMessage(WrappedBinding.java:50) at org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke(SoapBodyHandler.java:42) at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131) at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64) at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38) at org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:301) at org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:130) at org.codehaus.xfire.spring.remoting.XFireServletControllerAdapter.handleRequest(XFireServletControllerAdapter.java:67) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) I can use xsi:nil happily for other objects, what am I getting wrong here? I don't believe I'm using xmlbeans, but I am using annotations which I guess superseded beans? > Parse exception on empty elements of type java.lang.Integer > ----------------------------------------------------------- > > Key: XFIRE-635 > URL: http://jira.codehaus.org/browse/XFIRE-635 > Project: XFire > Issue Type: Sub-task > Affects Versions: 1.0, 1.1.2 > Environment: java 1.4 > Reporter: Jakub Mendys > Assignee: Dan Diephouse > Priority: Minor > Fix For: 1.2.3 > > Attachments: test.zip > > > When java.lang.Integer is used as a method parameter in your web service implementation then xFire will not accept null values nor empty element. Instead xFire will try to parse content of next elements and raise an exception. See test case: > Under link http://jmendys.com/test.zip you will find a test case to reproduce the problem > The zip contains folder 'test' which is an exploded war ready to deploy. After > deployment is exposes 2 services: > * XFireTestService1 (without xmlbean) > * XFireTestService2 (with xmlbean) > When you send a following request (to any of those): > <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> > <SOAP-ENV:Header/> > <SOAP-ENV:Body> > <getBasket xmlns="http://www.roche.com/drugsafety"> > <referenceNo>STRINGA</referenceNo> > <basketVersion></basketVersion> > <medDRAVersionName>STRINGB</medDRAVersionName> > </getBasket> > </SOAP-ENV:Body> > </SOAP-ENV:Envelope> > you will get something like this: > org.apache.commons.httpclient.HttpException : > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>For > input string: "STRINGB"</faultstring></soap:Fault></soap:Body></soap:Envelope> > And only if you provide valid and non null integer in basketVersion (e.g. > <basketVersion>0</basketVersion>) the request will be processed correctly. > Plaese note that xFire tries to parse STRINGB which is in next element as an value for the integer type element. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free Forum Powered by Nabble | Forum Help |