From: PXL | J. v. D. <ja...@px...> - 2012-04-17 07:19:13
|
Hello, The request (i removed the attachment data and confidential data): Accept: text/xml Accept: multipart/* Content-Length: 22383 Content-Type: Multipart/Related; type="text/xml"; start="<main_envelope>"; boundary="----------=_1334646560-22139-0" SOAPAction: "ubplus:portal#saveEmployeeXmlData" This is a multi-part message in MIME format... ------------=_1334646560-22139-0 Content-Type: text/xml Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Location: /main_envelope Content-ID: <main_envelope> <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><namesp1:saveEmployeeXmlData xmlns:namesp1="ubplus:portal"><id xsi:type="xsd:string">id</id><key xsi:type="xsd:string">key</key><data xsi:type="xsd:string"><medewerker><JobId>8</JobId><TimeStamp>17 april, 2012, 09:09</TimeStamp><Achternaam>Dam</Achternaam><Tussenvoegsel>van</Tussenvoegsel><Naam>Jacob</Naam><Geslacht>Man</Geslacht><Straat>Adres</Straat><Postcode>Postcode</Postcode><Woonplaats>Veenendaal</Woonplaats><Telefoon>Pxl</Telefoon><Mobielenummer>Mobiel</Mobielenummer><Email>ja...@px...</Email><GeboorteDatum>18-03-1989</GeboorteDatum><Opmerking>PXL Test</Opmerking><File>8_Dam_van_Jacob.doc</File></medewerker></data></namesp1:saveEmployeeXmlData></SOAP-ENV:Body></SOAP-ENV:Envelope> ------------=_1334646560-22139-0 Content-Type: application/msword; name="8_Dam_van_Jacob.doc" Content-Disposition: attachment; filename="8_Dam_van_Jacob.doc" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-Mailer: MIME-tools 5.502 (Entity 5.502) Response: SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x101835f0) SOAP::Transport::HTTP::Client::send_receive: HTTP/1.0 500 Internal Server Error Connection: close Date: Tue, 17 Apr 2012 07:09:20 GMT Server: Apache Content-Length: 729 Content-Type: text/xml; charset=ISO-8859-1 Client-Date: Tue, 17 Apr 2012 07:09:20 GMT Client-Peer: 94.126.67.30:443 Client-Response-Num: 1 Client-SSL-Cert-Issuer: /C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO SSL CA Client-SSL-Cert-Subject: /OU=Domain Control Validated/OU=Hosted by Denit Internet Services BV/OU=COMODO SSL Wildcard/CN=*.ubplus.nl Client-SSL-Cipher: DHE-RSA-AES256-SHA Client-SSL-Socket-Class: IO::Socket::SSL Status: 500 Internal Server Error X-Powered-By: PHP/5.2.13 X-SOAP-Server: NuSOAP/0.7.3 (1.1.1.1) <?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body><SOAP-ENV:Fault><faultcode xsi:type="xsd:string">SOAP-ENV:Client</faultcode><faultactor xsi:type="xsd:string"></faultactor><faultstring xsi:type="xsd:string">error in msg parsing: XML error parsing SOAP payload on line 1: Not well-formed (invalid token)</faultstring><detail xsi:type="xsd:string"></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> The code i wrote: my $data_id = SOAP::Data->new(name => 'id', value => 'id')->type('xsd:string'); my $data_key = SOAP::Data->new(name => 'key', value => 'key')->type('xsd:string'); my $data_xml = SOAP::Data->new(name => 'data', value => $xml_content)->type('xsd:string'); my $service = SOAP::Lite ->service('https://mywsdl_file.wsdl'); if ($cgi->param('uploaded_file')) { $service->parts(@parts) ->encoding(undef); } $service->saveEmployeeXmlData($data_id,$data_key,$data_xml); As said in my earlier message: When i remove the Content-Type header in Soap UI the message is posted correctly, but when i add the same headers as in this request it fails. This only happens when i add a attachment! Kind regards, Jacob Op 12 apr. 2012, om 13:00 heeft Thorsten Schöning het volgende geschreven: > Guten Tag PXL | Jacob van Dam, > am Donnerstag, 12. April 2012 um 10:10 schrieben Sie: > >> Is there any way to remove this header? Because this header makes my request fail. > > Please post the exact error you get and some more information about > your SOAP client and server, which SOAP protocols you try to use, > maybe even some code. SOAP::Lite is a widely used library and as such > it's more common that SOAP::Lite does what it should and does it > correctly, which may just not be what you want at all. In this case > it's not done with manipulating some headers, we first need to knwo > what you really want. > > Your problems sounds to me as if you create a request for SOAP with > attachments, in this case the header would be correct, and your > other communication part just can't understand it, in which case you > need to use other SOAP protocols. > > Mit freundlichen Grüßen, > > Thorsten Schöning > > -- > Thorsten Schöning E-Mail:Tho...@AM... > AM-SoFT IT-Systeme http://www.AM-SoFT.de/ > > Telefon.............030-2 1001-310 > Fax...............05151- 9468- 88 > Mobil..............0178-8 9468- 04 > > AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln > AG Hanover HRB 207 694 - Geschäftsführer: Andreas Muchow > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > Soaplite-devel mailing list > Soa...@li... > https://lists.sourceforge.net/lists/listinfo/soaplite-devel |