tags:

views:

194

answers:

1

I'm working with a third-party vendor who unfortunately requires that we set up a SOAP server to handle requests from them. I'm having some trouble finding the best way to go about this. One limitation I'm imposing is that it runs as a mod_perl2 handler. After some searching I've found that the best way may be to use XML::Compile and its SOAP classes but I'm having a tough time wrapping my head around it. Part of the problem is my limited understanding of SOAP and the documentation for most modules seems a bit cryptic to me.

So, can anyone give me some pointers, sample code, anything?

EDIT: we were also given a WSDL file to use, and this was not compatible with SOAP::WSDL ("unsupported global type found in ... Looks like a rpc/literal WSDL, which is not supported by SOAP::WSDL)

EDIT: XML::Compile::SOAP complains "RPC encoded not supported by this version" when using the WSDL with XML::Compile::WSDL11. Can/should I not worry about the WSDL file?

+2  A: 

If you have a limited understanding of SOAP, starting reading about SOAP before you worry about implementing it. There are lots of SOAP tutorials out there. Most of the documentation probably seems cryptic to you because you don't already know SOAP.

It's not that tricky of a process. It's not that different than any other web programming when it comes to the big steps:

  • You get a SOAP request, which is some XML.
  • You pull apart the XML to figure out what to do.
  • You put together some XML to send as a response.
  • You return the response.

XML::Compile will take care of most of the details for you.

Before you start writing your own server, you might consider writing a client for an existing SOAP server just to give yourself some practice.

brian d foy
I've actually looked at XML::Compile::SOAP but still haven't figured out how to tie it all together. Also, I'm wanting to use the WSDL file given to us.
kbosak
Don't start with the code. Start with learning about SOAP. You aren't going to understand the code until then.
brian d foy
I understand the basics of SOAP and the WSDL. I was hoping to get some simple examples or pointers on what modules to use and how to use them.
kbosak
Well, I was just going by what you said in your question.
brian d foy