php-general Digest 12 May 2010 16:09:15 -0000 Issue 6740

Topics (messages 305109 through 305128):

Re: PHP Application Structre
        305109 by: Kevin Kinsey
        305111 by: Peter Lind
        305124 by: Paul M Foster
        305125 by: Kevin Kinsey
        305126 by: Peter Lind
        305127 by: Peter Lind

Re: 2D barcodes
        305110 by: Manuel Lemos

Re: PHP Encoder like IonCube
        305112 by: Pete Ford
        305114 by: Pete Ford
        305115 by: shiplu
        305116 by: Peter Lind
        305118 by: Pete Ford
        305120 by: shiplu
        305122 by: Peter Lind

Re: regexp questions
        305113 by: Ford, Mike
        305128 by: Spud. Ivan.

Re: __call and recursion
        305117 by: Richard Quadling
        305119 by: Lawrance Shepstone

Generating PHP from WSDL
        305121 by: Gary .
        305123 by: Richard Quadling

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Ashley Sheridan wrote:
On Tue, 2010-05-11 at 08:48 +0530, chetan rane wrote:

Hi all,

mod rewrite was actually inrduced to have search engne frendly urls.
hnce if you want a seo site then you have to use options 1 & 2. using
smarty or any templating engine for readibility is not total  true.
one of the major advantages of using template engines is caching


I've read some {disparaging?) comments on "option 2", but I've
got a question, or point, about that.  I'm not at all sure that
you have to use "mod_rewrite" at all, can't you just use a
FORCETYPE directive on your handler script(s)?

I've certainly got some work in the form:

somesite.com/scriptname/var1/var2/var3

that seems to work well with no use of the rewrite module.


Aside from the fact that I've yet to find any actual evidence that
search engines treat what most people consider 'search engine friendly'
urls any different from the 'unfriendly dynamic' ones. Next time you
search for something online have a look at the URLs and see how many
belong to forums with dynamic URLs. More than you'd think I would
imagine, but it does go a long way to prove that most search engines
don't give much credence to the URL these days.

Of course, it does help if your keywords are in the URL, but I've not
noticed much of a difference between:

somesite.com/page-about-subject
and
somesite.com/?page=page-about-subject

I think that this may be an artifact of an earlier time.  There
was a time when SE's didn't do so well with query strings, but it'd
be a little silly to think their owners didn't realize this and left
things exactly the way they were back in 2002 ... wouldn't it?

My $0.02,

Kevin Kinsey

--- End Message ---
--- Begin Message ---
On 12 May 2010 07:10, Kevin Kinsey <k...@daleco.biz> wrote:
> Ashley Sheridan wrote:
>>
>> On Tue, 2010-05-11 at 08:48 +0530, chetan rane wrote:
>>
>>> Hi all,
>>>
>>> mod rewrite was actually inrduced to have search engne frendly urls.
>>> hnce if you want a seo site then you have to use options 1 & 2. using
>>> smarty or any templating engine for readibility is not total  true.
>>> one of the major advantages of using template engines is caching
>>>
>
> I've read some {disparaging?) comments on "option 2", but I've
> got a question, or point, about that.  I'm not at all sure that
> you have to use "mod_rewrite" at all, can't you just use a
> FORCETYPE directive on your handler script(s)?
>
> I've certainly got some work in the form:
>
> somesite.com/scriptname/var1/var2/var3
>
> that seems to work well with no use of the rewrite module.
>

And why wouldn't you want to use mod_rewrite? It's an extremely
powerful tool that does the job really well.

Regards
Peter

-- 
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51
</hype>

--- End Message ---
--- Begin Message ---
On Wed, May 12, 2010 at 10:16:04AM +0200, Peter Lind wrote:

