[Xml-compile] WSDL request and response structure
Bill Moseley
moseley at hank.org
Wed Mar 9 14:45:53 GMT 2011
On Tue, Mar 8, 2011 at 7:45 AM, Mark Overmeer <mark at overmeer.net> wrote:
>
> my $wsdl =3D XML::Compile::WSDL->new(....);
> $wsdl->importDefinitions(...);
> print $wsdl->explain('createPerson', PERL =3D> 'OUTPUT', recurse =3D> 1);
>
It was the recurse option that I was missing. I saw it mentioned in the
docs but didn't understand its use.
> Don't hessitate to ask more details.
>
Thanks Mark. I'm using this with
http://search.cpan.org/~druoso/Catalyst-Controller-SOAP-1.22/ and the two
distributions have been very helpful. I now need to understand the logging
aspect to make sure it fits in with how my Catalyst app logs (which uses
log4perl).
I do have a few questions, but they are a bit outside the scope of this
module.
As I mentioned, I'm using a set of WSDL files that form a standard web
service. Some subset of this API is implemented by many different
organizations and products. I'm also implementing a subset of actions
defined in the WSDL files. What I'm wondering is do I have to create copies
of these WSDL files specific to my service, trim out the bindings (and
portTypes?) that I don't use and update the service address location (URL)
and the soapAction URLs to point to my specific implementation?
I also use the same code for similar services (with different domain names),
so I think it would be helpful if I could use the provided WSDL files as-is
and somehow filter them on-the-fly to change the URLs and filter out what
methods I actually support.
What would you do in this situation? Is there a standard approach?
Also, is there a standard way to announce the location of (and a standard
place to put) the WSDL file for users of our API to find?
Thanks again for everyone that has worked on this module. I should have
stared here, writing code, instead of spending a few odd nights reading WDSL
tutorials ans specs. It's a lot easier to understand WDSL working with code
than reading about it. ;)
And to be honest, I'm not sure I quite get SOAP yet. But, I'm just still
learning. We provide a REST-ful/JSON API and it's really easy to use and
understand. There's no WDSL file to defined the service, but looking at the
WDSL files I have I still have to validate the requests exactly the same way
and, unless I'm missing something, seems like a human needs to code both
ends of the service. For example, the createPerson method mentioned above
does not have required input fields according to the WDSL file, so I still
have to validate. And I'm not quite sure how to return detailed fault data
about, say, an invalid email address.
-- =
Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/xml-compile/attachments/20110309/33=
e61ae1/attachment.htm
More information about the Xml-compile
mailing list