Caroline Maynard | 2 Nov 2007 13:02
Picon

Re: I suppose I can't put an SDO into the session...


Matthew Peters wrote:
> Caroline, thanks for answering. I am actually glad that it is supposed
> to work since I know it has worked for someone else - the person who
> gave me the code in the first place.
> 
> The schema Cart.xsd is

I needed a Customer.xsd too, but the one I found in the eServiceStore 
sample did the trick.

So the good news is that it wasn't a memory management problem (hard), 
but a simple regression in Tuscany in their string handling, so they no 
longer cope with a null being passed as root element name. I've sent 
them a patch, and also checked in a guard to our Fulmar branch to make 
sure we don't reach that bit of code.

Harm Bandstra | 9 Nov 2007 21:16
Picon

How can I access a property containing a hyphen (i.e. "portfolio-id")


Hello All,

I'm not sure if this is the right place for my question, but here
goes...

I have an XSD file with properties containing hyphens. I can't get it
to accept any changes to the properties. In part this is because php
doesn't accept hypens in variable names, but I found that "Simple-XML"
uses some sort of work around. I have the following php code:

===

$xmldas = SDO_DAS_XML::create('xsd/pre_qual_wso.xsd');
$messagebody = $xmldas->createDataObject('','MessagebodyType');

// This gives a syntax error (duh)
$messagebody->portfolio-id     = 'BST';

// These 2 give the following error:
// Problem creating an XML document: DataObjectImpl::setSDOValue -
path not found:
$messagebody['portfolio-id']   = 'BST';
$messagebody[0]                = 'BST';

// This is the way it's done in simple-xml, but also doesn't work
$messagebody->{'portfolio-id'} = 'BST';

===

(Continue reading)

simonslaws | 9 Nov 2007 22:21

Re: How can I access a property containing a hyphen (i.e. "portfolio-id")


On 9 Nov, 20:16, Harm Bandstra <hbands...@...> wrote:
> Hello All,
>
> I'm not sure if this is the right place for my question, but here
> goes...
>
> I have an XSD file with properties containing hyphens. I can't get it
> to accept any changes to the properties. In part this is because php
> doesn't accept hypens in variable names, but I found that "Simple-XML"
> uses some sort of work around. I have the following php code:
>
> ===
>
> $xmldas = SDO_DAS_XML::create('xsd/pre_qual_wso.xsd');
> $messagebody = $xmldas->createDataObject('','MessagebodyType');
>
> // This gives a syntax error (duh)
> $messagebody->portfolio-id     = 'BST';
>
> // These 2 give the following error:
> // Problem creating an XML document: DataObjectImpl::setSDOValue -
> path not found:
> $messagebody['portfolio-id']   = 'BST';
> $messagebody[0]                = 'BST';
>
> // This is the way it's done in simple-xml, but also doesn't work
> $messagebody->{'portfolio-id'} = 'BST';
>
> ===
(Continue reading)

Tatto de Castro | 12 Nov 2007 18:16
Picon

Error in Web Services Description Language Tool

Hi everybody,

    I'm having a strange problem when I try to use the Web Services Description Language Tool (Wsdl.exe) from .NET Framework Tools. I'm getting an error when I try to use the wsdl.exe to create the C# client proxy class based on the wsdl generated by PHP (SCA_SDO).
    I tried several ways to make the wsdl.exe create the C# code. Does anyone have any idea about how to solve this problem? Anyone else having this problem too?
    The info about how to reproduce the error follows below.
   
    Thanks, Tatto

