Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 03-22-2013, 02:13 AM   #1
Naughty
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,480
XML SOAP experts, i need a heads up

I have a piece of xml, like this:

Code:
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:uniface:applic:services:DELAPRBWS">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:CALCULATEPREMIUM soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
       <PL69_IN xsi:type="xsd:string"><![CDATA[<?xml version="1.0" ?>
       <PL69_IN>
          <INPUTBLOK>
            <BERICHTTYPE>PL69</BERICHTTYPE>
            <INITIATOR_ID>ATP</INITIATOR_ID>
            <RESPONDENT_ID>DELA</RESPONDENT_ID>
            <BEDRIJFSCODE>ATP</BEDRIJFSCODE>
          </INPUTBLOK>
          <POLISBLOK>
            <INSCHRIJVERNUMMER>10005</INSCHRIJVERNUMMER>
            <BEREKENING_ID>2</BEREKENING_ID>
            <BETAALPERIODE>1</BETAALPERIODE>
            <COMMERCIEEL_PRODUCT>D</COMMERCIEEL_PRODUCT>
            <INGANGSDATUM_POLISMUTATIE>01-10-2012</INGANGSDATUM_POLISMUTATIE>
            <DEKKINGBLOK>
              <DEKKING_ID_DEK>1</DEKKING_ID_DEK>
              <ELEMENTAIR_PRODUCT_ID>400</ELEMENTAIR_PRODUCT_ID>
              <INGANGSDATUM_DEKKING>01-10-2012</INGANGSDATUM_DEKKING>
              <KAPITAAL_VERZEKERD>5000</KAPITAAL_VERZEKERD>
              <VERZEKERDEBLOK>
                <GEB_DAT>31-01-1981</GEB_DAT>
                <GESLACHT>V</GESLACHT>
              </VERZEKERDEBLOK>
            </DEKKINGBLOK>
            <DEKKINGBLOK>
              <DEKKING_ID_DEK>2</DEKKING_ID_DEK>
              <ELEMENTAIR_PRODUCT_ID>210</ELEMENTAIR_PRODUCT_ID>
              <INGANGSDATUM_DEKKING>01-10-2012</INGANGSDATUM_DEKKING>
              <KAPITAAL_VERZEKERD>5000</KAPITAAL_VERZEKERD>
              <VERZEKERDEBLOK>
                <GEB_DAT>31-08-2005</GEB_DAT>
                <GESLACHT>V</GESLACHT>
              </VERZEKERDEBLOK>
            </DEKKINGBLOK>
          </POLISBLOK>
         </PL69_IN>]]>
        </PL69_IN>
        <PL69_OUT xsi:type="xsd:string"></PL69_OUT>
      </urn:CALCULATEPREMIUM>
   </soapenv:Body>
</soapenv:Envelope>
I need to use the cdata string to calculate some stuff.

Code:
$soapparam = new SoapVar($objRequest, XSD_ANYXML);


$client->__soapCall("CALCULATEPREMIUM", array($soapparam));

Its not working at all. I keep getting blank results.

Is there a function to check if we are getting through at all?

I keep getting this result, no matter what:
Code:
Array
(
    [return] => 0
    [PL69_OUT] => 
)
I'm puzzled.
__________________
seks.ai for sale - ping me
Naughty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2013, 02:19 AM   #2
Naughty
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,480
And yes, i do call the client first

Code:
$client = new SoapClient('http://domain.com/DELAPRBWS?wsdl');
__________________
seks.ai for sale - ping me
Naughty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2013, 02:54 AM   #3
blackmonsters
Making PHP work
 
blackmonsters's Avatar
 
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,484
The best heads up I can give you is :

"Don't use SOAP unless you are washing your ass".

But until then, use this class I wrote :

PHP Code:
class soapsender {

