Announcement Announcement Module
Collapse
No announcement yet.
Problem using webservice Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem using webservice

    Good Mornig,
    I'm from Brazil.
    I'd been working with Spring-ws framework and I have a problem with it.
    I'm trying to send a message to webservice, but a I have to add a SoapAction but one class in Java override my information with a defined information and we can't change the test.
    The class that change the test is

    com.sun.xml.internal.messaging.saaj.soap.MessageIm pl
    |-com.sun.xml.internal.messaging.saaj.soap.ver1_2.Me ssage1_2Implmethod SaveChanges (It overrrides the content type)

    Does anyone know how I could change this information?

    thanks,
    Daniel.

    I need to send the message with this content type:
    "Content-Type: application/soap+xml;charset=UTF-8;action="http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico2/nfeStatusServicoNF2"[\r][\n]"

    The message that I'm sending because this problem is:
    DEBUG 2010-12-20 16:41:10,354 [connector.http.0.receiver.4] httpclient.wire.header: >> "POST /nfe-service/services/NfeConsulta2 HTTP/1.1[\r][\n]"
    DEBUG 2010-12-20 16:41:10,355 [connector.http.0.receiver.4] httpclient.wire.header: >> "Accept-Encoding: gzip[\r][\n]"
    DEBUG 2010-12-20 16:41:10,355 [connector.http.0.receiver.4] httpclient.wire.header: >> "Accept: application/soap+xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2[\r][\n]"
    DEBUG 2010-12-20 16:41:10,355 [connector.http.0.receiver.4] httpclient.wire.header: >> "Content-Type: application/soap+xml; charset=utf-8[\r][\n]"
    DEBUG 2010-12-20 16:41:10,355 [connector.http.0.receiver.4] httpclient.wire.header: >> "Content-Length: 528[\r][\n]"
    DEBUG 2010-12-20 16:41:10,355 [connector.http.0.receiver.4] httpclient.wire.header: >> "User-Agent: Jakarta Commons-HttpClient/3.1[\r][\n]"
    DEBUG 2010-12-20 16:41:10,355 [connector.http.0.receiver.4] httpclient.wire.header: >> "Host: nfe.sefaz.pe.gov.br[\r][\n]"
    DEBUG 2010-12-20 16:41:10,355 [connector.http.0.receiver.4] httpclient.wire.header: >> "[\r][\n]"
    DEBUG 2010-12-20 16:41:10,355 [connector.http.0.receiver.4] httpclient.wire.content: >> "<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Header><nfeCabecMsg xmlns="262.00http://www.portalfiscal.inf.br/nfe/wsdl/NfeConsulta2"><cUF>26</cUF><versaoDados>2.00</versaoDados></nfeCabecMsg></env:Header><env:Body><nfeDadosMsg xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/NfeConsulta2"><consSitNFe xmlns="http://www.portalfiscal.inf.br/nfe" versao="2.00"><tpAmb>1</tpAmb><xServ>CONSULTAR</xServ><chNFe>2610120735876100512855001000145058116 8800031</chNFe></consSitNFe></nfeDadosMsg></env:Body></env:Envelope>"
    DEBUG 2010-12-20 16:41:11,633 [connector.http.0.receiver.4] httpclient.wire.header: << "HTTP/1.1 500 Internal Server Error[\r][\n]"
    DEBUG 2010-12-20 16:41:11,633 [connector.http.0.receiver.4] httpclient.wire.header: << "HTTP/1.1 500 Internal Server Error[\r][\n]"
    DEBUG 2010-12-20 16:41:11,633 [connector.http.0.receiver.4] httpclient.wire.header: << "Date: Mon, 20 Dec 2010 18:37:27 GMT[\r][\n]"
    DEBUG 2010-12-20 16:41:11,633 [connector.http.0.receiver.4] httpclient.wire.header: << "Server: IBM_HTTP_Server[\r][\n]"
    DEBUG 2010-12-20 16:41:11,633 [connector.http.0.receiver.4] httpclient.wire.header: << "Connection: close[\r][\n]"
    DEBUG 2010-12-20 16:41:11,633 [connector.http.0.receiver.4] httpclient.wire.header: << "Transfer-Encoding: chunked[\r][\n]"
    DEBUG 2010-12-20 16:41:11,633 [connector.http.0.receiver.4] httpclient.wire.header: << "Content-Type: text/xml; charset=utf-8[\r][\n]"
    DEBUG 2010-12-20 16:41:11,633 [connector.http.0.receiver.4] httpclient.wire.header: << "Content-Language: en-US[\r][\n]"
    DEBUG 2010-12-20 16:41:11,633 [connector.http.0.receiver.4] httpclient.wire.header: << "[\r][\n]"
    DEBUG 2010-12-20 16:41:11,636 [connector.http.0.receiver.4] httpclient.wire.content: << "2"
    DEBUG 2010-12-20 16:41:11,636 [connector.http.0.receiver.4] httpclient.wire.content: << "3"
    DEBUG 2010-12-20 16:41:11,636 [connector.http.0.receiver.4] httpclient.wire.content: << "8"
    DEBUG 2010-12-20 16:41:11,636 [connector.http.0.receiver.4] httpclient.wire.content: << "[\r]"
    DEBUG 2010-12-20 16:41:11,636 [connector.http.0.receiver.4] httpclient.wire.content: << "[\n]"
    DEBUG 2010-12-20 16:41:11,636 [connector.http.0.receiver.4] httpclient.wire.content: << "<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="[\n">http://www.w3.org/2001/XMLSchema-instance">[\n]"
    DEBUG 2010-12-20 16:41:11,636 [connector.http.0.receiver.4] httpclient.wire.content: << " <soapenv:Body>[\n]"
    DEBUG 2010-12-20 16:41:11,637 [connector.http.0.receiver.4] httpclient.wire.content: << "? <soapenv:Fault>[\n]"
    DEBUG 2010-12-20 16:41:11,637 [connector.http.0.receiver.4] httpclient.wire.content: << "?? <faultcode xmlns:ns1="ns1:Client.NoSOAPAction[\n">http://xml.apache.org/axis/">ns1:Client.NoSOAPAction</faultcode>[\n]"
    DEBUG 2010-12-20 16:41:11,637 [connector.http.0.receiver.4] httpclient.wire.content: << "?? <faultstring>no SOAPAction header!</faultstring>[\n]"
    DEBUG 2010-12-20 16:41:11,637 [connector.http.0.receiver.4] httpclient.wire.content: << "?? <detail>[\n]"
    DEBUG 2010-12-20 16:41:11,637 [connector.http.0.receiver.4] httpclient.wire.content: << "??? <ns2:hostname xmlns:ns2="sf002834.sefaz.pe.gov.br[\n">http://xml.apache.org/axis/">sf002834.sefaz.pe.gov.br</ns2:hostname>[\n]"
    DEBUG 2010-12-20 16:41:11,637 [connector.http.0.receiver.4] httpclient.wire.content: << "?? </detail>[\n]"
    DEBUG 2010-12-20 16:41:11,637 [connector.http.0.receiver.4] httpclient.wire.content: << "? </soapenv:Fault>[\n]"
    DEBUG 2010-12-20 16:41:11,637 [connector.http.0.receiver.4] httpclient.wire.content: << " </soapenv:Body>[\n]"
    DEBUG 2010-12-20 16:41:11,637 [connector.http.0.receiver.4] httpclient.wire.content: << "</soapenv:Envelope>"
    DEBUG 2010-12-20 16:41:11,637 [connector.http.0.receiver.4] httpclient.wire.content: << "[\r]"
    DEBUG 2010-12-20 16:41:11,637 [connector.http.0.receiver.4] httpclient.wire.content: << "[\n]"
    DEBUG 2010-12-20 16:41:11,637 [connector.http.0.receiver.4] httpclient.wire.content: << "0"
    DEBUG 2010-12-20 16:41:11,637 [connector.http.0.receiver.4] httpclient.wire.content: << "[\r]"
    DEBUG 2010-12-20 16:41:11,637 [connector.http.0.receiver.4] httpclient.wire.content: << "[\n]"
    DEBUG 2010-12-20 16:41:11,637 [connector.http.0.receiver.4] httpclient.wire.content: << "[\r]"
    DEBUG 2010-12-20 16:41:11,637 [connector.http.0.receiver.4] httpclient.wire.content: << "[\n]"
    DEBUG 2010-12-20 16:41:11,637 [connector.http.0.receiver.4] httpclient.wire.header: << "[\r][\n]"
    20/12/2010 16:41:11 com.sun.xml.internal.messaging.saaj.soap.MessageIm pl init
    SEVERE: SAAJ0533: Cannot create message: incorrect content-type for SOAP version. Got text/xml; charset=utf-8, but expected application/soap+xml
    20/12/2010 16:41:11 com.sun.xml.internal.messaging.saaj.soap.MessageIm pl init
    SEVERE: SAAJ0535: Unable to internalize message
Working...
X