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

5107Re: client sending multiple parameter/values

Expand Messages
  • wanda_b_anon
    Jan 2, 2006
    • 0 Attachment
      I got the following to work in 0.66, but I could not understand how to
      escape the XML with the Data method- the examples "return" it, but I
      do not understand where to put it then so it goes to the service.


      Here is what worked for me for Open Patent Services at the EPO. Sorry
      about the wrapping... it is crucial not to wrap the request, nor
      squash out the spaces in the seed.

      #!/usr/local/bin/perl
      use SOAP::Lite 'trace' , 'debug';
      print "SOAP::Lite VERSION: $SOAP::Lite::VERSION \n";

      my $wsdl
      ='http://ops.espacenet.com/OpenPatentServices/OpenPatentServices.wsdl';

      # careful to have 5 spaces after US- html squashes it to one! see
      http://ops.espacenet.com/ for good requests
      my $req_xml = '<OpenPatentServices
      ACTION="FamilyAndLegalAndBiblio"><WORLDPATENTDATA><FAMILY SEED=" US
      5000012A#" SEED_FORMAT="D" SEED_TYPE="PN" DESC_LNG="ENG"
      DATE_MIGR="00000000"
      LEGAL="YES"/></WORLDPATENTDATA></OpenPatentServices>';
      # x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
      x x x x x x x xUSxyxyx400...

      #<OpenPatentServices ACTION="Biblio"><WORLDPATENTDATA><BIBLIO SEED="
      US 4000034A#" SEED_FORMAT="D"
      SEED_TYPE="PN"/></WORLDPATENTDATA></OpenPatentServices>
      # <WORLDPATENTDATA><BIBLIO
      Seed="US4000034"><SDOBI><B111EP
      DATE="19761228
      ">US4000034</B111EP><B131EP>A</B131EP><B211EP
      DATE="19750815">US19750605093</B211EP><B311EP
      DATE="19750815">US19750605093</B311EP><B510
      TYPE="EPC">D21C11/06B2</B510><B510
      TYPE="IPC">D21C11/06</B510><B510
      TYPE="CI">D21C11/00</B510><B510
      TYPE="AI">D21C11/06</B510><B542
      TYPE="TI">Kraft mill recovery
      system</B542><B570EP>An improved process for the
      treatment, separation, and utilization of precipitator catch wherein
      treated precipitation catch is separated by countercurrent washing in
      a column.</B570EP><B711EP>HOOKER CHEMICALS PLASTICS
      CORP</B711EP><B721EP>PARTRIDGE HAROLD
      DEVERE;</B721EP><B721EP>FULLER WILLARD
      A</B721EP></SDOBI></BIBLIO></WORLDPATENTDATA>

      #<OpenPatentServices ACTION="Biblio"><WORLDPATENTDATA><BIBLIO SEED="
      US 4000034A#" SEED_FORMAT="D"
      SEED_TYPE="PN"/></WORLDPATENTDATA></OpenPatentServices>


      print SOAP::Lite
      -> service($wsdl)
      #-> ns('urn:EPO-OpenPatentServices')
      #-> proxy('http://ops.espacenet.com/OpenPatentServices/webService')
      -> getPatentData($req_xml)
      ;


      print SOAP::Lite
      #-> service($wsdl)
      -> ns('urn:EPO-OpenPatentServices')
      -> proxy('http://ops.espacenet.com/OpenPatentServices/webService')
      -> getPatentData($req_xml)
      -> result
      ;

      print "\nSOAP::Lite VERSION: $SOAP::Lite::VERSION \n";

      print SOAP::Lite
      -> service($wsdl)
      #-> ns('urn:EPO-OpenPatentServices')
      #-> proxy('http://ops.espacenet.com/OpenPatentServices/webService')
      -> getPatentData($req_xml)
      ;






      --- In soaplite@yahoogroups.com, "Dan Horne" <dan.horne@r...> wrote:
      >
      > After further testing: it works in 0.66. For older versions you'll
      need to
      > escape the xml tags.
      >
      > > -----Original Message-----
      > > From: soaplite@yahoogroups.com [mailto:soaplite@yahoogroups.com]
      On Behalf
      > > Of Dan Horne
      > > Sent: Sunday, 1 January 2006 4:51 p.m.
      > > To: 'Byrne Reese'
      > > Cc: 'wanda_b_anon'; soaplite@yahoogroups.com
      > > Subject: RE: [soaplite] client sending multiple parameter/values
      > >
      > > Er, it works for me
      > >
      > > > -----Original Message-----
      > > > From: Byrne Reese [mailto:byrne@m...]
      > > > Sent: Sunday, 1 January 2006 4:47 p.m.
      > > > To: Dan Horne
      > > > Cc: 'wanda_b_anon'; soaplite@yahoogroups.com
      > > > Subject: Re: [soaplite] client sending multiple parameter/values
      > > >
      > > > I am pretty sure that won't work. SOAP::Lite will interpret the
      text as
      > > > a string that needs to be XML escaped - not as XML that should be
      > > > included as-is.
      > > >
      > > > Dan Horne wrote:
      > > > > Sorry, I don't understand. Are you saying that I shouldn't
      send XML as
      > > > > shown
      > > > > below?
      > > > >
      > > > > > -----Original Message-----
      > > > > > From: Byrne Reese [mailto:byrne@m...]
      > > > > > Sent: Sunday, 1 January 2006 4:31 p.m.
      > > > > > To: Dan Horne
      > > > > > Cc: 'wanda_b_anon'; soaplite@yahoogroups.com
      > > > > > Subject: Re: [soaplite] client sending multiple parameter/values
      > > > > >
      > > > > > Perhaps this article may help:
      > > > > > http://www.majordojo.com/soaplite/2003/05/composing_messa.html
      > > > > >
      > > > > > Dan Horne wrote:
      > > > > > > How about:
      > > > > > >
      > > > > > >
      > > > > > >
      > > > > > > #!/usr/local/bin/perl
      > > > > > > use SOAP::Lite;
      > > > > > >
      > > > > > > my $wsdl =
      > > > > > >
      > > > >
      'http://ops.espacenet.com/OpenPatentServices/OpenPatentServices.wsdl';
      > > > >
      > > >
      > >
      <http://ops.espacenet.com/OpenPatentServices/OpenPatentServices.wsdl%27;>
      > > > > > >
      > > > > >
      > > > >
      > > >
      > >
      <http://ops.espacenet.com/OpenPatentServices/OpenPatentServices.wsdl%27;>
      > > > > > > my $req_xml = <<EOT;
      > > > > > > <OpenPatentServices ACTION="Biblio">
      > > > > > > <WORLDPATENTDATA>
      > > > > > > <BIBLIO
      > > > > > > SEED=" US 4000034A#"
      > > > > > > SEED_FORMAT="D" SEED_TYPE="PN"/>
      > > > > > > </WORLDPATENTDATA>
      > > > > > > </OpenPatentServices>
      > > > > > > EOT
      > > > > > >
      > > > > > > print SOAP::Lite
      > > > > > > -> service($wsdl)
      > > > > > > -> getPatentData($req_xml);
      > > > > > >
      > > > > > >
      > > > > > > Dan
      > > > > > >
      > > > > > >
      > > > > > >
      > > > > > > > -----Original Message-----
      > > > > > > > From: soaplite@yahoogroups.com
      [mailto:soaplite@yahoogroups.com]
      > > > On
      > > > > > > Behalf
      > > > > > > > Of wanda_b_anon
      > > > > > > > Sent: Sunday, 1 January 2006 11:35 a.m.
      > > > > > > > To: soaplite@yahoogroups.com
      > > > > > > > Subject: [soaplite] client sending multiple parameter/values
      > > > > > > >
      > > > > > > > A specific server has defeated my knowledge of
      SOAP::Lite, so I
      > > am
      > > > > > > > coming to the list for some help.
      > > > > > > >
      > > > > > > > The service I want to write a client for is described at
      > > > > > > >
      > > > > > > > http://ops.espacenet.com/
      > > > > > > >
      > > > > > > > with WSDL and input and output XML and DTD. The WSDL
      works on a
      > > > > > > > demonstration client,
      > > > > > > >
      > > > > > > >
      > > > > > >
      > > > > >
      > > > >
      > > >
      > >
      http://www.soapclient.com/soapclient?template=/clientform.html&fn=soapform
      > > > >
      > > >
      > >
      <http://www.soapclient.com/soapclient?template=/clientform.html&fn=soapfor
      > > > m>
      > > > > > >
      > > > > >
      > > > >
      > > >
      > >
      <http://www.soapclient.com/soapclient?template=/clientform.html&fn=soapfor
      > > > >
      > > >
      > >
      <http://www.soapclient.com/soapclient?template=/clientform.html&fn=soapfor
      > > > >
      > > > > > m>
      > > > > > > >
      > > > > > >
      > > > > >
      > > > >
      > > >
      > >
      &SoapTemplate=none&SoapWSDL=http://ops.espacenet.com/OpenPatentServices/Op
      > > > > > > > enPatentServices.wsdl
      > > > > > > >
      > > > > > > > (tiny url: http://tinyurl.com/bzx33 )
      > > > > > > >
      > > > > > > > and gives a good response from the input_request: (remove
      > > breaks)
      > > > > > > >
      > > > > > > > <OpenPatentServices ACTION="Biblio"><WORLDPATENTDATA>
      > > > > > > > <BIBLIO SEED=" US 4000034A#" SEED_FORMAT="D"
      > > > > > > > SEED_TYPE="PN"/></WORLDPATENTDATA></OpenPatentServices>
      > > > > > > >
      > > > > > > > But for the life of me, I do not understand how to use
      > > SOAP::Lite
      > > > to
      > > > > > > > make the input request, especially things like
      > > > > > > >
      > > > > > > > <BIBLIO SEED=" US 4000034A#" SEED_FORMAT="D"
      > > SEED_TYPE="PN"/>
      > > > > > > >
      > > > > > > > Can anyone illustrate how to construct and send this
      request?
      > > > > > > >
      > > > > > > > Thanks.
      > > > > > > >
      > > > > > > >
      > > > > > > >
      > > > > > > >
      > > > > > > >
      > > > > > > >
      > > > > > > >
      > > > > > > > Yahoo! Groups Links
      > > > > > > >
      > > > > > > >
      > > > > > > >
      > > > > > > >
      > > > > > > >
      > > > > > >
      > > > > > >
      > > > > > >
      > > > > > >
      > > > >
      ----------------------------------------------------------------------
      > > --
      > > > > > > YAHOO! GROUPS LINKS
      > > > > > >
      > > > > > > * Visit your group "soaplite
      > > > > > > <http://groups.yahoo.com/group/soaplite>" on the web.
      > > > > > >
      > > > > > > * To unsubscribe from this group, send an email to:
      > > > > > > soaplite-unsubscribe@yahoogroups.com
      > > > > > >
      > > > > <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
      > > > > > >
      > > > > > > * Your use of Yahoo! Groups is subject to the Yahoo!
      Terms of
      > > > > > > Service <http://docs.yahoo.com/info/terms/>.
      > > > > > >
      > > > > > >
      > > > > > >
      > > > >
      ----------------------------------------------------------------------
      > > --
      > > > > > >
      > > > > >
      > > > >
      > > > >
      > > > >
      > > > >
      > > > > SPONSORED LINKS
      > > > > Protocol analyzer
      > > > >
      > > >
      > >
      <http://groups.yahoo.com/gads?t=ms&k=Protocol+analyzer&w1=Protocol+analyze
      > > >
      > >
      r&w2=Ssl+protocol&w3=Protocol+converter&w4=Sip+protocol&w5=Protocol+analys
      > > > is&w6=Protocol&c=6&s=120&.sig=-vNi0F9sGxz3wJiUypOlsA>
      > > > > Ssl protocol
      > > > >
      > > >
      > >
      <http://groups.yahoo.com/gads?t=ms&k=Ssl+protocol&w1=Protocol+analyzer&w2=
      > > >
      > >
      Ssl+protocol&w3=Protocol+converter&w4=Sip+protocol&w5=Protocol+analysis&w6
      > > > =Protocol&c=6&s=120&.sig=QcUDWIbIdXkmz4QSFhqszw>
      > > > > Protocol converter
      > > > >
      > > >
      > >
      <http://groups.yahoo.com/gads?t=ms&k=Protocol+converter&w1=Protocol+analyz
      > > >
      > >
      er&w2=Ssl+protocol&w3=Protocol+converter&w4=Sip+protocol&w5=Protocol+analy
      > > > sis&w6=Protocol&c=6&s=120&.sig=8MMcEvfzdk5saYSJv-2g3g>
      > > > >
      > > > > Sip protocol
      > > > >
      > > >
      > >
      <http://groups.yahoo.com/gads?t=ms&k=Sip+protocol&w1=Protocol+analyzer&w2=
      > > >
      > >
      Ssl+protocol&w3=Protocol+converter&w4=Sip+protocol&w5=Protocol+analysis&w6
      > > > =Protocol&c=6&s=120&.sig=X7aZ6IACnEQUtAC57u829w>
      > > > > Protocol analysis
      > > > >
      > > >
      > >
      <http://groups.yahoo.com/gads?t=ms&k=Protocol+analysis&w1=Protocol+analyze
      > > >
      > >
      r&w2=Ssl+protocol&w3=Protocol+converter&w4=Sip+protocol&w5=Protocol+analys
      > > > is&w6=Protocol&c=6&s=120&.sig=SI1LEHwb69y6gddZAv_Fuw>
      > > > > Protocol
      > > > >
      > > >
      > >
      <http://groups.yahoo.com/gads?t=ms&k=Protocol&w1=Protocol+analyzer&w2=Ssl+
      > > >
      > >
      protocol&w3=Protocol+converter&w4=Sip+protocol&w5=Protocol+analysis&w6=Pro
      > > > tocol&c=6&s=120&.sig=aCiMFP0b3kFn96wqrZacGA>
      > > > >
      > > > >
      > > > >
      > > > >
      ----------------------------------------------------------------------
      > > --
      > > > > YAHOO! GROUPS LINKS
      > > > >
      > > > > * Visit your group "soaplite
      > > > > <http://groups.yahoo.com/group/soaplite>" on the web.
      > > > >
      > > > > * To unsubscribe from this group, send an email to:
      > > > > soaplite-unsubscribe@yahoogroups.com
      > > > > <mailto:soaplite-
      > > unsubscribe@yahoogroups.com?subject=Unsubscribe>
      > > > >
      > > > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
      > > > > Service <http://docs.yahoo.com/info/terms/>.
      > > > >
      > > > >
      > > > >
      ----------------------------------------------------------------------
      > > --
      > > > >
      > > >
      > >
      > >
      > >
      > >
      > >
      > >
      > > Yahoo! Groups Links
      > >
      > >
      > >
      > >
      > >
      > >
      >
    • Show all 8 messages in this topic