Loading ...
Sorry, an error occurred while loading the content.

dateTime

Expand Messages
  • starnuto_di_topo <starnuto_di_topo@yahoo
    Hi, all! I have a couple of troubles I cannot solve... 1) In the client side, I can use a date type, like this: $self- {SubmitTime} =
    Message 1 of 6 , Jan 8, 2003
    • 0 Attachment
      Hi, all!

      I have a couple of troubles I cannot solve...

      1)
      In the client side, I can use a 'date' type, like this:
      $self->{SubmitTime} = SOAP::Data->type('date')->value(shift)
      to serialize a date, but what I need is actually a 'dateTime' type,
      able to contain values like '2002-12-13T15:16:33'.
      Modifying that line of code doesn't work...
      Any suggestion?

      2)
      My second problem deals with an argument already discussed (see:
      http://groups.yahoo.com/group/soaplite/message/668
      ). Using a WSDL file, the namespace is not defined in the request
      SOAP message. Including the definition in the same part element, as
      myTypes below:
      <message name="AddUserRequest">
      <part name="account" type="myTypes:UserAccount"
      xmlns:myTypes="....."/>
      </message>
      (see: http://groups.yahoo.com/group/soaplite/message/669 )
      doesn't seem to work. In any case I'd rather like to handle the
      situation without modifying the WSDL file.
      Was any newer solution provided?

      Thanks a lot in advance!
      Xc
    • starnuto_di_topo <starnuto_di_topo@yahoo
      ... [...] ... type, ... Trying to find a solution on my own, what do you think about theese: $self- {SubmitTime} = SOAP::Data - attr({ xmlns:DateTimeNameSpace
      Message 2 of 6 , Jan 8, 2003
      • 0 Attachment
        --- In soaplite@yahoogroups.com, "starnuto_di_topo" wrote:
        [...]
        > 1)
        > In the client side, I can use a 'date' type, like this:
        > $self->{SubmitTime} = SOAP::Data->type('date')->value(shift)
        > to serialize a date, but what I need is actually a 'dateTime'
        type,
        > able to contain values like '2002-12-13T15:16:33'.
        > Modifying that line of code doesn't work...
        > Any suggestion?

        Trying to find a solution on my own, what do you think about theese:
        $self->{SubmitTime} = SOAP::Data
        ->attr({'xmlns:DateTimeNameSpace'
        =>'http://www.w3.org/2001/XMLSchema'})
        ->type('DateTimeNameSpace:dateTime')
        ->value(shift)

        or maybe better:

        $self->{SubmitTime} = SOAP::Data
        ->type('xsd:dateTime')
        ->value(shift)

        Apologizes for having created this chaos in the group!

        Still need help about the second point, see message 2242:
        http://groups.yahoo.com/group/soaplite/message/2242

        Thanks!
        Xc
      • starnuto_di_topo <starnuto_di_topo@yahoo
        ... [...] ... Sorry: this last solution does NOT work: the message is correect, but cannot be properly deserialized (isn t dateTime defined in 1999 schema?).
        Message 3 of 6 , Jan 8, 2003
        • 0 Attachment
          --- In soaplite@yahoogroups.com, "starnuto_di_topo" wrote:
          [...]
          > Trying to find a solution on my own, what do you think about theese:
          > $self->{SubmitTime} = SOAP::Data
          > ->attr({'xmlns:DateTimeNameSpace'
          > =>'http://www.w3.org/2001/XMLSchema'})
          > ->type('DateTimeNameSpace:dateTime')
          > ->value(shift)
          >
          > or maybe better:
          >
          > $self->{SubmitTime} = SOAP::Data
          > ->type('xsd:dateTime')
          > ->value(shift)

          Sorry: this last solution does NOT work: the message is correect, but
          cannot be properly deserialized (isn't dateTime defined in 1999
          schema?).

          Cheers,
          Xc
        • Paul Kulchenko
          Hi Xc, ... No wonder ;). dateTime doesn t exist in 1999 Schema, there is similar-looking timeInstant for the same purpose. You either need to use one (and it
          Message 4 of 6 , Jan 8, 2003
          • 0 Attachment
            Hi Xc,

            > Sorry: this last solution does NOT work: the message is correect,
            > but
            > cannot be properly deserialized (isn't dateTime defined in 1999
            > schema?).

            No wonder ;). dateTime doesn't exist in 1999 Schema, there is
            similar-looking timeInstant for the same purpose. You either need to
            use one (and it will be serialized as dateTime if you switch to 2001
            Schema later), or you need to use 2001 Schema and dateTime type (not
            xsd:dateTime):

            # XML Schema 1999 by default; may change in future versions

            $self->{SubmitTime} = SOAP::Data->type(timeInstant => shift);

            -- or --

            use SOAP::Lite
            xmlschema => 2001;

            ....

            $self->{SubmitTime} = SOAP::Data->type(dateTime => shift);

            Best wishes, Paul.

            --- "starnuto_di_topo <starnuto_di_topo@...>"
            <starnuto_di_topo@...> wrote:
            > --- In soaplite@yahoogroups.com, "starnuto_di_topo" wrote:
            > [...]
            > > Trying to find a solution on my own, what do you think about
            > theese:
            > > $self->{SubmitTime} = SOAP::Data
            > > ->attr({'xmlns:DateTimeNameSpace'
            > > =>'http://www.w3.org/2001/XMLSchema'})
            > > ->type('DateTimeNameSpace:dateTime')
            > > ->value(shift)
            > >
            > > or maybe better:
            > >
            > > $self->{SubmitTime} = SOAP::Data
            > > ->type('xsd:dateTime')
            > > ->value(shift)
            >
            > Sorry: this last solution does NOT work: the message is correect,
            > but
            > cannot be properly deserialized (isn't dateTime defined in 1999
            > schema?).
            >
            > Cheers,
            > Xc
            >
            >
            > ------------------------ Yahoo! Groups Sponsor
            >
            > To unsubscribe from this group, send an email to:
            > soaplite-unsubscribe@yahoogroups.com
            >
            >
            >
            > Your use of Yahoo! Groups is subject to
            > http://docs.yahoo.com/info/terms/
            >
            >


            __________________________________________________
            Do you Yahoo!?
            Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
            http://mailplus.yahoo.com
          • Paul Kulchenko
            Hi Starnuto, ... The one of the ways to fix it I can think of is to add something like this: $service- serializer- namespaces- { http://foo/... } = myTypes ;
            Message 5 of 6 , Jan 8, 2003
            • 0 Attachment
              Hi Starnuto,

              > doesn't seem to work. In any case I'd rather like to handle the
              > situation without modifying the WSDL file.
              > Was any newer solution provided?

              The one of the ways to fix it I can think of is to add something like
              this:

              $service->serializer->namespaces->{'http://foo/...'} = 'myTypes';

              It's not the best way to do it, but it should work.

              Best wishes, Paul.

              --- "starnuto_di_topo <starnuto_di_topo@...>"
              <starnuto_di_topo@...> wrote:
              > Hi, all!
              >
              > I have a couple of troubles I cannot solve...
              >
              > 1)
              > In the client side, I can use a 'date' type, like this:
              > $self->{SubmitTime} = SOAP::Data->type('date')->value(shift)
              > to serialize a date, but what I need is actually a 'dateTime'
              > type,
              > able to contain values like '2002-12-13T15:16:33'.
              > Modifying that line of code doesn't work...
              > Any suggestion?
              >
              > 2)
              > My second problem deals with an argument already discussed (see:
              > http://groups.yahoo.com/group/soaplite/message/668
              > ). Using a WSDL file, the namespace is not defined in the request
              >
              > SOAP message. Including the definition in the same part element, as
              >
              > myTypes below:
              > <message name="AddUserRequest">
              > <part name="account" type="myTypes:UserAccount"
              > xmlns:myTypes="....."/>
              > </message>
              > (see: http://groups.yahoo.com/group/soaplite/message/669 )
              > doesn't seem to work. In any case I'd rather like to handle the
              > situation without modifying the WSDL file.
              > Was any newer solution provided?
              >
              > Thanks a lot in advance!
              > Xc
              >
              >
              > ------------------------ Yahoo! Groups Sponsor
              >
              > To unsubscribe from this group, send an email to:
              > soaplite-unsubscribe@yahoogroups.com
              >
              >
              >
              > Your use of Yahoo! Groups is subject to
              > http://docs.yahoo.com/info/terms/
              >
              >


              __________________________________________________
              Do you Yahoo!?
              Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
              http://mailplus.yahoo.com
            • Josh Narins
              I was not conscious of dated (1999 and 2001) schemas. Should I explicitly set 2001, if it works now, with that? Thank you, -Josh, at major mega-corp ...
              Message 6 of 6 , Jan 8, 2003
              • 0 Attachment
                I was not conscious of dated (1999 and 2001) schemas.

                Should I explicitly set 2001, if it works now, with
                that?

                Thank you,

                -Josh, at major mega-corp

                --- Paul Kulchenko <paulclinger@...> wrote:
                > Hi Xc,
                >
                > > Sorry: this last solution does NOT work: the
                > message is correect,
                > > but
                > > cannot be properly deserialized (isn't dateTime
                > defined in 1999
                > > schema?).
                >
                > No wonder ;). dateTime doesn't exist in 1999 Schema,
                > there is
                > similar-looking timeInstant for the same purpose.
                > You either need to
                > use one (and it will be serialized as dateTime if
                > you switch to 2001
                > Schema later), or you need to use 2001 Schema and
                > dateTime type (not
                > xsd:dateTime):
                >
                > # XML Schema 1999 by default; may change in future
                > versions
                >
                > $self->{SubmitTime} = SOAP::Data->type(timeInstant
                > => shift);
                >
                > -- or --
                >
                > use SOAP::Lite
                > xmlschema => 2001;
                >
                > ....
                >
                > $self->{SubmitTime} = SOAP::Data->type(dateTime =>
                > shift);
                >
                > Best wishes, Paul.
                >
                > --- "starnuto_di_topo <starnuto_di_topo@...>"
                > <starnuto_di_topo@...> wrote:
                > > --- In soaplite@yahoogroups.com,
                > "starnuto_di_topo" wrote:
                > > [...]
                > > > Trying to find a solution on my own, what do you
                > think about
                > > theese:
                > > > $self->{SubmitTime} = SOAP::Data
                > > > ->attr({'xmlns:DateTimeNameSpace'
                > > >
                > =>'http://www.w3.org/2001/XMLSchema'})
                > > > ->type('DateTimeNameSpace:dateTime')
                > > > ->value(shift)
                > > >
                > > > or maybe better:
                > > >
                > > > $self->{SubmitTime} = SOAP::Data
                > > > ->type('xsd:dateTime')
                > > > ->value(shift)
                > >
                > > Sorry: this last solution does NOT work: the
                > message is correect,
                > > but
                > > cannot be properly deserialized (isn't dateTime
                > defined in 1999
                > > schema?).
                > >
                > > Cheers,
                > > Xc
                > >
                > >
                > > ------------------------ Yahoo! Groups Sponsor
                > >
                > > To unsubscribe from this group, send an email to:
                > > soaplite-unsubscribe@yahoogroups.com
                > >
                > >
                > >
                > > Your use of Yahoo! Groups is subject to
                > > http://docs.yahoo.com/info/terms/
                > >
                > >
                >
                >
                > __________________________________________________
                > Do you Yahoo!?
                > Yahoo! Mail Plus - Powerful. Affordable. Sign up
                > now.
                > http://mailplus.yahoo.com
                >


                __________________________________________________
                Do you Yahoo!?
                Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
                http://mailplus.yahoo.com
              Your message has been successfully submitted and would be delivered to recipients shortly.