Translating PHP SOAP to Lasso SOAP

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Translating PHP SOAP to Lasso SOAP

Paul Fabris
So I need to integrate my Lasso based online customer service site with PTI's Marcom Central web to print site.  

Pro: they have robust API for all kinds of interactions :-D
Con: it's in SOAP :-p

Last time I had to integrate my site with a SOAP site I tried using Lasso's SOAP tags for a couple of days and got nowhere.  I turned to PHP and got results fairly quickly.

This time, I want to stay Lasso, but I'll be damned if I can figure out Lasso's SOAP tags.

Can anyone help me translate this (working) PHP code into a Lasso 8.6 equivalent so I can see what the heck Lasso is thinking?

The API has some simple elements, but also a lot of nested array elements. I've tried to use indentation to show this.  Below is the Authenticate function.  In PHP, this returns an array with a URL I can forward to.  I can't figure out how to construct a working clone of this using SOAP_DefineTag.

Can anyone help?

$SOAPclient = @new SoapClient($SOAP_WSDL_URI);
$SOAPresult = $SOAPclient->Authenticate(
        array('SSOMessage'=>array(
                'PartnerCredentials'=>array(
                        'Token'=>$SOME_STRING
                        ),
                'SingleSignOnRequest'=>array(
                        'UserCredentials'=> array(
                                'ID'=>$SOME_USER_ID
                                )
                        ),
                'Navigation'=>array(
                        'ReturnURL'=>$MY_LOGOUT_URL,
                        'StartPage'=>array(
                                'PageName'=>'Catalog'
                                )
                        )
                )
        )
);
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

RE: Translating PHP SOAP to Lasso SOAP

Daniel Logue
Hi Paul,

Don't use the Lasso SOAP tags... (sorry if you didn't want to hear that)

Your best bet is to create the XML you need to send and post it with include_url().

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Paul Fabris
Sent: Friday, July 13, 2012 6:43 AM
To: LassoTalk List
Subject: Translating PHP SOAP to Lasso SOAP

So I need to integrate my Lasso based online customer service site with PTI's Marcom Central web to print site.  

Pro: they have robust API for all kinds of interactions :-D
Con: it's in SOAP :-p

Last time I had to integrate my site with a SOAP site I tried using Lasso's SOAP tags for a couple of days and got nowhere.  I turned to PHP and got results fairly quickly.

This time, I want to stay Lasso, but I'll be damned if I can figure out Lasso's SOAP tags.

Can anyone help me translate this (working) PHP code into a Lasso 8.6 equivalent so I can see what the heck Lasso is thinking?

The API has some simple elements, but also a lot of nested array elements. I've tried to use indentation to show this.  Below is the Authenticate function.  In PHP, this returns an array with a URL I can forward to.  I can't figure out how to construct a working clone of this using SOAP_DefineTag.

Can anyone help?

$SOAPclient = @new SoapClient($SOAP_WSDL_URI); $SOAPresult = $SOAPclient->Authenticate(
        array('SSOMessage'=>array(
                'PartnerCredentials'=>array(
                        'Token'=>$SOME_STRING
                        ),
                'SingleSignOnRequest'=>array(
                        'UserCredentials'=> array(
                                'ID'=>$SOME_USER_ID
                                )
                        ),
                'Navigation'=>array(
                        'ReturnURL'=>$MY_LOGOUT_URL,
                        'StartPage'=>array(
                                'PageName'=>'Catalog'
                                )
                        )
                )
        )
);
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Translating PHP SOAP to Lasso SOAP

Paul Fabris
Yeesh. Definitely did not want to hear that :)  It'll take forever to generate and parse raw XML SOAP queries and responses.
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Translating PHP SOAP to Lasso SOAP

Rick Draper-2
>Definitely did not want to hear that :)

It's not as bad as you might think, unless you have a lot of variation in structures.  Take a close look at your requirements and consider building a Lasso Type to handle the params

Very best regards

Rick Draper

-------------------------------------
Sent from my iPhone. Please excuse typographical errors & brevity


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>