EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Problems "Internal Server Error" WEB Service Response.

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#19335
Posted: 03/08/2012 05:32:16
by Rafael Sochodolosch (Basic support level)
Joined: 03/07/2012
Posts: 6

Good morning I am having difficulties in implementing a web service through consumption of the components and TIEHttpsClient TEIX509CertificateVAlidador.
The problem is, I'm trying to send an xml web service and receive the return data.
I'm using the POST command (url, xmlsaida);
I am not able to receive data from the web service is returning the following error "Internal Server Error".
SoapUI now works correctly.

follows an example of the return via SoapUI.

url:

Xml output.
Quote

<? Xml version = "1.0"?>
<SOAP-ENV: Envelope 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">
<SOAP-ENV:Body>
<OrderServicoExtractRequest Xmlns="urn:empresa.com:CRM7:SIMPSExtractServiceOrder">
<NumSrv Xmlns=""> 1 </ NumSrv>
<NumOrdem Xmlns=""> </ NumOrdem>
<Bloqueio Xmlns=""> </ block>
<DtHrCrFila Xmlns=""> </ DtHrCrFila>
<MessageId Xmlns=""> </ MessageId>
</ OrderServicoExtractRequest>
</ SOAP-ENV: Body>
</ SOAP-ENV: Envelope>

this is the return xml web service
xml input
Quote

<soap:Envelope Xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Header/>
<soap:Body>
<ns0:OrderServicoExtractResponse xmlns:ns0="urn:Whirlpool.com:CRM7:SIMPSExtractServiceOrder">
<Client>
<CodigoInterno> 5500027983 </ CodigoInterno>
<Name> Name </ Name>
<Sobrenome> Martins </ Surname>
<Sexo> 1 </ Gender>
<TelefoneResidencial> 999999 </ HomePhone>
<FlagTelResidencial> X </ FlagTelResidencial>
<Celular1> 123456 </ phones1>
<Rua> Street </ street>
<number> 247 </ Number>
<Complemento> HOUSE </ Supplement>
EXTRA <Referencia1> </ number1>
<Bairro> Neighborhood </ Quarter>
<City> SAO PAULO </ City>
<Cep> 44444-777 </ Zip>
<country> BR </ Country>
<status> ES </ State>
<CPFNaoObrigatorio> X </ CPFNaoObrigatorio>
<MotivoNaoPreencheCPF> X </ MotivoNaoPreencheCPF>
</ Customer>
<Appliance>
<CodigoAppliance> 888888 </ CodigoAppliance>
<CodigoProduto> 12 </ ProductCode>
<DataCompra> 0 </ DataCompra>
<ExtGarantia> 0 </ ExtGarantia>
</ Appliance>
<OrdemServico>
<NumOrdem> 111 </ NumOrdem>
<ClasseOrdem> 1 </ ClasseOrdem>
<CodDefeito1> 1111 </ CodDefeito1>
Technical <CodDiagnostico> </ CodDiagnostico>
<CanalAtendimento> 11 </ CanalAtendimento>
<TempoUso> 6 </ TempoUso>
<SenhaAtendimento> Client </ SenhaAtendimento>
<Consumidor> 3 </ Customer>
<DataOrdemAtual> 201202 </ DataOrdemAtual>
<priority> 1 </ Priority>
<Status>
The <code> </ Code>
<DataHora> 20120208135050 </ DateTime>
</ Status>
</ OrdemServico>
</ Ns0: OrderServicoExtractResponse>
</ SOAP: Body>
</ SOAP: Envelope>


how can I do to get this xml response?

I thank you.


Rafael Sochodolosch
email: rafaelsocho@hotmail.com
skype: socho26
msn: rafaelsocho@hotmail.com
#19336
Posted: 03/08/2012 05:56:14
by Eugene Mayevski (EldoS Corp.)