> On 12 May 2010 07:10, Kevin Kinsey <k...@daleco.biz> wrote:
> > Ashley Sheridan wrote:
> >>
> >> On Tue, 2010-05-11 at 08:48 +0530, chetan rane wrote:
> >>
> >>> Hi all,
> >>>
> >>> mod rewrite was actually inrduced to have search engne frendly urls.
> >>> hnce if you want a seo site then you have to use options 1 & 2. using
> >>> smarty or any templating engine for readibility is not total  true.
> >>> one of the major advantages of using template engines is caching
> >>>
> >
> > I've read some {disparaging?) comments on "option 2", but I've
> > got a question, or point, about that.  I'm not at all sure that
> > you have to use "mod_rewrite" at all, can't you just use a
> > FORCETYPE directive on your handler script(s)?
> >
> > I've certainly got some work in the form:
> >
> > somesite.com/scriptname/var1/var2/var3
> >
> > that seems to work well with no use of the rewrite module.
> >
> 
> And why wouldn't you want to use mod_rewrite? It's an extremely
> powerful tool that does the job really well.

Because your public internet server disables its use.

Paul

-- 
Paul M. Foster

--- End Message ---
--- Begin Message ---
Peter Lind wrote:
On 12 May 2010 07:10, Kevin Kinsey <k...@daleco.biz> wrote:
Ashley Sheridan wrote:
On Tue, 2010-05-11 at 08:48 +0530, chetan rane wrote:

Hi all,

mod rewrite was actually inrduced to have search engne frendly urls.
hnce if you want a seo site then you have to use options 1 & 2. using
smarty or any templating engine for readibility is not total  true.
one of the major advantages of using template engines is caching

I've read some {disparaging?) comments on "option 2", but I've
got a question, or point, about that.  I'm not at all sure that
you have to use "mod_rewrite" at all, can't you just use a
FORCETYPE directive on your handler script(s)?

I've certainly got some work in the form:

somesite.com/scriptname/var1/var2/var3

that seems to work well with no use of the rewrite module.


And why wouldn't you want to use mod_rewrite? It's an extremely
powerful tool that does the job really well.

Well, again, I'm not purporting to be an authority, but the
first thing that comes to mind is that my reasoning would be
much the same as my reasoning in building stuff:  I've got a nice
STIHL chainsaw, but I don't need it to cut two-by-fours, and
I've got access to a Hole Hawg but don't need it to make a
path for a CAT5 cable.  I guess you could call the concept
"avoiding overkill", but I'm not cognizant enough with the
inner workings of Apache to know really how much of a "hit"
the rewrite module makes.  I suppose, in terms of computing, it's
kind of similar to a Unix philosophy:  small tools that
do one job without extra fluff.

KDK

--- End Message ---
--- Begin Message ---
On 12 May 2010 17:07, Paul M Foster <pa...@quillandmouse.com> wrote:
>
> Because your public internet server disables its use.
>

And once more I'm reminded of just how happy I am with my VPS and my
dedicated server.

Regards
Peter

-- 
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51
</hype>

--- End Message ---
--- Begin Message ---
On 12 May 2010 17:17, Kevin Kinsey <k...@daleco.biz> wrote:
>
> Well, again, I'm not purporting to be an authority, but the
> first thing that comes to mind is that my reasoning would be
> much the same as my reasoning in building stuff:  I've got a nice
> STIHL chainsaw, but I don't need it to cut two-by-fours, and
> I've got access to a Hole Hawg but don't need it to make a
> path for a CAT5 cable.  I guess you could call the concept
> "avoiding overkill", but I'm not cognizant enough with the
> inner workings of Apache to know really how much of a "hit"
> the rewrite module makes.  I suppose, in terms of computing, it's
> kind of similar to a Unix philosophy:  small tools that
> do one job without extra fluff.
>

Doing it in PHP is like to be "doing it with extra fluff". Mod_rewrite
is designed for rewriting and it does it well. Doing the same job in
PHP is likely to use more resources and be more complex.

In short: using mod_rewrite for url rewriting is not "overkill" - it's
using the proper tool for the job.

Regards
Peter


-- 
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51
</hype>

--- End Message ---
--- Begin Message ---
Hello,

