RE: [PHP] PHP5 SOAP...

2009-06-16 Thread bruce
hi russell...

isn't the actual soap data/packet that's being sent over the wire viewable
via an app like livehttpheaders... (at least from firefox)

or are you looking for something in much more detail...



-Original Message-
From: rjon...@gmail.com [mailto:rjon...@gmail.com]on Behalf Of Russell
Jones
Sent: Tuesday, June 16, 2009 8:22 AM
To: PHP General
Subject: [PHP] PHP5 SOAP...


I'm working on a project using SOAP and WS-Security in which I am failing
miserably.

Is there a way to inspect the actual XML, header, etc. that is actually
being sent. I feel like I am constructing the call correctly, and I know
exactly what needs to be sent, but I dont know how to see exactly what is
sent - all I get back are useless errors like not enough information sent,
etc...

Any ideas? Any SOAP pros out there?


Russell Jones
CTO Virante, Inc.
r...@virante.com
919-459-1035


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



Re: [PHP] PHP5 SOAP...

2009-06-16 Thread Tom Rogers
Hi,

Wednesday, June 17, 2009, 1:21:47 AM, you wrote:
RJ I'm working on a project using SOAP and WS-Security in which I am failing
RJ miserably.

RJ Is there a way to inspect the actual XML, header, etc. that is actually
RJ being sent. I feel like I am constructing the call correctly, and I know
RJ exactly what needs to be sent, but I dont know how to see exactly what is
RJ sent - all I get back are useless errors like not enough information sent,
RJ etc...

RJ Any ideas? Any SOAP pros out there?


RJ Russell Jones
RJ CTO Virante, Inc.
RJ r...@virante.com
RJ 919-459-1035

Not a pro but...
Try something like this:
//object to pass function variables
class requestObject {
function requestObject($list) {
foreach($list as $key=$val)
$this-$key = $val;
}
}

$client = new  SoapClient(wsdl.xml, array('login'= login, 'password'= 
password, 'trace'=true));

$soapstruct = new requestObject(array('clientId'=12342, 'leagueId'=0)); //use 
whatever variables are needed
try {
$info = $client-soapFunction($soapstruct);
echo REQUEST:\n . $client-__getLastRequest() . br /\n;
print_r($info);
} catch (SoapFault $e) {
echo SOAP Fault: .$e-getMessage().br /\n;
echo REQUEST:\n . $client-__getLastRequest() . br /\n;
}

-- 
regards,
Tom


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



Re: [PHP] Php5 SOAP WSDL parsing

2006-01-09 Thread Jochem Maas

Simon Detheridge wrote:

I'm trying to get PHP5 to talk to a web service that I am developing.

