Re: [phpsoa] can't use wsdl file get service??

2009-11-24 Thread Silvano Girardi Jr
What happens?

You should be doing something with the return from
$service-getPrice(array('symbol'='IBM'));

Try var_dump($service-getPrice(array('symbol'='IBM')));

Silvano

2009/11/21 heshuai64 heshua...@gmail.com



 include 'SCA/SCA.php';
 $service = SCA::getService(StockQuoteService?wsdl);
 $service-getPrice(array('symbol'='IBM'));


 StockQuoteService?wsdl file content:
 ?xml version=1.0 encoding=UTF-8?
 wsdl:definitions xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
 xmlns:axis2=http://quickstart.samples/; xmlns:ns1=http://
 org.apache.axis2/xsd xmlns:ns=http://quickstart.samples/xsd;
 xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl;
 xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:xs=http://
 www.w3.org/2001/XMLSchema xmlns:mime=http://schemas.xmlsoap.org/wsdl/
 mime/ http://schemas.xmlsoap.org/wsdl/%0Amime/ xmlns:soap=
 http://schemas.xmlsoap.org/wsdl/soap/;
 xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/;
 targetNamespace=http://quickstart.samples/;
wsdl:documentationStockQuoteService/wsdl:documentation
wsdl:types
xs:schema attributeFormDefault=qualified
 elementFormDefault=qualified targetNamespace=http://
 quickstart.samples/xsd
xs:element name=getPrice
xs:complexType
xs:sequence
xs:element minOccurs=0 name=symbol
 nillable=true type=xs:string/

/xs:sequence
/xs:complexType
/xs:element
xs:element name=getPriceResponse
xs:complexType
xs:sequence
xs:element minOccurs=0 name=return
 type=xs:double/
/xs:sequence
/xs:complexType

/xs:element
xs:element name=update
xs:complexType
xs:sequence
xs:element minOccurs=0 name=symbol
 nillable=true type=xs:string/
xs:element minOccurs=0 name=price
 type=xs:double/
/xs:sequence
/xs:complexType
/xs:element

/xs:schema
/wsdl:types
wsdl:message name=getPriceRequest
wsdl:part name=parameters element=ns:getPrice/
/wsdl:message
wsdl:message name=getPriceResponse
wsdl:part name=parameters element=ns:getPriceResponse/
/wsdl:message
wsdl:message name=updateRequest

wsdl:part name=parameters element=ns:update/
/wsdl:message
wsdl:portType name=StockQuoteServicePortType
wsdl:operation name=getPrice
wsdl:input message=axis2:getPriceRequest
 wsaw:Action=urn:getPrice/
wsdl:output message=axis2:getPriceResponse
 wsaw:Action=urn:getPriceResponse/
/wsdl:operation
wsdl:operation name=update
wsdl:input message=axis2:updateRequest
 wsaw:Action=urn:update/

/wsdl:operation
/wsdl:portType
wsdl:binding name=StockQuoteServiceSoap11Binding
 type=axis2:StockQuoteServicePortType
soap:binding transport=http://schemas.xmlsoap.org/soap/http;
 style=document/
wsdl:operation name=getPrice
soap:operation soapAction=urn:getPrice style=document/
 
wsdl:input
soap:body use=literal/
/wsdl:input

wsdl:output
soap:body use=literal/
/wsdl:output
/wsdl:operation
wsdl:operation name=update
soap:operation soapAction=urn:update style=document/
wsdl:input
soap:body use=literal/
/wsdl:input

/wsdl:operation
/wsdl:binding
wsdl:binding name=StockQuoteServiceSoap12Binding
 type=axis2:StockQuoteServicePortType
soap12:binding transport=http://schemas.xmlsoap.org/soap/
 http style=document/
wsdl:operation name=getPrice
soap12:operation soapAction=urn:getPrice
 style=document/
wsdl:input
soap12:body use=literal/
/wsdl:input

wsdl:output
soap12:body use=literal/
/wsdl:output
/wsdl:operation
wsdl:operation name=update
soap12:operation soapAction=urn:update style=document/
 
wsdl:input
soap12:body use=literal/
/wsdl:input

/wsdl:operation
/wsdl:binding
wsdl:binding name=StockQuoteServiceHttpBinding
 type=axis2:StockQuoteServicePortType
http:binding verb=POST/
wsdl:operation name=getPrice
http:operation location=StockQuoteService/getPrice/
wsdl:input
mime:content type=text/xml part=getPrice/
/wsdl:input

wsdl:output
mime:content type=text/xml part=getPrice/
/wsdl:output
/wsdl:operation
wsdl:operation name=update
http:operation location=StockQuoteService/update/
wsdl:input
mime:content type=text/xml part=update/

[phpsoa] Re: Consuming SSL secured web services

2008-11-24 Thread Silvano Girardi Jr