Obviously you don't setup the HTTP client correctly and the server is confused by what it receives. To tell you how you should setup the client we need to see complete request as sent by some working application (including all HTTP headers). You can use sniffer to capture that request. If it contains confidential data, please post the capture result to HelpDesk.


Sincerely yours
Eugene Mayevski
#19337
Posted: 03/08/2012 06:30:40
by Rafael Sochodolosch (Basic support level)
Joined: 03/07/2012
Posts: 6

log follows Soap UI

Thu Mar 08 08:37:52 EDT 2012: DEBUG: >> "POST HTTP/1.1 [\ r] [\ n] "
Thu Mar 08 08:37:52 EDT 2012: DEBUG: >> "Accept-Encoding: gzip, deflate [\ r] [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: >> "Content-Type: text / xml; charset = UTF-8 [\ r] [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: >> "SOAPAction:" http://sap.com/xi/WebService/soap1.1 "[\ r] [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: >> "User-Agent: Jakarta Commons-HttpClient/3.1 [\ r] [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: >> "Host: zhmscaqe.whirlpool.com: 50201 [\ r] [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: >> "Content-Length: 439 [\ r] [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: >> "[\ r] [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: >> "<? Xml version =" 1.0 "?> [\ N]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: >> "<SOAP-ENV: Envelope 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 "> [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: >> "[0x9] <SOAP-ENV:Body> [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: >> "[0x9] [0x9] <ServicesExtractRequest xmlns="urn:Whrilpool.com:CRM7:SIMPSExtractServices"> [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: >> "[0x9] [0x9] [0x9] <SrvNumber xmlns=""> 24089 </ SrvNumber> [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: >> "[0x9] [0x9] [0x9] <MessageId xmlns=""> </ MessageId> [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: >> "[0x9] [0x9] </ ServicesExtractRequest> [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: >> "[0x9] </ SOAP-ENV: Body> [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: >> "</ SOAP-ENV: Envelope>"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: << "HTTP/1.1 401 Unauthorized [\ r] [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: << "HTTP/1.1 401 Unauthorized [\ r] [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: << "server: SAP NetWeaver Application Server 7.11 / AS Java 7.11 [\ r] [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: << "date: Thu, 08 Mar 2012 11:37:56 GMT [\ r] [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: << "www-authenticate: Basic realm =" XISOAPApps "[\ r] [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: << "connection: close [\ r] [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: << "pragma: no-cache [\ r] [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: << "Content-Type: text / html; charset = ISO-8859-1 [\ r] [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: << "Content-encoding: gzip [\ r] [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: << "set-cookie: * = saplb_ (zhmscaqe_GXQ_02) 23653050, Version = 1, Path = / [\ r] [\ n]"
Thu Mar 08 08:37:52 EDT 2012: DEBUG: << "[\ r] [\ n]"
Thu Mar 08 08:37:53 EDT 2012: DEBUG: >> "POST HTTP/1.1 [\ r] [\ n] "
Thu Mar 08 08:37:53 EDT 2012: DEBUG: >> "Accept-Encoding: gzip, deflate [\ r] [\ n]"
Thu Mar 08 08:37:53 EDT 2012: DEBUG: >> "Content-Type: text / xml; charset = UTF-8 [\ r] [\ n]"
Thu Mar 08 08:37:53 EDT 2012: DEBUG: >> "SOAPAction:" http://sap.com/xi/WebService/soap1.1 "[\ r] [\ n]"
Thu Mar 08 08:37:53 EDT 2012: DEBUG: >> "User-Agent: Jakarta Commons-HttpClient/3.1 [\ r] [\ n]"
Thu Mar 08 08:37:53 EDT 2012: DEBUG: >> "Content-Length: 439 [\ r] [\ n]"
Thu Mar 08 08:37:53 EDT 2012: DEBUG: >> "Authorization: Basic cmZjQHNpbXBzOnVzZXIycmZj [\ r] [\ n]"
Thu Mar 08 08:37:53 EDT 2012: DEBUG: >> "Host: zhmscaqe.whirlpool.com: 50201 [\ r] [\ n]"
Thu Mar 08 08:37:53 EDT 2012: DEBUG: >> "Cookie: $ Version =" 1 "; saplb_ * =" (zhmscaqe_GXQ_02) 23,653,050 ", $ Path =" / "[\ r] [\ n]"
Thu Mar 08 08:37:53 EDT 2012: DEBUG: >> "[\ r] [\ n]"
Thu Mar 08 08:37:53 EDT 2012: DEBUG: >> "<? Xml version =" 1.0 "?> [\ N]"
Thu Mar 08 08:37:53 EDT 2012: DEBUG: >> "<SOAP-ENV: Envelope 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 "> [\ n]"
Thu Mar 08 08:37:53 EDT 2012: DEBUG: >> "[0x9] <SOAP-ENV:Body> [\ n]"
Thu Mar 08 08:37:53 EDT 2012: DEBUG: >> "[0x9] [0x9] <ServicesExtractRequest xmlns="urn:Whrilpool.com:CRM7:SIMPSExtractServices"> [\ n]"
Thu Mar 08 08:37:53 EDT 2012: DEBUG: >> "[0x9] [0x9] [0x9] <SrvNumber xmlns=""> 24089 </ SrvNumber> [\ n]"
Thu Mar 08 08:37:53 EDT 2012: DEBUG: >> "[0x9] [0x9] [0x9] <MessageId xmlns=""> </ MessageId> [\ n]"
Thu Mar 08 08:37:53 EDT 2012: DEBUG: >> "[0x9] [0x9] </ ServicesExtractRequest> [\ n]"
Thu Mar 08 08:37:53 EDT 2012: DEBUG: >> "[0x9] </ SOAP-ENV: Body> [\ n]"
Thu Mar 08 08:37:53 EDT 2012: DEBUG: >> "</ SOAP-ENV: Envelope>"
Thu Mar 08 08:37:54 EDT 2012: DEBUG: << "HTTP/1.1 200 OK [\ r] [\ n]"
Thu Mar 08 08:37:54 EDT 2012: DEBUG: << "HTTP/1.1 200 OK [\ r] [\ n]"
Thu Mar 08 08:37:54 EDT 2012: DEBUG: << "server: SAP NetWeaver Application Server 7.11 / AS Java 7.11 [\ r] [\ n]"
Thu Mar 08 08:37:54 EDT 2012: DEBUG: << "Content-Type: text / xml; charset = utf-8 [\ r] [\ n]"
Thu Mar 08 08:37:54 EDT 2012: DEBUG: << "content-id: <soap-4F57068EDC630132E10080000A11E184@sap.com> [\ r] [\ n]"
Thu Mar 08 08:37:54 EDT 2012: DEBUG: << "Content-length: 354 [\ r] [\ n]"
Thu Mar 08 08:37:54 EDT 2012: DEBUG: << "date: Thu, 08 Mar 2012 11:37:58 GMT [\ r] [\ n]"
Thu Mar 08 08:37:54 EDT 2012: DEBUG: << "Set-Cookie: JSESSIONID = Q41FP3XyfRtsMzaYezk3R8mB4xnyNQG66mgB_SAPOlclMFfGKRWouDDzmVDxETw0, Version = 1, Path = / [\ r] [\ n]"
Thu Mar 08 08:37:54 EDT 2012: DEBUG: << "set-cookie: = JSESSIONMARKID pB0ueAuDH_zFyv_POAMi8JnL-RPryavIdrZbrqaAE, Version = 1, Path = / [\ r] [\ n]"
Thu Mar 08 08:37:54 EDT 2012: DEBUG: << "[\ r] [\ n]"
Thu Mar 08 08:37:54 EDT 2012: DEBUG: << "<SOAP: Envelope data to be returned there at the moment. </ message> </ Messages> </ ns0: ServicesExtractResponse> </ SOAP: Body> </ SOAP: Envelope> "


sending xml
<? Xml version = "1.0"?>
<SOAP-ENV: Envelope 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">
<SOAP-ENV:Body>
<ServicesExtractRequest Xmlns="urn:Whrilpool.com:CRM7:SIMPSExtractServices">
<SrvNumber Xmlns=""> 24089 </ SrvNumber>
<MessageId Xmlns=""> </ MessageId>
</ ServicesExtractRequest>
</ SOAP-ENV: Body>
</ SOAP-ENV: Envelope>


Rafael Sochodolosch
email: rafaelsocho@hotmail.com
skype: socho26
msn: rafaelsocho@hotmail.com
#19338
Posted: 03/08/2012 06:31:12
by Rafael Sochodolosch (Basic support level)
Joined: 03/07/2012
Posts: 6

url - https://zhmscaqe.whirlpool.com:50201/XISOAPAdapter/MessageServlet?channel=SIMPS:SIMPSSOAPConnection:SOAPSenderServicesExtract&version=3.0&Sender.Party=http://sap.com/xi/XI:XIParty:SIMPS&Sender.Service=SIMPSSOAPConnection&Interface=urn:Whrilpool.com:CRM7:SIMPSExtractServices^ServicesExtract_Sync_Out


Rafael Sochodolosch
email: rafaelsocho@hotmail.com
skype: socho26
msn: rafaelsocho@hotmail.com
#19340
Posted: 03/08/2012 06:52:06
by Eugene Mayevski (EldoS Corp.)

Thank you for the log. I see two things which you probably omited:

1) authentication - you need to set HTTP username and password via RequestParameters property
2) custom header ("SOAPAction") . The header can be added in OnPreparedHeaders event handler. Add the line "SOAPAction: http://sap.com/xi/WebService/soap1.1" (without quotes) to the headers StringList.

