I've been trying to use SOAPpy and ZSI (with and without the use of wsdl2py) to communicate with a SOAP server (looks like it's a WebLogic server(?) in front of some enterprise java bean) and not having much luck. I got them to send me an example of what the bytes on the wire are supposed to look like (attached below), and I got it to "work" by going lo-tech:
cn = httplib.HTTPSConnection('test.xx.no',443) cn.putrequest("POST", "/service/url") cn.putheader("Host", "test.xx.no") cn.putheader("Content-type", 'text/xml; charset="UTF-8"') cn.putheader("Content-length", "%d" % len(soap_message)) cn.putheader("SOAPAction", '""') cn.endheaders() cn.send(soap_message) Is there a better way to do this? Can it be done with any of the Python SOAP libraries? Bjorn soap message follows: <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <Header xmlns="http://schemas.xmlsoap.org/soap/envelope/" /> <env:Body> <submitMessage xmlns="http://no/brreg/BReMS/WebService/services"> <cpaid>y111</cpaid> <securityKey>y222</securityKey> <message><![CDATA[<?xml version='1.0' encoding='ISO-8859-1'?> <SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> <SOAP:Header xmlns:eb='http://www.oasis-open.org/committees/ebxml-msg/ schema/msg-header-2_0.xsd'> <eb:MessageHeader eb:id='1' eb:version='2.0' SOAP:mustUnderstand='1'> <eb:From> <eb:PartyId eb:type='orgnr-submitter'>x111</eb:PartyId> <eb:PartyId eb:type='orgnr-caseworker'>x222</eb:PartyId> <eb:Role>Submitter</eb:Role> </eb:From> <eb:To> <eb:PartyId eb:type='orgnr-registrator'>x111</eb:PartyId> <eb:Role>Registrator</eb:Role> </eb:To> <eb:CPAId>y111</eb:CPAId> <eb:ConversationId>ccd6dc26-836f-4768-8d28-5d46a872b9e8</ eb:ConversationId> <eb:Service eb:type='lockup'>x444</eb:Service> <eb:Action>appendMessage</eb:Action> <eb:MessageData> <eb:MessageId>ccd6dc26-836f-4768-8d28-5d46a872b9e8</eb:MessageId> <eb:Timestamp>23.09.2006</eb:Timestamp> </eb:MessageData> <eb:Description xml:lang='no'></eb:Description> </eb:MessageHeader> </SOAP:Header> <SOAP:Body> <LegacyData> <JegerproveInn xsi:noNamespaceSchemaLocation="JegerproveInn.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Arrangor> <ArrangorId>3</ArrangorId> <ArrangorNavn> <Navn1>BBB</Navn1> <Navn5></Navn5> </ArrangorNavn> <PersonNavn> <Fornavn>CCC</Fornavn> <Etternavn>DDD</Etternavn> </PersonNavn> <Kommunenr>9999</Kommunenr> <Telefon>12345678</Telefon> <Epost>[EMAIL PROTECTED]</Epost> </Arrangor> </JegerproveInn></LegacyData></SOAP:Body></SOAP:Envelope>]]> </message> </submitMessage> </env:Body> </env:Envelope> -- http://mail.python.org/mailman/listinfo/python-list