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

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

Expand Messages
  • Paul Kulchenko
    Hi Weidong, ... Yes, you should be able to. Regardless of the presence of section - service($wsdl, , $myPortTypeName) will allow you to choose
    Message 1 of 6 , Oct 17, 2002
    • 0 Attachment
      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
      >


      __________________________________________________
      Do you Yahoo!?
      Faith Hill - Exclusive Performances, Videos & More
      http://faith.yahoo.com
    • Weidong Wang
      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
      Message 2 of 6 , 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
      • Paul Kulchenko
        Hi Weidong, ... > 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
        Message 3 of 6 , Oct 18, 2002
        • 0 Attachment
          Hi Weidong,

          --- Weidong Wang <wwang@...> wrote:
          > 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.
          Interesting. Shouldn't happen though. What you can do is to assign
          different service names to those services (just provide non-empty
          service name in your service() call; it's possible to do because if
          there is no <service> section in the WSDL document, you can
          assign any service name you want and it will become a name of the
          generated package), which will effectively put all method-specific
          information in different spaces.

          (looking at the code I think it WILL help in your code, but I would
          like to call it feature for now rather than a bug ;). Could you try
          it?)

          I would like to try it with your WSDL myself. Could you send it to me
          off-list? Thanks.

          Best wishes, Paul.

          __________________________________________________
          Do you Yahoo!?
          Faith Hill - Exclusive Performances, Videos & More
          http://faith.yahoo.com
        Your message has been successfully submitted and would be delivered to recipients shortly.