You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by "Gupta, Rakesh" <Ra...@sigma-systems.com> on 2004/09/02 08:27:38 UTC
500 Internal Server error
I am using AXIS C++ client ( for the SOAP implementation ) to communicate
with the web services deployed with axis on tomcat. However, when I try to
send a SOAP request I get the following soap fault at the client side.
Transport:init() successfull
Got the message:^M
^M
HTTP/1.1 500 Internal Server Error^M
Content-Type: text/xml;charset=utf-8^M
Transfer-Encoding: chunked^M
Date: Wed, 01 Sep 2004 15:02:44 GMT^M
Server: Apache-Coyote/1.1^M
Connection: close^M
^M
1f5^M
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/
<http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="
http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> "
xmlns:xsi=" http://w <http://w>
ww.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>org.xml.sax.SAXException: Bad types (class java.lang.String
-> class ABC.ServiceId)</faultstring>
<detail/>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>^M
0^M
^M
> std::string GetChunkedPayLoad(Channel* channel, const std::string&
payload)^M
Payload:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/
<http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="
http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> "
xmlns:xsi=" http://w <http://w>
ww.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>org.xml.sax.SAXException: Bad types (class java.lang.String
-> class ABC.ServiceId)</faultstring>
<detail/>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
My request body looks like this :
<ServiceId xsi:type="xsd:string">abc</ServiceId>
<OperatorId xsi:type="xsd:string">xyz</OperatorId>
Also, the server (tomcat) logs show the following messages :
- Generating fault class
AxisFault
faultCode: { http://xml.apache.org/axis/ <http://xml.apache.org/axis/>
}Client.NoSOAPAction
faultSubcode:
faultString: no SOAPAction header!
faultActor:
faultNode:
faultDetail:
{ http://xml.apache.org/axis/ <http://xml.apache.org/axis/>
}stackTrace: AxisFault
faultCode: { http://xml.apache.org/axis/ <http://xml.apache.org/axis/>
}Client.NoSOAPAction
faultSubcode:
faultString: no SOAPAction header!
faultActor:
faultNode:
faultDetail:
no SOAPAction header!
at
org.apache.axis.transport.http.AxisServlet.getSoapAction(AxisServlet.java:11
21)
at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:835)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:
339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
Valve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137
)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118
)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:683)
at java.lang.Thread.run(Unknown Source)
The call that I make for setting the SOAP action header is
"m_pCall->setTransportProperty(SOAPACTION_HEADER , "");". The second
argument in this call has blank value since my WSDL does not specify any
soapAction for the service ( snapshot of WSDL : <wsdlsoap:operation
soapAction="" /> ).
Is it mandatory to specify a value for the SOAPACTION_HEADER ? Or is there
something wrong with the request ? And why do I get a
"org.xml.sax.SAXException: Bad types" exception ? What exactly could be the
problem?
Re: 500 Internal Server error
Posted by Samisa Abeysinghe <sa...@yahoo.com>.
Looking at the exception it looks like for Axis Java SOAPAction is mandatory. (need to ask form
Axis Java folks)
Please try giving value for SOAP action in m_pCall->setTransportProperty(SOAPACTION_HEADER , "");
In case you have a java client for this service, you could use tcpmon (Axis java tool) to monitor
the SOAP action sent by the Java client and use that in C++ client.
Samisa...
--- "Gupta, Rakesh" <Ra...@sigma-systems.com> wrote:
> I am using AXIS C++ client ( for the SOAP implementation ) to communicate
> with the web services deployed with axis on tomcat. However, when I try to
> send a SOAP request I get the following soap fault at the client side.
>
> Transport:init() successfull
>
> Got the message:^M
> ^M
> HTTP/1.1 500 Internal Server Error^M
> Content-Type: text/xml;charset=utf-8^M
> Transfer-Encoding: chunked^M
> Date: Wed, 01 Sep 2004 15:02:44 GMT^M
> Server: Apache-Coyote/1.1^M
> Connection: close^M
> ^M
> 1f5^M
> <?xml version="1.0" encoding="UTF-8"?>
> <soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/
> <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="
> http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> "
> xmlns:xsi=" http://w <http://w>
> ww.w3.org/2001/XMLSchema-instance">
> <soapenv:Body>
> <soapenv:Fault>
> <faultcode>soapenv:Server.userException</faultcode>
> <faultstring>org.xml.sax.SAXException: Bad types (class java.lang.String
> -> class ABC.ServiceId)</faultstring>
> <detail/>
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>^M
> 0^M
> ^M
>
>
> > std::string GetChunkedPayLoad(Channel* channel, const std::string&
> payload)^M
> Payload:
> <?xml version="1.0" encoding="UTF-8"?>
> <soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/
> <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="
> http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> "
> xmlns:xsi=" http://w <http://w>
> ww.w3.org/2001/XMLSchema-instance">
> <soapenv:Body>
> <soapenv:Fault>
> <faultcode>soapenv:Server.userException</faultcode>
> <faultstring>org.xml.sax.SAXException: Bad types (class java.lang.String
> -> class ABC.ServiceId)</faultstring>
> <detail/>
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
>
> My request body looks like this :
>
> <ServiceId xsi:type="xsd:string">abc</ServiceId>
> <OperatorId xsi:type="xsd:string">xyz</OperatorId>
>
> Also, the server (tomcat) logs show the following messages :
>
> - Generating fault class
> AxisFault
> faultCode: { http://xml.apache.org/axis/ <http://xml.apache.org/axis/>
> }Client.NoSOAPAction
> faultSubcode:
> faultString: no SOAPAction header!
> faultActor:
> faultNode:
> faultDetail:
> { http://xml.apache.org/axis/ <http://xml.apache.org/axis/>
> }stackTrace: AxisFault
> faultCode: { http://xml.apache.org/axis/ <http://xml.apache.org/axis/>
> }Client.NoSOAPAction
> faultSubcode:
> faultString: no SOAPAction header!
> faultActor:
> faultNode:
> faultDetail:
>
> no SOAPAction header!
> at
> org.apache.axis.transport.http.AxisServlet.getSoapAction(AxisServlet.java:11
> 21)
> at
> org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:835)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
> at
> org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:
> 339)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:237)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:157)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:214)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
> t.java:104)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> at
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
> Valve.java:198)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> va:152)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
> t.java:104)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137
> )
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
> t.java:104)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118
> )
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
> t.java:102)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> :109)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
> t.java:104)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> at
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
> ction(Http11Protocol.java:705)
> at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> a:683)
> at java.lang.Thread.run(Unknown Source)
>
> The call that I make for setting the SOAP action header is
> "m_pCall->setTransportProperty(SOAPACTION_HEADER , "");". The second
> argument in this call has blank value since my WSDL does not specify any
> soapAction for the service ( snapshot of WSDL : <wsdlsoap:operation
> soapAction="" /> ).
> Is it mandatory to specify a value for the SOAPACTION_HEADER ? Or is there
> something wrong with the request ? And why do I get a
> "org.xml.sax.SAXException: Bad types" exception ? What exactly could be the
> problem?
>
>
>
>
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush