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

1936Re: [soaplite] Handling a WSDL file with multiple portType/BindingType/Service

Expand Messages
  • Weidong Wang
    Oct 18, 2002
    • 0 Attachment
      Paul, I am happy to report that it works fine.

      We have WSDLs that defines multiple port types/services, and for each new call, the endpoint is different. What I did is to read in such WSDL file, get rid of the <service> section on the fly and then call service($wsdl), possibly to pass in the port type name in the case when there are multiple port types in the WSDL file.

      Then when I need to actually make a call, I can set the endpoint by doing $soap->proxy($newEndpoint) and it all works fine.

      The only minor problem I noticed is, when I do the above initialization for multiple WSDL files, say w1, w2, w3, w4, then I make a call to func1 in w1, the soapAction from W4 is used in the envelope. It is not a problem as our server does not use soapAction for anything. Just not looking good. Any way to get around this? not important, though.

      Weidong


      ----- Original Message -----
      From: "Paul Kulchenko" <paulclinger@...>
      To: "Weidong Wang" <wwang@...>; <soaplite@yahoogroups.com>
      Sent: Friday, October 18, 2002 2:08 AM
      Subject: Re: [soaplite] Handling a WSDL file with multiple portType/BindingType/Service


      > Hi Weidong,
      >
      > > I wonder what I need to do when dealing with tModel WSDL file with
      > > multiple port/bindings. Such WSDL files do not contain the
      > > <service> section. Can I leave the $service part empty and jus tuse
      > > the $port, like:
      > >
      > > $soap = SOAP::Lite->service($wsdlfile, '', $myPortTypeName);
      > Yes, you should be able to. Regardless of the presence of <service>
      > section ->service($wsdl, '', $myPortTypeName) will allow you to
      > choose specific portType from the list of all available portTypes (it
      > will filter based on service name only if it's present and not
      > empty). It's actually in the code, but I haven't tested this piece
      > with multiple portTypes yet. Do you have a WSDL file for me to try?
      >
      > Best wishes, Paul.
      >
      > --- Weidong Wang <wwang@...> wrote:
      > > > > based on the funccall names, to use diferent service? What if
      > > the
      > > > > funccall name is the same?
      > > > service() method accepts optional service and port names which
      > > allows
      > > > you to choose the right method:
      > > >
      > > > $soap = SOAP::Lite->service($wsdlfile [, $service [, $port]]);
      > >
      > > Paul, thanks for the reply. I finally got to the point that I will
      > > need to deal with such WSDLs.
      > >
      > > I wonder what I need to do when dealing with tModel WSDL file with
      > > multiple port/bindings. Such WSDL files do not contain the
      > > <service> section. Can I leave the $service part empty and jus tuse
      > > the $port, like:
      > >
      > > $soap = SOAP::Lite->service($wsdlfile, '', $myPortTypeName);
      > >
      > > Thanks.
      > >
      > > Weidong
    • Show all 6 messages in this topic