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

AW: [soaplite] Namespace problems

Expand Messages
  • Martin Busik
    Hi, ... The fault message is as far ambigous, as you don t know where the server expects an element in that schema. You are using the autodispatch feature
    Message 1 of 3 , Aug 27, 2009
    • 0 Attachment
      Hi,

      > I have been able to query it successfully
      > using the SOAPUI tool, but when I use Perl I am stopped with
      > the following fault: "namespace mismatch require
      > http://www.alarmpoint.com/webservices/schema found none". In
      > my request envelope I have added that namespace and I see
      > that in a trace, but the error still continues.

      The fault message is as far ambigous, as you don't know where the
      server expects an element in that schema.

      You are using the autodispatch feature ($AP->FindCountries) in your example.
      In this
      case, SOAP::Lite does a little bit magic more - compared to
      $AP->call('function',...).
      This "magic" heavy depends on the SOAP::Lite-Version you are using (which
      version are you
      using?)

      I suggest, you post both the (valid) SoapUI and the SOAP::Lite-generated
      requests here.

      Cheers,
      Martin
    • pgfarr
      Found the problem - it was a namespace reference issue. I changed my code to (note the prefix of ns: ). There were some other structure issues that were fixed
      Message 2 of 3 , Aug 27, 2009
      • 0 Attachment
        Found the problem - it was a namespace reference issue. I changed my code to (note the prefix of "ns:"). There were some other structure issues that were fixed too:

        my $ap_resp = $AP->call(
        SOAP::Data->name('ns:FindCountries') =>
        SOAP::Data->name('ns:user' => 'ws_user1'),
        SOAP::Data->name('ns:password' => 'LetMeIn'),
        SOAP::Data->name('ns:clientTimestamp'),
        SOAP::Data->name('ns:clientIP' => ''),
        SOAP::Data->name('ns:clientOSUser' => ''),
        SOAP::Data->name('ns:company' => 'Defaultz Company')
        ), # end FindCountries
        ;

        and the problem is resolved. I have more problems, but I will make a separate post for that.

        --- In soaplite@yahoogroups.com, "pgfarr" <pgfarr@...> wrote:
        >
        > I am pretty new to SOAP::Lite and SOAP in general so please excuse any terminology faux pas. I am trying to access a web services interface in a product called AlarmPoint via Perl/SOAP::Lite. I have been able to query it successfully using the SOAPUI tool, but when I use Perl I am stopped with the following fault: "namespace mismatch require http://www.alarmpoint.com/webservices/schema found none". In my request envelope I have added that namespace and I see that in a trace, but the error still continues.
        >
        > Any suggestions would be very welcome!
        >
        > Here is the Perl code fragment:
        >
        > my $AP = new SOAP::Lite (
        > proxy => $ENDPOINT
        > );
        >
        > my $serializer = $AP->serializer();
        > $serializer->register_ns( 'http://www.alarmpoint.com/webservices/schema','ns' );
        > $serializer->register_ns( 'http://www.alarmpoint.com/webservices/schema','ns0' );
        >
        > my $AlarmPoint = $AP->FindCountries => {
        > endpoint => $ENDPOINT,
        > namespace => 'http://www.alarmpoint.com/webservices/schema',
        > soapaction => 'urn:FindCountries',
        > parameters => [
        > SOAP::Data->new(
        > name => 'user', type => 'xs:string', attr => {}, 'ws_user1'
        > ),
        > SOAP::Data->new(
        > name => 'password', type => 'xs:string', attr => {},'XXXXX'
        > ),
        > SOAP::Data->new(
        > name => 'clientTimestamp', type => 'xs:string', attr=> {)
        > ),
        > SOAP::Data->new(
        > name => 'clientIP', type => 'xs:string', attr => {}
        > ),
        > SOAP::Data->new(
        > name => 'clientOSUser', type => 'xs:string', attr =>{}
        > ),
        > SOAP::Data->new(
        > name => 'company', type => 'xs:string', attr => {}, 'Default Company'
        > ),
        > ], # end parameters
        > }, # end FindCountries
        > ;
      Your message has been successfully submitted and would be delivered to recipients shortly.