On Mon, Nov 24, 2008 at 1:32 PM, Caroline Maynard [EMAIL PROTECTED] wrote:

 Matthew Peters wrote:
 OK so that's useful information and makes sense. How would you go
 about connecting to an https URL from PHP? I have never tried it. Is
 there a way to give the userid and password to the file wrapper?

 I've forgotten a lot of what I knew about this too, but Matthew's
 approach of getting the connection working first without SCA is a good
 one. The first obvious question is do you have OpenSSL compiled in?

Yes, I do :)

Silvano

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
phpsoa group.
To post to this group, send email to phpsoa@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.co.uk/group/phpsoa?hl=en
-~--~~~~--~~--~--~---



[phpsoa] Re: Consuming SSL secured web services

2008-11-24 Thread Silvano Girardi Jr

On Sun, Nov 23, 2008 at 6:49 PM, Matthew Peters
[EMAIL PROTECTED] wrote:

 OK so that's useful information and makes sense. How would you go
 about connecting to an https URL from PHP? I have never tried it. Is
 there a way to give the userid and password to the file wrapper?

 Matthew

For this specific case I need to get it via cURL, where I can specify the cert:

curl_setopt($res_curl, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($res_curl, CURLOPT_SSLCERT, /path/to/cert.crt);

or, like I resolved, using the SoapClient, but it was a pain to
convert all XSD types into classes. I'd love to be able to use SCA_SDO
with cases like these, so count on me to try to get this thing working
with SCA.

I wonder if there is any way to specify the certificate to PHP
somewhere else, so it would work with fopen() as well.

Silvano

 On 20 Nov, 20:44, Silvano Girardi Jr [EMAIL PROTECTED] wrote:
 Nope.

 failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden

 Because it requires the certificate as well.

 Silvano

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
phpsoa group.
To post to this group, send email to phpsoa@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.co.uk/group/phpsoa?hl=en
-~--~~~~--~~--~--~---



[phpsoa] Re: Problem when using type DOUBLE in SOAP

2008-06-24 Thread Silvano Girardi Jr
Ok! We will be using string until there is no fix for it.

Thank you!
Silvano

On Tue, Jun 24, 2008 at 6:27 AM, Matthew Peters 
[EMAIL PROTECTED] wrote:


 Hi Silvano, just to say that I bumped into Caroline who said she is
 going to take a look at it and see what it will take to get the right
 behaviour during xml generation.

 Matthew

 On Jun 19, 10:40 am, Matthew Peters [EMAIL PROTECTED]
 wrote:
  Hi Caroline, thanks for a very authoritative answer, as always. The
  one we are going to need to fix, of course, is the Tuscany behaviour,
  and what it does on $xmldas-saveString($xdoc), since that is what we
  use to generate the XML for the soap response ... unless we do some
  horrid fix up of the generated xml afterwards. Can you work out what
  the Tuscany change needs to be?
 
  Matthew
 
  On Jun 19, 2:33 am, Silvano Girardi Jr [EMAIL PROTECTED] wrote:
 
   On Wed, Jun 18, 2008 at 9:05 PM, Caroline Maynard [EMAIL PROTECTED]
 wrote:
 
I think this accounts for the behaviour of Matthew's testcase. But
 we're
going through similar Tuscany code when converting between SDOs and
 XML,
and this will really need a Tuscany change.
 
I did check this against the SDO 2.1 spec, and that expects doubles
 and
floats to be printed as [0-9]*('.'[0-9])?('E'|'e'). So I don't know
where Tuscany got its format. Certainly not from the XML schema spec:
   http://www.w3.org/TR/xmlschema-2/#float.
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
phpsoa group.
To post to this group, send email to phpsoa@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.co.uk/group/phpsoa?hl=en
-~--~~~~--~~--~--~---



[phpsoa] Problem when using type DOUBLE in SOAP

2008-06-16 Thread Silvano Girardi Jr
Gentlemen,
there is a critical issue (at least for me) when dealing with double values
using SOAP.

Example: when returning 3210.8765, you get: 3211.

I reported it as a bug: http://pecl.php.net/bugs/bug.php?id=14155

FYI, when I try with REST-RPC or not using SCA at all (with SoapServer), it
works fine: returns the same double value.

I appreciate if someone could take a look on this asap.

Thanks,
Silvano Girardi Jr.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
phpsoa group.
To post to this group, send email to phpsoa@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.co.uk/group/phpsoa?hl=en
-~--~~~~--~~--~--~---



[phpsoa] Re: Methods Documentation in WSDL

2008-06-02 Thread Silvano Girardi Jr
Hi Graham,
I have that interest. Where do I start? :)

Thanks
Silvano