on 05/11/2010 07:45 PM Brian Dunning said the following:
> I have a project where I need to add some 2D barcodes onto some PDF files. I 
> plan to use fpdi, since I've used it before and am familiar with it, but I 
> need a source to generate the 2D barcodes, preferably as a png or jpg. Anyone 
> have a suggestion - either a local classfile or a reliable web service? Free 
> is preferred.  :-)

Do you mean QRCode? If so, you may want to take a look at this class:

http://www.phpclasses.org/package/6092-PHP-Generate-QRCode-images-using-Kaywa-com-site.html



-- 

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

--- End Message ---
--- Begin Message ---
On 12/05/10 01:06, Ashley Sheridan wrote:
On Tue, 2010-05-11 at 16:50 -0700, Brian Dunning wrote:

Hi Shiplu -

I also have a product with similar requirements. I searched a LOT and was never 
able to find a free solution that I was satisfied with. Even a lot of the 
commercial solutions required some server-side runtime EXE or something be 
installed, and my customers are not tech savvy enough to get that going.

I ultimately settled on PHP Lockit, which is $29. It's a Windows program that 
you run to create an obfuscated version of your script. I'm very satisfied with 
the obfuscation, and it does not require any external runtime files or 
anything. Works like a charm, and I recommend it.

http://phplockit.com/

- Brian

On May 9, 2010, at 1:36 PM, shiplu wrote:

Is there any php encoder like IonCube ?
Looking for an opensource solution.
My main target is to deliver encoded php codes so that it can not be
re-engineered.






Does slightly limit you to the Windows platform though, which I always
think is a shame when using a language as open as PHP.

Thanks,
Ash
http://www.ashleysheridan.co.uk



Maybe it'll run under Wine?
I might just try that with a demo version...

--- End Message ---
--- Begin Message ---
On 12/05/10 10:48, Pete Ford wrote:
On 12/05/10 01:06, Ashley Sheridan wrote:
On Tue, 2010-05-11 at 16:50 -0700, Brian Dunning wrote:

Hi Shiplu -

I also have a product with similar requirements. I searched a LOT and
was never able to find a free solution that I was satisfied with.
Even a lot of the commercial solutions required some server-side
runtime EXE or something be installed, and my customers are not tech
savvy enough to get that going.

I ultimately settled on PHP Lockit, which is $29. It's a Windows
program that you run to create an obfuscated version of your script.
I'm very satisfied with the obfuscation, and it does not require any
external runtime files or anything. Works like a charm, and I
recommend it.

http://phplockit.com/

- Brian

On May 9, 2010, at 1:36 PM, shiplu wrote:

Is there any php encoder like IonCube ?
Looking for an opensource solution.
My main target is to deliver encoded php codes so that it can not be
re-engineered.






Does slightly limit you to the Windows platform though, which I always
think is a shame when using a language as open as PHP.

Thanks,
Ash
http://www.ashleysheridan.co.uk



Maybe it'll run under Wine?
I might just try that with a demo version...

Looks like it works fine under Wine, at least the demo does...



--
Peter Ford, Developer                 phone: 01580 893333 fax: 01580 893399
Justcroft International Ltd.                              www.justcroft.com
Justcroft House, High Street, Staplehurst, Kent   TN12 0AH   United Kingdom
Registered in England and Wales: 2297906
Registered office: Stag Gates House, 63/64 The Avenue, Southampton SO17 1XS

--- End Message ---
--- Begin Message ---
Can you paste a sample encoded version of a php file on pastie.org?


Shiplu Mokadd.im
My talks, http://talk.cmyweb.net
Follow me, http://twitter.com/shiplu
SUST Programmers, http://groups.google.com/group/p2psust
Innovation distinguishes bet ... ... (ask Steve Jobs the rest)

--- End Message ---
--- Begin Message ---
Output looks pretty typical for something encrypted/obfuscated. As the
script will run, it needs to unpack itself ... so you can write
automated unpackers for this kind of thing if you want.

Best go with Phpsters advice of the contract, you'd be a lot better
off (assuming the court system works).

