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

Unresolved prefix 'xs' in wsdl file?

Expand Messages
  • Bernd Prager
    Hi, I have a simple server script that I can access via SOAP method. ... #!/bin/perl -w use strict; use SOAP::Lite; my $test = SOAP::Lite -
    Message 1 of 3 , Oct 19, 2004
    View Source
    • 0 Attachment
      Hi,

      I have a simple server script that I can access via SOAP method.
      That works fine. Here is the client:
      --- snip -------------
      #!/bin/perl -w
      use strict;
      use SOAP::Lite;

      my $test = SOAP::Lite
      -> uri('http://www.prager.ws/Test')
      -> proxy('https://www.prager.ws/cgi-bin/test.cgi');

      my $result = $test->actionLog("bernd", "4711");

      if ($result->fault)
      { print join ', ',
      $result->faultcode,
      $result->faultstring,
      $result->faultdetail;
      }
      --- snip -------------
      When I access the same method as service via wsdl file:
      --- snip -------------
      <?xml version="1.0" encoding="UTF-8"?>
      <definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:y="urn:Test"
      targetNamespace="urn:Test">
      <types>
      <xs:schema/>
      </types>
      <message name="logMessage">
      <part name="user" type="xs:string"/>
      <part name="action" type="xs:string"/>
      </message>
      <portType name="TestPort">
      <operation name="actionLog">
      <input message="y:logMessage"/>
      </operation>
      </portType>
      <binding name="TestBinding" type="y:TestPort">
      <soap:binding style="rpc"
      transport="http://schemas.xmlsoap.org/soap/http"/>
      <operation name="actionLog">
      <soap:operation soapAction="urn:Test#actionLog"/>
      <input>
      <soap:body use="literal"/>
      </input>
      </operation>
      </binding>
      <service name="Test">
      <port name="TestSoap" binding="y:TestBinding">
      <soap:address location="https://www.prager.ws/cgi-bin/test.cgi"/>
      </port>
      </service>
      </definitions>
      --- snip -------------
      by using following client:
      --- snip -------------
      #!/bin/perl -w
      use strict;
      use SOAP::Lite;

      use SOAP::Lite
      service => 'https://www.prager.ws/sTest.wsdl',
      on_fault => sub { my($soap, $res) = @_;
      die ref $res ? $res->faultstring : $soap->transport->status,
      "\n";
      }
      ;

      actionLog("bernd", "4711");
      --- snip -------------
      I get the error message:
      Application failed during request deserialization: Unresolved prefix
      'xs' for attribute value 'xs:string'

      Did anybody discovered similar problems?
      Thank you for any help or tips.

      -- Bernd
    • Byrne Reese
      Thank you for reporting this. This has been fixed in development and will go out with SOAP::Lite-0.65 Beta 3. It was addressed by using the
      Message 2 of 3 , Nov 14, 2004
      View Source
      • 0 Attachment
        Thank you for reporting this. This has been fixed in development and
        will go out with SOAP::Lite-0.65 Beta 3.

        It was addressed by using the SOAP::Serializer->register_ns() subroutine
        which can be used to add namespaces to the Root Envelope part. I simply
        take all the namespaces declared in the definitions element in the WSDL,
        and add them to the SOAP Body.

        Byrne

        Bernd Prager wrote:

        >
        > Hi,
        >
        > I have a simple server script that I can access via SOAP method.
        > That works fine. Here is the client:
        > --- snip -------------
        > #!/bin/perl -w
        > use strict;
        > use SOAP::Lite;
        >
        > my $test = SOAP::Lite
        > -> uri('http://www.prager.ws/Test') <http://www.prager.ws/Test%27%29>
        > -> proxy('https://www.prager.ws/cgi-bin/test.cgi');
        > <https://www.prager.ws/cgi-bin/test.cgi%27%29;>
        >
        > my $result = $test->actionLog("bernd", "4711");
        >
        > if ($result->fault)
        > { print join ', ',
        > $result->faultcode,
        > $result->faultstring,
        > $result->faultdetail;
        > }
        > --- snip -------------
        > When I access the same method as service via wsdl file:
        > --- snip -------------
        > <?xml version="1.0" encoding="UTF-8"?>
        > <definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
        > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
        > xmlns:xs="http://www.w3.org/2001/XMLSchema"
        > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
        > xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:y="urn:Test"
        > targetNamespace="urn:Test">
        > <types>
        > <xs:schema/>
        > </types>
        > <message name="logMessage">
        > <part name="user" type="xs:string"/>
        > <part name="action" type="xs:string"/>
        > </message>
        > <portType name="TestPort">
        > <operation name="actionLog">
        > <input message="y:logMessage"/>
        > </operation>
        > </portType>
        > <binding name="TestBinding" type="y:TestPort">
        > <soap:binding style="rpc"
        > transport="http://schemas.xmlsoap.org/soap/http"/>
        > <operation name="actionLog">
        > <soap:operation soapAction="urn:Test#actionLog"/>
        > <input>
        > <soap:body use="literal"/>
        > </input>
        > </operation>
        > </binding>
        > <service name="Test">
        > <port name="TestSoap" binding="y:TestBinding">
        > <soap:address
        > location="https://www.prager.ws/cgi-bin/test.cgi"/>
        > </port>
        > </service>
        > </definitions>
        > --- snip -------------
        > by using following client:
        > --- snip -------------
        > #!/bin/perl -w
        > use strict;
        > use SOAP::Lite;
        >
        > use SOAP::Lite
        > service => 'https://www.prager.ws/sTest.wsdl',
        > <https://www.prager.ws/sTest.wsdl%27,>
        > on_fault => sub { my($soap, $res) = @_;
        > die ref $res ? $res->faultstring : $soap->transport->status,
        > "\n";
        > }
        > ;
        >
        > actionLog("bernd", "4711");
        > --- snip -------------
        > I get the error message:
        > Application failed during request deserialization: Unresolved prefix
        > 'xs' for attribute value 'xs:string'
        >
        > Did anybody discovered similar problems?
        > Thank you for any help or tips.
        >
        > -- Bernd
        >
      • Klaus Guenter
        Hi, List! I screwed up the previous post concerning that topic ... I have a similar problem and would like to know if this is my fault. The errormessage I get
        Message 3 of 3 , Jan 10, 2005
        View Source
        • 0 Attachment
          Hi, List!

          I screwed up the previous post concerning that topic ...

          I have a similar problem and would like to know if this is my
          fault.

          The errormessage I get is:
          Client Application failed during request deserialization:
          Unresolved prefix 'xsd1' for attribute value 'xsd1:StringArray'

          The WSDL File:

          --snip--
          <wsdl:definitions
          name="TestArray"
          targetNamespace="http://xxx.xxx.xxx/TestArray.wsdl"
          xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
          xmlns:tns="http://xxx.xxx.xxx/TestArray.wsdl"
          xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
          xmlns:xsd="http://www.w3.org/2001/XMLSchema"
          xmlns:xsd1="http://xxx.xxx.xxx/TestArray.xsd1"
          xmlns:xsd2="http://xxx.xxx.xxx/TestArray.xsd2">
          <wsdl:documentation
          xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"></wsdl:documentation>
          <wsdl:types>
          <xsd:schema
          targetNamespace="http://xxx.xxx.xxx/TestArray.xsd1"
          xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
          xmlns:xsd="http://www.w3.org/2001/XMLSchema"
          xmlns:xsd1="http://xxx.xxx.xxx/TestArray.xsd1">
          <xsd:complexType name="StringArray">
          <xsd:sequence>
          <xsd:element maxOccurs="10" minOccurs="1" name="Element"
          type="xsd:string"/>
          </xsd:sequence>
          </xsd:complexType>
          </xsd:schema>
          </wsdl:types>
          <wsdl:message name="GiveMeAnArrayRequest">
          <wsdl:part name="InArray" type="xsd1:StringArray"/>
          </wsdl:message>
          <wsdl:message name="GiveMeAnArrayResponse">
          <wsdl:part name="OutArray" type="xsd1:StringArray"/>
          </wsdl:message>

          --/snip--

          TIA
          Klaus
          --
          People often find it easier to be a result of the past than a cause of
          the future.
          -
        Your message has been successfully submitted and would be delivered to recipients shortly.