ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kim Neunert (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Commented: (AXIS-1050) xs:date not serialized/deserialized correctly
Date Mon, 03 May 2010 14:38:59 GMT

    [ https://issues.apache.org/jira/browse/AXIS-1050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12863365#action_12863365
] 

Kim Neunert commented on AXIS-1050:
-----------------------------------

Hi,

i'm not sure if someone will still read this. I'm using 1.4final and got that effect again:

{code}
DEBUG [NSStack] NSPop (32)
DEBUG [DeserializationContext] Popped element stack to org.apache.axis.message.MessageElement:records
DEBUG [DeserializationContext] Exit: DeserializationContext::endElement()
DEBUG [DeserializationContext] Enter: DeserializationContext::startElement(urn:sobject.enterprise.soap.sforce.com,
validFrom__c)
DEBUG [ProjectResourceBundle] org.apache.axis.i18n.resource::handleGetObject(pushHandler00)
DEBUG [DeserializationContext] Pushing handler org.apache.axis.encoding.ser.CalendarDeserializer@11710be
DEBUG [NSStack] NSPush (32)
DEBUG [DeserializationContext] Exit: DeserializationContext::startElement()
DEBUG [DeserializationContext] Enter: DeserializationContext::endElement(urn:sobject.enterprise.soap.sforce.com,
validFrom__c)
DEBUG [ProjectResourceBundle] org.apache.axis.i18n.resource::handleGetObject(popHandler00)
DEBUG [DeserializationContext] Popping handler org.apache.axis.encoding.ser.CalendarDeserializer@11710be
DEBUG [ProjectResourceBundle] org.apache.axis.i18n.resource::handleGetObject(badDateTime00)
DEBUG [NSStack] NSPop (32)
DEBUG [DeserializationContext] Popped element stack to org.apache.axis.message.MessageElement:records
DEBUG [DeserializationContext] Exit: DeserializationContext::endElement()
DEBUG [ProjectResourceBundle] org.apache.axis.i18n.resource::handleGetObject(exception00)
ERROR [Call] Exception:
java.lang.NumberFormatException: Invalid date/time
at org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.java:180)
at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:502)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.client.Call.invoke(Call.java:2467)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at de.hybris.salesforceapi.SoapBindingStub.query(SoapBindingStub.java:4342)
at de.hybris.salesforceapi.facade.SfConnection.query(SfConnection.java:164)
at de.hybris.salesforceapi.facade.SfDecreaseCouponAction.initCoupon(SfDecreaseCouponAction.java:110)
at de.hybris.salesforceapi.facade.SfDecreaseCouponAction.init(SfDecreaseCouponAction.java:88)
at de.hybris.salesforceapi.facade.SfDecreaseCouponActionTest.testDecreaseCouponWatcher(SfDecreaseCouponActionTest.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:79)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.NumberFormatException: Invalid date/time
at org.apache.axis.encoding.ser.CalendarDeserializer.makeValue(CalendarDeserializer.java:75)
at org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.java:172)
... 33 more
DEBUG [NSStack] NSPush (32)
DEBUG [ProjectResourceBundle] org.apache.axis.i18n.resource::handleGetObject(empty00)
DEBUG [NSStack] NSPop (empty)
{code}

The Soap-response looks like this:

{code}

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:enterprise.soap.sforce.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sf="urn:sobject.enterprise.soap.sforce.com">

<soapenv:Body>
<queryResponse>
<result>
<done>true</done>
<queryLocator xsi:nil="true"/>
<records xsi:type="sf:Coupon__c">
<sf:Id>a0ES0000002JEfOMAW</sf:Id>
<!-- Many more attributes -->
<sf:Status__c>active</sf:Status__c>
<sf:validFrom__c>2010-04-22</sf:validFrom__c>
</records>
<records xsi:type="sf:Coupon__c">
<!-- More records with more attributes -->
</records>
</result>
</queryResponse>
</soapenv:Body>
</soapenv:Envelope>
{code}

The WSDL lokks like this:

{code}
<?xml version="1.0" encoding="UTF-8"?>

<definitions targetNamespace="urn:enterprise.soap.sforce.com" xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="urn:enterprise.soap.sforce.com" xmlns:fns="urn:fault.enterprise.soap.sforce.com"
xmlns:ens="urn:sobject.enterprise.soap.sforce.com">
    <types>

        <schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:sobject.enterprise.soap.sforce.com">

            <import namespace="urn:enterprise.soap.sforce.com"/>


            <!-- Base sObject (abstract) -->
            <complexType name="sObject">
                <sequence>
                    <element name="fieldsToNull" type="xsd:string" nillable="true" minOccurs="0"
maxOccurs="unbounded"/>
                    <element name="Id" type="tns:ID" nillable="true"/>
                </sequence>
            </complexType>

<!-- .......... -->
            <complexType name="Coupon__c">
                <complexContent>
                    <extension base="ens:sObject">
                        <sequence>
                        <element name="ActivityHistories" nillable="true" minOccurs="0"
type="tns:QueryResult"/>
                       <!-- .......... -->
                        <element name="ValidFrom__c" nillable="true" minOccurs="0" type="xsd:date"/>
                        </sequence>
                    </extension>
                </complexContent>
            </complexType>

<!-- .......... -->
{code}


Any hints? maybe a workaround? Should i use Axis2?

kind regards

Kim Neunert

> xs:date not serialized/deserialized correctly
> ---------------------------------------------
>
>                 Key: AXIS-1050
>                 URL: https://issues.apache.org/jira/browse/AXIS-1050
>             Project: Axis
>          Issue Type: Bug
>          Components: Serialization/Deserialization
>    Affects Versions: 1.1
>         Environment: Operating System: Windows NT/2K
> Platform: PC
>            Reporter: Whitney Hunter
>            Assignee: Axis Developers Mailing List
>
> It seems that all XML schema types that map to java.util.Date are serialized and
> deserialized by CalendarSerializer/CalendarDeserializer. This causes dates to
> contain a time segment on the wire. I believe this should not be the case and is
> a bug.
> I am using castor on the server side to marshal and unmarshal the XML. Castor
> handles xs:dates correctly (ie no time segment), but is broken by the time
> segment sent by axis. Further, on the client side, axis does not handle dates
> returned by castor since they do not have a time component.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message