Command that I'm getting error:
wsdl.exe /protocol:SOAP /language:CS /out:"TestService.cs" Test.wsdl
+++++++++++++++
Error message:
Microsoft (R) Web Services Description Language Utility
[Microsoft (R) .NET Framework, Version 2.0.50727.42]
Copyright (C) Microsoft Corporation. All rights reserved.
Warning: This web reference does not conform to WS-I Basic Profile v1.1.
R2028, R2029: A DESCRIPTION using the WSDL namespace and the WSDL SOAP binding n
amespace MUST be valid according to the XML Schemas found at http://schemas.xmls
oap.org/wsdl/2003-02-11.xsd and http://schemas.xmlsoap.org/wsdl/soap/2003-02-11.
xsd.
  -  Warning: The element 'definitions' in namespace 'http://schemas.xmlsoap.org
/wsdl/' has invalid child element 'types'. List of possible elements expected: '
documentation, import, types, message, portType, binding, service' in namespace
'http://schemas.xmlsoap.org/wsdl/' as well as any element in namespace '##other'
. Line 3, position 4.

For more details on the WS-I Basic Profile v1.1, see the specification
at http://www.ws-i.org/Profiles/BasicProfile-1.1.html.

Error: Unable to import binding 'TestBinding' from namespace 'http://Test'.
  - Unable to import operation 'giveMeANumber'.
  - The element 'http://Test:giveMeANumber' is missing.

If you would like more help, please type "wsdl /?".
+++++++++++++++
Test.php:
<?php
require_once( "SCA/SCA.php" );

/**
 * Class Test
 *
 * <at> service
 * <at> binding.soap
 */
class Test {
   
    /**
     * Checks for an existing cart
     *
     * <at> return string
     */
    public function giveMeANumber( ) {
        return 'Your number is :' . rand(1,100);
    }
   
}
?>
+++++++++++++++
Test.wsdl:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:tns2="http://Test" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="http://Test">
<types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://Test"
elementFormDefault="qualified">
<xs:element name="giveMeANumber">
<xs:complexType>
<xs:sequence>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="giveMeANumberResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="giveMeANumberReturn" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</types>
<wsdl:message name="giveMeANumberRequest">
<wsdl:part name="giveMeANumberRequest" element="tns2:giveMeANumber"/>
</wsdl:message>
<wsdl:message name="giveMeANumberResponse">
<wsdl:part name="return" element="tns2:giveMeANumberResponse"/>
</wsdl:message>
<wsdl:portType name="TestPortType">
<wsdl:operation name="giveMeANumber">
<wsdl:input message="tns2:giveMeANumberRequest"/>
<wsdl:output message="tns2:giveMeANumberResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="TestBinding" type="tns2:TestPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="giveMeANumber">
<soap:operation soapAction=""/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="TestService">
<wsdl:port name="TestPort" binding="tns2:TestBinding">
<soap:address location="http://localhost/Test.php"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

<!-- this line identifies this file as WSDL generated by SCA for PHP. Do not remove -->
+++++++++++++++
PHP Version: 5.2.3
SCA_SDO Version: 1.2.3


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "phpsoa" group.
To post to this group, send email to phpsoa-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to phpsoa-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at http://groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---

Attachment (tattodecastro.vcf): text/x-vcard, 208 bytes
Paul Scott | 13 Nov 2007 10:48
Picon
Gravatar

Re: Error in Web Services Description Language Tool


On Mon, 2007-11-12 at 15:16 -0200, Tatto de Castro wrote:
>     I'm having a strange problem when I try to use the Web Services
> Description Language Tool (Wsdl.exe) from .NET Framework Tools. I'm
> getting an error when I try to use the wsdl.exe to create the C#
> client proxy class based on the wsdl generated by PHP (SCA_SDO).

Could you try and use the same tool for the URL
http://fsiu.uwc.ac.za/chisimba_modules/webservices/server.php?wsdl as
well? That service looks like the same type of thing as well and I would
like to know if you get the same issue.

Are any of the project developers alive on this list?

--Paul
--

-- 
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

Caroline Maynard | 13 Nov 2007 11:23
Picon

Re: Error in Web Services Description Language Tool