On 12 May 2010 12:23, shiplu <shiplu....@gmail.com> wrote:
> Can you paste a sample encoded version of a php file on pastie.org?
>
>
> Shiplu Mokadd.im
> My talks, http://talk.cmyweb.net
> Follow me, http://twitter.com/shiplu
> SUST Programmers, http://groups.google.com/group/p2psust
> Innovation distinguishes bet ... ... (ask Steve Jobs the rest)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51
</hype>

--- End Message ---
--- Begin Message ---
On 12/05/10 11:23, shiplu wrote:
Can you paste a sample encoded version of a php file on pastie.org?


Shiplu Mokadd.im
My talks, http://talk.cmyweb.net
Follow me, http://twitter.com/shiplu
SUST Programmers, http://groups.google.com/group/p2psust
Innovation distinguishes bet ... ... (ask Steve Jobs the rest)

OK, I just did the phpPgAdmin index.php page (just something public-domain I had lying around):

Here's the original: http://www.pastie.org/pastes/956801
and here's the encoded: http://www.pastie.org/pastes/956803

I haven't yet checked that the encoded version works!

--
Peter Ford, Developer                 phone: 01580 893333 fax: 01580 893399
Justcroft International Ltd.                              www.justcroft.com
Justcroft House, High Street, Staplehurst, Kent   TN12 0AH   United Kingdom
Registered in England and Wales: 2297906
Registered office: Stag Gates House, 63/64 The Avenue, Southampton SO17 1XS

--- End Message ---
--- Begin Message ---
It just obfuscates. Long ago I created a decoder for this type of encoder.
Every day I got 100s of decoding requests.
After changing my domain and hosting company I didn't upload it yet.

I think bcompiler is better.

Shiplu Mokadd.im
My talks, http://talk.cmyweb.net
Follow me, http://twitter.com/shiplu
SUST Programmers, http://groups.google.com/group/p2psust
Innovation distinguishes bet ... ... (ask Steve Jobs the rest)

--- End Message ---
--- Begin Message ---
On 12 May 2010 12:50, shiplu <shiplu....@gmail.com> wrote:
> It just obfuscates. Long ago I created a decoder for this type of encoder.
> Every day I got 100s of decoding requests.
> After changing my domain and hosting company I didn't upload it yet.

You of all people should know the futility in what you're asking then.

Regards
Peter

-- 
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51
</hype>

--- End Message ---
--- Begin Message ---

> -----Original Message-----
> From: Spud. Ivan. [mailto:spudm...@hotmail.com]
> Sent: 11 May 2010 15:56
> To: php-gene...@lists.php.net
> Subject: RE: [PHP] regexp questions
> 
> 
> 
> hehe, but I can't find anything related to regexp. I've found
> something at http://php.net/preg_match
> Changelog

Try searching for pcre:

Version 5.3.2
  Upgraded bundled PCRE to version 8.00.

Version 5.3.0
  Upgraded bundled PCRE to version 7.9.

Version 5.2.13
  Upgraded bundled PCRE to version 7.9.

Version 5.2.9
  Fixed bug #44336 (Improve pcre UTF-8 string matching performance).

Version 5.2.7
  Upgraded PCRE to version 7.8

Version 5.2.6
  Upgraded PCRE to version 7.6

Version 5.2.5
  Upgraded PCRE to version 7.3

Version 5.2.4
  Upgraded PCRE to version 7.2

Version 5.2.2
  Upgraded PCRE to version 7.0

Version 5.2.0
  Updated PCRE to version 6.7

... so it looks like between PHP 5.1 and 5.3.2 you have at least 2 major 
version upgrades of the PCRE library, so the previously referenced 
http://www.pcre.org/changelog.txt is more than likely what you need to be 
looking at.

Cheers!

Mike
 -- 
Mike Ford,
Electronic Information Developer, Libraries and Learning Innovation,  
Leeds Metropolitan University, C507, Civic Quarter Campus, 
Woodhouse Lane, LEEDS,  LS1 3HE,  United Kingdom 
Email: m.f...@leedsmet.ac.uk 
Tel: +44 113 812 4730





