whats the point of soap

Tue, Apr 28, 2009

My poor head. The day before yesterday it was Java. Yesterday it was Java and C++. Today it’s C++, Java and Ruby! But today’s language soup is down to SOAP and its evil sidekick WSDL. It’s great when it works. You can just run Axis2 over the WSDL to generate your beans and off you go but today I have a major headache with the library system at $WORK. I’m looking into plumbing it in to the account creation system and it has a nice SOAP interface, which doesn’t conform to WS-I. It uses RPC/Encoded. That’s ok as Axis2 supports it now but the WSDL itself is “broken”:

[java] Caused by: org.apache.axis2.AxisFault: Part ‘fault’ of fault message
must be defined with ‘element=QName’ and not ‘type=QName’
so that’s Axis2 out. Let’s rummage in the lingo-box and see what else I can program in. Ruby! and there’s a SOAP client too. So a quickie install:
gem install soap4r –include-dependencies
and a quick ‘n dirty test:
require ‘soap/wsdlDriver’
wsdl = ‘http://server.com/services?wsdl'
driver = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
and hey presto, it doesn’t work in 1.9:
gems/soap4r-1.5.8/lib/xsd/charset.rb:137:in `initialize’: invalid multibyte escape:
/\A(?:[\x9\xa\xd\x20-\x7F]|(?:[\x8E\xA1-\xFE][\xA1-\xFE])|(?:\x8F[\xA1-\xFE][\xA1-\xFE]))*\z/ (RegexpError)
OK, ok, so the open source ones don’t work. What about C#?
wsdl /l:cs /protocol:SOAP http://server.com/services?wsdl
Warning: This web reference does not conform to WS-I Basic Profile v1.1.
R2706: A wsdl:binding in a DESCRIPTION MUST use the value of “literal” for the
use attribute in all soapbind:body, soapbind:fault, soapbind:header and
soapbind:headerfault elements.
the .NET SDK recognises it’s a bum WSDL but generates the client class anyway.

so whither noo I say? whither indeed! Considering it’s going to run on a Windows box perhaps I’ll explore the C# route and collect another addition to the lingo-box along the way.

comments powered by Disqus