  function 
send($params) {

    require_once(
'nusoap-0.9.5/lib/nusoap.php');

    
$this_php_version phpversion();

try {


    if ( (
$this_php_version >= "5.1") && ($this_php_version "5.2") ) {
        
// PHP version: 5.1.6 works 

        /**********************************************************************
            Use nusoap-0.9.5 for php version less then 5.2
        **********************************************************************/
        


        
ini_set("soap.wsdl_cache_enabled""0");
        
$soapclient = new SoapClient('http://domain.com/wsdl',true);
        
$soapclient->response_timeout 600// Set read timeout to 10 minutes
    
        
$result $soapclient->call('send', array('request' => $params));


    } 
//endif

    
if ( ($this_php_version >= "5.2") && ($this_php_version "5.3") ) {

        
// PHP version: 5.2.17 works

        
ini_set("soap.wsdl_cache_enabled""0");

        
$client = new SoapClient("http://domain.com/wsdl");
        
$result $client->send($params);




    } 
//endif


    
if ($this_php_version >= "5.3")  {

        
ini_set("soap.wsdl_cache_enabled""0");

        
$client = new SoapClient('http://domain.com/wsdl',
        array(
'default_socket_timeout'=>'600'));

        
$result $client -> __soapCall('send', array('request' => $params));

    }



 } catch (
SoapFault $exception) {

    return 
"error";      

  }


    return 
$result;


   } 
//end function





Call the class like this :

PHP Code:
$params = array('stuff'=>$stuff,'morestuff'=>$morestuff);

$soapsender = new soapsender();
$result $soapsender->send($params); 
* Download the nusoap file first : http://sourceforge.net/projects/nuso.../nusoap/0.9.5/


That's all the time I can spend on this though.
__________________
Make Money with Porn
blackmonsters is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2013, 03:44 AM   #4
Naughty
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,480
Thanks, i will have a look.
Its annoying as hell, should have had this done yesterday.
__________________
seks.ai for sale - ping me
Naughty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2013, 03:46 AM   #5
Naughty
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,480
Issue is though, i think i need to get this format:
Code:
$params = array('stuff'=>$stuff,'morestuff'=>$morestuff);
From this section:
Code:
<PL69_IN xsi:type="xsd:string"><![CDATA[<?xml version="1.0" ?>
       <PL69_IN>
          <INPUTBLOK>
            <BERICHTTYPE>PL69</BERICHTTYPE>
            <INITIATOR_ID>ATP</INITIATOR_ID>
            <RESPONDENT_ID>DELA</RESPONDENT_ID>
            <BEDRIJFSCODE>ATP</BEDRIJFSCODE>
          </INPUTBLOK>
          <POLISBLOK>
            <INSCHRIJVERNUMMER>10005</INSCHRIJVERNUMMER>
            <BEREKENING_ID>2</BEREKENING_ID>
            <BETAALPERIODE>1</BETAALPERIODE>
            <COMMERCIEEL_PRODUCT>D</COMMERCIEEL_PRODUCT>
            <INGANGSDATUM_POLISMUTATIE>01-10-2012</INGANGSDATUM_POLISMUTATIE>
            <DEKKINGBLOK>
              <DEKKING_ID_DEK>1</DEKKING_ID_DEK>
              <ELEMENTAIR_PRODUCT_ID>400</ELEMENTAIR_PRODUCT_ID>
              <INGANGSDATUM_DEKKING>01-10-2012</INGANGSDATUM_DEKKING>
              <KAPITAAL_VERZEKERD>5000</KAPITAAL_VERZEKERD>
              <VERZEKERDEBLOK>
                <GEB_DAT>31-01-1981</GEB_DAT>
                <GESLACHT>V</GESLACHT>
              </VERZEKERDEBLOK>
            </DEKKINGBLOK>
            <DEKKINGBLOK>
              <DEKKING_ID_DEK>2</DEKKING_ID_DEK>
              <ELEMENTAIR_PRODUCT_ID>210</ELEMENTAIR_PRODUCT_ID>
              <INGANGSDATUM_DEKKING>01-10-2012</INGANGSDATUM_DEKKING>
              <KAPITAAL_VERZEKERD>5000</KAPITAAL_VERZEKERD>
              <VERZEKERDEBLOK>
                <GEB_DAT>31-08-2005</GEB_DAT>
                <GESLACHT>V</GESLACHT>
              </VERZEKERDEBLOK>
            </DEKKINGBLOK>
          </POLISBLOK>
         </PL69_IN>]]>
        </PL69_IN>
__________________
seks.ai for sale - ping me
Naughty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2013, 03:50 AM   #6
blackmonsters
Making PHP work
 
blackmonsters's Avatar
 
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,484
$params = array('BERICHTTYPE'=>'PL69','INITIATOR_ID'=>'ATP', 'RESPONDENT_ID'=>'DELA'.......);
__________________
Make Money with Porn
blackmonsters is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2013, 03:54 AM   #7
Naughty
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,480
Quote:
Originally Posted by blackmonsters View Post
$params = array('BERICHTTYPE'=>'PL69','INITIATOR_ID'=>'ATP', 'RESPONDENT_ID'=>'DELA'.......);
Hehe, i knew that much, but it is different each time so i need it automated. Feel like a freakin n00b
__________________
seks.ai for sale - ping me
Naughty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2013, 03:57 AM   #8
blackmonsters
Making PHP work
 
blackmonsters's Avatar
 
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,484
Quote:
Originally Posted by Naughty View Post
Hehe, i knew that much, but it is different each time so i need it automated. Feel like a freakin n00b
Yes, it's different every time so you need variables; but you didn't like it when
I posted that.

$params = array('stuff'=>$stuff,'morestuff'=>$morestuff);
__________________
Make Money with Porn
blackmonsters is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2013, 04:19 AM   #9
Naughty
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,480
Quote:
Originally Posted by blackmonsters View Post
Yes, it's different every time so you need variables; but you didn't like it when
I posted that.

$params = array('stuff'=>$stuff,'morestuff'=>$morestuff);
The variables are still static there, just the values aren't.

I appreciate the help though, don't get me wrong!!
__________________
seks.ai for sale - ping me
Naughty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2013, 05:08 AM   #10
blackmonsters
Making PHP work
 
blackmonsters's Avatar
 
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,484
Quote:
Originally Posted by Naughty View Post
The variables are still static there, just the values aren't.

I appreciate the help though, don't get me wrong!!
Well gee, sorry that I didn't explain how fucking arrays work for you!

Fuck you idiot!

__________________
Make Money with Porn
blackmonsters is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2013, 05:26 AM   #11
Naughty
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,480
Quote:
Originally Posted by blackmonsters View Post
Well gee, sorry that I didn't explain how fucking arrays work for you!

Fuck you idiot!

hehe, yeah arrays have always been my achilles heel;-)
I have two projects here that needed fixing yesterday. Always great when shit hits the fan on more than one project at the same time. It makes my vision blurry:-p
__________________
seks.ai for sale - ping me
Naughty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2013, 06:32 AM   #12
blazin
Confirmed User
 