Also it is possible that you need to send a cookie with the request, but that's the next step to check.


Sincerely yours
Eugene Mayevski
#19343
Posted: 03/08/2012 07:23:45
by Rafael Sochodolosch (Basic support level)
Joined: 03/07/2012
Posts: 6

put the good SoapAction.
this further by giving the following error "error connection (10060)"
what is this?


Rafael Sochodolosch
email: rafaelsocho@hotmail.com
skype: socho26
msn: rafaelsocho@hotmail.com
#19345
Posted: 03/08/2012 07:46:40
by Eugene Mayevski (EldoS Corp.)

10060 stands for Timeout error, which means that connection could not be established (or response could not be obtained) within specified timeout period.

Unfortunately there's no method to check if connection has been established (and data transfer time expired) or connection operation itself has expired.
So please check if OnHeadersReceived event is called. If it is, then connection has been established. Also check if there's any content in OutputStream after calling the method. This will tell us if data arrives.


Sincerely yours
Eugene Mayevski
#19348
Posted: 03/08/2012 07:53:38
by Rafael Sochodolosch (Basic support level)
Joined: 03/07/2012
Posts: 6

not find any of the two methods here in example source httpstest.
how to configure this information?


Rafael Sochodolosch
email: rafaelsocho@hotmail.com
skype: socho26
msn: rafaelsocho@hotmail.com
#19350
Posted: 03/08/2012 07:59:25
by Rafael Sochodolosch (Basic support level)
Joined: 03/07/2012
Posts: 6

nos arquivos demo nao tem o SBSimpleSSL.pas ?


Rafael Sochodolosch
email: rafaelsocho@hotmail.com
skype: socho26
msn: rafaelsocho@hotmail.com
#19352
Posted: 03/08/2012 08:17:31
by Eugene Mayevski (EldoS Corp.)

These are not methods. OnHeadersPrepared is an event and OutputStream is a property. Also, please use English in the forum


Sincerely yours
Eugene Mayevski
Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.

Reply

Statistics

Topic viewed 3321 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!