Paul Scott wrote:
> On Mon, 2007-11-12 at 15:16 -0200, Tatto de Castro wrote:
>>     I'm having a strange problem when I try to use the Web Services
>> Description Language Tool (Wsdl.exe) from .NET Framework Tools. I'm
>> getting an error when I try to use the wsdl.exe to create the C#
>> client proxy class based on the wsdl generated by PHP (SCA_SDO).
> 
> Could you try and use the same tool for the URL
> http://fsiu.uwc.ac.za/chisimba_modules/webservices/server.php?wsdl as
> well? That service looks like the same type of thing as well and I would
> like to know if you get the same issue.
> 
> Are any of the project developers alive on this list?

Alive, just sleeping ...

It's sad but true that different programs don't have the same criteria 
for deciding what is valid WSDL. If you look back in the mailing list or 
in our bugs list, you'll see there have been a couple of issues about 
the .NET tools being quite picky compared to Tuscany (the Apache library 
that we use to implement this stuff). It's only with real examples like 
yours that we can home in  on the discrepancies, so thanks for sending 
them. We'll take a look and see what can be done.

Paul Scott | 13 Nov 2007 12:04
Picon
Gravatar

Re: Error in Web Services Description Language Tool


On Tue, 2007-11-13 at 10:23 +0000, Caroline Maynard wrote:

> Alive, just sleeping ...
> 

Sleep, whats that? Coffee.... ;)

> It's sad but true that different programs don't have the same criteria 
> for deciding what is valid WSDL. If you look back in the mailing list or 
> in our bugs list, you'll see there have been a couple of issues about 
> the .NET tools being quite picky compared to Tuscany (the Apache library 
> that we use to implement this stuff). It's only with real examples like 
> yours that we can home in  on the discrepancies, so thanks for sending 
> them. We'll take a look and see what can be done.

Agreed, absolutely! I have only just started out on this stuff, and it
seems really promising. I am going to try and expose a whole whack of
things from our framework being used to deliver e-learning in 16 African
countries in this method, so I will try and keep you all up to date as
well.

For some background on our project, please check out
http://avoir.uwc.ac.za

Will check in later again, I just have to try and figure out a decent
way of generating XSD for complexTypes generically...

--Paul
--

-- 
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

Tatto de Castro | 13 Nov 2007 13:50
Picon

Error in Web Services Description Language Tool

Hi everybody,

    Thanks for the help Caroline Maynard, if there is something that I can do, let me know.
    I already tried to edit the wsdl file without success. Any other idea?

    Paul Scott, the problem happens with your wsdl too (error message follows below).

    Thanks, Tatto

+++++++
>wsdl.exe http://fsiu.uwc.ac.za/chisimba_modules/webservices/server.php?wsdl
Microsoft (R) Web Services Description Language Utility
[Microsoft (R) .NET Framework, Version 2.0.50727.42]
Copyright (C) Microsoft Corporation. All rights reserved.
Warning: This web reference does not conform to WS-I Basic Profile v1.1.
R2028, R2029: A DESCRIPTION using the WSDL namespace and the WSDL SOAP binding namespace MUST be valid according to the XML Schemas found at http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd and http://schemas.xmlsoap.org/wsdl/soap/2003-02-11.xsd.
  -  Warning: The element 'definitions' in namespace 'http://schemas.xmlsoap.org/wsdl/' has invalid child element 'types'. List of possible elements expected: 'documentation, import, types, message, portType, binding, service' in namespace'http://schemas.xmlsoap.org/wsdl/' as well as any element in namespace '##other'. Line 3, position 4.

For more details on the WS-I Basic Profile v1.1, see the specification at http://www.ws-i.org/Profiles/BasicProfile-1.1.html.

Error: Unable to import binding 'serverBinding' from namespace 'http://server'.
  - Unable to import operation 'hello'.
  - The element 'http://server:hello' is missing.

If you would like more help, please type "wsdl /?".
+++++++

