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

Re: XMLSchema

Expand Messages
  • KenWilner
    O.K. this worked great when using uri/proxy. However, it appears to be ignored when using the service method. Furthermore, eventhough the WSDL document that I
    Message 1 of 4 , Aug 5, 2002
    • 0 Attachment
      O.K. this worked great when using uri/proxy. However, it appears to
      be ignored when using the service method. Furthermore, eventhough the
      WSDL document that I set with the service method specifies XML Schema
      2001, SOAP::Lite generates messages using messages using XMLSchema
      1999 regardless or whether or not I set XMLSchema as indicated below.

      Any ideas who be greatly appreciated.

      Thanks.

      Ken


      --- In soaplite@y..., Duncan Cameron <dcameron@b...> wrote:
      > On 2002-08-02 KenWilner wrote:
      > >It appears that by default SOAP::Lite uses XMLSchema 1999 for
      types.
      > >How do I force it to use XMLSchema 2001?
      > >
      > >Thanks.
      > >
      > Something like this will work, but also search the archives for
      more discussion on SOAP
      > versions:
      >
      > my $s = SOAP::Lite->new(
      > xmlschema => '2001',
      > uri => ...
      > proxy => ...
      >
      >
      > Regards,
      > Duncan Cameron
    • ads0138
      ... to ... the ... Schema ... below. ... Hello All, I m replying to this several months after the original message for the benefit of anyone searching through
      Message 2 of 4 , Oct 15, 2002
      • 0 Attachment
        --- In soaplite@y..., "KenWilner" <wilner@p...> wrote:
        > O.K. this worked great when using uri/proxy. However, it appears
        to
        > be ignored when using the service method. Furthermore, eventhough
        the
        > WSDL document that I set with the service method specifies XML
        Schema
        > 2001, SOAP::Lite generates messages using messages using XMLSchema
        > 1999 regardless or whether or not I set XMLSchema as indicated
        below.
        >
        > Any ideas who be greatly appreciated.

        Hello All,

        I'm replying to this several months after the original message for
        the benefit of anyone searching through the archives (as I was doing
        when I came upon Duncan Cameron's helpful response to the OP).

        To change schema using the service method, you can do something like
        the following (mostly copied from the examples in the t/ directory
        of the SOAP::Lite source):

        my $service = SOAP::Lite
        ->service($remote_wsdlpoint)
        ->xmlschema('2001')
        ->on_fault(sub {
        my $soap = shift;
        my $res = shift;
        ref $res or $soap = shift;
        ref $res ? warn(join "\n", "--- SOAP FAULT ---",
        $res->faultcode, $res->faultstring, '')
        : warn(join "\n", "--- TRANSPORT ERROR ---",
        $soap->transport->status, '');
        return new SOAP::SOM;
        }) or die "Cannot create service. $!";

        The real key is the xmlschema() method, of course.

        -Al
      Your message has been successfully submitted and would be delivered to recipients shortly.