Join Date: Aug 2002
Posts: 2,781
Quote:
Originally Posted by Naughty View Post
hehe, yeah arrays have always been my achilles heel;-)
I have two projects here that needed fixing yesterday. Always great when shit hits the fan on more than one project at the same time. It makes my vision blurry:-p
A programmer that doesn't understand arrays.....

Give up programming now... its not for you.
__________________
I don't endorse a god damn thing......
blazin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2013, 10:22 AM   #13
Naughty
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,480
Quote:
Originally Posted by blazin View Post
A programmer that doesn't understand arrays.....

Give up programming now... its not for you.
I understand them, just not that much ;-)
Luckily i am not a 'real programmer'. I'm just very very resourcefull at times....
__________________
seks.ai for sale - ping me
Naughty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2013, 10:28 AM   #14
Naughty
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,480
20 bucks for who helps me fix this little crap, it needs to be done today.

dykwia at gmail dottercom
or 125586484
__________________
seks.ai for sale - ping me
Naughty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2013, 10:51 AM   #15
Mr. Stiff
So Fucking Stiff!
 
Mr. Stiff's Avatar
 
Industry Role:
Join Date: Oct 2005
Posts: 493
That raw SOAP envelope doesn't help much.. Better post the full WSDL URL and most of your code, that'll probably contain the key the solve this.

SOAP & PHP generally doen't play well together..

Maandag kan ik je helpen, maar 20 USD is wel een beetje weinig ;)
__________________
ICQ 208807506
Mr. Stiff is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2013, 11:47 AM   #16
Naughty
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,480
Quote:
Originally Posted by Mr. Stiff View Post
That raw SOAP envelope doesn't help much.. Better post the full WSDL URL and most of your code, that'll probably contain the key the solve this.
SOAP & PHP generally doen't play well together..
I cannot post everything, hence the emailaddress and icq number;-)


Quote:
Originally Posted by Mr. Stiff View Post
Maandag kan ik je helpen, maar 20 USD is wel een beetje weinig ;)
Ik weet dat 20 te weinig is, er stond drie uur voor, die heb ik geaccepteerd (eerder voor Wehkamp e.a. SOAP koppelingen gemaakt, maar ben inmiddels ruim anderhalve dag bezig;-)
Voor de kenner die mijn script ziet, vast binnen half uurtje voltooid.

Ik ken alleen SOAP mbt het halen van gegevens, niet voor het posten én halen;-)
__________________
seks.ai for sale - ping me
Naughty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2013, 12:53 PM   #17
Naughty
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,480
Glad to find out i am not a COMPLETE idiot. My input file/format is just wrong, i tested with some default xml data and that gave some valid output, whereas the SOAP envelope doesn't do me any good. Seems i need to read up on that first:-(
__________________
seks.ai for sale - ping me
Naughty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2013, 05:33 AM   #18
doorag
Confirmed User
 
Industry Role:
Join Date: Oct 2012
Posts: 45
xml is dead, everyone should use json
doorag is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2013, 05:37 AM   #19
CurrentlySober
Too lazy to wipe my ass
 
CurrentlySober's Avatar
 
Industry Role:
Join Date: Aug 2002
Location: A Public Bathroom
Posts: 38,614
i cant afford soap...

But I guess most of you knew that already...
__________________


👁️ 👍️ 💩
CurrentlySober is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2013, 12:48 PM   #20
Naughty
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,480
Quote:
Originally Posted by CurrentlySober View Post
i cant afford soap...

But I guess most of you knew that already...
I never actually thought about it, nor did i ever care, but... are you Drinkinghard?
__________________
seks.ai for sale - ping me
Naughty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2013, 12:52 PM   #21
grumpy
Too lazy to set a custom title
 
grumpy's Avatar
 
Join Date: Jan 2002
Location: Holland
Posts: 9,870
Quote:
Originally Posted by doorag View Post
xml is dead, everyone should use json

use csv for regular data exchange
__________________
Don't let greediness blur your vision | You gotta let some shit slide
icq - 441-456-888
grumpy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.