Paul Scott wrote:
On Tue, 2007-11-13 at 10:23 +0000, Caroline Maynard wrote:
Alive, just sleeping ...
Sleep, whats that? Coffee.... ;)
It's sad but true that different programs don't have the same criteria for deciding what is valid WSDL. If you look back in the mailing list or in our bugs list, you'll see there have been a couple of issues about the .NET tools being quite picky compared to Tuscany (the Apache library that we use to implement this stuff). It's only with real examples like yours that we can home in on the discrepancies, so thanks for sending them. We'll take a look and see what can be done.
Agreed, absolutely! I have only just started out on this stuff, and it seems really promising. I am going to try and expose a whole whack of things from our framework being used to deliver e-learning in 16 African countries in this method, so I will try and keep you all up to date as well. For some background on our project, please check out http://avoir.uwc.ac.za Will check in later again, I just have to try and figure out a decent way of generating XSD for complexTypes generically... --Paul All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "phpsoa" group.
To post to this group, send email to phpsoa-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to phpsoa-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at http://groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---

Attachment (tattodecastro.vcf): text/x-vcard, 208 bytes
Paul Scott | 13 Nov 2007 13:59
Picon
Gravatar

Re: Error in Web Services Description Language Tool


On Tue, 2007-11-13 at 10:50 -0200, Tatto de Castro wrote:
>     Paul Scott, the problem happens with your wsdl too (error message
> follows below).
> 

If I am not mistaken, the nameSpace is (one) of the problems there. I
need to fully qualify that at least before you try again. Thanks Tatto,
appreciate the feedback. We will certainly need to help each other out
here!

--Paul
--

-- 
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

simonslaws | 14 Nov 2007 13:44

Re: How can I access a property containing a hyphen (i.e. "portfolio-id")


On 9 Nov, 21:21, simonsl...@... wrote:
> On 9 Nov, 20:16, Harm Bandstra <hbands...@...> wrote:
>
>
>
> > Hello All,
>
> > I'm not sure if this is the right place for my question, but here
> > goes...
>
> > I have an XSD file with properties containing hyphens. I can't get it
> > to accept any changes to the properties. In part this is because php
> > doesn't accept hypens in variable names, but I found that "Simple-XML"
> > uses some sort of work around. I have the following php code:
>
> > ===
>
> > $xmldas = SDO_DAS_XML::create('xsd/pre_qual_wso.xsd');
> > $messagebody = $xmldas->createDataObject('','MessagebodyType');
>
> > // This gives a syntax error (duh)
> > $messagebody->portfolio-id     = 'BST';
>
> > // These 2 give the following error:
> > // Problem creating an XML document: DataObjectImpl::setSDOValue -
> > path not found:
> > $messagebody['portfolio-id']   = 'BST';
> > $messagebody[0]                = 'BST';
>
> > // This is the way it's done in simple-xml, but also doesn't work
> > $messagebody->{'portfolio-id'} = 'BST';
>
> > ===
>
> > Can it be done? Any help will be appreciated.
>
> > Kind regards,
>
> > Harm Bandstra
>
> Hi Harm
>
> Yep,  you found the right place to ask the question. I don't know the
> answer off the top of my head and I'm in the middle of rebuilding my
> PHP environment today so I'll take a look when I get it sorted. Sorry
> about the slight delay. I'll get back to you shortly.
>
> In the mean tim, if anyone else knows the answer feel free to jump
> in:-)
>
> Regards
>
> Simon

Hi Harm

Sorry this took me a while to get to. Have just managed to get my dev
environment up on my new machine following the demise of my old one.
The reason that this is failing is that the Tuscany SDO implementation
that we rely on for SDO support doesn't recognize the "-" character as
a valid character in a name. I think that it should in as much that it
is a valid name character [1]. Can you raise a bug report on this and
I'll log it in Tuscany and make a change. I can make the change
locally on PECL in the first instance. If people have doubts about
this then let me know.

Thanks

Simon


Gmane