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

6123Re: [soaplite] Classic Upgrade issue

Expand Messages
  • Martin Kutter
    Mar 28, 2008
      Hi Patrick,

      this is due to an error in SOAP::Lite's namespace handling - it uses
      soap: as envelope prefix and does not recognize it is already taken.

      The easiest workaround is to add the following line to your code
      (somewhere at start):

      $SOAP::Constants::PREFIX_ENV = 'SOAP-ENV';

      This makes SOAP::Lite use SOAP-ENV as envelope prefix again and avoids
      the namespace clash.

      Martin

      Am Freitag, den 28.03.2008, 20:39 +0000 schrieb Patrick:
      > Hi All - My apologies for a huge post, esp 1st time out - i've been
      > using SOAP::Lite for a year, and have been able to figure things out,
      > but.....oh, please don't try to call the yellowpages service.....it
      > isn't in a public place yet.
      >
      > We are changing platforms to solaris 10 and of course they want the
      > latest and greatest tool versions installed - we started with perl
      > 5.8.7 with SOAP::Lite .60, loading from a wsdl, i get a working
      > request that looks like....
      >
      >
      > SOAP::Transport::HTTP::Client::send_receive: POST
      > http://sandbox.yellowpages.com:8080/yellowpages/services/IntegrationAPI2 HTTP/1.1
      > Accept: text/xml
      > Accept: multipart/*
      > Content-Length: 936
      > Content-Type: text/xml; charset=utf-8
      > SOAPAction: ""
      >
      > <?xml version="1.0" encoding="UTF-8"?>
      > <SOAP-ENV:Envelope
      > xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      > xmlns:xsd="http://www.w3.org/1999/XMLSchema"
      > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      > >
      > <SOAP-ENV:Body
      > >
      > <namesp1:findListingsWithPhone
      > xmlns:namesp1="http://integration.yellowpages.com"
      > >
      > <phone xsi:type="xsd:string"
      > >2126455474</phone>
      > <profileId xsi:type="xsd:string"/>
      > <pageNumber xsi:type="xsd:int"
      > >1</pageNumber>
      > <pageSize xsi:type="xsd:int"
      > >1</pageSize>
      > <partnerId xsi:type="xsd:string"
      > >ABC123</partnerId>
      > <userId xsi:type="xsd:strin g"/>
      > <transactionId xsi:type="xsd:string" xsi:null="1"/>
      > <sort
      > xsi:type="xsd:string"/></namesp1:findListingsWithPhone></SOAP-ENV:Body></SOAP-ENV:Envelope>
      > SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
      > Connection: close
      >
      >
      > With Perl 5.8.8 (or 5.10) and SOAP::Lite .71 the request that
      > generates a fault...it looks like
      >
      >
      > SOAP::Transport::HTTP::Client::send_receive: POST
      > http://sandbox.yellowpages.com:8080/yellowpages/services/IntegrationAPI2 HTTP/1.1
      > Accept: text/xml
      > Accept: multipart/*
      > Accept: application/soap
      > Content-Length: 1085
      > Content-Type: text/xml; charset=utf-8
      > SOAPAction: ""
      >
      > <?xml version="1.0" encoding="UTF-8"?>
      > <soap:Envelope
      > xmlns:tns2="http://data2.integration.yellowpages.com"
      > xmlns:apachesoap="http://xml.apache.org/xml-soap"
      > soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      > xmlns:tns="http://integration.yellowpages.com">
      > <soap:Body>
      > <tns:findListingsWithPhone>
      > ! ; <ph one xsi:type="xsd:string">2126455474</phone>
      >
      > <profileId xsi:type="xsd:string" />
      >
      > <pageNumber xsi:type="xsd:int">1</pageNumber>
      >
      > <pageSize xsi:type="xsd:int">1</pageSize>
      >
      > <partnerId xsi:type="xsd:string">ABC123</partnerId>
      >
      > <userId xsi:type="xsd:string" />
      >
      > <transactionId xsi:type="xsd:string" />
      >
      > <sort xsi:type="xsd:string" />
      > </tns:findListingsWithPhone>
      > </soap:Body>
      > </soap:Envelope>
      > SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal
      > Server Error
      > Connection: close
      > Date: Fri, 28 Mar 2008 20:13:21 GMT
      > Server: nginx/0.5.35
      > Content-Type: text/xml;charset=utf-8
      > Client-Date: Fri, 28 Mar 2008 20:12:00 GMT
      > Client-Peer: 216.173.231.85:8080
      > Client-Response-Num: 1
      > Client-Transfer-Encoding: chunked
      >
      > <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope
      > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      > <soapenv:Header>
      > <soapenv:Upgrade
      > soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
      > soapenv:mustUnderstand="0">
      > <soapenv:SupportedEnvelope qname="soapenv:Envelope"/>
      > </soapenv:Upgrade>
      > </soapenv:Header>
      > <soapenv:Body>
      > <soapenv:Fault>
      > <faultcode>soapenv:VersionMismatch</faultcode>
      > <faultstring>Version Mismatch</faultstring>
      > <detail>
      > <ns1:hostname
      > xmlns:ns1="http://xml.apache.org/axis/">dalxmlsandbox1.flight.yellowpages.com</ns1:hostname>
      > </detail>
      > </soapenv:Fault>
      > </soapenv:Body>
      > </soapenv:Envelope>
      >
      >
      > I'm a bit worried about the 'soapenc' and 'encodingstyle' pointing to
      > the same place - and also the /wsdl/soap, rather than /soap/envelope/
      > - but the version mismatch error has me thrown for a loop -
      >
      > here is the top of the wsdl
      >
      > <wsdl:definitions name="IntegrationAPI2"
      > targetNamespace="http://integration.yellowpages.com"
      > xmlns:apachesoap="http://x
      > ml.apache.org/xml-soap"
      > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      > xmlns:soapenc="http://schemas.xmlsoap.org/soa
      > p/encoding/" xmlns:tns="http://integration.yellowpages.com"
      > xmlns:tns2="http://data2.integration.yellowpages.com" xmlns:
      > wsdl="http://schemas.xmlsoap.org/wsdl/"
      > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      >
      >
      > I'd rather edit the wsdl, than hack the code if possible.....it is so
      > nice and tight the way it is!
      >
      > many thanks
      >
      > pat
      >
      >
      >
      >
      >
    • Show all 3 messages in this topic