Newbie question

Heikki Levanto <[email protected]>
Newsgroups gmane.comp.windows.devel.soap.general
Message-ID <[email protected]>
Hi,

I am somewhat of a newbie in SOAP, but I have got the job to create a
simple server.  I would appreciate direct help, or pointers further, or
just about anything to get me unstuck.

My task is to make a simple dummy server that can serve requests
according to a given WDSL. To my inexperienced eyes the WDSL looks like
it would be on the complex side, it refers to types in another XSD, and
those contain nested structures.

  http://lcweb.loc.gov/z3950/agency/zing/srwu/wsdl/zing_srw_binding.wsdl
  http://lcweb.loc.gov/z3950/agency/zing/srwu/wsdl/zing_types.xsd

My problem is that when the server receives a request from the client,
it can not deserialize it. I get
>SOAP Fault:Application failed during request deserialization: Unresolved
>prefix 'ZiNGTypes' for attribute value 'ZiNGTypes:idType'

This does not surprise me the least, as I have not found any way to tell
the server what ZiNGTypes are. I suppose I ought to import the WDSL
and/or the XSD to the server. But HOW ???


Here is what my server code does, straight from the FAQ:

my $daemon = SOAP::Transport::HTTP::Daemon
              -> new (LocalPort => 8001)
              -> dispatch_to('srwdummyserver')
              ;

print "srw dummy SOAP server at ", $daemon->url, "\n";
$daemon->handle;

srwdummyserver is a trivial perl module, which will later do some real
work...

The client side is as trivial. It works (sort of) against a server my
colleague is writing in C (gsoap). At least I get the number of records
back, although I have not got the actual records yet - probably his
problem...

my $soap = SOAP::Lite
   -> service('file:zing_srw_binding.wsdl')
   -> proxy('http://localhost:8001')
   -> on_fault(sub { my($soap, $res) = @_;
         die "SOAP Fault:", ref $res ? $res->faultstring :
             $soap->transport->status, "\n";
       });
my $result = $soap
  -> searchRetrieve(undef,      # Auth
                    "computer", # Query (ccl)
                    undef,      # sort
                    0, 10,      # StartRec, MaxRecords
                    undef);     # recordSchema
print "numberOfRecords: ", $result->{'numberOfRecords'}, "\n";


Like I said, I would appreciate any pointers on how to get on with this
project. Am I totally on a wrong track? Using features not (yet?)
implemented? Missing something obvious? Trying too much?

Thanks in advance

        Heikki Levanto

P.S. If it makes any difference, my stuff will end up as part of our
Open Source packages, if I get them working.


--
Heikki Levanto            [email protected]            "In Murphy We Turst"

You can read messages from the SOAP archive, unsubscribe from SOAP, or subscribe to other
DevelopMentor lists at http://discuss.develop.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.