To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm

--- End Message ---
--- Begin Message ---


> Subject: RE: [PHP] regexp questions
> Date: Wed, 12 May 2010 11:11:07 +0100
> From: m.f...@leedsmet.ac.uk
> To: spudm...@hotmail.com; php-gene...@lists.php.net
> 
> 
> 
> > -----Original Message-----
> > From: Spud. Ivan. [mailto:spudm...@hotmail.com]
> > Sent: 11 May 2010 15:56
> > To: php-gene...@lists.php.net
> > Subject: RE: [PHP] regexp questions
> > 
> > 
> > 
> > hehe, but I can't find anything related to regexp. I've found
> > something at http://php.net/preg_match
> > Changelog
> 
> Try searching for pcre:
> 
> Version 5.3.2
>   Upgraded bundled PCRE to version 8.00.
> 
> Version 5.3.0
>   Upgraded bundled PCRE to version 7.9.
> 
> Version 5.2.13
>   Upgraded bundled PCRE to version 7.9.
> 
> Version 5.2.9
>   Fixed bug #44336 (Improve pcre UTF-8 string matching performance).
> 
> Version 5.2.7
>   Upgraded PCRE to version 7.8
> 
> Version 5.2.6
>   Upgraded PCRE to version 7.6
> 
> Version 5.2.5
>   Upgraded PCRE to version 7.3
> 
> Version 5.2.4
>   Upgraded PCRE to version 7.2
> 
> Version 5.2.2
>   Upgraded PCRE to version 7.0
> 
> Version 5.2.0
>   Updated PCRE to version 6.7
> 
> ... so it looks like between PHP 5.1 and 5.3.2 you have at least 2 major 
> version upgrades of the PCRE library, so the previously referenced 
> http://www.pcre.org/changelog.txt is more than likely what you need to be 
> looking at.
> 
> Cheers!
> 
> Mike
>  -- 
> Mike Ford,
> Electronic Information Developer, Libraries and Learning Innovation,  
> Leeds Metropolitan University, C507, Civic Quarter Campus, 
> Woodhouse Lane, LEEDS,  LS1 3HE,  United Kingdom 
> Email: m.f...@leedsmet.ac.uk 
> Tel: +44 113 812 4730
> 
> 
> 
> 
> 
> To view the terms under which this email is distributed, please go to 
> http://disclaimer.leedsmet.ac.uk/email.htm


Thank you very much, this was very useful ;)

I. Lopez.

                                          
_________________________________________________________________
¿Quieres conocer trucos de Windows 7? ¡Los que ya lo usan te los cuentan!
http://www.sietesunpueblodeexpertos.com/index_windows7.html

