You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by keith chapman <ke...@gmail.com> on 2009/04/01 19:02:19 UTC

Re: AxisFault namespace mismatch require

The exception says it all... The server expects your request to be in the
http://hello.axis2.com/xsd namespace but your request was in the
http://hello.axis2.com <http://hello.axis2.com/xsd> namespace. If you fix
this it would work.

BTW how did you write your client? If you used wsdl2Java to generate a stub
it would have handled this namespace issue.

Thanks,
Keith.

On Wed, Apr 1, 2009 at 1:56 AM, bandrm <ra...@gmail.com> wrote:

>
> Hello,
>
> I developed a simple web service using predominantly ant build script. The
> web service is deployed in tomcat and it is working fine. I have generated
> wsdl using using ant tool (Class org.apache.axis2.tool.ant.Java2WSDLTask).
>
> I developed client and consumed this wsdl. Now, when I execute the client
> program, I get the following exception. This might be elementary, but would
> like to get it resolved.
>
> 485 ERROR org.apache.axis2.rpc.receivers.RPCMessageReceiver - Exception
> occurred while trying to invoke service method sayHello
> org.apache.axis2.AxisFault: namespace mismatch require
> http://hello.axis2.com/xsd found http://hello.axis2.com at
>
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:103)
> at
>
> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:39)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:144) at
>
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:279)
> at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:116)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
> at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
> at
>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> at
>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
> at
>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> at
>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
> at
>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
> at
>
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
> at
>
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
> at
>
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
> at
>
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
> at java.lang.Thread.run(Unknown Source)
>
>
> --
> View this message in context:
> http://www.nabble.com/AxisFault-namespace-mismatch-require-tp22811514p22811514.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org

Re: AxisFault namespace mismatch require

Posted by bandrm <ra...@gmail.com>.
Thank you for responding, Keith. 

I don't understand why it is resulting in an exception, since I have
generated the wsdl using ant (Class
org.apache.axis2.tool.ant.Java2WSDLTask). There were no changes made to the
wsdl after it was generated by this tool. Please note I didn't use Eclipse
here, everything is worked out using ant build script. 

To develop the client, I have used org.apache.axis2.wsdl.WSDL2Java class in
ant to consume the wsdl generated from the above task. Again, client stub is
generated by the ant build script.

Now, here is an interesting thing. I developed the same web service using
Eclipse as described in this URL 
http://www.eclipse.org/webtools/community/tutorials/BottomUpAxis2WebService/bu_tutorial.html
Eclipse Axis2 Web Service . After the web service was up and running. I
created the client using the same procedure as mentioned in my previous
paragraph. And the result is, it works very fine. 

I compared the files between the two webservices, one using ant and other
eclipse, everything is same between the two web services I developed, like
the services.xml etc. Except, I guess, the way the wsdl is getting
generated. Using ant build script, i am using class
org.apache.axis2.tool.ant.Java2WSDLTask, whereas using Eclipse, eclipse is
generating the wsdl on its own. Now, the client is the same for both web
services, first web service doesn't work, whereas second, using eclipse,
works for this client.

I hope I am making sense.



Keithgchapman wrote:
> 
> The exception says it all... The server expects your request to be in the
> http://hello.axis2.com/xsd namespace but your request was in the
> http://hello.axis2.com <http://hello.axis2.com/xsd> namespace. If you fix
> this it would work.
> 
> BTW how did you write your client? If you used wsdl2Java to generate a
> stub
> it would have handled this namespace issue.
> 
> Thanks,
> Keith.
> 
> On Wed, Apr 1, 2009 at 1:56 AM, bandrm <ra...@gmail.com> wrote:
> 
>>
>> Hello,
>>
>> I developed a simple web service using predominantly ant build script.
>> The
>> web service is deployed in tomcat and it is working fine. I have
>> generated
>> wsdl using using ant tool (Class
>> org.apache.axis2.tool.ant.Java2WSDLTask).
>>
>> I developed client and consumed this wsdl. Now, when I execute the client
>> program, I get the following exception. This might be elementary, but
>> would
>> like to get it resolved.
>>
>> 485 ERROR org.apache.axis2.rpc.receivers.RPCMessageReceiver - Exception
>> occurred while trying to invoke service method sayHello
>> org.apache.axis2.AxisFault: namespace mismatch require
>> http://hello.axis2.com/xsd found http://hello.axis2.com at
>>
>> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:103)
>> at
>>
>> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:39)
>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:144) at
>>
>> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:279)
>> at
>> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:116)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>> at
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>> at
>>
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>> at
>>
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
>> at
>>
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>> at
>>
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>> at
>>
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>> at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
>> at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
>> at
>>
>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
>> at
>>
>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
>> at
>>
>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
>> at
>>
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
>> at java.lang.Thread.run(Unknown Source)
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/AxisFault-namespace-mismatch-require-tp22811514p22811514.html
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
> 
> blog: http://www.keith-chapman.org
> 
> 

-- 
View this message in context: http://www.nabble.com/AxisFault-namespace-mismatch-require-tp22811514p22831885.html
Sent from the Axis - User mailing list archive at Nabble.com.