Discussion:
Explicitly specifying type of xsd:anyType in soap request
Charlie
2008-06-18 18:54:36 UTC
Permalink
I am using a wsdl that has a xsd:anyType parameter in a method call.
The resulting SOAP request generates xml that looks like this:

<tns2:mValue>testing</tns2:mValue>

I need someway to make it output this instead:

<tns2:mValue xsi:type="xsd:string">13.219</tns2:mValue>

How can I inject an attribute or specify a type in this situation?

Here is a code snippet.

$metadata = $constraint->createDataObject('mMetadata');
$metadata->mName = 'Name';
$metadata->mID = $nameSMDD->mID;
$metadata->mValue = 'testing';
// $mValue = $metadata->createDataObject('mValue'); // this call
works, but can't do much with it

Thanks,
Charlie
Charlie Moad
2008-06-20 00:38:04 UTC
Permalink
Trying again. Is there anyway at all to manipulate the outgoing xml of the
soap request?
Thanks,
Charlie
Post by Charlie
I am using a wsdl that has a xsd:anyType parameter in a method call.
<tns2:mValue>testing</tns2:mValue>
<tns2:mValue xsi:type="xsd:string">13.219</tns2:mValue>
How can I inject an attribute or specify a type in this situation?
Here is a code snippet.
$metadata = $constraint->createDataObject('mMetadata');
$metadata->mName = 'Name';
$metadata->mID = $nameSMDD->mID;
$metadata->mValue = 'testing';
// $mValue = $metadata->createDataObject('mValue'); // this call
works, but can't do much with it
Thanks,
Charlie
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "phpsoa" group.
To post to this group, send email to phpsoa-/***@public.gmane.org
To unsubscribe from this group, send email to phpsoa-unsubscribe-/***@public.gmane.org
For more options, visit this group at http://groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---
Matthew Peters
2008-06-23 10:35:09 UTC
Permalink
Hi Charlie,
There is no way to alter the xml that gets generated; this is done in
the C code inside the php_sdo extension. However, it might be that it
is not working properly, and that it should be generating the
xsi:type's - if so, we should fix it. It would help if you could point
us at the wsdl you are using???

Matthew
Post by Charlie Moad
Trying again. Is there anyway at all to manipulate the outgoing xml of the
soap request?
Thanks,
Charlie
Post by Charlie
I am using a wsdl that has a xsd:anyType parameter in a method call.
<tns2:mValue>testing</tns2:mValue>
<tns2:mValue xsi:type="xsd:string">13.219</tns2:mValue>
How can I inject an attribute or specify a type in this situation?
Here is a code snippet.
$metadata = $constraint->createDataObject('mMetadata');
$metadata->mName = 'Name';
$metadata->mID = $nameSMDD->mID;
$metadata->mValue = 'testing';
// $mValue = $metadata->createDataObject('mValue'); // this call
works, but can't do much with it
Thanks,
Charlie
Charlie Moad
2008-06-23 12:45:34 UTC
Permalink
Attached. The anyType is on the MBMetadata type.

Thanks,
- Charlie

On Mon, Jun 23, 2008 at 6:35 AM, Matthew Peters <
Post by Matthew Peters
Hi Charlie,
There is no way to alter the xml that gets generated; this is done in
the C code inside the php_sdo extension. However, it might be that it
is not working properly, and that it should be generating the
xsi:type's - if so, we should fix it. It would help if you could point
us at the wsdl you are using???
Matthew
Post by Charlie Moad
Trying again. Is there anyway at all to manipulate the outgoing xml of
the
Post by Charlie Moad
soap request?
Thanks,
Charlie
Post by Charlie
I am using a wsdl that has a xsd:anyType parameter in a method call.
<tns2:mValue>testing</tns2:mValue>
<tns2:mValue xsi:type="xsd:string">13.219</tns2:mValue>
How can I inject an attribute or specify a type in this situation?
Here is a code snippet.
$metadata = $constraint->createDataObject('mMetadata');
$metadata->mName = 'Name';
$metadata->mID = $nameSMDD->mID;
$metadata->mValue = 'testing';
// $mValue = $metadata->createDataObject('mValue'); // this call
works, but can't do much with it
Thanks,
Charlie
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "phpsoa" group.
To post to this group, send email to phpsoa-/***@public.gmane.org
To unsubscribe from this group, send email to phpsoa-unsubscribe-/***@public.gmane.org
For more options, visit this group at http://groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---
Matthew Peters
2008-06-24 09:25:41 UTC
Permalink
Hi Charlie, thanks, I see the type you mean. I have passed it on to
someone who knows how the xml serialisation works inside the sdo
extension. I'll get back to you.

Matthew
Post by Charlie Moad
Attached. The anyType is on the MBMetadata type.
Thanks,
- Charlie
On Mon, Jun 23, 2008 at 6:35 AM, Matthew Peters <
Post by Matthew Peters
Hi Charlie,
There is no way to alter the xml that gets generated; this is done in
the C code inside the php_sdo extension. However, it might be that it
is not working properly, and that it should be generating the
xsi:type's - if so, we should fix it. It would help if you could point
us at the wsdl you are using???
Matthew
Post by Charlie Moad
Trying again. Is there anyway at all to manipulate the outgoing xml of
the
Post by Charlie Moad
soap request?
Thanks,
Charlie
Post by Charlie
I am using a wsdl that has a xsd:anyType parameter in a method call.
<tns2:mValue>testing</tns2:mValue>
<tns2:mValue xsi:type="xsd:string">13.219</tns2:mValue>
How can I inject an attribute or specify a type in this situation?
Here is a code snippet.
$metadata = $constraint->createDataObject('mMetadata');
$metadata->mName = 'Name';
$metadata->mID = $nameSMDD->mID;
$metadata->mValue = 'testing';
// $mValue = $metadata->createDataObject('mValue'); // this call
works, but can't do much with it
Thanks,
Charlie
mediabin.wsdl
419KDownload
Charlie Moad
2008-06-24 12:56:30 UTC
Permalink
Thanks for looking into this. I just did some testing with the php soap
extension and specifying the type as "xsd:string" on the anyType argument
indeed fixes my problem. It would be great to somehow specify the type of
the anyType. Just trying to infer the type might not be powerful enough to
detect complex types.

Thanks,
Charlie

On Tue, Jun 24, 2008 at 5:25 AM, Matthew Peters <
Post by Matthew Peters
Hi Charlie, thanks, I see the type you mean. I have passed it on to
someone who knows how the xml serialisation works inside the sdo
extension. I'll get back to you.
Matthew
Post by Charlie Moad
Attached. The anyType is on the MBMetadata type.
Thanks,
- Charlie
On Mon, Jun 23, 2008 at 6:35 AM, Matthew Peters <
Post by Matthew Peters
Hi Charlie,
There is no way to alter the xml that gets generated; this is done in
the C code inside the php_sdo extension. However, it might be that it
is not working properly, and that it should be generating the
xsi:type's - if so, we should fix it. It would help if you could point
us at the wsdl you are using???
Matthew
Post by Charlie Moad
Trying again. Is there anyway at all to manipulate the outgoing xml
of
Post by Charlie Moad
Post by Matthew Peters
the
Post by Charlie Moad
soap request?
Thanks,
Charlie
Post by Charlie
I am using a wsdl that has a xsd:anyType parameter in a method
call.
Post by Charlie Moad
Post by Matthew Peters
Post by Charlie Moad
Post by Charlie
<tns2:mValue>testing</tns2:mValue>
<tns2:mValue xsi:type="xsd:string">13.219</tns2:mValue>
How can I inject an attribute or specify a type in this situation?
Here is a code snippet.
$metadata = $constraint->createDataObject('mMetadata');
$metadata->mName = 'Name';
$metadata->mID = $nameSMDD->mID;
$metadata->mValue = 'testing';
// $mValue = $metadata->createDataObject('mValue'); // this call
works, but can't do much with it
Thanks,
Charlie
mediabin.wsdl
419KDownload
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "phpsoa" group.
To post to this group, send email to phpsoa-/***@public.gmane.org
To unsubscribe from this group, send email to phpsoa-unsubscribe-/***@public.gmane.org
For more options, visit this group at http://groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---
Matthew Peters
2008-07-01 13:37:29 UTC
Permalink
Hi Charlie, just to say that I am sorry to say that the person who is
looking into this is busy elesewhere right now so although I expect
him to get to it in time, right now it's on hold. Just thought I ought
to let you know. We do agree it needs fixing though.

Matthew
Post by Charlie Moad
Thanks for looking into this. I just did some testing with the php soap
extension and specifying the type as "xsd:string" on the anyType argument
indeed fixes my problem. It would be great to somehow specify the type of
the anyType. Just trying to infer the type might not be powerful enough to
detect complex types.
Loading...