On Mon, Jun 2, 2008 at 10:19 AM, Graham Charters [EMAIL PROTECTED]
wrote:


 Hi Silvano,

 Sorry for not replying sooner and not replying to your original note.
 I always had in mind to generate documentation in the WSDL from the
 methods descriptions, so what you have done is exactly the right idea.

 Thanks also for the patch.  I haven't taken a look at the moment.  The
 SCA_SDO project has a CLA to cover contributions and so far as I'm
 aware you've not signed, or been asked to sign it.  Is this something
 you'd be willing and able to do?  I can give you more information in
 needed.

 Regards, Graham.

 On 30 May, 17:05, Silvano Girardi Jr [EMAIL PROTECTED] wrote:
  Since I got no comments, I made it only for methods and not optional.
 
  I've put the patch in the case.
 
  Silvano
 
  On Fri, Apr 25, 2008 at 1:06 PM, Silvano Girardi Jr [EMAIL PROTECTED]
 
  wrote:
 
   On Fri, Apr 25, 2008 at 12:28 PM, Caroline Maynard [EMAIL PROTECTED]
 wrote:
 
   Silvano Girardi Jr wrote:
On Fri, Apr 25, 2008 at 5:38 AM, Caroline Maynard [EMAIL PROTECTED]
 wrote:
 
Silvano Girardi Jr wrote:
 
is there any special reason for the SCA to do not generate the
documentation/documentation in the WSDL based on the method's
description in the doc block?
Probably nobody thought to do it. Seems a good idea to me. Any
   volunteers?
 
I was checking how it works and it seems something I can handle in
 my
   spare
time.
 
I will need to be in touch with someone here to discuss how we are
 going
   to
do this.
Might be best in private and once we define the ways to do it we can
 put
here in the list for votes. (Just thoughts really... not sure how
 you
   guys
handle these things).
 
Anyway, I am a volunteer :)
 
Silvano
 
   Great :-)
   Suggest you raise a Feature/Change Request at
  http://pecl.php.net/bugs/report.php?package=SCA_SDO. Then when you
 have
   a proposed patch we can get the relevant committers to review it.
 
   Ok I just did it:http://pecl.php.net/bugs/bug.php?id=13775
 
   Need your thoughts here.
 
   1 - should it include the description of the service too (as I put in
 the
   request above), or only for methods?
   2 - should it always happen or be optional? If optional, how to handle
   this?
 
   Silvano
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
phpsoa group.
To post to this group, send email to phpsoa@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.co.uk/group/phpsoa?hl=en
-~--~~~~--~~--~--~---



[phpsoa] Re: Methods Documentation in WSDL

2008-04-25 Thread Silvano Girardi Jr
On Fri, Apr 25, 2008 at 5:38 AM, Caroline Maynard [EMAIL PROTECTED] wrote:


 Silvano Girardi Jr wrote:

  is there any special reason for the SCA to do not generate the
  documentation/documentation in the WSDL based on the method's
  description in the doc block?

 Probably nobody thought to do it. Seems a good idea to me. Any volunteers?


I was checking how it works and it seems something I can handle in my spare
time.

I will need to be in touch with someone here to discuss how we are going to
do this.
Might be best in private and once we define the ways to do it we can put
here in the list for votes. (Just thoughts really... not sure how you guys
handle these things).

Anyway, I am a volunteer :)

Silvano

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
phpsoa group.
To post to this group, send email to phpsoa@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.co.uk/group/phpsoa?hl=en
-~--~~~~--~~--~--~---



[phpsoa] SDO_Model_ReflectionDataObject

2008-01-09 Thread Silvano Girardi Jr
Hi guys,
I am experiencing problems with the SDO_Model_ReflectionDataObject.

What I am trying to do is to get the instance properties.
When I call the method getInstanceProperties() it returns null, although the
method ::export() shows me the SDO.

code
$obj_customer   = SCA::createDataObject(http://example.org;, Customers);
$obj_reflection = new SDO_Model_ReflectionDataObject($obj_customer);
var_dump($obj_customer); // returns null
var_dump($obj_customer-getInstanceProperties()); // returns null
SDO_Model_ReflectionDataObject::export($obj_customer); // see next lines
/code
object(SDO_Model_ReflectionDataObject)#54 {
  - ROOT OBJECT
  - Type dataObject http://example.org#CustomerPlans
  - Instance Properties[1] {
http://example.org#SinglePlan $Plans[] {
commonj.sdo#Integer $plan_id;
commonj.sdo#String $name;
}
}
}

XSD is:
?xml version=1.0 encoding=UTF-8?
xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema; targetNamespace=
http://example.org; xmlns:tns=http://example.org;
  xs:complexType name=SinglePlan
xs:sequence
  xs:element name=plan_id type=xs:integer /
  xs:element name=name type=xs:string /
/xs:sequence
  /xs:complexType
  xs:element name=CustomerPlans
xs:complexType
  xs:sequence
xs:element name=Plans type=tns:SinglePlan maxOccurs=unbounded
/
  /xs:sequence
/xs:complexType
  /xs:element
/xs:schema


I see that if I use the SDO_Model_ReflectionDataObject's
getInstanceProperties method for an argument of type SDO_DataObject it works
fine.

What am I doing wrong? :)

Thanks,
Silvano

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
phpsoa group.
To post to this group, send email to phpsoa@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.co.uk/group/phpsoa?hl=en
-~--~~~~--~~--~--~---