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

XML as parameter

Expand Messages
  • Nick Potemkin
    Hi again, All. I m at a deadlock :( ( i m newbie in SOAP, XML and another stuff like that :)) I m trying to write program which will be able simulate some
    Message 1 of 4 , Jun 30, 2003
    • 0 Attachment
      Hi again, All.

      I'm at a deadlock :( ( i'm newbie in SOAP, XML and another stuff like that :))

      I'm trying to write program which will be able simulate some service responses on
      query that user send from some Windows-program.

      So, the client sent query to me:

      <?xml version="1.0" encoding="utf-8" ?>
      <s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
      <s:Body>
      <Registration xmlns='urn:Microsoft.Search'>
      <registrationXml xsi:type='xsd:string'>
      <RegistrationRequest revision="1" xmlns="urn:Microsoft.Search.Registration.Request">
      <SystemInformation>
      <SkuLanguage>en-us</SkuLanguage>
      <LanguagePack>en-us</LanguagePack>
      <InterfaceLanguage>en-us</InterfaceLanguage>
      <Location>RU</Location>
      </SystemInformation>
      </RegistrationRequest>
      </registrationXml>
      </Registration>
      </s:Body>
      </s:Envelope>


      If i can understand, on original environment, this query should call Microsoft.Search.Registration method
      and this method should run XML code that contains in registrationXml variable. Is it true?

      So, there is response from 'original server' on this query:

      <?xml version="1.0" encoding="utf-8"?>
      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <soap:Body>
      <RegistrationResponse xmlns="urn:Microsoft.Search">
      <RegistrationResult>
      <?xml version="1.0" encoding="utf-8"?>
      <ProviderUpdate xmlns="urn:Microsoft.Search.Registration.Response">
      <Status>SUCCESS</Status>
      <Providers>
      <Provider>
      <Message>Some message</Message>
      <Id>{5A1AAF54-87F0-4f1d-A2D4-AB3E5D080DE1}</Id>
      <Name>IBuySpyStore.com Research Pane</Name>
      <QueryPath>http://localhost/IBuySpyResearchPane/Query.asmx</QueryPath>
      <RegistrationPath>http://localhost/IBuySpyResearchPane/Registration.asmx</RegistrationPath>
      <Type>SOAP</Type>
      <Services>
      <Service>
      <Id>{1698075D-E2F5-4254-87B2-7FC9E9AB0780}</Id>
      <Name>IBuySpy.com Product Information</Name>
      <Description>Some desc</Description>
      <Copyright>All content Copyright (c) 2003.</Copyright>
      <Display>On</Display>
      <Category>INTRANET_GENERAL</Category>
      </Service>
      </Services>
      </Provider>
      </Providers>
      </ProviderUpdate>
      </RegistrationResult>
      </RegistrationResponse>
      </soap:Body>
      </soap:Envelope>


      Can you tell me, how can i produce "RegistrationResult" section through SOAP::Data (or another module) with second "<?xml...> declaration?
      And i can't understand - what is the second declaration of "<?xml....>"? Is it result of execution Microsoft.Search.Registration.Response method? Or what? And how can i run XML which sent me in query registrationXML parameter?

      Excuse me for stupid questions, but now i don't understand this technology completely :)

      --
      Nick Potemkin
      Eniro Rus-M
      http://www.eniro-m.ru
      ::: Yellow Pages Moscow
      http://www.yellowpages.ru
      phone: +7 (095) 799-55-55
      fax: +7 (095) 799-55-09
    • Nick Potemkin
      On Mon, Jun 30, 2003 at 09:19:55PM +0400, Nick Potemkin wrote: Hi, all. I m trying to write server with help of SOAP::Lite (Linux, Apache 1.3, SOAP::Lite
      Message 2 of 4 , Jul 7, 2003
      • 0 Attachment
        On Mon, Jun 30, 2003 at 09:19:55PM +0400, Nick Potemkin wrote:

        Hi, all. I'm trying to write server with help of SOAP::Lite (Linux, Apache 1.3, SOAP::Lite 0.55).
        I've got query to my server with parameter 'registrationXml' for method Microsoft.Search.Registration
        which realized on my side.
        This parameter is prebuilded XML passed to me as string from client (see below).
        It contains call of another method.

        Can I pass this string to SOAP-server for execution?
        In other words - can i pass prebuilded XML to SOAP server with help of SOAP::Lite methods?

        It's very important for me.

        ====================================================================================
        Query is:

        <?xml version="1.0" encoding="utf-8" ?>
        <s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
        <s:Body>
        <Registration xmlns='urn:Microsoft.Search'>
        <registrationXml xsi:type='xsd:string'>
        <RegistrationRequest revision="1" xmlns="urn:Microsoft.Search.Registration.Request">
        <SystemInformation>
        <SkuLanguage>en-us</SkuLanguage>
        <LanguagePack>en-us</LanguagePack>
        <InterfaceLanguage>en-us</InterfaceLanguage>
        <Location>RU</Location>
        </SystemInformation>
        </RegistrationRequest>
        </registrationXml>
        </Registration>
        </s:Body>
        </s:Envelope>

        Debug output of server:
        (eval): <RegistrationRequest revision='1' xmlns='urn:Microsoft.Search.Registration.Request'><SystemInformation><SkuLanguage>e
        n-us</SkuLanguage><LanguagePack>en-us</LanguagePack><InterfaceLanguage>en-us</InterfaceLanguage><Location>RU</Location></Syst
        emInformation></RegistrationRequest>

        =====================================================================================

        Thank you.

        --
        Nick Potemkin
        Eniro Rus-M
        http://www.eniro-m.ru
        ::: Yellow Pages Moscow
        http://www.yellowpages.ru
        phone: +7 (095) 799-55-55
        fax: +7 (095) 799-55-09
      • Paul Kulchenko
        Nick, You can use the pseudotype xml : return SOAP::Data- type(xml = bar ); The XML fragment will be inserted as is with no checks and
        Message 3 of 4 , Jul 7, 2003
        • 0 Attachment
          Nick,

          You can use the pseudotype 'xml':

          return SOAP::Data->type(xml => '<foo>bar</foo>');

          The XML fragment will be inserted as is with no checks and
          validation.

          Best wishes, Paul.

          --- Nick Potemkin <nick@...> wrote:
          > On Mon, Jun 30, 2003 at 09:19:55PM +0400, Nick Potemkin wrote:
          >
          > Hi, all. I'm trying to write server with help of SOAP::Lite (Linux,
          > Apache 1.3, SOAP::Lite 0.55).
          > I've got query to my server with parameter 'registrationXml' for
          > method Microsoft.Search.Registration
          > which realized on my side.
          > This parameter is prebuilded XML passed to me as string from client
          > (see below).
          > It contains call of another method.
          >
          > Can I pass this string to SOAP-server for execution?
          > In other words - can i pass prebuilded XML to SOAP server with help
          > of SOAP::Lite methods?
          >
          > It's very important for me.
          >
          >
          ====================================================================================
          > Query is:
          >
          > <?xml version="1.0" encoding="utf-8" ?>
          > <s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'
          > xmlns:xsd='http://www.w3.org/2001/XMLSchema'
          > xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
          > <s:Body>
          > <Registration xmlns='urn:Microsoft.Search'>
          > <registrationXml xsi:type='xsd:string'>
          > <RegistrationRequest revision="1"
          > xmlns="urn:Microsoft.Search.Registration.Request">
          > <SystemInformation>
          > <SkuLanguage>en-us</SkuLanguage>
          > <LanguagePack>en-us</LanguagePack>
          > <InterfaceLanguage>en-us</InterfaceLanguage>
          > <Location>RU</Location>
          > </SystemInformation>
          > </RegistrationRequest>
          > </registrationXml>
          > </Registration>
          > </s:Body>
          > </s:Envelope>
          >
          > Debug output of server:
          > (eval): <RegistrationRequest revision='1'
          >
          xmlns='urn:Microsoft.Search.Registration.Request'><SystemInformation><SkuLanguage>e
          >
          n-us</SkuLanguage><LanguagePack>en-us</LanguagePack><InterfaceLanguage>en-us</InterfaceLanguage><Location>RU</Location></Syst
          > emInformation></RegistrationRequest>
          >
          >
          =====================================================================================
          >
          > Thank you.
          >
          > --
          > Nick Potemkin
          > Eniro Rus-M
          > http://www.eniro-m.ru
          > ::: Yellow Pages Moscow
          > http://www.yellowpages.ru
          > phone: +7 (095) 799-55-55
          > fax: +7 (095) 799-55-09
          >
          >
          >
          > ------------------------ Yahoo! Groups Sponsor
          >
          > To unsubscribe from this group, send an email to:
          > soaplite-unsubscribe@yahoogroups.com
          >
          >
          >
          > Your use of Yahoo! Groups is subject to
          > http://docs.yahoo.com/info/terms/
          >
          >
        • Byrne Reese
          This blog entry may be of help to you... http://www.majordojo.com/archives/2003_05.html#000017 ... -- Byrne Reese Developer Program Manager Grand Central
          Message 4 of 4 , Jul 7, 2003
          • 0 Attachment
            This blog entry may be of help to you...

            http://www.majordojo.com/archives/2003_05.html#000017

            On Mon, 2003-07-07 at 04:52, Nick Potemkin wrote:
            > On Mon, Jun 30, 2003 at 09:19:55PM +0400, Nick Potemkin wrote:
            >
            > Hi, all. I'm trying to write server with help of SOAP::Lite (Linux, Apache 1.3, SOAP::Lite 0.55).
            > I've got query to my server with parameter 'registrationXml' for method Microsoft.Search.Registration
            > which realized on my side.
            > This parameter is prebuilded XML passed to me as string from client (see below).
            > It contains call of another method.
            >
            > Can I pass this string to SOAP-server for execution?
            > In other words - can i pass prebuilded XML to SOAP server with help of SOAP::Lite methods?
            >
            > It's very important for me.
            >
            > ====================================================================================
            > Query is:
            >
            > <?xml version="1.0" encoding="utf-8" ?>
            > <s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
            > <s:Body>
            > <Registration xmlns='urn:Microsoft.Search'>
            > <registrationXml xsi:type='xsd:string'>
            > <RegistrationRequest revision="1" xmlns="urn:Microsoft.Search.Registration.Request">
            > <SystemInformation>
            > <SkuLanguage>en-us</SkuLanguage>
            > <LanguagePack>en-us</LanguagePack>
            > <InterfaceLanguage>en-us</InterfaceLanguage>
            > <Location>RU</Location>
            > </SystemInformation>
            > </RegistrationRequest>
            > </registrationXml>
            > </Registration>
            > </s:Body>
            > </s:Envelope>
            >
            > Debug output of server:
            > (eval): <RegistrationRequest revision='1' xmlns='urn:Microsoft.Search.Registration.Request'><SystemInformation><SkuLanguage>e
            > n-us</SkuLanguage><LanguagePack>en-us</LanguagePack><InterfaceLanguage>en-us</InterfaceLanguage><Location>RU</Location></Syst
            > emInformation></RegistrationRequest>
            >
            > =====================================================================================
            >
            > Thank you.
            --
            Byrne Reese
            Developer Program Manager
            Grand Central Communications
          Your message has been successfully submitted and would be delivered to recipients shortly.