[jboss-user] [JBossWS] - sample example for sending /processing axml file in webserv

kiran22 do-not-reply at jboss.com
Wed Jul 26 14:57:01 EDT 2006


Hi,
I am new to web services /xml technologies and using Jboss4.0.4 with jbossws 1.0.0. Following is the requirement I have to develop in two weeks.
1. End Client sends an XML file to a web service 
2. Web service has to accept the xml file and process it - update the database, checks with directory...etc
3. return the response in xml.

I tried to look for some examples but couldn't find complete example. I suggested to my client that document style webservice will serve the purpose .Meanwhile, I was trying to develop sample example but when send I request to SOAP, Jboss is throwinng the exception:

My XML FIle:
<?xml version="1.0" encoding="UTF-8"?> 
<SOAP-ENV:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
  <SOAP-ENV:Body>
   <ns1:echoStringResponse xmlns:ns1="http://user.webservices.abc.com/"> 
    <result xsi:type="xsd:string">Hello!
   </ns1:echoStringResponse> 
  </SOAP-ENV:Body>
 </SOAP-ENV:Envelope>

Exception is:

javax.xml.soap.SOAPException: Unsupported content type: application/x-www-form-urlencoded
        at org.jboss.ws.soap.MessageFactoryImpl.createMessageInternal(MessageFactoryImpl.java:217)
        at org.jboss.ws.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:157)
        at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:215)
        at org.jboss.ws.server.ServiceEndpointServlet.doPost(ServiceEndpointServlet.java:120)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
ava:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
ava:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.ja
va:175)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Htt
p11BaseProtocol.java:664)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
        at java.lang.Thread.run(Thread.java:534)
14:05:44,140 ERROR [SOAPFaultExceptionHelper] Error creating SOAPFault message
org.jboss.ws.WSException: Cannot obtain NamespaceRegistry, because there is no SOAPMessage associate
d with this context
        at org.jboss.ws.soap.SOAPMessageContextImpl.getNamespaceRegistry(SOAPMessageContextImpl.java
:140)
        at org.jboss.ws.soap.SOAPMessageContextImpl.getSerializationContext(SOAPMessageContextImpl.j
ava:130)
        at org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper.toSOAPMessage(SOAPFaultExceptionHelper.java:
223)
        at org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper.exceptionToFaultMessage(SOAPFaultExceptionHe
lper.java:177)
        at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:248)
        at org.jboss.ws.server.ServiceEndpointServlet.doPost(ServiceEndpointServlet.java:120)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717).


If anybody has small example to meet above requirement, pleaes share with me.



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961104#3961104

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961104



More information about the jboss-user mailing list