--- End Message ---
--- Begin Message ---
On 9 May 2010 22:21, Daniel Kolbo <kolb0...@umn.edu> wrote:
> Hello,
>
> I've defined a __call() method inside a class.  Within the __call()
> method (after testing that the method exists and is callable I am using:
>
> call_user_func_array(array($this,$method), $args);
>
> However, this seems to be an infinite loop (and is crashing my test
> apache server).  How, could I still use the __call() method and avoid an
> infinite loop of calling?
>
> Thanks,
> dK

__call() is receiving $method.

Do you alter $method in any way?

If not, calling call_user_func(array($this, $method), $args) will
simply call the non-existent function.




-- 
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

--- End Message ---
--- Begin Message ---
Hi Daniel,

Could you please tell us what version of PHP and OS you're using.

The following code fragment runs as expected on my PHP 5.3.2/Windows/XP/32bit:

<?php

        header('Content-Type: text/plain');

        class A
        {
                private function method_a( $argument )
                {
                        echo('private method_a(\'' . $argument . '\') ...' . 
PHP_EOL );
                }
                
                public function __call( $method, $arguments )
                {
                        if( method_exists( $this, $method ) && is_callable( 
array( $this, $method ) ) )
                        {
                                call_user_func_array( array( $this, $method ), 
$arguments );
                        }
                        else
                        {
                                echo('method \'' . $method . '\' either does 
not exist, or is not callable ...' . PHP_EOL );
                        }
                }
        }
        
        $a = new A();
        
        $a->method_a('argument');

        $a->method_b('argument');

?>

Results in:

private method_a('argument') called ...
method 'method_b' either does not exist, or is not callable ...


Perhaps if you provided some code we could spot the problem.

I would guess there's something fishy in your __call() method.

Best of luck,
Lawrance

-----Original Message-----
From: Richard Quadling [mailto:rquadl...@googlemail.com] 
Sent: 12 May 2010 12:28 PM
To: Daniel Kolbo
Cc: PHP General
Subject: Re: [PHP] __call and recursion

On 9 May 2010 22:21, Daniel Kolbo <kolb0...@umn.edu> wrote:
> Hello,
>
> I've defined a __call() method inside a class.  Within the __call()
> method (after testing that the method exists and is callable I am using:
>
> call_user_func_array(array($this,$method), $args);
>
> However, this seems to be an infinite loop (and is crashing my test
> apache server).  How, could I still use the __call() method and avoid an
> infinite loop of calling?
>
> Thanks,
> dK

__call() is receiving $method.

Do you alter $method in any way?

If not, calling call_user_func(array($this, $method), $args) will
simply call the non-existent function.




-- 
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
Let's if anyone can come up with a non-brittle solution to this.

In order to create the framework code for a webservice client I
have generated it from the server's wsdl. Unfortunately the wsdl
(which is out of my control) tries to use "extension base=..."
to say that 'B' "extends"/"inherits from " 'A', and the tool I
use doesn't understand it, with the result that the generated
code doesn't include that relatonship, and so sending a 'B' to
the webservice doesn't work because it doesn't also include the
expected properties of 'A'.

Possible solutions I have thought of are:

* create 'C', inheriting from 'A' and 'B' and send one of those
  instead, but of course php doesn't support multiple-inheritance;

* manually change 'B' so that it does inherit from 'A'. I don't
  like this because if the wsdl changes then that client-side
  code needs to again be changed manually.

* use composition instead. Doesn't seem it will work because the
  marshalling of the objects seems to want to use the properties
  directly (i.e. instead of using getters as it "should" do).

Does anyone have any other ideas?

Are there any generators out there that handle something like:
<s:complexType name="B">
 <s:complexContent mixed="false">
 <s:extension base="tns:A">
...
</s:complexType>
and produce nusoap client code?

--- End Message ---
--- Begin Message ---
On 12 May 2010 11:53, Gary . <php-gene...@garydjones.name> wrote:
> Let's if anyone can come up with a non-brittle solution to this.
>
> In order to create the framework code for a webservice client I
> have generated it from the server's wsdl. Unfortunately the wsdl
> (which is out of my control) tries to use "extension base=..."
> to say that 'B' "extends"/"inherits from " 'A', and the tool I
> use doesn't understand it, with the result that the generated
> code doesn't include that relatonship, and so sending a 'B' to
> the webservice doesn't work because it doesn't also include the
> expected properties of 'A'.
>
> Possible solutions I have thought of are:
>
> * create 'C', inheriting from 'A' and 'B' and send one of those
>  instead, but of course php doesn't support multiple-inheritance;
>
> * manually change 'B' so that it does inherit from 'A'. I don't
>  like this because if the wsdl changes then that client-side
>  code needs to again be changed manually.
>
> * use composition instead. Doesn't seem it will work because the
>  marshalling of the objects seems to want to use the properties
>  directly (i.e. instead of using getters as it "should" do).
>
> Does anyone have any other ideas?
>
> Are there any generators out there that handle something like:
> <s:complexType name="B">
>  <s:complexContent mixed="false">
>  <s:extension base="tns:A">
> ...
> </s:complexType>
> and produce nusoap client code?

Can you provide a URL for the wsdl file please?

-- 
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

--- End Message ---

Reply via email to