I have created a wsdl for the service 
(http://www.symgate.com/symgate/symgate.wsdl) and am trying to get PHP 
to parse it. (The wsdl validates in a number of tools I've pointed at 
it, including mindreef soapscope and the wsdl analyser on xmethods.net)


When I try and get PHP5 to read the file, I get an error that it not 
very helpful. My code says:


is php choking on the comment?:

!--xsd:include schemaLocation=cml.xsd /--

or maybe it's choking on the 'included' cml.xsd whihc doesn't
define a charset in its 'header'?

just thinking out loud there...



try
{
 $client = new SoapClient ( 
http://www.symgate.com/symgate/symgate.wsdl; ) ;

} catch ( SoapFault $fault ) {
 echo $fault ;


try this instead:

echo 'pre';
var_dump($fault);
exit;

doubt that it will tell you anymore though.


 exit ;
}

The output says:

SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: unexpected  in 
complexType in /var/www/localhost/htdocs/soap1.php:5 Stack trace: #0 
/var/www/localhost/htdocs/soap1.php(5): 
SoapClient-__construct('http://www.symg...') #1 {main}


This is obviously truncated. I've tried looking at the apache2 error_log 
but I can't see any further detail.


I'd really like to know what PHP's problem is with my wsdl. How can I 
see the full output of this error?


Thanks,
Simon



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



Re: [PHP] Php5 SOAP WSDL parsing

2006-01-09 Thread Simon Detheridge

Thanks for your response.

Quoting Jochem Maas [EMAIL PROTECTED]:


Simon Detheridge wrote:

I'm trying to get PHP5 to talk to a web service that I am developing.



is php choking on the comment?:

!--xsd:include schemaLocation=cml.xsd /--


I've removed the comments from the file. No luck.


or maybe it's choking on the 'included' cml.xsd whihc doesn't
define a charset in its 'header'?

just thinking out loud there...


Fixed, and no dice there either.


try
{
 $client = new SoapClient ( 
http://www.symgate.com/symgate/symgate.wsdl; ) ;

} catch ( SoapFault $fault ) {
 echo $fault ;


try this instead:

echo 'pre';
var_dump($fault);
exit;

doubt that it will tell you anymore though.


It provides more data about where it failed in the PHP, but the 
internal error string is still: SOAP-ERROR: Parsing Schema: unexpected 
 in complexType


Actaully, it turns out that in the original message I posted, the 
message wasn't truncated - just insuffucently verbose to derive any 
meaningful reason as to why it failed.


All I currently know is that php found an unexpected nothing in a 
complexType. It doesn't tell me which complexType, or anything that 
might enable me to debug this usefully.


I am at a loss.

Simon



This message has been scanned for viruses by BlackSpider MailControl - 
www.blackspider.com

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



Re: [PHP] Php5 SOAP WSDL parsing

2006-01-09 Thread Jochem Maas

another guess: does the php soap extension maybe think
that 'complexType' (all of them) needs a name attrib? (try
giving them bogus names?)

Simon Detheridge wrote:

Thanks for your response.

Quoting Jochem Maas [EMAIL PROTECTED]:


Simon Detheridge wrote:


I'm trying to get PHP5 to talk to a web service that I am developing.




is php choking on the comment?:

!--xsd:include schemaLocation=cml.xsd /--



I've removed the comments from the file. No luck.


or maybe it's choking on the 'included' cml.xsd whihc doesn't
define a charset in its 'header'?

just thinking out loud there...



Fixed, and no dice there either.


try
{
 $client = new SoapClient ( 
http://www.symgate.com/symgate/symgate.wsdl; ) ;

} catch ( SoapFault $fault ) {
 echo $fault ;



try this instead:

echo 'pre';
var_dump($fault);
exit;

doubt that it will tell you anymore though.



It provides more data about where it failed in the PHP, but the internal 
error string is still: SOAP-ERROR: Parsing Schema: unexpected  in 
complexType


Actaully, it turns out that in the original message I posted, the 
message wasn't truncated - just insuffucently verbose to derive any 
meaningful reason as to why it failed.


All I currently know is that php found an unexpected nothing in a 
complexType. It doesn't tell me which complexType, or anything that 
might enable me to debug this usefully.


I am at a loss.

Simon



This message has been scanned for viruses by BlackSpider MailControl - 
www.blackspider.com




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



Re: [PHP] Php5 SOAP WSDL parsing

2006-01-09 Thread David Grant
Simon,

It would appear you've not included the full message.  Please look at
the source of the message in your web browser.  The space between
unexpected and in complexType probably contains an XML tag.

David

Simon Detheridge wrote:
 I'm trying to get PHP5 to talk to a web service that I am developing.
 
 I have created a wsdl for the service
 (http://www.symgate.com/symgate/symgate.wsdl) and am trying to get PHP
 to parse it. (The wsdl validates in a number of tools I've pointed at
 it, including mindreef soapscope and the wsdl analyser on xmethods.net)
 
 When I try and get PHP5 to read the file, I get an error that it not
 very helpful. My code says:
 
 try
 {
  $client = new SoapClient (
 http://www.symgate.com/symgate/symgate.wsdl; ) ;
 } catch ( SoapFault $fault ) {
  echo $fault ;
  exit ;
 }
 
 The output says:
 
 SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: unexpected  in
 complexType in /var/www/localhost/htdocs/soap1.php:5 Stack trace: #0
 /var/www/localhost/htdocs/soap1.php(5):
 SoapClient-__construct('http://www.symg...') #1 {main}
 
 This is obviously truncated. I've tried looking at the apache2 error_log
 but I can't see any further detail.
 
 I'd really like to know what PHP's problem is with my wsdl. How can I
 see the full output of this error?
 
 Thanks,
 Simon
 


-- 
David Grant
http://www.grant.org.uk/

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



Re: [PHP] PHP5 Soap + .NET Webservice

2005-10-11 Thread Chris Hemmings

Thanks Richard,

I think I might start on a slightly simpler service, it seems MS has 
done its best to complicate everything.


I have managed to get something working, but, god knows why the their 
example web service is sending back schema data as well as the result 
data, quite over the top.  I'm guessing it helps their .NET stuff all 
work together nicely.


Anyway, thanks again.

Chris.

Richard Lynch wrote:

On Mon, October 10, 2005 4:40 am, Chris Hemmings wrote:


Can anyone explain how this works, and, how to fix it.  I'm can't find
any documentation on the problem I am having.



colon-separated name-spaces in XML are a relatively new development.

Your XML parser probably is not up to speed on them yet...

You'd have to upgrade your XML parser, or replace it with one that is
aware of this newer XML format.

I forget the precise terminology for colon-separated name-spaces in
XML, so your first task is to find out what the heck it's called. :-)



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



Re: [PHP] PHP5 Soap + .NET Webservice

2005-10-10 Thread Richard Lynch
On Mon, October 10, 2005 4:40 am, Chris Hemmings wrote:
 Can anyone explain how this works, and, how to fix it.  I'm can't find
 any documentation on the problem I am having.

colon-separated name-spaces in XML are a relatively new development.

Your XML parser probably is not up to speed on them yet...

You'd have to upgrade your XML parser, or replace it with one that is
aware of this newer XML format.

I forget the precise terminology for colon-separated name-spaces in
XML, so your first task is to find out what the heck it's called. :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

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